mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
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.
25 lines
749 B
Plaintext
25 lines
749 B
Plaintext
// CAMERA CHUNK
|
|
//
|
|
// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed.
|
|
// Allows the Eye to stream these chunks and know what it can and cannot see.
|
|
|
|
/datum/chunk/camera/acquire_visible_turfs(var/list/visible)
|
|
for(var/source in sources)
|
|
if(istype(source, /obj/structure/machinery/camera))
|
|
var/obj/structure/machinery/camera/c = source
|
|
if(!c.can_use())
|
|
continue
|
|
|
|
for(var/turf/t in c.can_see())
|
|
visible[t] = t
|
|
else if(isAI(source))
|
|
var/mob/living/silicon/ai/AI = source
|
|
if (AI.stat == DEAD)
|
|
continue
|
|
for(var/T in seen_turfs_in_range(AI, world.view))
|
|
var/turf/t = T
|
|
visible[t] = t
|
|
else
|
|
log_visualnet("Contained an unhandled source", source)
|
|
sources -= source
|