mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Moves External Organs to Nullspace (#15548)
* Moves External Organs to Nullspace * additions * oops * further cleanup
This commit is contained in:
@@ -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