mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Merge pull request #7759 from Mechoid/FixOrgansSimplemob
Fix Simplemob+ Organs
This commit is contained in:
@@ -43,6 +43,21 @@
|
||||
if(LAZYLEN(organs))
|
||||
organs_by_name.Cut()
|
||||
|
||||
for(var/path in organs)
|
||||
if(ispath(path))
|
||||
var/obj/item/organ/external/neworg = new path(src)
|
||||
neworg.name = "[name] [neworg.name]"
|
||||
neworg.meat_type = meat_type
|
||||
|
||||
if(istype(src, /mob/living/simple_mob))
|
||||
var/mob/living/simple_mob/SM = src
|
||||
if(SM.limb_icon)
|
||||
neworg.force_icon = SM.limb_icon
|
||||
neworg.force_icon_key = SM.limb_icon_key
|
||||
|
||||
organs |= neworg
|
||||
organs -= path
|
||||
|
||||
for(var/obj/item/organ/OR in organs)
|
||||
OR.removed()
|
||||
organs -= OR
|
||||
@@ -50,6 +65,14 @@
|
||||
if(LAZYLEN(internal_organs))
|
||||
internal_organs_by_name.Cut()
|
||||
|
||||
for(var/path in internal_organs)
|
||||
if(ispath(path))
|
||||
var/obj/item/organ/neworg = new path(src, TRUE)
|
||||
neworg.name = "[name] [neworg.name]"
|
||||
neworg.meat_type = meat_type
|
||||
internal_organs |= neworg
|
||||
internal_organs -= path
|
||||
|
||||
for(var/obj/item/organ/OR in internal_organs)
|
||||
OR.removed()
|
||||
internal_organs -= OR
|
||||
|
||||
@@ -17,12 +17,21 @@
|
||||
return organs_by_name[zone]
|
||||
|
||||
/mob/living/gib()
|
||||
for(var/path in internal_organs)
|
||||
if(ispath(path))
|
||||
var/obj/item/organ/neworg = new path(src, TRUE)
|
||||
internal_organs -= path
|
||||
neworg.name = "[name] [neworg.name]"
|
||||
neworg.meat_type = meat_type
|
||||
internal_organs |= neworg
|
||||
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
I.removed()
|
||||
if(isturf(I?.loc)) // Some organs qdel themselves or other things when removed
|
||||
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
|
||||
for(var/obj/item/organ/external/E in src.organs)
|
||||
E.droplimb(0,DROPLIMB_EDGE,1)
|
||||
if(!ispath(E))
|
||||
E.droplimb(0,DROPLIMB_EDGE,1)
|
||||
|
||||
..()
|
||||
|
||||
@@ -173,29 +173,6 @@
|
||||
if(has_eye_glow)
|
||||
add_eyes()
|
||||
|
||||
if(LAZYLEN(organs))
|
||||
for(var/path in organs)
|
||||
if(ispath(path))
|
||||
var/obj/item/organ/external/neworg = new path(src)
|
||||
neworg.name = "[name] [neworg.name]"
|
||||
neworg.meat_type = meat_type
|
||||
|
||||
if(limb_icon)
|
||||
neworg.force_icon = limb_icon
|
||||
neworg.force_icon_key = limb_icon_key
|
||||
|
||||
organs |= neworg
|
||||
organs -= path
|
||||
|
||||
if(LAZYLEN(internal_organs))
|
||||
for(var/path in internal_organs)
|
||||
if(ispath(path))
|
||||
var/obj/item/organ/neworg = new path(src)
|
||||
neworg.name = "[name] [neworg.name]"
|
||||
neworg.meat_type = meat_type
|
||||
internal_organs |= neworg
|
||||
internal_organs -= path
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/Destroy()
|
||||
|
||||
@@ -84,8 +84,8 @@ var/list/organ_cache = list()
|
||||
if(!LAZYLEN(holder.organs_by_name))
|
||||
holder.organs_by_name = list()
|
||||
|
||||
holder.internal_organs |= src
|
||||
holder.internal_organs_by_name[organ_tag] = src
|
||||
holder.organs |= src
|
||||
holder.organs_by_name[organ_tag] = src
|
||||
|
||||
if(!max_damage)
|
||||
max_damage = min_broken_damage * 2
|
||||
|
||||
Reference in New Issue
Block a user