mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 10:41:42 +00:00
This commit ports the base system of LINDA from TG. This version of linda is the original version, with none of -tg-'s fixes, rewrites, or other such improvements attached. The mob ignite system has been 100% removed, as LINDA does not support this normally. It may be added back in when the improvements and refactors to LINDA have been ported.
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
/obj/machinery/zvent
|
|
name = "Interfloor Air Transfer System"
|
|
|
|
icon = 'icons/obj/pipes.dmi'
|
|
icon_state = "vent-db"
|
|
density = 0
|
|
anchored=1
|
|
|
|
var/on = 0
|
|
var/volume_rate = 800
|
|
|
|
/obj/machinery/zvent/process()
|
|
|
|
//all this object does, is make its turf share air with the ones above and below it, if they have a vent too.
|
|
if (istype(loc,/turf/simulated)) //if we're not on a valid turf, forget it
|
|
for (var/new_z in list(-1,1)) //change this list if a fancier system of z-levels gets implemented
|
|
var/turf/simulated/zturf_conn = locate(x,y,z+new_z)
|
|
if (istype(zturf_conn))
|
|
var/obj/machinery/zvent/zvent_conn= locate(/obj/machinery/zvent) in zturf_conn
|
|
if (istype(zvent_conn))
|
|
//both floors have simulated turfs, share()
|
|
var/turf/simulated/myturf = loc
|
|
var/datum/gas_mixture/conn_air = zturf_conn.air //TODO: pop culture reference
|
|
var/datum/gas_mixture/my_air = myturf.air
|
|
if (istype(conn_air) && istype(my_air))
|
|
my_air.share(conn_air)
|
|
air_update_turf()
|