mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
4ecb0bc21c
Repaths obj/machinery to obj/structure/machinery. **Note for reviewers:** the only meaningful changed code exists within **code/game/objects/structures.dm** and **code/game/objects/structures/_machinery.dm**, largely concerning damage procs. With the exception of moving airlock defines to their own file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES. Objects, _categorically_, are largely divided between those you can hold in your hand/inventory and those you can't. Machinery objects are already subtypes of Structures behaviorally, this PR just makes their pathing reflect that, and allows for future work (tool actions, more health/destruction functionality) to be developed without unnecessary code duplication. I have tested this PR by loading up the Horizon and dismantling various machines and structures with tools, shooting guns of various types throughout the ship, and detonating a bunch of explosions throughout the ship.
21 lines
970 B
Plaintext
21 lines
970 B
Plaintext
/datum/event/gravity
|
|
announceWhen = 5
|
|
ic_name = "a gravity failure"
|
|
no_fake = 1
|
|
|
|
/datum/event/gravity/setup()
|
|
endWhen = rand(15, 60)
|
|
|
|
/datum/event/gravity/announce()
|
|
command_announcement.Announce("Feedback surge detected in the gravity generation systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes.", "Gravity Failure", zlevels = affecting_z)
|
|
|
|
/datum/event/gravity/start()
|
|
..()
|
|
|
|
// TO-DO: I'm not gonna touch this can of worms right now, but this effectively means that gravity is global for everyone,
|
|
// meaning, if the horizon loses gravity, EVERYONE DOES. this seriously needs to be fixed, and i'm commenting out the gravity flux event until that is done
|
|
GLOB.gravity_is_on = 0
|
|
for(var/obj/structure/machinery/gravity_generator/main/generator in SSmachinery.gravity_generators)
|
|
if(generator.z in affecting_z)
|
|
generator.eventshutofftoggle()
|