This commit is contained in:
Roxy
2025-05-15 16:57:46 -04:00
parent 158babce74
commit a856347d67
8 changed files with 24 additions and 18 deletions
@@ -21,14 +21,14 @@
. = ..()
alternate_worn_layer = initial(alternate_worn_layer)
if(istype(user) && user.ears && (flags_inv & HIDEEARS))
RegisterSignal(user, COMSIG_CARBON_UNEQUIP_HAT, PROC_REF(update_on_removed))
RegisterSignal(user, COMSIG_MOB_UNEQUIPPED_ITEM, PROC_REF(update_on_removed))
/// After the hat has actually been removed from the mob, we can update what needs to be updated here
/obj/item/clothing/head/proc/update_on_removed(mob/living/carbon/user, obj/item/hat)
/obj/item/clothing/head/proc/update_on_removed(mob/living/carbon/human/user, /obj/item/hat, slot)
SIGNAL_HANDLER
if(istype(user) && user.ears)
user.update_worn_ears()
UnregisterSignal(user, COMSIG_CARBON_UNEQUIP_HAT)
UnregisterSignal(user, COMSIG_MOB_UNEQUIPPED_ITEM)
/obj/item/clothing/head/bio_hood
worn_icon_muzzled = 'modular_skyrat/master_files/icons/mob/clothing/head/bio_muzzled.dmi'
@@ -25,10 +25,10 @@
give_item_to_holder(
new_ticket_book,
list(
LOCATION_LPOCKET = ITEM_SLOT_LPOCKET,
LOCATION_RPOCKET = ITEM_SLOT_RPOCKET,
LOCATION_BACKPACK = ITEM_SLOT_BACKPACK,
LOCATION_HANDS = ITEM_SLOT_HANDS,
LOCATION_LPOCKET,
LOCATION_RPOCKET,
LOCATION_BACKPACK,
LOCATION_HANDS,
),
)
tracked_ticket_book = WEAKREF(new_ticket_book)
+1 -1
View File
@@ -103,7 +103,7 @@ GLOBAL_VAR_INIT(DNR_trait_overlay, generate_DNR_trait_overlay())
icon = FA_ICON_GRIN_TEARS
/datum/quirk/item_quirk/joker/add_unique(client/client_source)
give_item_to_holder(/obj/item/paper/joker, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS))
give_item_to_holder(/obj/item/paper/joker, list(LOCATION_BACKPACK, LOCATION_HANDS))
/datum/quirk/item_quirk/joker/process()
if(pcooldown > world.time)
@@ -34,10 +34,10 @@
give_item_to_holder(
/obj/item/storage/pill_bottle/liquid_solder/braintumor,
list(
LOCATION_LPOCKET = ITEM_SLOT_LPOCKET,
LOCATION_RPOCKET = ITEM_SLOT_RPOCKET,
LOCATION_BACKPACK = ITEM_SLOT_BACKPACK,
LOCATION_HANDS = ITEM_SLOT_HANDS,
LOCATION_LPOCKET,
LOCATION_RPOCKET,
LOCATION_BACKPACK,
LOCATION_HANDS,
),
flavour_text = "These will keep you alive until you can secure a supply of medication. Don't rely on them too much!",
)
@@ -17,7 +17,7 @@
user.gain_trauma(/datum/brain_trauma/severe/narcolepsy/permanent, TRAUMA_RESILIENCE_ABSOLUTE)
var/obj/item/storage/pill_bottle/prescription_stimulant/stimmies = new()
if(quirk_holder.equip_to_slot_if_possible(stimmies, ITEM_SLOT_BACKPACK, qdel_on_fail = TRUE, initial = TRUE, indirect_action = TRUE))
if(quirk_holder.equip_to_storage(stimmies, ITEM_SLOT_BACK, del_on_fail = TRUE, initial = TRUE, indirect_action = TRUE))
to_chat(quirk_holder, span_info("You have been given a bottle of mild stimulants to assist in staying awake this shift..."))
/datum/quirk/narcolepsy/remove()
@@ -4,6 +4,8 @@
icon = FA_ICON_BOX_OPEN
/// the items that will be equipped, formatted in the way of [item_path = list of slots it can be equipped to], will not equip over nodrop items
var/list/items = list()
/// the items that will be added to storage, formatted in the way of [item_path = list of storage slots it can be inserted into]
var/list/stored_items = list()
/// the items that will be forcefully equipped, formatted in the way of [item_path = list of slots it can be equipped to], will equip over nodrop items
var/list/forced_items = list()
/// did we force drop any items? if so, they're in this list. useful for transferring any applicable contents into new items on roundstart
@@ -38,6 +40,13 @@
if (success)
break
equipped_items[item] = success
for(var/obj/item/item_path as anything in stored_items)
if(!ispath(item_path))
continue
var/item = new item_path(carbon_holder.loc)
for(var/slot as anything in stored_items[item_path])
carbon_holder.equip_to_storage(item, slot, indirect_action = TRUE)
for (var/item as anything in equipped_items)
on_equip_item(item, equipped_items[item])
@@ -4,7 +4,7 @@
var/obj/item/organ/lungs/lungs_holding
var/obj/item/organ/lungs/lungs_added
var/lungs_typepath = /obj/item/organ/lungs
items = list(/obj/item/clothing/accessory/breathing = list(ITEM_SLOT_BACKPACK))
stored_items = list(/obj/item/clothing/accessory/breathing = list(ITEM_SLOT_BACK))
var/breath_type = "oxygen"
/datum/quirk/equipping/lungs/add(client/client_source)
@@ -152,10 +152,7 @@
if(!isnum(number))//Default to 1
number = 1
for(var/i in 1 to number) // Copy and paste of EQUIP_OUTFIT_ITEM
owner.equip_to_slot_or_del(SSwardrobe.provide_type(path, owner), ITEM_SLOT_BACKPACK, TRUE, TRUE)
var/obj/item/outfit_item = owner.get_item_by_slot(ITEM_SLOT_BACKPACK)
if(outfit_item && outfit_item.type == path && !get_a_job)
outfit_item.on_outfit_equip(owner, visuals_only, ITEM_SLOT_BACKPACK)
owner.equip_to_storage(SSwardrobe.provide_type(path, owner), ITEM_SLOT_BACK, TRUE, TRUE)
/datum/species/protean/get_default_mutant_bodyparts()
return list(