mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Replaces our lighting system with CM's. (#21465)
Depends on #21458. Ports https://github.com/cmss13-devs/cmss13/pull/4229, with the original authors as: - https://github.com/tgstation/TerraGov-Marine-Corps/pull/1964 for the lighting controller (A-lexa) - https://github.com/tgstation/TerraGov-Marine-Corps/pull/4747 and https://github.com/tgstation/TerraGov-Marine-Corps/pull/7263 for the lighting (TiviPlus) - https://github.com/tgstation/tgstation/pull/54520 for the dir lighting component - https://github.com/tgstation/tgstation/pull/75018 for the out of bounds fix in lighting - https://github.com/tgstation/TerraGov-Marine-Corps/pull/6678 for the emissives (TiviPlus) The main driving reason behind this is that current lighting consumes way too much processing power, especially for things like odysseys/away sites where a billion light sources are processing/moving at once and the game slows down to a crawl. Hopefully this improves the situation by a good margin, but we will need some testmerging to confirm that. <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/1059ba2b-c0c5-495a-9c76-2d75d0c42bf2" /> <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/9704b0f6-4cf6-4dfd-a6cb-5702ad07d677" /> - [x] Resolve todos - [x] Look into open space fuckery (border objects) --------- Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: JohnWildkins <john.wildkins@gmail.com>
This commit is contained in:
co-authored by
Matt Atlas
JohnWildkins
parent
8ebd7c9ad5
commit
94d92803b4
@@ -13,7 +13,8 @@
|
||||
/obj/aura/radiant_aura/added_to(mob/living/user)
|
||||
..()
|
||||
to_chat(user, SPAN_NOTICE("A bubble of light appears around you, exuding protection and warmth."))
|
||||
set_light(6, 6, COLOR_AMBER)
|
||||
set_light_range_power_color(6, 6, COLOR_AMBER)
|
||||
set_light_on(TRUE)
|
||||
|
||||
/obj/aura/radiant_aura/Destroy()
|
||||
to_chat(user, SPAN_WARNING("Your protective aura dissipates, leaving you feeling cold and unsafe."))
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
light_range = 2
|
||||
light_power = 0.5
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
uv_intensity = 0
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "greenglow"
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/obj/effect/decal/fake_object/light_source/Initialize()
|
||||
.=..()
|
||||
set_light()
|
||||
set_light(light_power, light_range, light_color)
|
||||
|
||||
/obj/effect/decal/fake_object/light_source/invisible
|
||||
simulated = 0
|
||||
|
||||
@@ -122,6 +122,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/effect/smoke/Destroy()
|
||||
if(opacity)
|
||||
set_opacity(FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/effect/smoke/proc/kill()
|
||||
animate(src, alpha = 0, time = 2 SECONDS, easing = QUAD_EASING)
|
||||
set_opacity(FALSE)
|
||||
@@ -157,7 +162,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "sparks"
|
||||
|
||||
/obj/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
|
||||
/obj/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=5)
|
||||
time_to_live=lifetime
|
||||
..()
|
||||
set_light(brightness)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
/obj/effect/shockwave
|
||||
icon = 'icons/effects/shockwave.dmi'
|
||||
icon = 'icons/effects/light_overlays/shockwave.dmi'
|
||||
icon_state = "shockwave"
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
plane = DISPLACEMENT_PLATE_RENDER_LAYER
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "item"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
light_system = MOVABLE_LIGHT
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
|
||||
/// This saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
@@ -491,9 +492,6 @@
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user)
|
||||
in_inventory = FALSE
|
||||
|
||||
if(user && (z_flags & ZMM_MANGLE_PLANES))
|
||||
addtimer(CALLBACK(user, /mob/proc/check_emissive_equipment), 0, TIMER_UNIQUE)
|
||||
|
||||
user?.update_equipment_speed_mods()
|
||||
try_make_persistent_trash()
|
||||
|
||||
@@ -629,9 +627,6 @@
|
||||
//Ěent for observable
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_REMOVE, src)
|
||||
|
||||
if(user && (z_flags & ZMM_MANGLE_PLANES))
|
||||
addtimer(CALLBACK(user, /mob/proc/check_emissive_equipment), 0, TIMER_UNIQUE)
|
||||
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
if(persistency_considered_trash || persistence_track_active) // The moment trash like items get picked up they are no longer persistent
|
||||
|
||||
@@ -2,17 +2,15 @@
|
||||
name = "flare"
|
||||
desc = "A red standard-issue flare. There are instructions on the side reading 'twist cap off, make light'."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
brightness_on = 5 // Pretty bright.
|
||||
light_range = 5 // Pretty bright.
|
||||
light_power = 6
|
||||
light_color = LIGHT_COLOR_FLARE //"#E58775"
|
||||
icon_state = "flare"
|
||||
item_state = "flare"
|
||||
action_button_name = null //just pull it manually, neckbeard.
|
||||
var/fuel = 0
|
||||
uv_intensity = 100
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
light_wedge = LIGHT_OMNI
|
||||
power_use = FALSE
|
||||
activation_sound = 'sound/items/flare.ogg'
|
||||
toggle_sound = null
|
||||
@@ -77,6 +75,7 @@
|
||||
SPAN_NOTICE("\The [src] sputters out.")
|
||||
)
|
||||
update_icon()
|
||||
set_light_on(on)
|
||||
|
||||
/obj/item/device/flashlight/flare/proc/update_damage()
|
||||
if(on)
|
||||
@@ -90,12 +89,11 @@
|
||||
name = "torch"
|
||||
desc = "A rustic source of light."
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
brightness_on = 2
|
||||
light_range = 2
|
||||
light_power = 3
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
icon_state = "torch"
|
||||
item_state = "torch"
|
||||
uv_intensity = 40
|
||||
produce_heat = 1000
|
||||
on_damage = 10
|
||||
|
||||
@@ -121,12 +119,12 @@
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
|
||||
/obj/item/device/flashlight/flare/torch/proc/light(mob/user)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] lights \the [src]."), SPAN_NOTICE("You light \the [src]."))
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
on = TRUE
|
||||
set_light_on(on)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
update_icon()
|
||||
|
||||
@@ -177,7 +175,7 @@
|
||||
/obj/item/device/flashlight/flare/torch/stick
|
||||
name = "flaming stick"
|
||||
desc = "How exciting!"
|
||||
brightness_on = 1.5
|
||||
light_range = 1.5
|
||||
light_power = 1
|
||||
produce_heat = 400
|
||||
|
||||
|
||||
@@ -8,16 +8,14 @@
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
slot_flags = SLOT_BELT
|
||||
light_color = LIGHT_COLOR_HALOGEN
|
||||
uv_intensity = 50
|
||||
light_wedge = LIGHT_WIDE
|
||||
light_system = DIRECTIONAL_LIGHT
|
||||
light_range = 4
|
||||
|
||||
matter = list(MATERIAL_PLASTIC = 50, MATERIAL_GLASS = 20)
|
||||
|
||||
action_button_name = "Toggle Flashlight"
|
||||
/// Is the light currently on or off?
|
||||
var/on = FALSE
|
||||
/// Luminosity when on
|
||||
var/brightness_on = 4
|
||||
// Lighting power when on
|
||||
var/flashlight_power = 0.8
|
||||
/// Sound the light makes when it's switched
|
||||
@@ -55,36 +53,29 @@
|
||||
. += "\The [src] is set to [brightness_level]."
|
||||
if(cell)
|
||||
. += "\The [src] has \a [cell] attached. It has [round(cell.percent())]% charge remaining."
|
||||
if(light_wedge && isturf(loc))
|
||||
. += SPAN_NOTICE("\The [src] is facing [dir2text(dir)].")
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
|
||||
if(power_use && cell_type)
|
||||
if(starts_with_cell)
|
||||
cell = new cell_type(src)
|
||||
brightness_levels = list("low" = 1/32, "medium" = 1/16, "high" = 1/8) // ~26 minutes at high power with a device cell.
|
||||
power_usage = (brightness_levels[brightness_level] / efficiency_modifier)
|
||||
brightness_levels = list("low" = 2, "medium" = 3, "high" = 4)
|
||||
power_usage = ((brightness_levels[brightness_level]/ 10 ) / efficiency_modifier)
|
||||
else
|
||||
verbs -= /obj/item/device/flashlight/verb/toggle_brightness
|
||||
|
||||
if (on)
|
||||
if(brightness_level == "low")
|
||||
light_range = brightness_on * 0.5
|
||||
light_range = light_range * 0.5
|
||||
else if(brightness_level == "high")
|
||||
light_range = brightness_on * 1.5
|
||||
light_range = light_range * 1.5
|
||||
else
|
||||
light_range = brightness_on
|
||||
light_range = light_range
|
||||
update_icon()
|
||||
set_light_on(on)
|
||||
|
||||
. = ..()
|
||||
|
||||
if(light_wedge)
|
||||
set_dir(pick(NORTH, SOUTH, EAST, WEST))
|
||||
if(spawn_dir)
|
||||
set_dir(spawn_dir)
|
||||
update_light()
|
||||
|
||||
/obj/item/device/flashlight/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
QDEL_NULL(cell)
|
||||
@@ -96,7 +87,7 @@
|
||||
/obj/item/device/flashlight/proc/set_brightness(mob/user)
|
||||
var/choice = tgui_input_list(user, "Choose a brightness level.", "Flashlight", brightness_levels)
|
||||
if(choice)
|
||||
brightness_level = choice
|
||||
set_light_range(brightness_levels[choice])
|
||||
power_usage = brightness_levels[choice]
|
||||
to_chat(user, SPAN_NOTICE("You set the brightness level on \the [src] to [brightness_level]."))
|
||||
update_icon()
|
||||
@@ -120,15 +111,8 @@
|
||||
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
if(brightness_level == "low")
|
||||
set_light(brightness_on * 0.5, flashlight_power * 0.75, light_color)
|
||||
else if(brightness_level == "high")
|
||||
set_light(brightness_on * 1.5, flashlight_power * 1.1, light_color)
|
||||
else
|
||||
set_light(brightness_on, flashlight_power, light_color)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
set_light(0)
|
||||
if (ismob(src.loc)) //for reasons, this makes headlights work.
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_l_ear()
|
||||
@@ -198,24 +182,12 @@
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
else if (power_use)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
set_light_on(on)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/vendor_action(var/obj/machinery/vending/V)
|
||||
toggle()
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
. = ..()
|
||||
if(light_wedge)
|
||||
set_dir(user.dir)
|
||||
update_light()
|
||||
|
||||
/obj/item/device/flashlight/throw_at(atom/target, range, speed, thrower, do_throw_animation)
|
||||
. = ..()
|
||||
if(light_wedge)
|
||||
var/new_dir = pick(NORTH, SOUTH, EAST, WEST)
|
||||
set_dir(new_dir)
|
||||
update_light()
|
||||
|
||||
/obj/item/device/flashlight/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
@@ -229,7 +201,7 @@
|
||||
if(((user.is_clumsy()) || (user.mutations & DUMB)) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
|
||||
if(brightness_on < 2)
|
||||
if(light_range < 2)
|
||||
to_chat(user, SPAN_WARNING("This light is too dim to see anything with!"))
|
||||
return
|
||||
|
||||
@@ -253,7 +225,7 @@
|
||||
inspect_vision(vision, user)
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //can be used offensively
|
||||
if (!(brightness_on < 2))
|
||||
if (!(light_range < 2))
|
||||
H.flash_act(length = 1 SECOND)
|
||||
else
|
||||
return ..()
|
||||
@@ -312,9 +284,8 @@
|
||||
pickup_sound = 'sound/items/pickup/accessory.ogg'
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
slot_flags = SLOT_EARS
|
||||
brightness_on = 2
|
||||
light_range = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
light_wedge = LIGHT_OMNI
|
||||
|
||||
/obj/item/device/flashlight/drone
|
||||
name = "low-power flashlight"
|
||||
@@ -322,7 +293,7 @@
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
brightness_on = 2
|
||||
light_range = 2
|
||||
efficiency_modifier = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -331,11 +302,9 @@
|
||||
desc = "A high-luminosity flashlight, for specialist duties."
|
||||
icon_state = "heavyflashlight"
|
||||
item_state = "heavyflashlight"
|
||||
brightness_on = 4
|
||||
light_range = 4
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
uv_intensity = 60
|
||||
matter = list(MATERIAL_PLASTIC = 100, MATERIAL_GLASS = 70)
|
||||
light_wedge = LIGHT_SEMI
|
||||
|
||||
/obj/item/device/flashlight/heavy/on
|
||||
on = TRUE
|
||||
@@ -346,14 +315,12 @@
|
||||
icon_state = "maglight"
|
||||
item_state = "maglight"
|
||||
force = 9
|
||||
brightness_on = 5
|
||||
light_range = 5
|
||||
efficiency_modifier = 0.8
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
uv_intensity = 70
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
matter = list(MATERIAL_ALUMINIUM = 200, MATERIAL_GLASS = 100)
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
light_wedge = LIGHT_NARROW
|
||||
|
||||
/obj/item/device/flashlight/maglight/update_icon()
|
||||
..()
|
||||
@@ -373,13 +340,12 @@
|
||||
icon_state = "yellow slime extract"
|
||||
item_state = "flashlight"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
brightness_on = 6
|
||||
uv_intensity = 200
|
||||
light_range = 6
|
||||
on = TRUE //Bio-luminesence has one setting, on.
|
||||
always_on = TRUE
|
||||
power_usage = FALSE
|
||||
light_color = LIGHT_COLOR_SLIME_LAMP
|
||||
light_wedge = LIGHT_OMNI
|
||||
light_system = MOVABLE_LIGHT
|
||||
|
||||
/obj/item/device/flashlight/headlights
|
||||
name = "headlights"
|
||||
@@ -388,9 +354,8 @@
|
||||
item_state = "headlights"
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
slot_flags = SLOT_HEAD | SLOT_EARS
|
||||
brightness_on = 2
|
||||
light_range = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
light_wedge = LIGHT_WIDE
|
||||
body_parts_covered = 0
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
@@ -403,11 +368,11 @@
|
||||
attack_verb = list("bludgeoned, bashed, whacked")
|
||||
matter = list(MATERIAL_STEEL = 200,MATERIAL_GLASS = 100)
|
||||
flashlight_power = 1
|
||||
brightness_on = 4
|
||||
light_range = 4
|
||||
cell_type = /obj/item/cell
|
||||
accepts_large_cells = TRUE
|
||||
light_wedge = LIGHT_OMNI
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
light_system = MOVABLE_LIGHT
|
||||
|
||||
/obj/item/device/flashlight/lantern/update_icon()
|
||||
..()
|
||||
|
||||
@@ -2,21 +2,20 @@
|
||||
name = "green glowstick"
|
||||
desc = "A green military-grade glowstick."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 1.2
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = 1.2
|
||||
flashlight_power = 2
|
||||
light_color = "#49F37C"
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
produce_heat = 0
|
||||
uv_intensity = 255
|
||||
light_wedge = LIGHT_OMNI
|
||||
activation_sound = 'sound/items/glowstick.ogg'
|
||||
toggle_sound = null
|
||||
|
||||
/obj/item/device/flashlight/flare/glowstick/Initialize()
|
||||
. = ..()
|
||||
fuel = rand(9 MINUTES, 12 MINUTES)
|
||||
light_color = color
|
||||
set_light_color(color)
|
||||
|
||||
/obj/item/device/flashlight/flare/glowstick/process()
|
||||
fuel = max(fuel - 1, 0)
|
||||
@@ -30,14 +29,15 @@
|
||||
overlays.Cut()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
set_light(0)
|
||||
set_light_on(0)
|
||||
else if(on)
|
||||
var/image/I = overlay_image(icon, "glowstick-overlay", color)
|
||||
I.blend_mode = BLEND_ADD
|
||||
AddOverlays(I)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
item_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on, flashlight_power, light_color)
|
||||
set_light_range_power_color(light_range, flashlight_power, light_color)
|
||||
set_light_on(on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
update_held_icon()
|
||||
|
||||
@@ -4,17 +4,16 @@
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
center_of_mass = list("x" = 13,"y" = 11)
|
||||
brightness_on = 4
|
||||
flashlight_power = 1.0
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
obj_flags = OBJ_FLAG_CONDUCTABLE
|
||||
uv_intensity = 100
|
||||
power_use = FALSE
|
||||
on = TRUE
|
||||
slot_flags = 0 //No wearing desklamps
|
||||
light_wedge = LIGHT_OMNI
|
||||
toggle_sound = /singleton/sound_category/switch_sound
|
||||
activation_sound = 'sound/effects/lighton.ogg'
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = 3
|
||||
flashlight_power = 1.0
|
||||
|
||||
/obj/item/device/flashlight/lamp/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
@@ -32,7 +31,7 @@
|
||||
desc = "A classic green-shaded desk lamp."
|
||||
icon_state = "lampgreen"
|
||||
item_state = "lampgreen"
|
||||
brightness_on = 5
|
||||
light_range = 4
|
||||
light_color = "#FFC58F"
|
||||
toggle_sound = 'sound/machines/switch_chain.ogg'
|
||||
|
||||
@@ -49,15 +48,16 @@
|
||||
name = "data encryption lamp"
|
||||
desc = "Random oil globules within were parsed in photos for your protection. Enjoy this kitschy memorabilia by sticking it on your desk."
|
||||
icon_state = "lavalamp"
|
||||
brightness_on = 3
|
||||
light_range = 3
|
||||
flashlight_power = 0.5
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 250, MATERIAL_GLASS = 200)
|
||||
|
||||
/obj/item/device/flashlight/lamp/lava/update_icon()
|
||||
if(on)
|
||||
set_light(brightness_on, flashlight_power, light_color)
|
||||
set_light_range_power_color(light_range, flashlight_power, light_color)
|
||||
else
|
||||
set_light(0)
|
||||
set_light_on(on)
|
||||
ClearOverlays()
|
||||
var/image/I = image(icon = icon, icon_state = "lavalamp-[on ? "on" : "off"]")
|
||||
I.color = light_color
|
||||
@@ -97,7 +97,7 @@
|
||||
name = "holographic lighting orb"
|
||||
desc = "A floating orb that comes in a variety of colors. Optional holodeck lighting."
|
||||
anchored = 1
|
||||
brightness_on = 12
|
||||
light_range = 12
|
||||
light_color = "#ffcb9b"
|
||||
icon = 'icons/effects/props/holodeck/holodeck_tools.dmi'
|
||||
icon_state = "orb"
|
||||
@@ -108,7 +108,7 @@
|
||||
/obj/item/device/flashlight/lamp/box
|
||||
name = "box lamp"
|
||||
desc = "A box-shaped traditional flame lamp. Less safe, more pretty."
|
||||
brightness_on = 5
|
||||
light_range = 5
|
||||
light_color = "#ffcb9b"
|
||||
icon = 'icons/effects/props/holodeck/konyang/32x32.dmi'
|
||||
icon_state = "boxlamp"
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
item_state = "marshallingwand"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
light_color = LIGHT_COLOR_RED
|
||||
light_wedge = LIGHT_OMNI
|
||||
brightness_on = 2
|
||||
light_range = 2
|
||||
action_button_name = "Toggle Marshalling Wands"
|
||||
|
||||
/obj/item/device/flashlight/marshallingwand/AltClick(mob/user)
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
desc = "A hand-held emergency light. This one has been modified with a larger, more efficient bulb pointing inwards."
|
||||
icon_state = "survival_flashlight"
|
||||
item_state = "survival_flashlight"
|
||||
light_wedge = null
|
||||
|
||||
uv_intensity = 255
|
||||
light_power = 2
|
||||
brightness_on = 2
|
||||
light_range = 2
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
efficiency_modifier = 1.2 // 120% more efficient compared to other flashlights
|
||||
|
||||
@@ -24,11 +24,9 @@
|
||||
return
|
||||
|
||||
var/visible_reading = T.get_lumcount(low, high)
|
||||
var/uv_reading = T.get_uv_lumcount(low, high)
|
||||
|
||||
var/reading = "Light analysis for <b>\the [T]</b>.<br>"
|
||||
reading += "Visible light: <b>[visible_reading]</b> lx<br>"
|
||||
reading += "Ultraviolet light: <b>[uv_reading]</b> lx ([uv_reading * 5.5 - 1.5] adlx)"
|
||||
|
||||
to_chat(usr, SPAN_NOTICE(reading))
|
||||
|
||||
|
||||
@@ -11,15 +11,14 @@
|
||||
var/on = FALSE
|
||||
var/activation_sound = 'sound/items/flare.ogg'
|
||||
light_color = LIGHT_COLOR_FLARE
|
||||
uv_intensity = 50
|
||||
var/brightness_on = 2 // Moderate bright.
|
||||
light_range = 2 // Moderate bright.
|
||||
light_power = 2
|
||||
action_button_name = null
|
||||
|
||||
/obj/item/device/oxycandle/attack_self(mob/user)
|
||||
if(!on)
|
||||
to_chat(user, SPAN_NOTICE("You pull the cord and [src] ignites."))
|
||||
light_range = brightness_on
|
||||
light_range = light_range
|
||||
on = TRUE
|
||||
update_icon()
|
||||
playsound(src.loc, activation_sound, 75, 1)
|
||||
@@ -65,7 +64,7 @@
|
||||
if(on)
|
||||
icon_state = "oxycandle_on"
|
||||
item_state = icon_state
|
||||
set_light(brightness_on)
|
||||
set_light(light_range)
|
||||
else
|
||||
icon_state = "oxycandle"
|
||||
item_state = icon_state
|
||||
|
||||
@@ -121,7 +121,6 @@
|
||||
if(!PN)
|
||||
return 1
|
||||
|
||||
set_light(12)
|
||||
PN.trigger_warning()
|
||||
// found a powernet, so drain up to max power from it
|
||||
drained = PN.draw_power(drain_rate * seconds_per_tick)
|
||||
|
||||
@@ -29,7 +29,6 @@ pixel_x = 8;
|
||||
canhear_range = 2
|
||||
atom_flags = ATOM_FLAG_NO_BLOOD
|
||||
obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED | OBJ_FLAG_CONDUCTABLE
|
||||
z_flags = ZMM_MANGLE_PLANES
|
||||
var/number = 0
|
||||
var/obj/machinery/abstract/intercom_listener/power_interface
|
||||
var/radio_sound = null
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(!powersupply)
|
||||
icon_state = "recharger_backpack"
|
||||
item_state = "recharger_backpack"
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
else
|
||||
var/current_charge = powersupply.percent()
|
||||
@@ -72,19 +72,22 @@
|
||||
if(70 to INFINITY)
|
||||
icon_state = "recharger_backpack_full"
|
||||
item_state = "recharger_backpack_full"
|
||||
set_light(2, 0.75, LIGHT_COLOR_GREEN)
|
||||
set_light_range_power_color(2, 0.75, LIGHT_COLOR_GREEN)
|
||||
set_light_on(TRUE)
|
||||
if(35 to 70)
|
||||
icon_state = "recharger_backpack_med"
|
||||
item_state = "recharger_backpack_med"
|
||||
set_light(2, 0.75, LIGHT_COLOR_FIRE)
|
||||
set_light_range_power_color(2, 0.75, LIGHT_COLOR_FIRE)
|
||||
set_light_on(TRUE)
|
||||
if(1 to 35)
|
||||
icon_state = "recharger_backpack_low"
|
||||
item_state = "recharger_backpack_low"
|
||||
set_light(2, 0.75, LIGHT_COLOR_RED)
|
||||
set_light_range_power_color(2, 0.75, LIGHT_COLOR_RED)
|
||||
set_light_on(TRUE)
|
||||
if(-INFINITY to 1)
|
||||
icon_state = "recharger_backpack"
|
||||
item_state = "recharger_backpack"
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
/obj/item/recharger_backpack/get_cell()
|
||||
if(powersupply)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
light_power = 1
|
||||
light_range = 1
|
||||
light_color = LIGHT_COLOR_HALOGEN
|
||||
z_flags = ZMM_MANGLE_PLANES
|
||||
var/global/image/glow_state
|
||||
|
||||
/obj/effect/temp_visual/constellation/Initialize()
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
pickup_sound = 'sound/items/pickup/gloves.ogg'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
light_color = "#E09D37"
|
||||
light_range = 2
|
||||
light_power = CANDLE_LUM
|
||||
var/wax = 3200
|
||||
var/start_lit = FALSE
|
||||
|
||||
@@ -47,8 +49,7 @@
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
playsound(src.loc, 'sound/items/cigs_lighters/cig_light.ogg', 50, 1)
|
||||
//src.damtype = "fire"
|
||||
set_light(CANDLE_LUM)
|
||||
set_light_on(TRUE)
|
||||
update_icon()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
@@ -76,4 +77,4 @@
|
||||
to_chat(user, SPAN_NOTICE("You snuff out the flame."))
|
||||
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
|
||||
update_icon()
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
|
||||
@@ -770,7 +770,8 @@
|
||||
var/list/pilot_access = list()
|
||||
for(var/mob/pilot as anything in exosuit.pilots)
|
||||
var/obj/item/ID = pilot.GetIdCard()
|
||||
pilot_access |= ID.GetAccess()
|
||||
if(ID)
|
||||
pilot_access |= ID.GetAccess()
|
||||
return pilot_access
|
||||
|
||||
#undef ID_CARD_UNSET
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
icon_state = "azubarre_torch"
|
||||
item_state = "azubarre_torch"
|
||||
contained_sprite = TRUE
|
||||
light_range = 3
|
||||
light_power = 1
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
var/lit = FALSE
|
||||
|
||||
/obj/item/nullrod/azubarre/attack_self(mob/user)
|
||||
@@ -142,10 +145,10 @@
|
||||
/obj/item/nullrod/azubarre/update_icon()
|
||||
if(lit)
|
||||
icon_state = "azubarre_torch-on"
|
||||
set_light(3, 1, LIGHT_COLOR_FIRE)
|
||||
set_light_on(TRUE)
|
||||
else
|
||||
icon_state = "azubarre_torch-empty"
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/nullrod/azubarre/isFlameSource()
|
||||
|
||||
@@ -40,6 +40,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
attack_verb = list("burnt", "singed")
|
||||
drop_sound = 'sound/items/drop/food.ogg'
|
||||
pickup_sound = 'sound/items/pickup/food.ogg'
|
||||
light_system = MOVABLE_LIGHT
|
||||
|
||||
/obj/item/trash/match
|
||||
name = "burnt match"
|
||||
@@ -113,7 +114,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
M.update_inv_wear_mask(0)
|
||||
M.update_inv_l_hand(0)
|
||||
M.update_inv_r_hand(1)
|
||||
set_light(2, 0.25, "#E38F46")
|
||||
set_light_range_power_color(2, 0.25, "#E38F46")
|
||||
set_light_on(TRUE)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/flame/match/proc/die(var/nomessage = FALSE)
|
||||
@@ -135,7 +137,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
M.update_inv_l_hand(0)
|
||||
M.update_inv_r_hand(1)
|
||||
M.put_in_hands(burnt)
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
qdel(src)
|
||||
|
||||
@@ -227,12 +229,13 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
|
||||
M.update_inv_r_hand(1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(flavor_text)
|
||||
set_light(2, 0.25, "#E38F46")
|
||||
set_light_range_power_color(2, 0.25, "#E38F46")
|
||||
set_light_on(TRUE)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/clothing/mask/smokable/proc/die(var/no_message = FALSE, var/intentionally = FALSE)
|
||||
var/turf/T = get_turf(src)
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
|
||||
if(type_butt)
|
||||
var/obj/item/butt = new type_butt(src.loc)
|
||||
@@ -965,7 +968,7 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("<b>[user]</b> quietly shuts off \the [src]."), range = 3)
|
||||
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
else
|
||||
return ..()
|
||||
@@ -975,7 +978,8 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
|
||||
lit = TRUE
|
||||
update_icon()
|
||||
playsound(src.loc, pick(activation_sound), 75, 1)
|
||||
set_light(flame_light_power, flame_light_range, l_color = flame_light_color)
|
||||
set_light_range_power_color(flame_light_range, flame_light_power, flame_light_color)
|
||||
set_light_on(TRUE)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/flame/lighter/vendor_action(var/obj/machinery/vending/V)
|
||||
@@ -1032,7 +1036,7 @@ ABSTRACT_TYPE(/obj/item/clothing/mask/smokable)
|
||||
lit = 0
|
||||
icon_state = "[base_state]"
|
||||
item_state = "[base_state]"
|
||||
set_light(0)
|
||||
set_light_on(FALSE)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return
|
||||
|
||||
|
||||
@@ -237,6 +237,10 @@
|
||||
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
|
||||
light_system = MOVABLE_LIGHT
|
||||
light_range = 1
|
||||
light_color = LIGHT_COLOR_LAVA
|
||||
|
||||
//Amount of OUCH when it's thrown
|
||||
force = 3
|
||||
throwforce = 5
|
||||
@@ -299,6 +303,7 @@
|
||||
max_fuel = 40
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100, MATERIAL_GLASS = 120)
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_BIO = 4)
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
var/last_gen = 0
|
||||
var/fuelgen_delay = 400 //The time, in deciseconds, required to regenerate one unit of fuel
|
||||
@@ -333,11 +338,14 @@
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
if(welding == 2)
|
||||
set_light(0.7, 2, l_color = LIGHT_COLOR_CYAN)
|
||||
set_light_range_power_color(light_range * 1.5, light_power * 1.5, light_color)
|
||||
set_light_on(TRUE)
|
||||
else if (welding == 1)
|
||||
set_light(0.6, 1.5, l_color = LIGHT_COLOR_LAVA)
|
||||
set_light_range_power_color(light_range, light_power, light_color)
|
||||
set_light_on(TRUE)
|
||||
else
|
||||
set_light(0)
|
||||
set_light_range_power_color(light_range, light_power, light_color)
|
||||
set_light_on(FALSE)
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
ClearOverlays()
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "rustlamp_l"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
light_wedge = LIGHT_OMNI
|
||||
light_color = LIGHT_COLOR_HALOGEN
|
||||
light_range = 8
|
||||
light_power = 8
|
||||
@@ -29,7 +28,6 @@
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
light_color = "#FA644B"
|
||||
light_wedge = LIGHT_OMNI
|
||||
light_range = 6
|
||||
light_power = 1
|
||||
|
||||
@@ -66,7 +64,6 @@
|
||||
|
||||
/obj/structure/utility_pole/street/on
|
||||
desc = "A tall light source. This one shines brightly."
|
||||
light_wedge = LIGHT_OMNI
|
||||
light_color = "#e8ffeb"
|
||||
light_range = 8
|
||||
light_power = 1.9
|
||||
@@ -82,7 +79,6 @@
|
||||
|
||||
/obj/structure/utility_pole/street/classic/on
|
||||
desc = "A tall light source. This one shines brightly."
|
||||
light_wedge = LIGHT_OMNI
|
||||
light_color = LIGHT_COLOR_TUNGSTEN
|
||||
light_range = 8
|
||||
light_power = 1.9
|
||||
|
||||
@@ -241,7 +241,7 @@ ABSTRACT_TYPE(/obj/structure/stairs/urban)
|
||||
icon = 'icons/obj/structure/urban/ledges.dmi'
|
||||
icon_state = "stairs-single"
|
||||
layer = 2.01
|
||||
opacity = 1
|
||||
opacity = TRUE
|
||||
|
||||
/obj/structure/stairs/urban/right
|
||||
dir = EAST
|
||||
@@ -821,6 +821,10 @@ ABSTRACT_TYPE(/obj/structure/stairs/urban/road_ramp)
|
||||
if(storage_type)
|
||||
storage_compartment = new storage_type(src)
|
||||
|
||||
/obj/structure/cash_register/Destroy()
|
||||
QDEL_NULL(storage_compartment)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/toolbox/cash_register_storage
|
||||
name = "cash compartment"
|
||||
|
||||
@@ -960,7 +964,7 @@ ABSTRACT_TYPE(/obj/structure/stairs/urban/road_ramp)
|
||||
autoclose = TRUE
|
||||
support_ids = TRUE
|
||||
glass = TRUE
|
||||
opacity = 0 //otherwise it is opaque until opened/closed for the first time.
|
||||
opacity = FALSE //otherwise it is opaque until opened/closed for the first time.
|
||||
|
||||
/obj/machinery/door/urban/glass_sliding/double //use north state for left side and south state for right side
|
||||
icon_state = "double_glass_sliding_closed"
|
||||
|
||||
Reference in New Issue
Block a user