mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Kathira El-Hashem Custom Item (#11897)
This commit is contained in:
@@ -544,7 +544,18 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//external organs handle brokenness a bit differently when it comes to damage. Instead brute_dam is checked inside process()
|
||||
//this also ensures that an external organ cannot be "broken" without broken_description being set.
|
||||
/obj/item/organ/external/is_broken()
|
||||
return ((status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
|
||||
if(status & ORGAN_CUT_AWAY)
|
||||
return TRUE
|
||||
if((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED))
|
||||
for(var/obj/item/organ/internal/augment/aug in internal_organs)
|
||||
if(aug.supports_limb)
|
||||
if(aug.is_broken())
|
||||
continue
|
||||
if(aug.is_bruised() && prob(60))
|
||||
continue
|
||||
return FALSE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Determines if we even need to process this organ.
|
||||
/obj/item/organ/external/proc/need_process()
|
||||
|
||||
@@ -138,11 +138,11 @@
|
||||
/obj/item/organ/external/proc/get_internal_organs_overlay()
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
if(O.on_mob_icon)
|
||||
var/cache_key = "[O.on_mob_icon]-[O.icon_state]"
|
||||
var/cache_key = "[O.on_mob_icon]-[O.item_state || O.icon_state]"
|
||||
|
||||
var/icon/organ_icon = SSicon_cache.internal_organ_cache[cache_key]
|
||||
if (!organ_icon)
|
||||
organ_icon = new /icon(O.on_mob_icon, O.icon_state)
|
||||
organ_icon = new /icon(O.on_mob_icon, O.item_state || O.icon_state)
|
||||
SSicon_cache.internal_organ_cache[cache_key] = organ_icon
|
||||
|
||||
add_overlay(organ_icon)
|
||||
@@ -264,7 +264,7 @@
|
||||
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
if(O.on_mob_icon)
|
||||
keyparts += "[O.on_mob_icon]-[O.icon_state]"
|
||||
keyparts += "[O.on_mob_icon]-[O.item_state || O.icon_state]"
|
||||
|
||||
. = keyparts.Join("_")
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
var/action_button_icon = "augment"
|
||||
var/activable = FALSE
|
||||
var/bypass_implant = FALSE
|
||||
var/supports_limb = FALSE // if true, will make parent limb not count as broken, as long as it's not bruised (40%) and not broken (0%)
|
||||
|
||||
/obj/item/organ/internal/augment/Initialize()
|
||||
robotize()
|
||||
|
||||
Reference in New Issue
Block a user