Backward 512 compatibility removal.
This commit is contained in:
@@ -28,10 +28,8 @@
|
||||
/obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S)
|
||||
. = ..()
|
||||
panel = new()
|
||||
#if DM_VERSION >= 513
|
||||
panel.vis_flags = VIS_INHERIT_ID|VIS_INHERIT_ICON|VIS_INHERIT_PLANE
|
||||
vis_contents += panel
|
||||
#endif
|
||||
panel.icon = icon
|
||||
panel.icon_state = "solar_panel"
|
||||
panel.layer = FLY_LAYER
|
||||
@@ -170,7 +168,7 @@
|
||||
else
|
||||
//dot product of sun and panel -- Lambert's Cosine Law
|
||||
. = cos(azimuth_current - sun_azimuth)
|
||||
. = CLAMP(round(., 0.01), 0, 1)
|
||||
. = clamp(round(., 0.01), 0, 1)
|
||||
sunfrac = .
|
||||
|
||||
/obj/machinery/power/solar/process()
|
||||
@@ -385,7 +383,7 @@
|
||||
if(adjust)
|
||||
value = azimuth_rate + adjust
|
||||
if(value != null)
|
||||
azimuth_rate = round(CLAMP(value, -2 * SSsun.base_rotation, 2 * SSsun.base_rotation), 0.01)
|
||||
azimuth_rate = round(clamp(value, -2 * SSsun.base_rotation, 2 * SSsun.base_rotation), 0.01)
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(action == "tracking")
|
||||
@@ -464,7 +462,7 @@
|
||||
|
||||
///Rotates the panel to the passed angles
|
||||
/obj/machinery/power/solar_control/proc/set_panels(azimuth)
|
||||
azimuth = CLAMP(round(azimuth, 0.01), -360, 719.99)
|
||||
azimuth = clamp(round(azimuth, 0.01), -360, 719.99)
|
||||
if(azimuth >= 360)
|
||||
azimuth -= 360
|
||||
if(azimuth < 0)
|
||||
|
||||
Reference in New Issue
Block a user