mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fixed botpathing. Some fixes/changes to glows. Made lights less piss yellow.
This commit is contained in:
@@ -267,20 +267,19 @@ atom/proc/ul_LightLevelChanged()
|
|||||||
return
|
return
|
||||||
|
|
||||||
atom/New()
|
atom/New()
|
||||||
..()
|
. = ..()
|
||||||
if(ul_IsLuminous())
|
if(ul_IsLuminous())
|
||||||
spawn(1)
|
spawn(1)
|
||||||
ul_Illuminate()
|
ul_Illuminate()
|
||||||
return
|
|
||||||
|
|
||||||
atom/Del()
|
atom/Del()
|
||||||
if(ul_IsLuminous())
|
if(ul_IsLuminous())
|
||||||
ul_Extinguish()
|
ul_Extinguish()
|
||||||
..()
|
. = ..()
|
||||||
|
|
||||||
atom/movable/Move()
|
atom/movable/Move()
|
||||||
ul_Extinguish()
|
ul_Extinguish()
|
||||||
..()
|
. = ..()
|
||||||
ul_Illuminate()
|
ul_Illuminate()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,16 +127,16 @@ obj
|
|||||||
//Change icon depending on the fuel, and thus temperature.
|
//Change icon depending on the fuel, and thus temperature.
|
||||||
if(firelevel > 6)
|
if(firelevel > 6)
|
||||||
icon_state = "3"
|
icon_state = "3"
|
||||||
if(LuminosityRed != 7)
|
if(LuminosityRed != 11)
|
||||||
ul_SetLuminosity(7,5,0)
|
ul_SetLuminosity(11,9,0)
|
||||||
else if(firelevel > 2.5)
|
else if(firelevel > 2.5)
|
||||||
icon_state = "2"
|
icon_state = "2"
|
||||||
if(LuminosityRed != 5)
|
if(LuminosityRed != 8)
|
||||||
ul_SetLuminosity(5,4,0)
|
ul_SetLuminosity(8,7,0)
|
||||||
else
|
else
|
||||||
icon_state = "1"
|
icon_state = "1"
|
||||||
if(LuminosityRed != 3)
|
if(LuminosityRed != 5)
|
||||||
ul_SetLuminosity(3,2,0)
|
ul_SetLuminosity(5,4,0)
|
||||||
|
|
||||||
//Ensure flow temperature is higher than minimum fire temperatures.
|
//Ensure flow temperature is higher than minimum fire temperatures.
|
||||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
// Remove any luminosity etc.
|
// Remove any luminosity etc.
|
||||||
var/prevlum = teleatom.luminosity
|
var/prevlum = teleatom.luminosity
|
||||||
teleatom.luminosity = 0
|
teleatom.ul_SetLuminosity(0)
|
||||||
|
|
||||||
if(force_teleport)
|
if(force_teleport)
|
||||||
teleatom.forceMove(destturf)
|
teleatom.forceMove(destturf)
|
||||||
|
|||||||
@@ -1153,12 +1153,12 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
|
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
|
||||||
src.ul_SetLuminosity(0)
|
ul_SetLuminosity(0)
|
||||||
user.ul_SetLuminosity(user.LuminosityRed + potency/5, user.LuminosityGreen + potency/5, user.LuminosityBlue + potency/5)
|
user.ul_SetLuminosity(user.LuminosityRed + potency/5, user.LuminosityGreen + potency/5, user.LuminosityBlue + potency/5)
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
|
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
|
||||||
user.ul_SetLuminosity(user.LuminosityRed - potency/5, user.LuminosityGreen - potency/5, user.LuminosityBlue - potency/5)
|
user.ul_SetLuminosity(user.LuminosityRed - potency/5, user.LuminosityGreen - potency/5, user.LuminosityBlue - potency/5)
|
||||||
src.ul_SetLuminosity(potency/5)
|
ul_SetLuminosity(potency/5)
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
|
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
|
||||||
seed = "/obj/item/seeds/cocoapodseed"
|
seed = "/obj/item/seeds/cocoapodseed"
|
||||||
@@ -1621,7 +1621,7 @@
|
|||||||
if(istype(src.loc,/mob))
|
if(istype(src.loc,/mob))
|
||||||
pickup(src.loc)
|
pickup(src.loc)
|
||||||
else
|
else
|
||||||
src.ul_SetLuminosity(potency/10)
|
ul_SetLuminosity(potency/10)
|
||||||
lifespan = 120 //ten times that is the delay
|
lifespan = 120 //ten times that is the delay
|
||||||
endurance = 30
|
endurance = 30
|
||||||
maturation = 15
|
maturation = 15
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
|
|
||||||
/obj/machinery/flasher/New()
|
/obj/machinery/flasher/New()
|
||||||
sleep(4)
|
sleep(4)
|
||||||
src.ul_SetLuminosity(2)
|
ul_SetLuminosity(0,2,0)
|
||||||
|
|
||||||
/obj/machinery/flasher/power_change()
|
/obj/machinery/flasher/power_change()
|
||||||
if ( powered() )
|
if ( powered() )
|
||||||
stat &= ~NOPOWER
|
stat &= ~NOPOWER
|
||||||
icon_state = "[base_state]1"
|
icon_state = "[base_state]1"
|
||||||
src.ul_SetLuminosity(2)
|
src.ul_SetLuminosity(0,2,0)
|
||||||
else
|
else
|
||||||
stat |= ~NOPOWER
|
stat |= ~NOPOWER
|
||||||
icon_state = "[base_state]1-p"
|
icon_state = "[base_state]1-p"
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
hologram.icon = A.holo_icon
|
hologram.icon = A.holo_icon
|
||||||
hologram.mouse_opacity = 0//So you can't click on it.
|
hologram.mouse_opacity = 0//So you can't click on it.
|
||||||
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||||
hologram.ul_SetLuminosity(1)//To make it glowy.
|
hologram.ul_SetLuminosity(0,0,2)//To make it glowy.
|
||||||
hologram.anchored = 1//So space wind cannot drag it.
|
hologram.anchored = 1//So space wind cannot drag it.
|
||||||
hologram.name = "AI hologram"//If someone decides to right click.
|
hologram.name = "AI hologram"//If someone decides to right click.
|
||||||
ul_SetLuminosity(0,0,1)//To make the pad glowy.
|
ul_SetLuminosity(0,0,1)//To make the pad glowy.
|
||||||
|
|||||||
@@ -53,11 +53,11 @@
|
|||||||
if ( powered() && disable == 0 )
|
if ( powered() && disable == 0 )
|
||||||
stat &= ~NOPOWER
|
stat &= ~NOPOWER
|
||||||
icon_state = "[base_state]"
|
icon_state = "[base_state]"
|
||||||
src.ul_SetLuminosity(2)
|
ul_SetLuminosity(2,0,0)
|
||||||
else
|
else
|
||||||
stat |= ~NOPOWER
|
stat |= ~NOPOWER
|
||||||
icon_state = "[base_state]-p"
|
icon_state = "[base_state]-p"
|
||||||
src.ul_SetLuminosity(0)
|
ul_SetLuminosity(0)
|
||||||
|
|
||||||
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/device/detective_scanner))
|
if(istype(W, /obj/item/device/detective_scanner))
|
||||||
|
|||||||
@@ -427,7 +427,7 @@
|
|||||||
if(A && B)
|
if(A && B)
|
||||||
needs_power = 1
|
needs_power = 1
|
||||||
spawn(1)
|
spawn(1)
|
||||||
src.ul_SetLuminosity(3)
|
src.ul_SetLuminosity(0,0,4)
|
||||||
|
|
||||||
/* for(var/mob/M as mob in src.loc) //does not work for some reason.
|
/* for(var/mob/M as mob in src.loc) //does not work for some reason.
|
||||||
if(istype(M,/mob/living/carbon))
|
if(istype(M,/mob/living/carbon))
|
||||||
|
|||||||
@@ -942,9 +942,9 @@
|
|||||||
return
|
return
|
||||||
lights = !lights
|
lights = !lights
|
||||||
if(lights)
|
if(lights)
|
||||||
src.ul_SetLuminosity(src.luminosity + src.lights_power)
|
ul_SetLuminosity(luminosity + lights_power, luminosity + lights_power, luminosity)
|
||||||
else
|
else
|
||||||
src.ul_SetLuminosity(src.luminosity - src.lights_power)
|
ul_SetLuminosity(luminosity - lights_power, luminosity - lights_power, luminosity)
|
||||||
src.log_message("Toggled lights.")
|
src.log_message("Toggled lights.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
ul_SetLuminosity(1)
|
ul_SetLuminosity(0,3,0)
|
||||||
|
|
||||||
spawn(1200) // 2 minutes
|
spawn(1200) // 2 minutes
|
||||||
del(src)
|
del(src)
|
||||||
@@ -28,14 +28,14 @@
|
|||||||
if(src.loc == user)
|
if(src.loc == user)
|
||||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
||||||
else if (isturf(src.loc))
|
else if (isturf(src.loc))
|
||||||
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
|
ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||||
|
|
||||||
else
|
else
|
||||||
icon_state = icon_off
|
icon_state = icon_off
|
||||||
if(src.loc == user)
|
if(src.loc == user)
|
||||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
||||||
else if (isturf(src.loc))
|
else if (isturf(src.loc))
|
||||||
src.ul_SetLuminosity(0)
|
ul_SetLuminosity(0)
|
||||||
|
|
||||||
/obj/item/device/flashlight/attack_self(mob/user)
|
/obj/item/device/flashlight/attack_self(mob/user)
|
||||||
// if(!isturf(user.loc))
|
// if(!isturf(user.loc))
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
var/datum/powernet/PN = attached.get_powernet()
|
var/datum/powernet/PN = attached.get_powernet()
|
||||||
if(PN)
|
if(PN)
|
||||||
if(!luminosity)
|
if(!luminosity)
|
||||||
ul_SetLuminosity(12)
|
ul_SetLuminosity(12,3,0)
|
||||||
|
|
||||||
|
|
||||||
// found a powernet, so drain up to max power from it
|
// found a powernet, so drain up to max power from it
|
||||||
|
|||||||
@@ -491,5 +491,5 @@ ZIPPO
|
|||||||
dropped(mob/user)
|
dropped(mob/user)
|
||||||
if(lit)
|
if(lit)
|
||||||
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
||||||
ul_SetLuminosity(2)
|
ul_SetLuminosity(2,1,0)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
ul_SetLuminosity(3)
|
ul_SetLuminosity(0,3,0)
|
||||||
|
|
||||||
/obj/structure/mineral_door/sandstone
|
/obj/structure/mineral_door/sandstone
|
||||||
mineralType = "sandstone"
|
mineralType = "sandstone"
|
||||||
@@ -281,4 +281,4 @@
|
|||||||
isSwitchingStates = 0
|
isSwitchingStates = 0
|
||||||
|
|
||||||
Dismantle(devastated = 0)
|
Dismantle(devastated = 0)
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
return
|
return
|
||||||
proc/ChangeSign(var/Text)
|
proc/ChangeSign(var/Text)
|
||||||
src.icon_state = "[Text]"
|
src.icon_state = "[Text]"
|
||||||
//ul_SetLuminosity(4)
|
ul_SetLuminosity(3,0,0)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/effect/sign/securearea/ex_act(severity)
|
/obj/effect/sign/securearea/ex_act(severity)
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
|
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
|
||||||
S.ReplaceWithAirlessPlating()
|
S.ReplaceWithPlating()
|
||||||
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
|
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
|
||||||
// W.make_plating()
|
// W.make_plating()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -193,34 +193,27 @@
|
|||||||
W.opacity = 1
|
W.opacity = 1
|
||||||
W.ul_SetOpacity(0)
|
W.ul_SetOpacity(0)
|
||||||
W.levelupdate()
|
W.levelupdate()
|
||||||
air_master.tiles_to_update |= W
|
|
||||||
|
|
||||||
var/turf/simulated/north = get_step(W,NORTH)
|
if(W && W.air)
|
||||||
var/turf/simulated/south = get_step(W,SOUTH)
|
var/new_ox = 0
|
||||||
var/turf/simulated/east = get_step(W,EAST)
|
var/new_n2 = 0
|
||||||
var/turf/simulated/west = get_step(W,WEST)
|
var/new_co2 = 0
|
||||||
|
var/new_tx = 0
|
||||||
|
for(var/direction in cardinal)
|
||||||
|
var/turf/T = get_step(src, direction)
|
||||||
|
if(istype(T))
|
||||||
|
var/datum/gas_mixture/G = T.return_air()
|
||||||
|
new_ox += G.oxygen
|
||||||
|
new_n2 += G.nitrogen
|
||||||
|
new_co2 += G.carbon_dioxide
|
||||||
|
new_tx += G.toxins
|
||||||
|
|
||||||
if(istype(north)) air_master.tiles_to_update |= north
|
W.air.nitrogen = new_n2/4
|
||||||
if(istype(south)) air_master.tiles_to_update |= south
|
W.air.oxygen = new_ox/4
|
||||||
if(istype(east)) air_master.tiles_to_update |= east
|
W.air.carbon_dioxide = new_co2/4
|
||||||
if(istype(west)) air_master.tiles_to_update |= west
|
W.air.toxins = new_tx/4
|
||||||
return W
|
W.air.update_values()
|
||||||
|
|
||||||
/turf/proc/ReplaceWithAirlessPlating()
|
|
||||||
var/prior_icon = icon_old
|
|
||||||
var/old_dir = dir
|
|
||||||
|
|
||||||
for(var/obj/structure/lattice/L in locate(src.x, src.y, src.z))
|
|
||||||
del(L)
|
|
||||||
var/turf/simulated/floor/plating/airless/W = new /turf/simulated/floor/plating/airless( locate(src.x, src.y, src.z) )
|
|
||||||
|
|
||||||
W.RemoveLattice()
|
|
||||||
W.dir = old_dir
|
|
||||||
if(prior_icon) W.icon_state = prior_icon
|
|
||||||
else W.icon_state = "plating"
|
|
||||||
W.opacity = 1
|
|
||||||
W.ul_SetOpacity(0)
|
|
||||||
W.levelupdate()
|
|
||||||
air_master.tiles_to_update |= W
|
air_master.tiles_to_update |= W
|
||||||
|
|
||||||
var/turf/simulated/north = get_step(W,NORTH)
|
var/turf/simulated/north = get_step(W,NORTH)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
var/oldlum = luminosity
|
var/oldlum = luminosity
|
||||||
|
|
||||||
//luminosity = on * brightness
|
//luminosity = on * brightness
|
||||||
ul_SetLuminosity(on * brightness, on * brightness, ( fitting != "bulb" ? on * brightness : round(on*brightness/2) ) ) // *DAL*
|
ul_SetLuminosity(on * brightness, on * brightness, ( fitting != "bulb" ? on * brightness : round(on*brightness/2 + 1) ) ) // *DAL*
|
||||||
|
|
||||||
// if the state changed, inc the switching counter
|
// if the state changed, inc the switching counter
|
||||||
if(oldlum != luminosity)
|
if(oldlum != luminosity)
|
||||||
|
|||||||
Reference in New Issue
Block a user