mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Return of the neck slot! (#27188)
* this turned out to be wayyyy more than just a test * remove bedsheet icons from back.dmi * hud+better icons * error fixed * fixes a few bedsheet icons * Update code/game/objects/items/weapons/storage/garment.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Signed-off-by: Bm0n <92271472+Bm0n@users.noreply.github.com> * review * spacing * TGUI Bundle Rebuild * TGUI Bundle Rebuild * TGUI Bundle Rebuild * TGUI Bundle Rebuild * lint? * guh * lint * TGUI Bundle Rebuild * test * fix * dead golem fix * TGUI Bundle Rebuild * TGUI Bundle Rebuild * TGUI Bundle Rebuild --------- Signed-off-by: Bm0n <92271472+Bm0n@users.noreply.github.com> Co-authored-by: Bmon <no@email.com> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
@@ -231,6 +231,8 @@
|
||||
items += glasses
|
||||
if(gloves)
|
||||
items += gloves
|
||||
if(neck)
|
||||
items += neck
|
||||
if(shoes)
|
||||
items += shoes
|
||||
if(wear_id)
|
||||
|
||||
@@ -82,6 +82,10 @@
|
||||
"<span class='userdanger'>[user] [muzzle.locked ? "locks" : "unlocks"] [source]'s [muzzle.name].</span>")
|
||||
|
||||
|
||||
/datum/strippable_item/mob_item_slot/neck
|
||||
key = STRIPPABLE_ITEM_NECK
|
||||
item_slot = ITEM_SLOT_NECK
|
||||
|
||||
/datum/strippable_item/mob_item_slot/handcuffs
|
||||
key = STRIPPABLE_ITEM_HANDCUFFS
|
||||
item_slot = ITEM_SLOT_HANDCUFFED
|
||||
|
||||
@@ -184,7 +184,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/getarmor_organ(obj/item/organ/external/def_zone, type)
|
||||
if(!type || !def_zone) return 0
|
||||
var/protection = 0
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id, neck) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
|
||||
for(var/bp in body_parts)
|
||||
if(!bp) continue
|
||||
if(bp && isclothing(bp))
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
var/obj/item/clothing/shoes = null
|
||||
var/obj/item/belt = null
|
||||
var/obj/item/clothing/gloves = null
|
||||
var/obj/item/clothing/neck = null
|
||||
var/obj/item/clothing/glasses = null
|
||||
var/obj/item/l_ear = null
|
||||
var/obj/item/r_ear = null
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
list("[p_are()] holding", l_hand, "in", "left hand"),
|
||||
list("[p_are()] holding", r_hand, "in", "right hand"),
|
||||
list("[p_are()] wearing", head, "on", "head"),
|
||||
list("[p_are()] wearing", neck, "around", "neck"),
|
||||
list("[p_are()] wearing", !skip_jumpsuit && w_uniform, null, null, length(w_uniform?.accessories) && "[english_accessory_list(w_uniform)]"),
|
||||
list("[p_are()] wearing", wear_suit, null, null),
|
||||
list("[p_are()] carrying", !skip_suit_storage && s_store, "on", wear_suit && wear_suit.name),
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
return has_organ("chest")
|
||||
if(ITEM_SLOT_MASK)
|
||||
return has_organ("head")
|
||||
if(ITEM_SLOT_NECK)
|
||||
return has_organ("chest")
|
||||
if(ITEM_SLOT_HANDCUFFED)
|
||||
return has_organ("l_hand") && has_organ("r_hand")
|
||||
if(ITEM_SLOT_LEGCUFFED)
|
||||
@@ -96,6 +98,9 @@
|
||||
else if(I == gloves)
|
||||
gloves = null
|
||||
update_inv_gloves()
|
||||
else if(I == neck)
|
||||
neck = null
|
||||
update_inv_neck()
|
||||
else if(I == glasses)
|
||||
glasses = null
|
||||
var/obj/item/clothing/glasses/G = I
|
||||
@@ -222,6 +227,9 @@
|
||||
wear_mask_update(I, toggle_off = TRUE)
|
||||
update_misc_effects()
|
||||
update_inv_wear_mask()
|
||||
if(ITEM_SLOT_NECK)
|
||||
neck = I
|
||||
update_inv_neck()
|
||||
if(ITEM_SLOT_HANDCUFFED)
|
||||
handcuffed = I
|
||||
update_inv_handcuffed()
|
||||
@@ -356,6 +364,8 @@
|
||||
return back
|
||||
if(ITEM_SLOT_MASK)
|
||||
return wear_mask
|
||||
if(ITEM_SLOT_NECK)
|
||||
return neck
|
||||
if(ITEM_SLOT_HANDCUFFED)
|
||||
return handcuffed
|
||||
if(ITEM_SLOT_LEGCUFFED)
|
||||
|
||||
@@ -353,6 +353,9 @@
|
||||
if(gloves)
|
||||
if(gloves.max_heat_protection_temperature && gloves.max_heat_protection_temperature >= temperature)
|
||||
thermal_protection_flags |= gloves.heat_protection
|
||||
if(neck)
|
||||
if(neck.max_heat_protection_temperature && neck.max_heat_protection_temperature >= temperature)
|
||||
thermal_protection_flags |= neck.heat_protection
|
||||
if(wear_mask)
|
||||
if(wear_mask.max_heat_protection_temperature && wear_mask.max_heat_protection_temperature >= temperature)
|
||||
thermal_protection_flags |= wear_mask.heat_protection
|
||||
@@ -414,6 +417,9 @@
|
||||
if(gloves)
|
||||
if(gloves.min_cold_protection_temperature && gloves.min_cold_protection_temperature <= temperature)
|
||||
thermal_protection_flags |= gloves.cold_protection
|
||||
if(neck)
|
||||
if(neck.min_cold_protection_temperature && neck.min_cold_protection_temperature <= temperature)
|
||||
thermal_protection_flags |= neck.cold_protection
|
||||
if(wear_mask)
|
||||
if(wear_mask.min_cold_protection_temperature && wear_mask.min_cold_protection_temperature <= temperature)
|
||||
thermal_protection_flags |= wear_mask.cold_protection
|
||||
@@ -528,6 +534,8 @@
|
||||
covered |= shoes.body_parts_covered
|
||||
if(gloves)
|
||||
covered |= gloves.body_parts_covered
|
||||
if(neck)
|
||||
covered |= neck.body_parts_covered
|
||||
if(wear_mask)
|
||||
covered |= wear_mask.body_parts_covered
|
||||
|
||||
|
||||
@@ -1111,7 +1111,7 @@
|
||||
if(!(dna.species.bodyflags & HAS_SKIN_TONE))
|
||||
s_tone = 0
|
||||
|
||||
var/list/thing_to_check = list(ITEM_SLOT_MASK, ITEM_SLOT_HEAD, ITEM_SLOT_SHOES, ITEM_SLOT_GLOVES, ITEM_SLOT_LEFT_EAR, ITEM_SLOT_RIGHT_EAR, ITEM_SLOT_EYES, ITEM_SLOT_LEFT_HAND, ITEM_SLOT_RIGHT_HAND)
|
||||
var/list/thing_to_check = list(ITEM_SLOT_MASK, ITEM_SLOT_HEAD, ITEM_SLOT_SHOES, ITEM_SLOT_GLOVES, ITEM_SLOT_LEFT_EAR, ITEM_SLOT_RIGHT_EAR, ITEM_SLOT_EYES, ITEM_SLOT_LEFT_HAND, ITEM_SLOT_RIGHT_HAND, ITEM_SLOT_NECK)
|
||||
var/list/kept_items[0]
|
||||
var/list/item_flags[0]
|
||||
for(var/thing in thing_to_check)
|
||||
|
||||
@@ -5,6 +5,7 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list(
|
||||
/datum/strippable_item/mob_item_slot/head,
|
||||
/datum/strippable_item/mob_item_slot/back,
|
||||
/datum/strippable_item/mob_item_slot/mask,
|
||||
/datum/strippable_item/mob_item_slot/neck,
|
||||
/datum/strippable_item/mob_item_slot/eyes,
|
||||
/datum/strippable_item/mob_item_slot/left_ear,
|
||||
/datum/strippable_item/mob_item_slot/right_ear,
|
||||
|
||||
@@ -539,6 +539,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
update_inv_w_uniform()
|
||||
update_inv_wear_id()
|
||||
update_inv_gloves()
|
||||
update_inv_neck()
|
||||
update_inv_glasses()
|
||||
update_inv_ears()
|
||||
update_inv_shoes()
|
||||
@@ -1059,6 +1060,22 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
apply_overlay(FACEMASK_LAYER)
|
||||
|
||||
/mob/living/carbon/human/update_inv_neck()
|
||||
remove_overlay(NECK_LAYER)
|
||||
if(client && hud_used)
|
||||
var/atom/movable/screen/inventory/inv = hud_used.inv_slots[ITEM_SLOT_2_INDEX(ITEM_SLOT_NECK)]
|
||||
if(inv)
|
||||
inv.update_icon()
|
||||
|
||||
if(neck)
|
||||
update_hud_neck(neck)
|
||||
if(neck.icon_override)
|
||||
overlays_standing[NECK_LAYER] = mutable_appearance(neck.icon_override, "[neck.icon_state]", layer = -NECK_LAYER)
|
||||
else if(neck.sprite_sheets && neck.sprite_sheets[dna.species.sprite_sheet_name])
|
||||
overlays_standing[NECK_LAYER] = mutable_appearance(neck.sprite_sheets[dna.species.sprite_sheet_name], "[neck.icon_state]", layer = -NECK_LAYER)
|
||||
else
|
||||
overlays_standing[NECK_LAYER] = mutable_appearance('icons/mob/clothing/neck.dmi', "[neck.icon_state]", layer = -NECK_LAYER)
|
||||
apply_overlay(NECK_LAYER)
|
||||
|
||||
/mob/living/carbon/human/update_inv_back()
|
||||
..()
|
||||
@@ -1232,6 +1249,12 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
client.screen += worn_item
|
||||
update_observer_view(worn_item, TRUE)
|
||||
|
||||
/mob/living/carbon/human/proc/update_hud_neck(obj/item/worn_item)
|
||||
worn_item.screen_loc = ui_neck
|
||||
if((client && hud_used && hud_used.hud_version == HUD_STYLE_STANDARD) && (hud_used.inventory_shown && hud_used.hud_shown))
|
||||
client.screen += worn_item
|
||||
update_observer_view(worn_item, TRUE)
|
||||
|
||||
/mob/living/carbon/human/update_hud_back(obj/item/worn_item)
|
||||
worn_item.screen_loc = ui_back
|
||||
if(client && hud_used?.hud_shown && hud_used.hud_version == HUD_STYLE_STANDARD)
|
||||
|
||||
@@ -773,6 +773,8 @@
|
||||
return !H.gloves && (I.slot_flags & ITEM_SLOT_GLOVES)
|
||||
if(ITEM_SLOT_SHOES)
|
||||
return !H.shoes && (I.slot_flags & ITEM_SLOT_SHOES)
|
||||
if(ITEM_SLOT_NECK)
|
||||
return !H.neck && (I.slot_flags & ITEM_SLOT_NECK)
|
||||
if(ITEM_SLOT_BELT)
|
||||
if(H.belt)
|
||||
return FALSE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
species_traits = list(NOT_SELECTABLE)
|
||||
skinned_type = /obj/item/stack/sheet/animalhide/monkey
|
||||
greater_form = /datum/species/human
|
||||
no_equip = ITEM_SLOT_BELT | ITEM_SLOT_ID | ITEM_SLOT_LEFT_EAR | ITEM_SLOT_RIGHT_EAR | ITEM_SLOT_EYES | ITEM_SLOT_GLOVES | ITEM_SLOT_SHOES | ITEM_SLOT_OUTER_SUIT | ITEM_SLOT_JUMPSUIT | ITEM_SLOT_LEFT_POCKET | ITEM_SLOT_RIGHT_POCKET | ITEM_SLOT_SUIT_STORE | ITEM_SLOT_PDA
|
||||
no_equip = ITEM_SLOT_BELT | ITEM_SLOT_ID | ITEM_SLOT_LEFT_EAR | ITEM_SLOT_RIGHT_EAR | ITEM_SLOT_EYES | ITEM_SLOT_GLOVES | ITEM_SLOT_SHOES | ITEM_SLOT_OUTER_SUIT | ITEM_SLOT_JUMPSUIT | ITEM_SLOT_LEFT_POCKET | ITEM_SLOT_RIGHT_POCKET | ITEM_SLOT_SUIT_STORE | ITEM_SLOT_PDA | ITEM_SLOT_NECK
|
||||
inherent_factions = list("jungle", "monkey")
|
||||
can_craft = FALSE
|
||||
is_small = 1
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
mouse_opacity = MOUSE_OPACITY_ICON
|
||||
death_sound = 'sound/misc/demon_dies.ogg'
|
||||
deathmessage = "begins to shudder as it becomes transparent..."
|
||||
loot_drop = /obj/item/clothing/accessory/necklace/herald_cloak
|
||||
loot_drop = /obj/item/clothing/neck/cloak/herald_cloak
|
||||
|
||||
|
||||
attack_action_types = list(/datum/action/innate/elite_attack/herald_trishot,
|
||||
@@ -257,22 +257,21 @@
|
||||
|
||||
//Herald's loot: Cloak of the Prophet
|
||||
|
||||
/obj/item/clothing/accessory/necklace/herald_cloak
|
||||
/obj/item/clothing/neck/cloak/herald_cloak
|
||||
name = "cloak of the prophet"
|
||||
desc = "A cloak which lts you travel through a perfect reflection of the world."
|
||||
icon = 'icons/obj/lavaland/elite_trophies.dmi'
|
||||
icon_state = "herald_cloak"
|
||||
item_state = "herald_cloak"
|
||||
item_color = "herald_cloak"
|
||||
slot_flags = ITEM_SLOT_ACCESSORY
|
||||
allow_duplicates = FALSE
|
||||
actions_types = list(/datum/action/item_action/accessory/herald)
|
||||
actions_types = list(/datum/action/item_action/herald)
|
||||
|
||||
/obj/item/clothing/accessory/necklace/herald_cloak/attack_self()
|
||||
if(has_suit)
|
||||
mirror_walk()
|
||||
|
||||
/obj/item/clothing/accessory/necklace/herald_cloak/proc/mirror_walk()
|
||||
/obj/item/clothing/neck/cloak/herald_cloak/item_action_slot_check(slot)
|
||||
if(slot == ITEM_SLOT_NECK)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/neck/cloak/herald_cloak/ui_action_click()
|
||||
var/found_mirror = FALSE
|
||||
var/list/mirrors_to_use = list()
|
||||
var/list/areaindex = list()
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
if(prob(10))
|
||||
belt = pick(/obj/item/storage/belt/mining/vendor, /obj/item/storage/belt/utility/full)
|
||||
if(prob(50))
|
||||
back = /obj/item/bedsheet/rd/royal_cape
|
||||
neck = /obj/item/bedsheet/rd/royal_cape
|
||||
if(prob(10))
|
||||
l_pocket = pick(/obj/item/crowbar/power, /obj/item/wrench/power, /obj/item/weldingtool/experimental)
|
||||
if("YeOlde")
|
||||
|
||||
@@ -309,6 +309,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
ITEM_SLOT_JUMPSUIT,\
|
||||
ITEM_SLOT_OUTER_SUIT,\
|
||||
ITEM_SLOT_MASK,\
|
||||
ITEM_SLOT_NECK,\
|
||||
ITEM_SLOT_HEAD,\
|
||||
ITEM_SLOT_SHOES,\
|
||||
ITEM_SLOT_GLOVES,\
|
||||
@@ -393,6 +394,15 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
if(ITEM_SLOT_NECK)
|
||||
if(!(slot_flags & ITEM_SLOT_NECK))
|
||||
return 0
|
||||
if(H.neck)
|
||||
if(!(H.neck.flags & NODROP))
|
||||
return 2
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
if(ITEM_SLOT_SHOES)
|
||||
if(!(slot_flags & ITEM_SLOT_SHOES))
|
||||
return 0
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
/mob/proc/update_inv_gloves()
|
||||
return
|
||||
|
||||
/mob/proc/update_inv_neck()
|
||||
return
|
||||
|
||||
/mob/proc/update_mutations()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user