Skip to content

Commit

Permalink
Merge pull request Baystation12#14515 from PsiOmegaDelta/161102-Weldi…
Browse files Browse the repository at this point in the history
…ngMasks

New welding masks.
  • Loading branch information
comma authored Nov 3, 2016
2 parents 70fe45c + caff458 commit b374766
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code/_helpers/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,19 @@ proc/dd_sortedTextList(list/incoming)
if(istype(entry, type))
. += entry


/proc/group_by(var/list/group_list, var/key, var/value)
var/values = group_list[key]
if(!values)
values = list()
group_list[key] = values

values += value

/proc/assoc_by_proc(var/list/plain_list, var/get_initial_value)
. = list()
for(var/entry in plain_list)
.[call(get_initial_value)(entry)] = entry

/proc/get_initial_name(var/atom/atom_type)
var/atom/A = atom_type
return initial(A.name)
14 changes: 14 additions & 0 deletions code/modules/client/preference_setup/loadout/loadout_head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,17 @@
display_name = "turban"
path = /obj/item/clothing/head/turban
flags = GEAR_HAS_COLOR_SELECTION

/datum/gear/head/welding
display_name = "welding mask selection"
path = /obj/item/clothing/head/welding
allowed_roles = list("Roboticist","Station Engineer","Atmospheric Technician","Chief Engineer")

/datum/gear/head/welding/New()
..()
var/welding_masks = list()
welding_masks += /obj/item/clothing/head/welding/demon
welding_masks += /obj/item/clothing/head/welding/engie
welding_masks += /obj/item/clothing/head/welding/fancy
welding_masks += /obj/item/clothing/head/welding/knight
gear_tweaks += new/datum/gear_tweak/path(assoc_by_proc(welding_masks, /proc/get_initial_name))
31 changes: 31 additions & 0 deletions code/modules/clothing/head/misc_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,37 @@
update_clothing_icon() //so our mob-overlays
usr.update_action_buttons()

/obj/item/clothing/head/welding/demon
name = "demonic welding helmet"
desc = "A painted welding helmet, this one has a demonic face on it."
icon_state = "demonwelding"
item_state_slots = list(
slot_l_hand_str = "demonwelding",
slot_r_hand_str = "demonwelding",
)

/obj/item/clothing/head/welding/knight
name = "knightly welding helmet"
desc = "A painted welding helmet, this one looks like a knights helmet."
icon_state = "knightwelding"

/obj/item/clothing/head/welding/fancy
name = "fancy welding helmet"
desc = "A painted welding helmet, the black and gold make this one look very fancy."
icon_state = "fancywelding"
item_state_slots = list(
slot_l_hand_str = "fancywelding",
slot_r_hand_str = "fancywelding",
)

/obj/item/clothing/head/welding/engie
name = "engineering welding helmet"
desc = "A painted welding helmet, this one has been painted the engineering colours."
icon_state = "engiewelding"
item_state_slots = list(
slot_l_hand_str = "engiewelding",
slot_r_hand_str = "engiewelding",
)

/*
* Cakehat
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/PsiOmegaDelta-Weld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: ColaFiend
delete-after: True
changes:
- rscadd: "Added new welding masks available in the gear loadout for engineers and roboticists."
Binary file modified icons/mob/head.dmi
Binary file not shown.
Binary file modified icons/mob/items/lefthand_hats.dmi
Binary file not shown.
Binary file modified icons/mob/items/righthand_hats.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/hats.dmi
Binary file not shown.

0 comments on commit b374766

Please sign in to comment.