Files
Paradise/code/datums/wires/alarm.dm
Charlie Nolan e6f99049f6 MILLA phase 2 (#27659)
* MILLA phase 2

* Lint.

* Build Rust library

* Assorted bugfixes and tweaks

* Simplify fire mechanics and make hotspot sending to DM more reliable.

* Assorted tweaks, fixed an issue in the core engine and removed the softcap it made necesary.

* SM fixes, slower plasmafire, less overpowered pyro anomalies, and air alarm improvements.

* Review fixes.

* Build Rust library

* Unbalanced icon.

* Rebalance immovable rods.

* Unbalanced has alerts, can fight airflow (but get slowed)

* Build Rust library

* Stronger space cooling, slower temperature flow, faster burns, burnt floors, and a hotspot display fix.

* Build Rust library

* Tweaks to avoid merge conflict

* Oops.

* Build Rust library

* Rebalance wind.

* Rebalance temperature flow and space cooling.

* Fix gas flamethrower.

* Build Rust library

* Make air push slowdown directional, so you don't get slowed while moving with the air.

* Variable name cleanup.

* Reduce the speed of wind pushes.

* Prevent wind pushes from breaking your pull.

* Prevent swaps during wind push.

* Made supermatter crytals reliably run last in atmos machinery.

* Sped up plasmafire burning, but dropped the minimum burn amount.

* Rebalanced SM heat output.

* Rebalanced pyro anomaly.

* Build Rust library

* Lint

* Build Rust library

* Uncap fuel burnt readout.

* Added Custom air alarm mode, dropped Refill cap to ONE_ATMOSPHERE.

* Updated air alarm modes to use pressure settings instead of ONE_ATMOSPHERE

* Added a list of areas not in Filtering to atmos alert computer.

* Increase pressure gradient and vent output, especially at low distro pressure.

* Changed Immovable Rod from Moderate to Major.

* Lint

* Build Rust library

* More lint!

* Build Rust library

* Magboots, scaled slowdown, and nukie borg immunity

* Wind image

* Wind v2

* Wind v3

* pngcrush

* pngcrush again

* Moved hotspot removal into SSair, add wind effect.

* Lint

* Build Rust library

* Fix hotspots.

* Hotspot visual based on gas burnt

* Build Rust library

* Scaled wind to gas amount, stopped first wind push while moving.

* Made Rust panic logging safer.

* Made MILLA full tick and sleep timers more honest.

* Pressure overlay, ghost mode, atmos goggles.

* Build Rust library

* Lint

* Build Rust library

* More lint-y stuff.

* Build Rust library

* Repair pressure overlay if it loses its loc.

* Bind pressure overlays to their tile better.

* Build Rust library

* Make the pressure overlay work on z=1 and not proliferate effects.

* Don't block the supply shuttle.

* Don't fine for special effects.

* Maybe don't fine for ghosts, either.

* Build Rust library

* Make pressure overlay play nice with shuttles.

* Build Rust library

* Pressure scanning for borgs.

* Build Rust library

* Lint

* Build Rust library

* Made explosions not generate so much wind.

* Removed an old and non-functional proc.

* Clientless mobs can get pushed again.

* Build Rust library

* cargo fmt

* Build Rust library

* Don't divide by zero.

* Plasmafire generator for the Shadow

* Update shadow to use plasmafire generators

* Fix shadow's plasmafire generators going out on depart.

* Prevent heat2color from runtiming at absolute zero.

* Better nanofrost

* Build Rust library

* Singularity immunity

* Build Rust library

* Add back meson mode to atmospheric scanner goggles, so they don't stare deeply into the SM

* Build Rust library

* Dump panic outputs into data/ instead.

* Build Rust library

* Apply suggestions from code review

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

* Saner handling of MILLA crash.

* Build Rust library

---------

Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2025-01-01 20:12:05 +00:00

82 lines
1.8 KiB
Plaintext

/datum/wires/alarm
holder_type = /obj/machinery/alarm
wire_count = 5
proper_name = "Air alarm"
/datum/wires/alarm/New(atom/_holder)
wires = list(
WIRE_IDSCAN , WIRE_MAIN_POWER1 , WIRE_SIPHON,
WIRE_AI_CONTROL, WIRE_AALARM
)
return ..()
/datum/wires/alarm/interactable(mob/user)
var/obj/machinery/alarm/A = holder
if(A.wiresexposed)
return TRUE
return FALSE
/datum/wires/alarm/get_status()
. = ..()
var/obj/machinery/alarm/A = holder
. += "The Air Alarm is [A.locked ? "" : "un"]locked."
. += "The Air Alarm is [(A.shorted || (A.stat & (NOPOWER|BROKEN))) ? "offline." : "working properly!"]"
. += "The 'AI control allowed' light is [A.aidisabled ? "off" : "on"]."
/datum/wires/alarm/on_cut(wire, mend)
var/obj/machinery/alarm/A = holder
switch(wire)
if(WIRE_IDSCAN)
if(!mend)
A.locked = TRUE
if(WIRE_MAIN_POWER1)
A.shock(usr, 50)
A.shorted = !mend
A.update_icon()
if(WIRE_AI_CONTROL)
A.aidisabled = !mend
if(WIRE_SIPHON)
if(!mend)
A.mode = AALARM_MODE_PANIC
A.apply_mode()
if(WIRE_AALARM)
A.alarm_area.atmosalert(ATMOS_ALARM_DANGER, A)
A.update_icon()
..()
/datum/wires/alarm/on_pulse(wire)
var/obj/machinery/alarm/A = holder
switch(wire)
if(WIRE_IDSCAN)
A.locked = !A.locked
if(WIRE_MAIN_POWER1)
if(!A.shorted)
A.shorted = TRUE
A.update_icon()
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/alarm, unshort_callback)), 120 SECONDS)
if(WIRE_AI_CONTROL)
if(!A.aidisabled)
A.aidisabled = TRUE
A.updateDialog()
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/alarm, enable_ai_control_callback)), 10 SECONDS)
if(WIRE_SIPHON)
if(A.mode == AALARM_MODE_FILTERING)
A.mode = AALARM_MODE_PANIC
else
A.mode = AALARM_MODE_FILTERING
A.apply_mode()
if(WIRE_AALARM)
A.alarm_area.atmosalert(ATMOS_ALARM_NONE, A)
A.update_icon()
..()