mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Starlight
This commit ports baystation12's implementation of starlight, modified to rely on the master-controller due to differences between us, -tg-, and bay12. Starlight allows space tiles to give off light, the amount of light can be configured in config.txt.
This commit is contained in:
@@ -152,6 +152,8 @@
|
||||
// 15, 45, 70 minutes respectively
|
||||
var/list/event_delay_upper = list(EVENT_LEVEL_MUNDANE = 9000, EVENT_LEVEL_MODERATE = 27000, EVENT_LEVEL_MAJOR = 42000)
|
||||
|
||||
var/starlight = 0 // Whether space turfs have ambient light or not
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
for (var/T in L)
|
||||
@@ -501,6 +503,10 @@
|
||||
config.event_delay_upper[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2])
|
||||
config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
|
||||
|
||||
if("starlight")
|
||||
var/vvalue = text2num(value)
|
||||
config.starlight = vvalue >= 0 ? vvalue : 0
|
||||
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ datum/controller/game_controller/proc/setup()
|
||||
|
||||
color_windows_init()
|
||||
setup_objects()
|
||||
setup_starlight()
|
||||
setupgenetics()
|
||||
setupfactions()
|
||||
setup_economy()
|
||||
@@ -83,7 +84,6 @@ datum/controller/game_controller/proc/setup()
|
||||
make_mining_asteroid_secret()
|
||||
|
||||
populate_spawn_points()
|
||||
|
||||
/* MOVED TO SCHEDULER
|
||||
|
||||
spawn(0)
|
||||
@@ -125,6 +125,11 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
world << "\red \b Initializations complete."
|
||||
sleep(-1)
|
||||
|
||||
datum/controller/game_controller/proc/setup_starlight()
|
||||
world << "\red \b Initializing Starlight"
|
||||
for(var/turf/space/S in world)
|
||||
S.update_starlight()
|
||||
world << "\red \b Starlight Initilization Complete"
|
||||
|
||||
datum/controller/game_controller/proc/process()
|
||||
processing = 1
|
||||
|
||||
Reference in New Issue
Block a user