Files
VOREStation/code/game/objects/items/robobag.dm
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

128 lines
4.3 KiB
Plaintext

/obj/item/bodybag/cryobag/robobag
name = "synthmorph bag"
desc = "A reusable polymer bag designed to slow down synthetic functions such as data corruption and coolant flow, \
especially useful if short on time or in a hostile enviroment."
icon = 'icons/obj/robobag.dmi'
icon_state = "bodybag_folded"
item_state = "bodybag_cryo_folded"
origin_tech = list(TECH_ENGINEERING = 3)
robotic = TRUE
cryogenic = FALSE
/obj/structure/closet/body_bag/cryobag/robobag
name = "synthmorph bag"
desc = "A reusable polymer bag designed to slow down synthetic functions such as data corruption and coolant flow, \
especially useful if short on time or in a hostile enviroment."
icon = 'icons/obj/robobag.dmi'
item_path = /obj/item/bodybag/cryobag/robobag
tank_type = /obj/item/tank/stasis/nitro_cryo
stasis_level = 2 // Lower than the normal cryobag, because it's not made for meat that dies. It's made for robots and is freezing.
var/obj/item/clothing/accessory/badge/corptag // The tag on the bag.
/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user)
. = ..()
if(corptag && Adjacent(user))
. += span_notice("[src] has a [corptag] attached to it.")
/obj/structure/closet/body_bag/cryobag/robobag/update_icon()
cut_overlays()
..()
if(corptag)
var/corptag_icon_state = "tag_blank"
if(istype(corptag,/obj/item/clothing/accessory/badge/holo/detective) || istype(corptag,/obj/item/clothing/accessory/badge/holo/detective) || istype(corptag, /obj/item/clothing/accessory/badge/holo/hos) || istype(corptag, /obj/item/clothing/accessory/badge/old) || istype(corptag, /obj/item/clothing/accessory/badge/sheriff))
corptag_icon_state = "tag_badge_gold"
else if(istype(corptag, /obj/item/clothing/accessory/badge/holo/warden))
corptag_icon_state = "tag_badge_silver"
else if(istype(corptag, /obj/item/clothing/accessory/badge/holo))
corptag_icon_state = "tag_badge_blue"
else if(istype(corptag, /obj/item/clothing/accessory/badge/corporate_tag))
corptag_icon_state = corptag.icon_state
add_overlay(corptag_icon_state)
/obj/structure/closet/body_bag/cryobag/robobag/click_alt(mob/user)
if(!Adjacent(user))
..()
if(corptag)
corptag.forceMove(get_turf(user))
to_chat(user, span_notice("You remove \the [corptag] from \the [src]."))
corptag = null
update_icon()
return
return ..()
/obj/structure/closet/body_bag/cryobag/robobag/Destroy()
if(corptag && get_turf(src))
var/turf/T = get_turf(src)
corptag.forceMove(T)
corptag = null
else
QDEL_NULL(corptag)
return ..()
/obj/structure/closet/body_bag/cryobag/robobag/Entered(atom/movable/AM)
..()
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(H.isSynthetic())
if(H.getToxLoss() == 0) // We don't exactly care about the bag being 'used' when containing a synth, unless it's got work.
used = FALSE
else
H.add_modifier(/datum/modifier/fbp_debug/robobag)
/obj/structure/closet/body_bag/cryobag/robobag/attackby(obj/item/W, mob/user)
if(opened)
..()
else //Allows the bag to respond to a cyborg analyzer and tag.
if(istype(W,/obj/item/robotanalyzer))
var/obj/item/robotanalyzer/analyzer = W
for(var/mob/living/L in contents)
analyzer.attack(L,user)
else if(istype(W, /obj/item/clothing/accessory/badge))
if(corptag)
var/old_tag = corptag
corptag.forceMove(get_turf(src))
corptag = W
user.unEquip(corptag)
corptag.loc = null
to_chat(user, span_notice("You swap \the [old_tag] for \the [corptag]."))
else
corptag = W
user.unEquip(corptag)
corptag.loc = null
to_chat(user, span_notice("You attach \the [corptag] to \the [src]."))
update_icon()
else
..()
/datum/modifier/fbp_debug
name = "defragmenting"
desc = "Your software is being debugged."
mob_overlay_state = "signal_blue"
on_created_text = span_notice("You feel something pour over your senses.")
on_expired_text = span_notice("Your mind is clear once more.")
stacks = MODIFIER_STACK_FORBID
/datum/modifier/fbp_debug/tick()
if(holder.getToxLoss())
holder.adjustToxLoss(rand(-1,-5))
/datum/modifier/fbp_debug/can_apply(mob/living/L)
if(!L.isSynthetic())
return FALSE
return TRUE
/datum/modifier/fbp_debug/check_if_valid()
..()
if(!holder.getToxLoss())
src.expire()
/datum/modifier/fbp_debug/robobag/check_if_valid()
..()
if(!istype(holder.loc, /obj/structure/closet/body_bag/cryobag/robobag))
src.expire()