mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-19 20:22:38 +01:00
new object-based lighting system
Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
@@ -208,8 +208,8 @@
|
||||
O.vars[variable]) as num|null
|
||||
if(new_value == null) return
|
||||
|
||||
if(variable=="luminosity")
|
||||
O.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
O.set_light(new_value)
|
||||
else
|
||||
O.vars[variable] = new_value
|
||||
|
||||
@@ -217,24 +217,24 @@
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
if(variable=="luminosity")
|
||||
M.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -242,24 +242,24 @@
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
M.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
A.SetLuminosity(new_value)
|
||||
if(variable=="light_range")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
@@ -372,4 +372,4 @@
|
||||
A.vars[variable] = O.vars[variable]
|
||||
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
|
||||
@@ -455,10 +455,10 @@ var/list/forbidden_varedit_object_types = list(
|
||||
O.vars[variable] = var_new
|
||||
|
||||
if("num")
|
||||
if(variable=="luminosity")
|
||||
if(variable=="light_range")
|
||||
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
|
||||
if(var_new == null) return
|
||||
O.SetLuminosity(var_new)
|
||||
O.set_light(var_new)
|
||||
else if(variable=="stat")
|
||||
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
|
||||
if(var_new == null) return
|
||||
|
||||
Reference in New Issue
Block a user