mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Moves External Organs to Nullspace (#15548)
* Moves External Organs to Nullspace * additions * oops * further cleanup
This commit is contained in:
+2
-8
@@ -1515,14 +1515,8 @@
|
||||
else if(href_list["common"])
|
||||
switch(href_list["common"])
|
||||
if("undress")
|
||||
if(ishuman(current))
|
||||
var/mob/living/carbon/human/H = current
|
||||
// Don't "undress" organs right out of the body
|
||||
for(var/obj/item/W in H.contents - (H.bodyparts | H.internal_organs))
|
||||
current.unEquip(W, 1)
|
||||
else
|
||||
for(var/obj/item/W in current)
|
||||
current.unEquip(W, 1)
|
||||
for(var/obj/item/I in current)
|
||||
current.unEquip(I, TRUE)
|
||||
log_admin("[key_name(usr)] has unequipped [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has unequipped [key_name_admin(current)]")
|
||||
if("takeuplink")
|
||||
|
||||
@@ -125,9 +125,9 @@
|
||||
|
||||
// Copy cybernetic implants
|
||||
O.cybernetic_implants = list()
|
||||
for(var/obj/item/organ/internal/CI in contents)
|
||||
if(istype(CI))
|
||||
O.cybernetic_implants |= CI.type
|
||||
for(var/org in internal_organs)
|
||||
var/obj/item/organ/internal/aug = org
|
||||
O.cybernetic_implants |= aug.type
|
||||
|
||||
// Copy accessories
|
||||
var/obj/item/clothing/under/uniform_slot = get_item_by_slot(slot_w_uniform)
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
if(issmall(H))
|
||||
return
|
||||
for(var/obj/item/W in H)
|
||||
if(istype(W,/obj/item/organ))
|
||||
continue
|
||||
if(istype(W,/obj/item/implant))
|
||||
if(istype(W, /obj/item/implant))
|
||||
continue
|
||||
H.unEquip(W)
|
||||
|
||||
@@ -51,9 +49,7 @@
|
||||
for(var/obj/item/W in H)
|
||||
if(W == H.w_uniform) // will be torn
|
||||
continue
|
||||
if(istype(W,/obj/item/organ))
|
||||
continue
|
||||
if(istype(W,/obj/item/implant))
|
||||
if(istype(W, /obj/item/implant))
|
||||
continue
|
||||
H.unEquip(W)
|
||||
H.regenerate_icons()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/organs = user.get_organs_zone("head", 1)
|
||||
|
||||
for(var/obj/item/organ/internal/I in organs)
|
||||
I.remove(user, 1)
|
||||
I.remove(user, TRUE)
|
||||
|
||||
explosion(get_turf(user),0,0,2,0,silent=1)
|
||||
for(var/mob/living/carbon/human/H in range(2,user))
|
||||
@@ -35,7 +35,7 @@
|
||||
spawn(5) // So it's not killed in explosion
|
||||
var/mob/living/simple_animal/hostile/headslug/crab = new(new_location)
|
||||
for(var/obj/item/organ/internal/I in organs)
|
||||
I.loc = crab
|
||||
I.forceMove(crab)
|
||||
crab.origin = M
|
||||
if(crab.origin)
|
||||
crab.origin.active = 1
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
|
||||
H.visible_message("<span class='warning'>[H]'s things suddenly slip off. They hunch over and vomit up a copious amount of purple goo which begins to shape around them!</span>", \
|
||||
"<span class='shadowling'>You remove any equipment which would hinder your hatching and begin regurgitating the resin which will protect you.</span>")
|
||||
|
||||
for(var/obj/item/I in H.contents - (H.bodyparts | H.internal_organs)) //drops all items except organs
|
||||
for(var/obj/item/I in H.contents)
|
||||
H.unEquip(I)
|
||||
|
||||
sleep(50)
|
||||
|
||||
@@ -252,8 +252,6 @@
|
||||
for(var/obj/item/I in H)
|
||||
if(istype(I, /obj/item/implant))
|
||||
continue
|
||||
if(istype(I, /obj/item/organ))
|
||||
continue
|
||||
qdel(I)
|
||||
|
||||
H.equipOutfit(selected_outfit)
|
||||
|
||||
@@ -333,7 +333,7 @@ effective or pretty fucking useless.
|
||||
playsound(destination, "sound/magic/disintegrate.ogg", 50, TRUE)
|
||||
destination.ex_act(rand(1,2))
|
||||
for(var/obj/item/W in user)
|
||||
if(istype(W, /obj/item/organ)|| istype(W, /obj/item/implant))
|
||||
if(istype(W, /obj/item/implant))
|
||||
continue
|
||||
if(!user.unEquip(W))
|
||||
qdel(W)
|
||||
|
||||
@@ -2967,9 +2967,6 @@
|
||||
if(!security)
|
||||
//strip their stuff before they teleport into a cell :downs:
|
||||
for(var/obj/item/W in H)
|
||||
if(istype(W, /obj/item/organ/external))
|
||||
continue
|
||||
//don't strip organs
|
||||
H.unEquip(W)
|
||||
if(H.client)
|
||||
H.client.screen -= W
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
for(var/obj/item/I in H)
|
||||
if(istype(I, /obj/item/implant))
|
||||
continue
|
||||
if(istype(I, /obj/item/organ))
|
||||
continue
|
||||
qdel(I)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
for(var/obj/item/I in H)
|
||||
if(istype(I, /obj/item/implant))
|
||||
continue
|
||||
if(istype (I, /obj/item/organ))
|
||||
continue
|
||||
qdel(I)
|
||||
|
||||
to_chat(H, "<B>You are part of the [station_name()] dodgeball tournament. Throw dodgeballs at crewmembers wearing a different color than you. OOC: Use THROW on an EMPTY-HAND to catch thrown dodgeballs.</B>")
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
//Destroy Equipment
|
||||
T.visible_message("<span class='userdanger'>Everything [user] is holding and wearing disappears!</span>")
|
||||
for(var/obj/item/I in user)
|
||||
if(istype(I, /obj/item/implant) || istype(I, /obj/item/organ))
|
||||
if(istype(I, /obj/item/implant))
|
||||
continue
|
||||
qdel(I)
|
||||
if(5)
|
||||
|
||||
@@ -387,8 +387,6 @@
|
||||
var/obj/item/implant/I = O
|
||||
if(I.implanted)
|
||||
continue
|
||||
if(istype(O,/obj/item/organ))
|
||||
continue
|
||||
if(O.flags & NODROP || stealthmode)
|
||||
qdel(O) //they are already dead by now
|
||||
H.unEquip(O)
|
||||
|
||||
@@ -482,8 +482,6 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
|
||||
var/failed = 0
|
||||
if(istype(I, /obj/item/implant))
|
||||
continue
|
||||
if(istype(I, /obj/item/organ))
|
||||
continue
|
||||
if(I.flags & ABSTRACT)
|
||||
continue
|
||||
else
|
||||
|
||||
@@ -226,6 +226,12 @@ emp_act
|
||||
if(mind && mind.martial_art && prob(mind.martial_art.block_chance) && mind.martial_art.can_use(src) && in_throw_mode && !incapacitated(FALSE, TRUE))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/emp_act(severity)
|
||||
..()
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/organ/external/L = X
|
||||
L.emp_act(severity)
|
||||
|
||||
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit) //todo: update this to utilize check_obscured_slots() //and make sure it's check_obscured_slots(TRUE) to stop aciding through visors etc
|
||||
var/list/damaged = list()
|
||||
var/list/inventory_items_to_kill = list()
|
||||
|
||||
@@ -66,14 +66,6 @@
|
||||
if(slot_tie)
|
||||
return TRUE
|
||||
|
||||
// The actual dropping happens at the mob level - checks to prevent drops should
|
||||
// come here
|
||||
/mob/living/carbon/human/canUnEquip(obj/item/I, force)
|
||||
. = ..()
|
||||
var/obj/item/organ/O = I
|
||||
if(istype(O) && O.owner == src)
|
||||
. = 0 // keep a good grip on your heart
|
||||
|
||||
/mob/living/carbon/human/unEquip(obj/item/I, force, silent = FALSE)
|
||||
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
|
||||
if(!. || !I)
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
M.SetConfused(0)
|
||||
if(ishuman(M)) // Unequip all cult clothing
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/I in H.contents - (H.bodyparts | H.internal_organs)) // Satanic liver NYI
|
||||
for(var/I in H.contents)
|
||||
if(is_type_in_list(I, CULT_CLOTHING))
|
||||
H.unEquip(I)
|
||||
return
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
if(isspaceturf(loc))
|
||||
if(isspaceturf(H.loc))
|
||||
H.adjustOxyLoss(10)
|
||||
else
|
||||
H.adjustOxyLoss(5)
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
|
||||
if(affected) affected.internal_organs -= src
|
||||
|
||||
loc = get_turf(owner)
|
||||
forceMove(get_turf(owner))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
max_damage = 0
|
||||
dir = SOUTH
|
||||
organ_tag = "limb"
|
||||
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 // On Para, external organs have a loc, ergo they need this.
|
||||
var/brute_mod = 1
|
||||
var/burn_mod = 1
|
||||
|
||||
@@ -115,7 +114,7 @@
|
||||
|
||||
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
|
||||
owner = target
|
||||
forceMove(owner)
|
||||
loc = null
|
||||
if(istype(owner))
|
||||
if(!isnull(owner.bodyparts_by_name[limb_name]))
|
||||
log_debug("Duplicate organ in slot \"[limb_name]\", mob '[target]'")
|
||||
@@ -227,7 +226,7 @@
|
||||
check_fracture(brute)
|
||||
var/mob/living/carbon/owner_old = owner //Need to update health, but need a reference in case the below check cuts off a limb.
|
||||
//If limb took enough damage, try to cut or tear it off
|
||||
if(owner && loc == owner)
|
||||
if(owner)
|
||||
if(!cannot_amputate && (brute_dam) >= (max_damage))
|
||||
if(prob(brute / 2))
|
||||
if(sharp)
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
colour = BlendRGB(owner.m_colours["body"], owner.m_colours["head"], 0.65) //then again im pretty bad at theoretics
|
||||
|
||||
if(new_light != glowing)
|
||||
var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ))
|
||||
lbody.set_light(new_light,l_color = colour)
|
||||
owner.set_light(new_light, l_color = colour)
|
||||
glowing = new_light
|
||||
|
||||
return
|
||||
@@ -73,14 +72,12 @@
|
||||
|
||||
if(!glowing)
|
||||
var/light = calculate_glow(KIDAN_LANTERN_LIGHT)
|
||||
var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ))
|
||||
lbody.set_light(light,l_color = colour)
|
||||
owner.set_light(light, l_color = colour)
|
||||
glowing = light
|
||||
return 1
|
||||
|
||||
else
|
||||
var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ))
|
||||
lbody.set_light(0)
|
||||
owner.set_light(0)
|
||||
glowing = 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -16,14 +16,24 @@
|
||||
var/obj/item/storage/internal/pocket
|
||||
|
||||
/obj/item/organ/internal/headpocket/New()
|
||||
..()
|
||||
pocket = new /obj/item/storage/internal(src)
|
||||
pocket.storage_slots = 1
|
||||
// Allow adjacency calculation to work properly
|
||||
loc = owner
|
||||
// Fit only pocket sized items
|
||||
pocket.max_w_class = WEIGHT_CLASS_SMALL
|
||||
pocket.max_combined_w_class = 2
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/headpocket/Destroy()
|
||||
QDEL_NULL(pocket)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/headpocket/insert(mob/living/carbon/M, special = FALSE, dont_remove_slot = 0)
|
||||
. = ..()
|
||||
pocket.master_item = M // So headpockets work with adjacency checks
|
||||
|
||||
/obj/item/organ/internal/headpocket/remove(mob/living/carbon/M, special = 0)
|
||||
pocket.master_item = src
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/headpocket/on_life()
|
||||
..()
|
||||
@@ -34,8 +44,6 @@
|
||||
empty_contents()
|
||||
|
||||
/obj/item/organ/internal/headpocket/ui_action_click()
|
||||
if(!loc)
|
||||
loc = owner
|
||||
pocket.MouseDrop(owner)
|
||||
|
||||
/obj/item/organ/internal/headpocket/on_owner_death()
|
||||
|
||||
Reference in New Issue
Block a user