mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +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
@@ -105,7 +105,8 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE)
|
||||
/atom/movable/flick_visual,
|
||||
|
||||
//Weather system, requires a z level
|
||||
/obj/abstract/weather_system
|
||||
/obj/abstract/weather_system,
|
||||
/atom/movable/lighting_mask, //leave it alone
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#define SUCCESS 1
|
||||
#define FAILURE 0
|
||||
|
||||
|
||||
/datum/unit_test/vision_glasses/
|
||||
name = "EQUIPMENT: Vision Template"
|
||||
groups = list("generic", "vision")
|
||||
|
||||
|
||||
var/mob/living/carbon/human/H = null
|
||||
var/expectation = SEE_INVISIBLE_NOLIGHTING
|
||||
var/glasses_type = null
|
||||
async = 1
|
||||
|
||||
/datum/unit_test/vision_glasses/start_test()
|
||||
var/list/test = create_test_mob_with_mind(null, /mob/living/carbon/human)
|
||||
if(isnull(test))
|
||||
TEST_FAIL("Check Runtimed in Mob creation")
|
||||
|
||||
if(test["result"] == FAILURE)
|
||||
TEST_FAIL(test["msg"])
|
||||
async = 0
|
||||
|
||||
return 0
|
||||
|
||||
H = locate(test["mobref"])
|
||||
|
||||
var/obj/item/clothing/glasses/G = new glasses_type()
|
||||
H.glasses = G
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/datum/unit_test/vision_glasses/check_result()
|
||||
|
||||
if(isnull(H) || H.life_tick < 2)
|
||||
return 0
|
||||
|
||||
if(isnull(H.glasses))
|
||||
TEST_FAIL("Mob doesn't have glasses on")
|
||||
|
||||
H.handle_vision() // Because Life has a client check that bypasses updating vision
|
||||
|
||||
if(H.see_invisible == expectation)
|
||||
TEST_PASS("Mob See invisible is [H.see_invisible]")
|
||||
else
|
||||
TEST_FAIL("Mob See invisible is [H.see_invisible] / expected [expectation]")
|
||||
|
||||
return 1
|
||||
|
||||
/datum/unit_test/vision_glasses/NVG
|
||||
name = "EQUIPMENT: NVG see_invis"
|
||||
glasses_type = /obj/item/clothing/glasses/night
|
||||
|
||||
/datum/unit_test/vision_glasses/mesons
|
||||
name = "EQUIPMENT: Mesons see_invis"
|
||||
glasses_type = /obj/item/clothing/glasses/meson
|
||||
|
||||
/datum/unit_test/vision_glasses/plain
|
||||
name = "EQUIPMENT: Plain glasses. see_invis"
|
||||
glasses_type = /obj/item/clothing/glasses/regular
|
||||
expectation = SEE_INVISIBLE_LIVING
|
||||
|
||||
#undef SUCCESS
|
||||
#undef FAILURE
|
||||
|
||||
Reference in New Issue
Block a user