Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 0865f6f

Browse files
Adds day/night cycle to icemoon (#22573)
* fix + adds icemoon * area fix
1 parent af0e67d commit 0865f6f

File tree

10 files changed

+153
-112
lines changed

10 files changed

+153
-112
lines changed

_maps/map_files/IceMeta/IceMeta.dmm

Lines changed: 96 additions & 93 deletions
Large diffs are not rendered by default.

code/controllers/subsystem/daylight.dm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
#define NIGHT_TURF_BRIGHTNESS 0.1
2+
13
SUBSYSTEM_DEF(daylight)
24
name = "Daylight"
35
wait = 2 SECONDS
6+
flags = SS_NO_INIT
47
/// Time required to complete a full day-night cycle
58
var/daylight_time = 24 MINUTES
69
/// All areas that should update their lighting based on time of day
@@ -17,4 +20,4 @@ SUBSYSTEM_DEF(daylight)
1720
var/light_alpha = round(255 * light_coefficient)
1821
var/light_color = rgb(255, 130 + 125 * light_coefficient, 130 + 125 * light_coefficient)
1922
for(var/area/lit_area as anything in daylight_areas)
20-
lit_area.set_base_lighting(light_color, light_alpha)
23+
lit_area.set_base_lighting(light_color, light_alpha * lit_area.daylight_multiplier)

code/game/area/Space_Station_13_areas.dm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
681681
flags_1 = NONE
682682
ambience_index = AMBIENCE_ENGI
683683
sound_environment = SOUND_AREA_SPACE
684+
lights_always_start_on = TRUE
684685
minimap_color = "#6b6b6b"
685686
airlock_wires = /datum/wires/airlock/engineering
686687

@@ -709,10 +710,18 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
709710
name = "Starboard Quarter (SE) Solar Array"
710711
icon_state = "panelsAS"
711712

713+
/area/solar/starboard/aft/icemoon
714+
name = "Southeast (SE) Geothermal Station" // it's a planetary station and not a ship, cardinal directions apply
715+
uses_daylight = TRUE
716+
712717
/area/solar/starboard/fore
713718
name = "Starboard Bow (NE) Solar Array"
714719
icon_state = "panelsFS"
715720

721+
/area/solar/starboard/fore/icemoon
722+
name = "Northeast (NE) Geothermal Station"
723+
uses_daylight = TRUE
724+
716725
/area/solar/port
717726
name = "Port (W) Solar Array"
718727
icon_state = "panelsP"
@@ -721,10 +730,18 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
721730
name = "Port Quarter (SW) Solar Array"
722731
icon_state = "panelsAP"
723732

733+
/area/solar/port/aft/icemoon
734+
name = "Southwest (SW) Geothermal Station"
735+
uses_daylight = TRUE
736+
724737
/area/solar/port/fore
725738
name = "Port Bow (NW) Solar Array"
726739
icon_state = "panelsFP"
727740

741+
/area/solar/port/fore/icemoon
742+
name = "Northwest (NW) Geothermal Station"
743+
uses_daylight = TRUE
744+
728745

729746
//Solar Maint
730747

code/game/area/areas.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@
138138

139139
/// Whether to cycle brightness based on time of day
140140
var/uses_daylight = FALSE
141+
/// Daylight brightness
142+
var/daylight_multiplier = 1
141143

142144
/**
143145
* A list of teleport locations

code/game/area/areas/mining.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@
181181
power_light = FALSE
182182
requires_power = TRUE
183183
ambience_index = AMBIENCE_MINING
184+
uses_daylight = TRUE
185+
daylight_multiplier = 0.7
184186

185187
/area/icemoon/top_layer/outdoors
186188
name = "Icemoon Wastes"

code/game/turfs/closed/minerals.dm

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@
243243

244244
/turf/closed/mineral/random/high_chance/snow/top_layer
245245
light_range = 2
246-
light_power = 0.1
246+
light_power = NIGHT_TURF_BRIGHTNESS
247+
light_color = COLOR_STARLIGHT
247248
mineralSpawnChanceList = list(
248249
/turf/closed/mineral/uranium/ice/icemoon/top_layer = 35, /turf/closed/mineral/diamond/ice/icemoon/top_layer = 25, /turf/closed/mineral/gold/ice/icemoon/top_layer = 40, /turf/closed/mineral/titanium/ice/icemoon/top_layer = 45,
249250
/turf/closed/mineral/silver/ice/icemoon/top_layer = 50, /turf/closed/mineral/plasma/ice/icemoon/top_layer = 50, /turf/closed/mineral/bscrystal/ice/icemoon/top_layer = 15, /turf/closed/mineral/dilithium/ice/icemoon/top_layer = 15)
@@ -335,7 +336,8 @@
335336

336337
/turf/closed/mineral/random/snow/top_layer
337338
light_range = 2
338-
light_power = 0.1
339+
light_power = NIGHT_TURF_BRIGHTNESS
340+
light_color = COLOR_STARLIGHT
339341
mineralSpawnChanceList = list(
340342
/turf/closed/mineral/uranium/ice/icemoon/top_layer = 5, /turf/closed/mineral/diamond/ice/icemoon/top_layer = 1, /turf/closed/mineral/gold/ice/icemoon/top_layer = 10, /turf/closed/mineral/titanium/ice/icemoon/top_layer = 10,
341343
/turf/closed/mineral/silver/ice/icemoon/top_layer = 12, /turf/closed/mineral/plasma/ice/icemoon/top_layer = 19, /turf/closed/mineral/iron/ice/icemoon/top_layer = 40,
@@ -409,7 +411,8 @@
409411

410412
/turf/closed/mineral/iron/ice/icemoon/top_layer
411413
light_range = 2
412-
light_power = 0.1
414+
light_power = NIGHT_TURF_BRIGHTNESS
415+
light_color = COLOR_STARLIGHT
413416

414417
/turf/closed/mineral/uranium
415418
mineralType = /obj/item/stack/ore/uranium
@@ -452,7 +455,8 @@
452455

453456
/turf/closed/mineral/uranium/ice/icemoon/top_layer
454457
light_range = 2
455-
light_power = 0.1
458+
light_power = NIGHT_TURF_BRIGHTNESS
459+
light_color = COLOR_STARLIGHT
456460

457461
/turf/closed/mineral/diamond
458462
mineralType = /obj/item/stack/ore/diamond
@@ -495,7 +499,8 @@
495499

496500
/turf/closed/mineral/diamond/ice/icemoon/top_layer
497501
light_range = 2
498-
light_power = 0.1
502+
light_power = NIGHT_TURF_BRIGHTNESS
503+
light_color = COLOR_STARLIGHT
499504

500505
/turf/closed/mineral/gold
501506
mineralType = /obj/item/stack/ore/gold
@@ -538,7 +543,8 @@
538543

539544
/turf/closed/mineral/gold/ice/icemoon/top_layer
540545
light_range = 2
541-
light_power = 0.1
546+
light_power = NIGHT_TURF_BRIGHTNESS
547+
light_color = COLOR_STARLIGHT
542548

543549
/turf/closed/mineral/silver
544550
mineralType = /obj/item/stack/ore/silver
@@ -581,7 +587,8 @@
581587

582588
/turf/closed/mineral/silver/ice/icemoon/top_layer
583589
light_range = 2
584-
light_power = 0.1
590+
light_power = NIGHT_TURF_BRIGHTNESS
591+
light_color = COLOR_STARLIGHT
585592

586593
/turf/closed/mineral/titanium
587594
mineralType = /obj/item/stack/ore/titanium
@@ -624,8 +631,8 @@
624631

625632
/turf/closed/mineral/titanium/ice/icemoon/top_layer
626633
light_range = 2
627-
light_power = 0.1
628-
634+
light_power = NIGHT_TURF_BRIGHTNESS
635+
light_color = COLOR_STARLIGHT
629636

630637
/turf/closed/mineral/plasma
631638
mineralType = /obj/item/stack/ore/plasma
@@ -668,7 +675,8 @@
668675

669676
/turf/closed/mineral/plasma/ice/icemoon/top_layer
670677
light_range = 2
671-
light_power = 0.1
678+
light_power = NIGHT_TURF_BRIGHTNESS
679+
light_color = COLOR_STARLIGHT
672680

673681
/turf/closed/mineral/bananium
674682
mineralType = /obj/item/stack/ore/bananium
@@ -752,7 +760,8 @@
752760

753761
/turf/closed/mineral/bscrystal/ice/icemoon/top_layer
754762
light_range = 2
755-
light_power = 0.1
763+
light_power = NIGHT_TURF_BRIGHTNESS
764+
light_color = COLOR_STARLIGHT
756765

757766
/turf/closed/mineral/volcanic
758767
environment_type = "basalt"
@@ -977,7 +986,8 @@
977986

978987
/turf/closed/mineral/gibtonite/ice/icemoon/top_layer
979988
light_range = 2
980-
light_power = 0.1
989+
light_power = NIGHT_TURF_BRIGHTNESS
990+
light_color = COLOR_STARLIGHT
981991

982992
/turf/closed/mineral/magmite
983993
mineralType = /obj/item/magmite

code/game/turfs/open/floor/plating/asteroid.dm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@
208208

209209
/turf/open/floor/plating/asteroid/snow/icemoon/top_layer
210210
light_range = 2
211-
light_power = 0.1
211+
light_power = NIGHT_TURF_BRIGHTNESS
212+
light_color = COLOR_STARLIGHT
212213

213214
/turf/open/lava/plasma/ice_moon
214215
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
@@ -252,7 +253,8 @@
252253

253254
/turf/open/floor/plating/asteroid/snow/ice/icemoon/top_layer
254255
light_range = 2
255-
light_power = 0.1
256+
light_power = NIGHT_TURF_BRIGHTNESS
257+
light_color = COLOR_STARLIGHT
256258

257259
/turf/open/floor/plating/asteroid/snow/ice/burn_tile()
258260
return FALSE

code/game/turfs/open/floor/plating/misc_plating.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@
225225

226226
/turf/open/floor/plating/ice/icemoon/top_layer
227227
light_range = 2
228-
light_power = 0.1
228+
light_power = NIGHT_TURF_BRIGHTNESS
229+
light_color = COLOR_STARLIGHT
229230

230231
/turf/open/floor/plating/snowed
231232
name = "snowed-over plating"

yogstation/code/game/turfs/simulated/minerals.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@
4040

4141
/turf/closed/mineral/dilithium/ice/icemoon/top_layer
4242
light_range = 2
43-
light_power = 0.1
43+
light_power = NIGHT_TURF_BRIGHTNESS
44+
light_color = COLOR_STARLIGHT

yogstation/code/modules/jungleland/jungle_turfs.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Temperature: 126.85 °C (400 K)
8282
var/ore_present = ORE_EMPTY
8383
var/spawn_overlay = TRUE
8484
var/can_mine = TRUE
85-
light_power = 0.1
85+
light_power = NIGHT_TURF_BRIGHTNESS
8686
light_range = 2 // fullbright it for proper shadows and darkspawn interaction
8787
light_color = COLOR_STARLIGHT
8888

@@ -194,7 +194,7 @@ Temperature: 126.85 °C (400 K)
194194
planetary_atmos = TRUE
195195
baseturfs = /turf/open/water/smooth/toxic_pit
196196

197-
light_power = 0.15 // reflects the moonlight
197+
light_power = NIGHT_TURF_BRIGHTNESS + 0.05 // reflects the moonlight
198198
light_range = 2 // fullbright it for proper shadows and darkspawn interaction
199199
light_color = COLOR_STARLIGHT
200200

0 commit comments

Comments
 (0)