mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Merge remote-tracking branch 'upstream/master' into wires-tgui
This commit is contained in:
+11
-12
@@ -217,8 +217,7 @@
|
||||
area = A
|
||||
name = "\improper [area.name] APC"
|
||||
else
|
||||
area = get_area_name(areastring)
|
||||
name = "\improper [area.name] APC"
|
||||
name = "\improper [get_area_name(area, TRUE)] APC"
|
||||
area.apc |= src
|
||||
|
||||
update_icon()
|
||||
@@ -1189,31 +1188,31 @@
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
autoflag = 3
|
||||
if(report_power_alarm && is_station_contact(z))
|
||||
SSalarms.power_alarm.clearAlarm(loc, src)
|
||||
if(report_power_alarm)
|
||||
area.poweralert(TRUE, src)
|
||||
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
|
||||
if(autoflag != 2)
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 1)
|
||||
environ = autoset(environ, 1)
|
||||
if(report_power_alarm && is_station_contact(z))
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
if(report_power_alarm)
|
||||
area.poweralert(FALSE, src)
|
||||
autoflag = 2
|
||||
else if(cell.charge < 750 && cell.charge > 10) // <15%, turn off lighting & equipment
|
||||
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
|
||||
equipment = autoset(equipment, 2)
|
||||
lighting = autoset(lighting, 2)
|
||||
environ = autoset(environ, 1)
|
||||
if(report_power_alarm && is_station_contact(z))
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
if(report_power_alarm)
|
||||
area.poweralert(FALSE, src)
|
||||
autoflag = 1
|
||||
else if(cell.charge <= 0) // zero charge, turn all off
|
||||
if(autoflag != 0)
|
||||
equipment = autoset(equipment, 0)
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
if(report_power_alarm && is_station_contact(z))
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
if(report_power_alarm)
|
||||
area.poweralert(FALSE, src)
|
||||
autoflag = 0
|
||||
|
||||
// now trickle-charge the cell
|
||||
@@ -1268,8 +1267,8 @@
|
||||
equipment = autoset(equipment, 0)
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
if(report_power_alarm && is_station_contact(z))
|
||||
SSalarms.power_alarm.triggerAlarm(loc, src)
|
||||
if(report_power_alarm)
|
||||
area.poweralert(FALSE, src)
|
||||
autoflag = 0
|
||||
|
||||
// update icon & area power if anything changed
|
||||
|
||||
+16
-13
@@ -229,14 +229,15 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct()
|
||||
|
||||
obj/structure/cable/proc/cable_color(var/colorC)
|
||||
if(colorC)
|
||||
if(colorC == "rainbow")
|
||||
color = color_rainbow()
|
||||
else
|
||||
color = colorC
|
||||
obj/structure/cable/proc/cable_color(colorC)
|
||||
if(!colorC)
|
||||
color = COLOR_RED
|
||||
else if(colorC == "rainbow")
|
||||
color = color_rainbow()
|
||||
else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them
|
||||
color = COLOR_ORANGE
|
||||
else
|
||||
color = "#DD0000"
|
||||
color = colorC
|
||||
|
||||
/obj/structure/cable/proc/color_rainbow()
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
@@ -845,13 +846,15 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
..()
|
||||
|
||||
/obj/item/stack/cable_coil/proc/cable_color(var/colorC)
|
||||
if(colorC)
|
||||
if(colorC == "rainbow")
|
||||
colorC = color_rainbow()
|
||||
color = colorC
|
||||
else
|
||||
/obj/item/stack/cable_coil/proc/cable_color(colorC)
|
||||
if(!colorC)
|
||||
color = COLOR_RED
|
||||
else if(colorC == "rainbow")
|
||||
color = color_rainbow()
|
||||
else if(colorC == "orange") //byond only knows 16 colors by name, and orange isn't one of them
|
||||
color = COLOR_ORANGE
|
||||
else
|
||||
color = colorC
|
||||
|
||||
/obj/item/stack/cable_coil/proc/color_rainbow()
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
|
||||
|
||||
@@ -177,6 +177,8 @@
|
||||
var/nightshift_light_power = 0.45
|
||||
var/nightshift_light_color = "#FFDDCC"
|
||||
|
||||
var/bulb_emergency_colour = "#FF3232" // determines the colour of the light while it's in emergency mode
|
||||
|
||||
// the smaller bulb light fixture
|
||||
|
||||
/obj/machinery/light/small
|
||||
@@ -238,7 +240,11 @@
|
||||
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
icon_state = "[base_state][on]"
|
||||
var/area/A = get_area(src)
|
||||
if(A && A.fire)
|
||||
icon_state = "[base_state]_emergency"
|
||||
else
|
||||
icon_state = "[base_state][on]"
|
||||
if(LIGHT_EMPTY)
|
||||
icon_state = "[base_state]-empty"
|
||||
on = FALSE
|
||||
@@ -260,10 +266,20 @@
|
||||
on = FALSE
|
||||
update_icon()
|
||||
if(on)
|
||||
var/BR = nightshift_enabled ? nightshift_light_range : brightness_range
|
||||
var/PO = nightshift_enabled ? nightshift_light_power : brightness_power
|
||||
var/CO = nightshift_enabled ? nightshift_light_color : brightness_color
|
||||
var/matching = light_range == BR && light_power == PO && light_color == CO
|
||||
var/BR = brightness_range
|
||||
var/PO = brightness_power
|
||||
var/CO = brightness_color
|
||||
if(color)
|
||||
CO = color
|
||||
var/area/A = get_area(src)
|
||||
if(A && A.fire)
|
||||
CO = bulb_emergency_colour
|
||||
else if(nightshift_enabled)
|
||||
BR = nightshift_light_range
|
||||
PO = nightshift_light_power
|
||||
if(!color)
|
||||
CO = nightshift_light_color
|
||||
var/matching = light && BR == light.light_range && PO == light.light_power && CO == light.light_color
|
||||
if(!matching)
|
||||
switchcount++
|
||||
if(rigged)
|
||||
@@ -627,7 +643,7 @@
|
||||
|
||||
/obj/item/light/Crossed(mob/living/L)
|
||||
if(istype(L) && has_gravity(loc))
|
||||
if(L.incorporeal_move || L.flying)
|
||||
if(L.incorporeal_move || L.flying || L.floating)
|
||||
return
|
||||
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
|
||||
if(status == LIGHT_BURNED || status == LIGHT_OK)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/area/engine/engineering/power_alert(var/alarming)
|
||||
if(alarming)
|
||||
investigate_log("has a power alarm!","singulo")
|
||||
/area/engine/engineering/poweralert(state, source)
|
||||
if(state != poweralm)
|
||||
investigate_log("has a power alarm!", "singulo")
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user