[MIRROR] prot rig (#10457)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-18 16:44:58 -07:00
committed by GitHub
parent 4b6881fd85
commit 033a1c6060
6 changed files with 14 additions and 12 deletions

View File

@@ -114,7 +114,7 @@ var/datum/antagonist/ninja/ninjas
player.put_in_hands(ninjasuit)
player.equip_to_slot_or_del(ninjasuit,slot_back)
if(ninjasuit)
ninjasuit.toggle_seals(src,1)
ninjasuit.toggle_seals(src,TRUE,TRUE)
ninjasuit.seal_delay = initial(ninjasuit.seal_delay)
if(istype(player.back,/obj/item/rig))

View File

@@ -275,14 +275,17 @@
toggle_piece("chest", loc, ONLY_RETRACT, TRUE)
update_icon(1)
/obj/item/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
/obj/item/rig/proc/toggle_seals(mob/living/carbon/human/M, instant, destructive)
if(sealing) return
if(!check_power_cost(M))
return 0
deploy(M,instant)
//NOTE: DESTRUCTIVE SHOULD ONLY BE CALLED ONCE (DURING THE INITIAL DEPLOYMENT)
//DESTRUCTIVE WILL DELETE ANY CLOTHING THAT WOULD OTHERWISE BE BLOCKING IT.
//IF DESTRUCTIVE IS CALLED WHILE THE RIG IS ALREADY DEPLOYED, THE RIG WILL DELETE ITSELF.
deploy(M,destructive)
var/seal_target = !canremove
var/failed_to_seal
@@ -755,7 +758,7 @@
if(piece == "helmet" && helmet?.light_system == STATIC_LIGHT)
helmet.update_light()
/obj/item/rig/proc/deploy(mob/M,var/sealed)
/obj/item/rig/proc/deploy(mob/M,destructive)
var/mob/living/carbon/human/H = M
@@ -764,7 +767,7 @@
if(H.back != src && H.belt != src)
return
if(sealed)
if(destructive)
if(H.head)
var/obj/item/garbage = H.head
H.drop_from_inventory(garbage)

View File

@@ -23,8 +23,8 @@
return ..()
/obj/item/electronic_assembly/Destroy()
battery = null // It will be qdel'd by ..() if still in our contents
STOP_PROCESSING(SSobj, src)
battery = null // It will be qdel'd by ..() if still in our contents
return ..()
/obj/item/electronic_assembly/process()

View File

@@ -246,7 +246,7 @@
if(dead)
switch(dead)
if(1)
if(W.is_screwdriver())
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
if(do_after(user,50,src,exclusive = TASK_ALL_EXCLUSIVE))
to_chat(user, span_notice("You unscrew the maintenace panel on the [src]."))
@@ -321,7 +321,7 @@
mod.installed(src)
update_icon()
return 1
else if(W.is_wrench())
else if(W.has_tool_quality(TOOL_WRENCH))
if(!air_supply)
to_chat(user, "There is no tank to remove.")
return
@@ -333,7 +333,7 @@
to_chat(user, "You detach and remove \the [air_supply].")
air_supply = null
return
else if(W.is_screwdriver())
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
var/list/possible_removals = list()
for(var/obj/item/rig_module/module in installed_modules)
if(module.permanent)
@@ -365,7 +365,6 @@
else
if(istype(W,/obj/item/storage/backpack))
AssimilateBag(user,0,W)
..()
/obj/item/rig/protean/proc/make_alive(var/mob/living/carbon/human/H, var/partial)
if(H)

View File

@@ -672,7 +672,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
/mob/living/simple_mob/vore/alienanimals/teppi/Life()
. =..()
if(!.)
if(!. || QDELETED(src))
return
wantpet += rand(0,2) * affection_factor
amount_grown += rand(1,5)

View File

@@ -159,7 +159,7 @@
//If they have these values, apply them
if(isliving(M))
var/mob/living/L = M
brainmob.dna = L.dna
brainmob.dna = L.dna.Clone()
brainmob.ooc_notes = L.ooc_notes
brainmob.ooc_notes_likes = L.ooc_notes_likes
brainmob.ooc_notes_dislikes = L.ooc_notes_dislikes