mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Immursive Audio 2
This commit is contained in:
@@ -18,6 +18,7 @@ SUBSYSTEM_DEF(fire_burning)
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
var/delta_time = wait * 0.1
|
||||
|
||||
while(currentrun.len)
|
||||
var/obj/O = currentrun[currentrun.len]
|
||||
@@ -28,10 +29,12 @@ SUBSYSTEM_DEF(fire_burning)
|
||||
return
|
||||
continue
|
||||
|
||||
if(O.resistance_flags & ON_FIRE)
|
||||
O.take_damage(20, BURN, "fire", 0)
|
||||
else
|
||||
processing -= O
|
||||
|
||||
if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun
|
||||
if(!(O.resistance_flags & FIRE_PROOF))
|
||||
O.take_damage(10 * delta_time, BURN, "fire", 0)
|
||||
else
|
||||
O.extinguish()
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(machines)
|
||||
name = "Machines"
|
||||
init_order = INIT_ORDER_MACHINES
|
||||
flags = SS_KEEP_TIMING
|
||||
wait = 2 SECONDS
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
var/list/powernets = list()
|
||||
@@ -27,7 +28,7 @@ SUBSYSTEM_DEF(machines)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/machines/fire(resumed = 0)
|
||||
/datum/controller/subsystem/machines/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
for(var/datum/powernet/Powernet in powernets)
|
||||
Powernet.reset() //reset the power state.
|
||||
@@ -36,11 +37,10 @@ SUBSYSTEM_DEF(machines)
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
var/seconds = wait * 0.1
|
||||
while(currentrun.len)
|
||||
var/obj/machinery/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
|
||||
if(!QDELETED(thing) && thing.process(wait * 0.1) != PROCESS_KILL)
|
||||
if(thing.use_power)
|
||||
thing.auto_use_power() //add back the power state
|
||||
else
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define PROB_MOUSE_SPAWN 98
|
||||
|
||||
SUBSYSTEM_DEF(minor_mapping)
|
||||
name = "Minor Mapping"
|
||||
init_order = INIT_ORDER_MINOR_MAPPING
|
||||
@@ -5,29 +7,43 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
|
||||
/datum/controller/subsystem/minor_mapping/Initialize(timeofday)
|
||||
trigger_migration(CONFIG_GET(number/mice_roundstart))
|
||||
// place_satchels()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10)
|
||||
var/list/exposed_wires = find_exposed_wires()
|
||||
|
||||
var/mob/living/simple_animal/mouse/M
|
||||
var/mob/living/simple_animal/mouse/mouse
|
||||
var/turf/proposed_turf
|
||||
|
||||
while((num_mice > 0) && exposed_wires.len)
|
||||
proposed_turf = pick_n_take(exposed_wires)
|
||||
if(!M)
|
||||
M = new(proposed_turf)
|
||||
else
|
||||
M.forceMove(proposed_turf)
|
||||
if(M.environment_is_safe())
|
||||
num_mice -= 1
|
||||
M = null
|
||||
if(prob(PROB_MOUSE_SPAWN))
|
||||
if(!mouse)
|
||||
mouse = new(proposed_turf)
|
||||
else
|
||||
mouse.forceMove(proposed_turf)
|
||||
// else
|
||||
// mouse = new /mob/living/simple_animal/hostile/regalrat/controlled(proposed_turf)
|
||||
if(mouse.environment_is_safe())
|
||||
num_mice -= 1
|
||||
mouse = null
|
||||
|
||||
// /datum/controller/subsystem/minor_mapping/proc/place_satchels(amount=10)
|
||||
// var/list/turfs = find_satchel_suitable_turfs()
|
||||
|
||||
// while(turfs.len && amount > 0)
|
||||
// var/turf/T = pick_n_take(turfs)
|
||||
// var/obj/item/storage/backpack/satchel/flat/F = new(T)
|
||||
|
||||
// SEND_SIGNAL(F, COMSIG_OBJ_HIDE, T.intact)
|
||||
// amount--
|
||||
|
||||
/proc/find_exposed_wires()
|
||||
var/list/exposed_wires = list()
|
||||
exposed_wires.Cut()
|
||||
|
||||
var/list/all_turfs
|
||||
for (var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
|
||||
for(var/turf/open/floor/plating/T in all_turfs)
|
||||
if(is_blocked_turf(T))
|
||||
@@ -36,3 +52,15 @@ SUBSYSTEM_DEF(minor_mapping)
|
||||
exposed_wires += T
|
||||
|
||||
return shuffle(exposed_wires)
|
||||
|
||||
// /proc/find_satchel_suitable_turfs()
|
||||
// var/list/suitable = list()
|
||||
|
||||
// for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
// for(var/t in block(locate(1,1,z), locate(world.maxx,world.maxy,z)))
|
||||
// if(isfloorturf(t) && !isplatingturf(t))
|
||||
// suitable += t
|
||||
|
||||
// return shuffle(suitable)
|
||||
|
||||
#undef PROB_MOUSE_SPAWN
|
||||
|
||||
@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(parallax)
|
||||
. = ..()
|
||||
if(prob(70)) //70% chance to pick a special extra layer
|
||||
random_layer = pick(/obj/screen/parallax_layer/random/space_gas, /obj/screen/parallax_layer/random/asteroids)
|
||||
random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_SILVER, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color.
|
||||
random_parallax_color = pick(COLOR_TEAL, COLOR_GREEN, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE, COLOR_PURPLE)//Special color for random_layer1. Has to be done here so everyone sees the same color. [COLOR_SILVER]
|
||||
planet_y_offset = rand(100, 160)
|
||||
planet_x_offset = rand(100, 160)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user