diff --git a/code/game/Rogue Star/magic_damage.dm b/code/game/Rogue Star/magic_damage.dm new file mode 100644 index 00000000000..a48151af2d9 --- /dev/null +++ b/code/game/Rogue Star/magic_damage.dm @@ -0,0 +1,212 @@ +//RS FILE +#define ED_OVERLAY_LIGHT 1 +#define ED_OVERLAY_MEDIUM 2 +#define ED_OVERLAY_HEAVY 3 +#define ED_OVERLAY_EXTREME 4 + +/mob/living + var/ether_damage = 0.0 + +/mob/living/proc/handle_ether_damage() + if(!stat && health - ether_damage <= 0) + death() + +/mob/living/carbon/human/handle_ether_damage() + species.handle_ether_damage(src) + +/datum/species + var/ether_slow = 1 + +/datum/species/proc/handle_ether_damage(var/mob/living/carbon/human/H) + if(!H.stat && (H.health + 100) - H.ether_damage <= 0) + H.death() + var/mob/living/simple_mob/hostile/seething/S = new(get_turf(H)) + S.visible_message(SPAN_DANGER("\The [S] seems to climb out of \the [H]!!!")) + +/mob/living/proc/ether_death() + ether_damage = 0.0 + var/mob/living/simple_mob/hostile/seething/S = new(get_turf(src)) + S.visible_message(SPAN_DANGER("\The [S] seems to climb out of \the [src]!!!")) + +/mob/living/carbon/human/ether_death() + ether_damage = 0.0 + +/mob/living/proc/getEtherDamage() + return ether_damage + +/mob/living/proc/adjustEtherDamage(var/amount = 0.0) + ether_damage += amount + + if(ether_damage < 0) + ether_damage = 0 + if(amount > 0) + add_modifier(/datum/modifier/ether_damage) + +/datum/modifier/ether_damage + name = "Ether Damage" + + var/last_dmg = 0.0 + var/ticks_since_dmg = 0 + var/heal_factor = 0 + var/overlay_state + var/obj/screen/fullscreen/ether_damage/our_overlay + +/datum/modifier/ether_damage/expire(silent) + . = ..() + clear_overlay() + +/datum/modifier/ether_damage/tick() + var/current_dmg = holder.getEtherDamage() + if(current_dmg <= 0) + expire() + return + if(holder.stat == DEAD) + holder.ether_death() + expire() + return + new /obj/particle_emitter/ether_damage/limited(get_turf(holder)) + if(current_dmg > last_dmg) + ticks_since_dmg = 0 + heal_factor = 0 + else + ticks_since_dmg ++ + if(ticks_since_dmg >= 10) + heal_factor ++ + holder.adjustEtherDamage(-heal_factor) + last_dmg = current_dmg + assess_overlay() + +/datum/modifier/ether_damage/proc/assess_overlay() + if(!holder.client) + return + var/which = null + switch(holder.getEtherDamage()) + if(10 to 49) + which = ED_OVERLAY_LIGHT + if(50 to 99) + which = ED_OVERLAY_MEDIUM + if(100 to 149) + which = ED_OVERLAY_HEAVY + if(150 to INFINITY) + which = ED_OVERLAY_EXTREME + else + which = null + + if(overlay_state == which) + return + overlay_state = which + if(!which) + clear_overlay() + return + + if(!our_overlay) + our_overlay = holder.overlay_fullscreen("ether", /obj/screen/fullscreen/ether_damage) + + switch(which) + if(ED_OVERLAY_LIGHT) + slowdown = 0 + our_overlay.particles.count = 100 + our_overlay.particles.spawning = 0.1 + if(ED_OVERLAY_MEDIUM) + slowdown = 0.5 + our_overlay.particles.count = 100 + our_overlay.particles.spawning = 0.25 + if(ED_OVERLAY_HEAVY) + slowdown = 1 + our_overlay.particles.count = 500 + our_overlay.particles.spawning = 1 + if(ED_OVERLAY_EXTREME) + slowdown = 1 + our_overlay.particles.count = 5000 + our_overlay.particles.spawning = 10 + our_overlay.icon_state = "[which]" + +/datum/modifier/ether_damage/proc/clear_overlay() + holder.clear_fullscreen("ether") + holder.clear_fullscreen("ether_damage") + +/obj/particle_emitter/ether_damage + particles = new/particles/ether_damage + +/obj/particle_emitter/ether_damage/limited + lifespan = 3 + +/particles/ether_damage + icon = 'icons/rogue-star/particlesx32.dmi' + icon_state = list("eh1","eh2","eh3","eh4","eh5","eh6","eh7",) + color = "#ae00ff" + width = 1000 + height = 1000 + count = 10 + spawning = 1 + bound1 = list(-1000, -1000, -1000) + lifespan = 10 + fade = 5 + position = generator("box", list(-8,-8,0), list(8,8,0)) + gravity = list(0,0.5) + friction = 0.1 + velocity = generator("vector",list(-3,0),list(3,0)) + spin = generator("num", -10,10) + scale = 0.25 + grow = 0.1 + gradient = list(0, "#ae00ff", 1, "#520079", 2, "#ff00ff", "loop") + +/particles/ether_damage/fullscreen + width = 500 + height = 500 + spawning = 0.1 + position = generator("box", list(-250,-300,0), list(250,-300,0)) + gravity = list(0,1) + grow = 0.05 + drift = generator("sphere", 0, 2) + lifespan = 50 + +/particles/ether_damage/fullscreen/medium + count = 100 + spawning = 0.25 +/particles/ether_damage/fullscreen/heavy + count = 500 + spawning = 1 +/particles/ether_damage/fullscreen/extreme + count = 5000 + spawning = 10 + +/obj/aoe + name = "ether damage applier" + icon = null + icon_state = null + anchored = TRUE + mouse_opacity = FALSE + plane = PLANE_LIGHTING_ABOVE + particles = new/particles/ether_damage + +/obj/aoe/Crossed(O) + if(!isliving(O)) + return + var/mob/living/L = O + L.adjustEtherDamage(25) + +/obj/particle_emitter/ether_damage/screen + particles = new/particles/ether_damage/fullscreen + +/obj/screen/fullscreen/ether_damage + icon = 'icons/rogue-star/full_screen_effects.dmi' + icon_state = null + mouse_opacity = FALSE + layer = 18.4 + + particles = new/particles/ether_damage/fullscreen + +///// +/mob/living/simple_mob/hostile/seething/handle_ether_damage() + health = maxHealth + ether_damage = 0.0 + +/mob/living/simple_mob/hostile/seething_spawner/handle_ether_damage() + health = maxHealth + ether_damage = 0.0 + +#undef ED_OVERLAY_LIGHT +#undef ED_OVERLAY_MEDIUM +#undef ED_OVERLAY_HEAVY +#undef ED_OVERLAY_EXTREME diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 9e4eb0c2a5f..14e316948f9 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -99,6 +99,7 @@ set_stat(CONSCIOUS) else health = getMaxHealth() - getFireLoss() - getBruteLoss() + handle_ether_damage() //RS ADD oxyloss = 0 toxloss = 0 cloneloss = 0 diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 575a26bfb0f..822c01c8776 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -16,6 +16,7 @@ total_burn += O.burn_dam health = getMaxHealth() - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute + handle_ether_damage() //RS ADD //TODO: fix husking if( ((getMaxHealth() - total_burn) < config.health_threshold_dead * huskmodifier) && stat == DEAD) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 69a7582c38e..1fbc8d62c77 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -20,6 +20,7 @@ . += M.slowdown var/health_deficiency = (getMaxHealth() - health) + health_deficiency += ether_damage * species.ether_slow //RS ADD if(istype(src, /mob/living/carbon/human)) //VOREStation Edit Start var/mob/living/carbon/human/H = src health_deficiency *= H.species.trauma_mod //Species pain sensitivity does not apply to painkillers, so we apply it before diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6a3cf39f7f1..36b28e14e2f 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1464,7 +1464,7 @@ var/no_damage = 1 var/trauma_val = 0 // Used in calculating softcrit/hardcrit indicators. if(!(species.flags & NO_PAIN)) - trauma_val = max(traumatic_shock,halloss)/species.total_health + trauma_val = max(traumatic_shock,halloss)/species.total_health //RS EDIT var/limb_trauma_val = trauma_val*0.3 // Collect and apply the images all at once to avoid appearance churn. var/list/health_images = list() @@ -1477,6 +1477,8 @@ if(on_fire) health_images += image('icons/mob/OnFire.dmi',"[get_fire_icon_state()]") + trauma_val += ether_damage /species.total_health //RS ADD + // Show a general pain/crit indicator if needed. if(trauma_val) if(!(species.flags & NO_PAIN)) diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index 7b64fd1cc5d..2bdef026d6c 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -122,6 +122,7 @@ human_brute = humanform.getActualBruteLoss() human_burn = humanform.getActualFireLoss() health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - human_brute - human_burn + handle_ether_damage() //RS ADD //Alive, becoming dead if((stat < DEAD) && (health <= 0)) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm index 2dd26bcc8b5..930b81eb3eb 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm @@ -146,6 +146,7 @@ human_brute = humanform.getActualBruteLoss() human_burn = humanform.getActualFireLoss() health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - human_brute - human_burn + handle_ether_damage() //RS ADD //Alive, becoming dead if((stat < DEAD) && (health <= 0)) diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 41ec416d17d..e062aa8eedd 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -553,6 +553,15 @@ /datum/species/crew_shadekin/get_bodytype() return SPECIES_SHADEKIN +//RS ADD START +/datum/species/crew_shadekin/handle_ether_damage(var/mob/living/carbon/human/H) + if((H.health + 100) - H.ether_damage <= 0) + H.ISay("*scream") + H.halloss = 999 + H.sleeping = 60 + H.ether_damage = 0 +//RS ADD END + //These species are not really species but are just there for custom species selection /datum/species/fl_zorren diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a5044053d87..baa54c30cd7 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -125,6 +125,7 @@ set_stat(CONSCIOUS) else health = getMaxHealth() - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss + handle_ether_damage() //RS ADD //This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually //affects them once clothing is factored in. ~Errorage diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 49bb3eaf164..c1e3bfe80ad 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -174,8 +174,8 @@ setOxyLoss(0) else health = 100 - getFireLoss() - getBruteLoss() // Oxyloss is not part of health as it represents AIs backup power. AI is immune against ToxLoss as it is machine. + handle_ether_damage() //RS ADD /mob/living/silicon/ai/rejuvenate() ..() add_ai_verbs(src) - diff --git a/code/modules/mob/living/silicon/decoy/life.dm b/code/modules/mob/living/silicon/decoy/life.dm index 07683eb2dcf..3269cbb7fd9 100644 --- a/code/modules/mob/living/silicon/decoy/life.dm +++ b/code/modules/mob/living/silicon/decoy/life.dm @@ -13,3 +13,4 @@ set_stat(CONSCIOUS) else health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() + handle_ether_damage() //RS ADD diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index 6e7e8a42a10..fb1b35a6960 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -1,5 +1,5 @@ /mob/living/silicon/pai/Life() - + handle_modifiers() //RS ADD if(src.cable) if(get_dist(src, src.cable) > 1) var/turf/T = get_turf_or_move(src.loc) @@ -13,6 +13,8 @@ if (src.stat == DEAD) return + updatehealth() //RS ADD + if(card.cell != PP_FUNCTIONAL|| card.processor != PP_FUNCTIONAL || card.board != PP_FUNCTIONAL || card.capacitor != PP_FUNCTIONAL) death() @@ -48,3 +50,4 @@ set_stat(CONSCIOUS) else health = 100 - getBruteLoss() - getFireLoss() + handle_ether_damage() //RS ADD diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 7cfa78b7311..70ccd1ee073 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -311,6 +311,7 @@ var/list/mob_hat_cache = list() set_stat(CONSCIOUS) return health = maxHealth - (getBruteLoss() + getFireLoss()) + handle_ether_damage() //RS ADD return //Easiest to check this here, then check again in the robot proc. diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index 82c5edd4149..b234693686c 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -4,6 +4,7 @@ set_stat(CONSCIOUS) return health = getMaxHealth() - (getBruteLoss() + getFireLoss()) + handle_ether_damage() //RS ADD return /mob/living/silicon/robot/getBruteLoss() @@ -152,4 +153,4 @@ /mob/living/silicon/robot/emp_act(severity) uneq_all() - ..() //Damage is handled at /silicon/ level. \ No newline at end of file + ..() //Damage is handled at /silicon/ level. diff --git a/code/modules/mob/living/simple_mob/life.dm b/code/modules/mob/living/simple_mob/life.dm index ad4ecaba751..01c5e8b8659 100644 --- a/code/modules/mob/living/simple_mob/life.dm +++ b/code/modules/mob/living/simple_mob/life.dm @@ -22,6 +22,7 @@ //Should we be dead? /mob/living/simple_mob/updatehealth() health = getMaxHealth() - getFireLoss() - getBruteLoss() - getToxLoss() - getOxyLoss() - getCloneLoss() + handle_ether_damage() //RS ADD //Alive, becoming dead if((stat < DEAD) && (health <= 0)) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 7023f7b554f..5694de86b56 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -1,10 +1,22 @@ var/list/obj/machinery/photocopier/faxmachine/allfaxes = list() -var/list/admin_departments = list("[using_map.boss_name]", "Virgo-Prime Governmental Authority", "Virgo-Erigonne Job Boards", "Supply") +var/list/admin_departments = list() // RS Edit: Fax machine fix (Lira, March 2026) var/list/alldepartments = list() var/global/last_fax_role_request var/list/adminfaxes = list() //cache for faxes that have been sent to admins +// RS Add: Fax machine fix (Lira, March 2026) +/proc/setup_fax_admin_departments() + if(!using_map) + return + + admin_departments = list( + "[using_map.boss_name]", + "Virgo-Prime Governmental Authority", + "Virgo-Erigonne Job Boards", + "Supply" + ) + /obj/machinery/photocopier/faxmachine name = "fax machine" desc = "Send papers and pictures far away! Or to your co-worker's office a few doors down." diff --git a/icons/rogue-star/full_screen_effects.dmi b/icons/rogue-star/full_screen_effects.dmi new file mode 100644 index 00000000000..4d50def5868 Binary files /dev/null and b/icons/rogue-star/full_screen_effects.dmi differ diff --git a/icons/rogue-star/particlesx32.dmi b/icons/rogue-star/particlesx32.dmi index 87251445058..f378c45e45a 100644 Binary files a/icons/rogue-star/particlesx32.dmi and b/icons/rogue-star/particlesx32.dmi differ diff --git a/maps/~map_system/maps_rs.dm b/maps/~map_system/maps_rs.dm index 3976a7cc095..1ecec1e571e 100644 --- a/maps/~map_system/maps_rs.dm +++ b/maps/~map_system/maps_rs.dm @@ -68,6 +68,7 @@ var/global/list/possible_station_maps = list( using_map = new DEFAULT_MAP //Something has gone wrong, let's try to make an emergency map object! if(using_map) + setup_fax_admin_departments() // Fax machine fix (Lira, March 2026) log_debug("[using_map.name] was created successfully.") else error("initialise_map_list() failed to create a map object. No maps will load.") diff --git a/vorestation.dme b/vorestation.dme index 6c1002caeef..690ef84a299 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1666,6 +1666,7 @@ #include "code\game\Rogue Star\hide_and_seek.dm" #include "code\game\Rogue Star\inv_return.dm" #include "code\game\Rogue Star\kiss.dm" +#include "code\game\Rogue Star\magic_damage.dm" #include "code\game\Rogue Star\multipoint_barrier.dm" #include "code\game\Rogue Star\objective_objects.dm" #include "code\game\Rogue Star\special_persist.dm"