mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
582d213b8d
This PR fixes a few bugs that were recently reported both by players and by our new bug monitoring system. An AI agent (specifically Gemini 3) was used to do some of the code diving process, while the fixes were tested and verified myself manually. Yes I have actually verified the fixes in this PR in testing. The swap to Calculus methods for organ EMP was done by me, no AI. I love Calculus to much to let a bot do it for me. In particular my fix to organ EMP was to make it so that EMP damage is handled directly as "number of fractional seconds the EMP will last", and that they tick down cleanly per second. I did this because after fixing mechanical organs not doing ANY EMP effects at all, I tested them and discovered that the EMP effects were extremely underwhelming. They were like, "Your screen only briefly filling with static for like 2 ticks", and "your heart skips a single beat", which was lame and nonthreatening. Significantly more fun is making the static last for N number of seconds, and for the Heart to fail to pump for N number of seconds (very life threatening!) The new organ EMP handling vars are per-organ rather than a define, so if we want there to be different EMP times for hearts vs eyes, that's totally doable. Just make the heart have a larger recovery rate, or the eyes have a smaller recovery rate. --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: Arrow768 <1331699+Arrow768@users.noreply.github.com>
74 lines
2.3 KiB
Plaintext
74 lines
2.3 KiB
Plaintext
/obj/item/organ/internal/appendix
|
|
name = "appendix"
|
|
icon_state = "appendix"
|
|
parent_organ = BP_GROIN
|
|
organ_tag = BP_APPENDIX
|
|
possible_modifications = list ("Normal","Removed")
|
|
|
|
/**
|
|
* The amount of seconds that have passed since starting an appendicitis event.
|
|
* This number is set initially to 1 by the event, and increments by 1 each real life second.
|
|
* While its at 0, no appendix calculations are performed.
|
|
*/
|
|
var/inflamed = 0
|
|
|
|
/// The amount of pain to take per second while in stage 1 of appendicitis.
|
|
var/stage_one_pain_per_second = 1
|
|
|
|
/// The amount of pain to take per second while in stage 2 of appendicitis.
|
|
var/stage_two_pain_per_second = 1.5
|
|
|
|
/// The amount of damage an appendix takes per second while in stage 2 of appendicitis.
|
|
var/stage_two_organ_damage_per_second = 0.006
|
|
|
|
/obj/item/organ/internal/appendix/update_icon()
|
|
..()
|
|
if(inflamed)
|
|
icon_state = "[icon_state]inflamed"
|
|
name = "inflamed [name]"
|
|
|
|
/obj/item/organ/internal/appendix/process(seconds_per_tick)
|
|
..()
|
|
if(!owner || !inflamed || !BP_IS_ROBOTIC(src))
|
|
return
|
|
|
|
if(owner.stasis_value > 0)
|
|
// Decrease the effective tickrate when in stasis.
|
|
// Basically, you die of appendicitis slower while in stasis.
|
|
seconds_per_tick /= owner.stasis_value
|
|
|
|
var/can_feel_pain = ORGAN_CAN_FEEL_PAIN(src)
|
|
inflamed += seconds_per_tick
|
|
|
|
if(can_feel_pain)
|
|
if(prob(5))
|
|
owner.custom_pain("You feel a stinging pain in your abdomen!")
|
|
owner.visible_message("<B>\The [owner]</B> winces slightly.")
|
|
var/obj/item/organ/external/O = owner.get_organ(parent_organ)
|
|
if(O)
|
|
O.add_pain(stage_one_pain_per_second * seconds_per_tick)
|
|
if(inflamed > 400)
|
|
take_internal_damage(stage_two_organ_damage_per_second * seconds_per_tick)
|
|
if(can_feel_pain)
|
|
if(prob(3))
|
|
owner.visible_message("<B>\The [owner]</B> winces painfully.")
|
|
var/obj/item/organ/external/O = owner.get_organ(parent_organ)
|
|
if(O)
|
|
O.add_pain(stage_two_pain_per_second * seconds_per_tick)
|
|
owner.adjustToxLoss(1)
|
|
if(inflamed > 800 && prob(1))
|
|
germ_level += rand(2,6)
|
|
owner.vomit()
|
|
if(inflamed > 1200 && prob(1))
|
|
if(can_feel_pain)
|
|
owner.custom_pain("You feel a stinging pain in your abdomen!")
|
|
owner.Weaken(10)
|
|
|
|
var/obj/item/organ/external/E = owner.get_organ(parent_organ)
|
|
if(E)
|
|
E.sever_artery()
|
|
E.germ_level = max(INFECTION_LEVEL_TWO, E.germ_level)
|
|
owner.adjustToxLoss(25)
|
|
removed()
|
|
qdel(src)
|