mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user