mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +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
|
||||
|
||||
atom/New()
|
||||
..()
|
||||
. = ..()
|
||||
if(ul_IsLuminous())
|
||||
spawn(1)
|
||||
ul_Illuminate()
|
||||
return
|
||||
|
||||
atom/Del()
|
||||
if(ul_IsLuminous())
|
||||
ul_Extinguish()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
atom/movable/Move()
|
||||
ul_Extinguish()
|
||||
..()
|
||||
. = ..()
|
||||
ul_Illuminate()
|
||||
|
||||
|
||||
|
||||
@@ -127,16 +127,16 @@ obj
|
||||
//Change icon depending on the fuel, and thus temperature.
|
||||
if(firelevel > 6)
|
||||
icon_state = "3"
|
||||
if(LuminosityRed != 7)
|
||||
ul_SetLuminosity(7,5,0)
|
||||
if(LuminosityRed != 11)
|
||||
ul_SetLuminosity(11,9,0)
|
||||
else if(firelevel > 2.5)
|
||||
icon_state = "2"
|
||||
if(LuminosityRed != 5)
|
||||
ul_SetLuminosity(5,4,0)
|
||||
if(LuminosityRed != 8)
|
||||
ul_SetLuminosity(8,7,0)
|
||||
else
|
||||
icon_state = "1"
|
||||
if(LuminosityRed != 3)
|
||||
ul_SetLuminosity(3,2,0)
|
||||
if(LuminosityRed != 5)
|
||||
ul_SetLuminosity(5,4,0)
|
||||
|
||||
//Ensure flow temperature is higher than minimum fire temperatures.
|
||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
// Remove any luminosity etc.
|
||||
var/prevlum = teleatom.luminosity
|
||||
teleatom.luminosity = 0
|
||||
teleatom.ul_SetLuminosity(0)
|
||||
|
||||
if(force_teleport)
|
||||
teleatom.forceMove(destturf)
|
||||
|
||||
@@ -1153,12 +1153,12 @@
|
||||
..()
|
||||
|
||||
/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)
|
||||
|
||||
/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)
|
||||
src.ul_SetLuminosity(potency/5)
|
||||
ul_SetLuminosity(potency/5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
|
||||
seed = "/obj/item/seeds/cocoapodseed"
|
||||
@@ -1621,7 +1621,7 @@
|
||||
if(istype(src.loc,/mob))
|
||||
pickup(src.loc)
|
||||
else
|
||||
src.ul_SetLuminosity(potency/10)
|
||||
ul_SetLuminosity(potency/10)
|
||||
lifespan = 120 //ten times that is the delay
|
||||
endurance = 30
|
||||
maturation = 15
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
/obj/machinery/flasher/New()
|
||||
sleep(4)
|
||||
src.ul_SetLuminosity(2)
|
||||
ul_SetLuminosity(0,2,0)
|
||||
|
||||
/obj/machinery/flasher/power_change()
|
||||
if ( powered() )
|
||||
stat &= ~NOPOWER
|
||||
icon_state = "[base_state]1"
|
||||
src.ul_SetLuminosity(2)
|
||||
src.ul_SetLuminosity(0,2,0)
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
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.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.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.name = "AI hologram"//If someone decides to right click.
|
||||
ul_SetLuminosity(0,0,1)//To make the pad glowy.
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
if ( powered() && disable == 0 )
|
||||
stat &= ~NOPOWER
|
||||
icon_state = "[base_state]"
|
||||
src.ul_SetLuminosity(2)
|
||||
ul_SetLuminosity(2,0,0)
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
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)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
if(A && B)
|
||||
needs_power = 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.
|
||||
if(istype(M,/mob/living/carbon))
|
||||
|
||||
@@ -942,9 +942,9 @@
|
||||
return
|
||||
lights = !lights
|
||||
if(lights)
|
||||
src.ul_SetLuminosity(src.luminosity + src.lights_power)
|
||||
ul_SetLuminosity(luminosity + lights_power, luminosity + lights_power, luminosity)
|
||||
else
|
||||
src.ul_SetLuminosity(src.luminosity - src.lights_power)
|
||||
ul_SetLuminosity(luminosity - lights_power, luminosity - lights_power, luminosity)
|
||||
src.log_message("Toggled lights.")
|
||||
return
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
ul_SetLuminosity(1)
|
||||
ul_SetLuminosity(0,3,0)
|
||||
|
||||
spawn(1200) // 2 minutes
|
||||
del(src)
|
||||
@@ -28,14 +28,14 @@
|
||||
if(src.loc == user)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
||||
else if (isturf(src.loc))
|
||||
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||
ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||
|
||||
else
|
||||
icon_state = icon_off
|
||||
if(src.loc == user)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
||||
else if (isturf(src.loc))
|
||||
src.ul_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
// if(!isturf(user.loc))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
var/datum/powernet/PN = attached.get_powernet()
|
||||
if(PN)
|
||||
if(!luminosity)
|
||||
ul_SetLuminosity(12)
|
||||
ul_SetLuminosity(12,3,0)
|
||||
|
||||
|
||||
// found a powernet, so drain up to max power from it
|
||||
|
||||
@@ -491,5 +491,5 @@ ZIPPO
|
||||
dropped(mob/user)
|
||||
if(lit)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
||||
ul_SetLuminosity(2)
|
||||
ul_SetLuminosity(2,1,0)
|
||||
return
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
ul_SetLuminosity(3)
|
||||
ul_SetLuminosity(0,3,0)
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
@@ -281,4 +281,4 @@
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
del(src)
|
||||
del(src)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
proc/ChangeSign(var/Text)
|
||||
src.icon_state = "[Text]"
|
||||
//ul_SetLuminosity(4)
|
||||
ul_SetLuminosity(3,0,0)
|
||||
return
|
||||
|
||||
/obj/effect/sign/securearea/ex_act(severity)
|
||||
|
||||
@@ -142,7 +142,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
return
|
||||
|
||||
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
|
||||
S.ReplaceWithAirlessPlating()
|
||||
S.ReplaceWithPlating()
|
||||
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
|
||||
// W.make_plating()
|
||||
return
|
||||
|
||||
@@ -193,34 +193,27 @@
|
||||
W.opacity = 1
|
||||
W.ul_SetOpacity(0)
|
||||
W.levelupdate()
|
||||
air_master.tiles_to_update |= W
|
||||
|
||||
var/turf/simulated/north = get_step(W,NORTH)
|
||||
var/turf/simulated/south = get_step(W,SOUTH)
|
||||
var/turf/simulated/east = get_step(W,EAST)
|
||||
var/turf/simulated/west = get_step(W,WEST)
|
||||
if(W && W.air)
|
||||
var/new_ox = 0
|
||||
var/new_n2 = 0
|
||||
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
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
if(istype(west)) air_master.tiles_to_update |= west
|
||||
return W
|
||||
W.air.nitrogen = new_n2/4
|
||||
W.air.oxygen = new_ox/4
|
||||
W.air.carbon_dioxide = new_co2/4
|
||||
W.air.toxins = new_tx/4
|
||||
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
|
||||
|
||||
var/turf/simulated/north = get_step(W,NORTH)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
var/oldlum = luminosity
|
||||
|
||||
//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(oldlum != luminosity)
|
||||
|
||||
Reference in New Issue
Block a user