mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 07:08:03 +01:00
7c5ef1cfb8
## About The Pull Request What it says on the tin. `times_fired` is the most unused parameter in all mob procs. I say most because there were just 2 cases where it was used - handling breathing - handling heartbeat Besides these 2 cases this parameter did nothing in every proc. Removing it does 2 things - Makes those procs more readable as it now has 1 less parameter that was documented poorly and did nothing - Makes those procs slightly faster as we are passing 1 less variable to its parameter call stack It can easily be substituted with `SSmobs.times_fired` which was its original value anyways ## Changelog 🆑 code: removes an unused parameter `times_fired` from mob life procs. Making them function slightly faster /🆑
58 lines
1.6 KiB
Plaintext
58 lines
1.6 KiB
Plaintext
/obj/item/organ/body_egg
|
|
name = "body egg"
|
|
desc = "All slimy and yuck."
|
|
icon_state = "innards"
|
|
visual = TRUE
|
|
zone = BODY_ZONE_CHEST
|
|
slot = ORGAN_SLOT_PARASITE_EGG
|
|
organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
|
|
|
|
/obj/item/organ/body_egg/on_find(mob/living/finder)
|
|
..()
|
|
to_chat(finder, span_warning("You found an unknown alien organism in [owner]'s [zone]!"))
|
|
|
|
/obj/item/organ/body_egg/feel_for_damage(self_aware)
|
|
// keep these stealthy for now, revisit later
|
|
return ""
|
|
|
|
/obj/item/organ/body_egg/Initialize(mapload)
|
|
. = ..()
|
|
if(iscarbon(loc))
|
|
Insert(loc)
|
|
|
|
/obj/item/organ/body_egg/on_mob_insert(mob/living/carbon/egg_owner, special = FALSE, movement_flags)
|
|
. = ..()
|
|
|
|
egg_owner.add_traits(list(TRAIT_XENO_HOST, TRAIT_XENO_IMMUNE), ORGAN_TRAIT)
|
|
egg_owner.med_hud_set_status()
|
|
INVOKE_ASYNC(src, PROC_REF(AddInfectionImages), egg_owner)
|
|
|
|
/obj/item/organ/body_egg/on_mob_remove(mob/living/carbon/egg_owner, special, movement_flags)
|
|
. = ..()
|
|
egg_owner.remove_traits(list(TRAIT_XENO_HOST, TRAIT_XENO_IMMUNE), ORGAN_TRAIT)
|
|
egg_owner.med_hud_set_status()
|
|
INVOKE_ASYNC(src, PROC_REF(RemoveInfectionImages), egg_owner)
|
|
|
|
/obj/item/organ/body_egg/on_death(seconds_per_tick)
|
|
. = ..()
|
|
if(!owner)
|
|
return
|
|
egg_process(seconds_per_tick)
|
|
|
|
/obj/item/organ/body_egg/on_life(seconds_per_tick)
|
|
. = ..()
|
|
egg_process(seconds_per_tick)
|
|
|
|
/obj/item/organ/body_egg/proc/egg_process(seconds_per_tick)
|
|
return
|
|
|
|
/obj/item/organ/body_egg/proc/RefreshInfectionImage()
|
|
RemoveInfectionImages()
|
|
AddInfectionImages()
|
|
|
|
/obj/item/organ/body_egg/proc/AddInfectionImages()
|
|
return
|
|
|
|
/obj/item/organ/body_egg/proc/RemoveInfectionImages()
|
|
return
|