mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Ultralight, but Botpathing is still retardedly broke.
This commit is contained in:
@@ -206,7 +206,6 @@
|
||||
#define FILE_DIR "icons/vending_icons"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "maps/RandomZLevels"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/AI"
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
#define UL_I_EXTINGUISHED 1
|
||||
#define UL_I_ONZERO 2
|
||||
|
||||
#define ul_LightingEnabled 1
|
||||
#define ul_LightingResolution 1
|
||||
#define ul_Steps 7
|
||||
#define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
|
||||
#define ul_Layer 10
|
||||
|
||||
var
|
||||
ul_LightingEnabled = 1
|
||||
ul_LightingResolution = 1
|
||||
ul_LightingResolutionSqrt = sqrt(ul_LightingResolution)
|
||||
ul_Steps = 7
|
||||
ul_FalloffStyle = UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
|
||||
ul_TopLuminosity = 0
|
||||
ul_Layer = 10
|
||||
ul_SuppressLightLevelChanges = 0
|
||||
|
||||
list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
|
||||
@@ -85,35 +86,35 @@ atom/proc/ul_Illuminate()
|
||||
if(DeltaRed > 0)
|
||||
if(!Affected.MaxRed)
|
||||
Affected.MaxRed = list()
|
||||
var/list/parameter_list = params2list(Affected.MaxRedValues)
|
||||
if(!("[DeltaRed]" in parameter_list))
|
||||
Affected.MaxRedSources = list()
|
||||
if(!(DeltaRed in Affected.MaxRed))
|
||||
Affected.MaxRed.Add(DeltaRed)
|
||||
parameter_list["[DeltaRed]"] = 1
|
||||
Affected.MaxRedSources.Add(1)
|
||||
else
|
||||
parameter_list["[DeltaRed]"] = "[text2num(parameter_list["[DeltaRed]"]) + 1]"
|
||||
Affected.MaxRedValues = list2params(parameter_list)
|
||||
var/list_location = Affected.MaxRed.Find(DeltaRed)
|
||||
Affected.MaxRedSources[list_location]++
|
||||
|
||||
if(DeltaGreen > 0)
|
||||
if(!Affected.MaxGreen)
|
||||
Affected.MaxGreen = list()
|
||||
var/list/parameter_list = params2list(Affected.MaxGreenValues)
|
||||
if(!("[DeltaGreen]" in parameter_list))
|
||||
Affected.MaxGreenSources = list()
|
||||
if(!(DeltaGreen in Affected.MaxGreen))
|
||||
Affected.MaxGreen.Add(DeltaGreen)
|
||||
parameter_list["[DeltaGreen]"] = 1
|
||||
Affected.MaxGreenSources.Add(1)
|
||||
else
|
||||
parameter_list["[DeltaGreen]"] = "[text2num(parameter_list["[DeltaGreen]"]) + 1]"
|
||||
Affected.MaxGreenValues = list2params(parameter_list)
|
||||
var/list_location = Affected.MaxGreen.Find(DeltaGreen)
|
||||
Affected.MaxGreenSources[list_location]++
|
||||
|
||||
if(DeltaBlue > 0)
|
||||
if(!Affected.MaxBlue)
|
||||
Affected.MaxBlue = list()
|
||||
var/list/parameter_list = params2list(Affected.MaxBlueValues)
|
||||
if(!("[DeltaBlue]" in parameter_list))
|
||||
Affected.MaxBlueSources = list()
|
||||
if(!(DeltaBlue in Affected.MaxBlue))
|
||||
Affected.MaxBlue.Add(DeltaBlue)
|
||||
parameter_list["[DeltaBlue]"] = 1
|
||||
Affected.MaxBlueSources.Add(1)
|
||||
else
|
||||
parameter_list["[DeltaBlue]"] = "[text2num(parameter_list["[DeltaBlue]"]) + 1]"
|
||||
Affected.MaxBlueValues = list2params(parameter_list)
|
||||
var/list_location = Affected.MaxBlue.Find(DeltaBlue)
|
||||
Affected.MaxBlueSources[list_location]++
|
||||
|
||||
Affected.ul_UpdateLight()
|
||||
|
||||
@@ -143,57 +144,42 @@ atom/proc/ul_Extinguish()
|
||||
|
||||
if(DeltaRed > 0)
|
||||
if(Affected.MaxRed)
|
||||
if(findtext(Affected.MaxRedValues, "[DeltaRed]"))
|
||||
var/list/parameter_list = params2list(Affected.MaxRedValues)
|
||||
if(!("[DeltaRed]" in parameter_list))
|
||||
Affected.MaxRed.Remove(DeltaRed)
|
||||
parameter_list.Remove("[DeltaRed]")
|
||||
else if (parameter_list["[DeltaRed]"] != "1")
|
||||
parameter_list["[DeltaRed]"] = "[text2num(parameter_list["[DeltaRed]"]) - 1]"
|
||||
var/list_location = Affected.MaxRed.Find(DeltaRed)
|
||||
if(list_location)
|
||||
if(Affected.MaxRedSources[list_location] > 1)
|
||||
Affected.MaxRedSources[list_location]--
|
||||
else
|
||||
Affected.MaxRed.Remove(DeltaRed)
|
||||
parameter_list.Remove("[DeltaRed]")
|
||||
Affected.MaxRedValues = list2params(parameter_list)
|
||||
else
|
||||
Affected.MaxRed.Remove(DeltaRed)
|
||||
Affected.MaxRedSources.Cut(list_location, list_location + 1)
|
||||
if(!Affected.MaxRed.len)
|
||||
del Affected.MaxRed
|
||||
del Affected.MaxRedSources
|
||||
|
||||
if(DeltaGreen > 0)
|
||||
if(Affected.MaxGreen)
|
||||
if(findtext(Affected.MaxGreenValues, "[DeltaGreen]"))
|
||||
var/list/parameter_list = params2list(Affected.MaxGreenValues)
|
||||
if(!("[DeltaGreen]" in parameter_list))
|
||||
Affected.MaxGreen.Remove(DeltaGreen)
|
||||
parameter_list.Remove("[DeltaGreen]")
|
||||
else if (parameter_list["[DeltaGreen]"] != "1")
|
||||
parameter_list["[DeltaGreen]"] = "[text2num(parameter_list["[DeltaGreen]"]) - 1]"
|
||||
var/list_location = Affected.MaxGreen.Find(DeltaGreen)
|
||||
if(list_location)
|
||||
if(Affected.MaxGreenSources[list_location] > 1)
|
||||
Affected.MaxGreenSources[list_location]--
|
||||
else
|
||||
Affected.MaxGreen.Remove(DeltaGreen)
|
||||
parameter_list.Remove("[DeltaGreen]")
|
||||
Affected.MaxGreenValues = list2params(parameter_list)
|
||||
else
|
||||
Affected.MaxGreen.Remove(DeltaGreen)
|
||||
Affected.MaxGreenSources.Cut(list_location, list_location + 1)
|
||||
if(!Affected.MaxGreen.len)
|
||||
del Affected.MaxGreen
|
||||
del Affected.MaxGreenSources
|
||||
|
||||
if(DeltaBlue > 0)
|
||||
if(Affected.MaxBlue)
|
||||
if(findtext(Affected.MaxBlueValues, "[DeltaBlue]"))
|
||||
var/list/parameter_list = params2list(Affected.MaxBlueValues)
|
||||
if(!("[DeltaBlue]" in parameter_list))
|
||||
Affected.MaxBlue.Remove(DeltaBlue)
|
||||
parameter_list.Remove("[DeltaBlue]")
|
||||
else if (parameter_list["[DeltaBlue]"] != "1")
|
||||
parameter_list["[DeltaBlue]"] = "[text2num(parameter_list["[DeltaBlue]"]) - 1]"
|
||||
var/list_location = Affected.MaxBlue.Find(DeltaBlue)
|
||||
if(list_location)
|
||||
if(Affected.MaxBlueSources[list_location] > 1)
|
||||
Affected.MaxBlueSources[list_location]--
|
||||
else
|
||||
Affected.MaxBlue.Remove(DeltaBlue)
|
||||
parameter_list.Remove("[DeltaBlue]")
|
||||
Affected.MaxBlueValues = list2params(parameter_list)
|
||||
else
|
||||
Affected.MaxBlue.Remove(DeltaBlue)
|
||||
Affected.MaxBlueSources.Cut(list_location, list_location + 1)
|
||||
if(!Affected.MaxBlue.len)
|
||||
del Affected.MaxBlue
|
||||
del Affected.MaxBlueSources
|
||||
|
||||
Affected.ul_UpdateLight()
|
||||
|
||||
@@ -293,20 +279,17 @@ atom/Del()
|
||||
..()
|
||||
|
||||
atom/movable/Move()
|
||||
if(ul_IsLuminous())
|
||||
ul_Extinguish()
|
||||
..()
|
||||
ul_Illuminate()
|
||||
else
|
||||
..()
|
||||
ul_Extinguish()
|
||||
..()
|
||||
ul_Illuminate()
|
||||
|
||||
|
||||
turf/var/list/MaxRed
|
||||
turf/var/list/MaxGreen
|
||||
turf/var/list/MaxBlue
|
||||
turf/var/MaxRedValues
|
||||
turf/var/MaxGreenValues
|
||||
turf/var/MaxBlueValues
|
||||
turf/var/list/MaxRedSources
|
||||
turf/var/list/MaxGreenSources
|
||||
turf/var/list/MaxBlueSources
|
||||
|
||||
turf/proc/ul_GetRed()
|
||||
if(MaxRed)
|
||||
@@ -405,3 +388,14 @@ area/proc/ul_Prep()
|
||||
//world.log << tag
|
||||
|
||||
return
|
||||
|
||||
#undef UL_I_FALLOFF_SQUARE
|
||||
#undef UL_I_FALLOFF_ROUND
|
||||
#undef UL_I_LIT
|
||||
#undef UL_I_EXTINGUISHED
|
||||
#undef UL_I_ONZERO
|
||||
#undef ul_LightingEnabled
|
||||
#undef ul_LightingResolution
|
||||
#undef ul_Steps
|
||||
#undef ul_FalloffStyle
|
||||
#undef ul_Layer
|
||||
@@ -13,7 +13,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/area
|
||||
var/fire = null
|
||||
var/atmos = 1
|
||||
@@ -128,6 +127,8 @@ proc/process_ghost_teleport_locs()
|
||||
|
||||
/area/shuttle //DO NOT TURN THE ul_Lighting STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/shuttle/arrival
|
||||
name = "\improper Arrival Shuttle"
|
||||
@@ -231,11 +232,15 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Alien Shuttle Base"
|
||||
requires_power = 1
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/shuttle/alien/mine
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Alien Shuttle Mine"
|
||||
requires_power = 1
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/shuttle/prison/
|
||||
name = "\improper Prison Shuttle"
|
||||
@@ -802,6 +807,8 @@ proc/process_ghost_teleport_locs()
|
||||
/area/holodeck
|
||||
name = "\improper Holodeck"
|
||||
icon_state = "Holodeck"
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/holodeck/alphadeck
|
||||
name = "\improper Holodeck Alpha"
|
||||
@@ -957,8 +964,9 @@ proc/process_ghost_teleport_locs()
|
||||
//Solars
|
||||
|
||||
/area/solar
|
||||
LightLevels = list("Red" = 2, "Green" = 2, "Blue" = 3)
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
auxport
|
||||
name = "\improper Port Auxiliary Solar Array"
|
||||
@@ -1474,18 +1482,26 @@ proc/process_ghost_teleport_locs()
|
||||
/area/turret_protected/AIsatextFP
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/turret_protected/AIsatextFS
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/turret_protected/AIsatextAS
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/turret_protected/AIsatextAP
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
|
||||
/area/turret_protected/NewAIMain
|
||||
name = "\improper AI Main New"
|
||||
|
||||
@@ -28,24 +28,22 @@
|
||||
requires_power = 1
|
||||
always_unpowered = 1
|
||||
LightLevels = list("Red" = 2, "Green" = 2, "Blue" = 3)
|
||||
ul_SetLuminosity(2,2,3)
|
||||
power_light = 0
|
||||
power_equip = 0
|
||||
power_environ = 0
|
||||
//has_gravity = 0 // Space has gravity. Because.. because.
|
||||
|
||||
else if(!requires_power)
|
||||
if(!requires_power)
|
||||
power_light = 0//rastaf0
|
||||
power_equip = 0//rastaf0
|
||||
power_environ = 0//rastaf0
|
||||
if(!ul_Lighting)
|
||||
luminosity = 1
|
||||
luminosity = 1
|
||||
ul_Lighting = 0
|
||||
else
|
||||
luminosity = 0
|
||||
area_lights_luminosity = rand(6,7)
|
||||
if(LightLevels)
|
||||
ul_Light()
|
||||
//ul_SetLuminosity(0) // *DAL*
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user