mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-06 22:29:14 +00:00
Separates the 'count and assess everything' stuff to it's own datum, called the metric datum, which I plan to add on to in the future to make counting and metrics easier. Makes decision process a bit more weight-based, will probably continue tweaking later. Makes the admin debug UI have links to change settings easily. Adds replacement for grid check event, which works similar to the old one, but is now based on a physical machine in the game world, that Engineering can hack to make the event end faster, if so desired. Note that the machine is not mapped in, and won't be mapped in until the event system is ready for launch. Adds grid_check variables to SMESes and APCs to make them stop doing work without draining the battery. Grid checks in the new system are caused by a "power spike" which originates from the engine and will cause bad things, should no grid checker machine be connected to the power-net. These power spikes occur when the GM decides that a grid check is a good event to have. The grid checker can be built and deconstructed using the standard machine construction methods.
22 lines
1.2 KiB
Plaintext
22 lines
1.2 KiB
Plaintext
// New grid check event:
|
|
// Very similar to the old one, power goes out in most of the colony, however the new feature is the ability for engineering to
|
|
// get power back on sooner, if they are able to reach a special machine and initiate a manual reboot. If no one is able to do so,
|
|
// it will reboot itself after a few minutes, just like the old one. Bad things happen if there is no grid checker machine protecting
|
|
// the powernet when this event fires.
|
|
|
|
/datum/gm_action/grid_check
|
|
name = "grid check"
|
|
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
|
chaotic = 20
|
|
|
|
/datum/gm_action/grid_check/get_weight()
|
|
return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 30)
|
|
|
|
/datum/gm_action/grid_check/start()
|
|
// This sets off a chain of events that lead to the actual grid check (or perhaps worse).
|
|
// First, the Supermatter engine makes a power spike.
|
|
for(var/obj/machinery/power/generator/engine in machines)
|
|
engine.power_spike()
|
|
break // Just one engine, please.
|
|
// After that, the engine checks if a grid checker exists on the same powernet, and if so, it triggers a blackout.
|
|
// If not, lots of stuff breaks. See code/modules/power/generator.dm for that piece of code. |