mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Requests console helpers (#75224)
## About The Pull Request This PR adds mapping helpers for requests consoles. Two of them set up if the console can receive ore updates, and if it can make announcements, flipping their relevant variables to TRUE. The other three adds the consoles to their relevant department console lists during late initialize. This allowed me to remove three variables directly from the consoles themselves.  New sprites by CoiledLamb! ~~This PR also anchors mapping helpers, to prevent effects like the roundstart crate initialization from moving them.~~ This was fixed by a different PR. ## Why It's Good For The Game Less var edits, easier to see a console's type at a glance. ## Changelog 🆑 Profakos, sprites by CoiledLamb qol: Most request console varedits have been moved to mapping helpers. /🆑
This commit is contained in:
@@ -1220,3 +1220,66 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
|
||||
var/area/area = get_area(target)
|
||||
log_mapping("[src] at [AREACOORD(src)] [(area.type)] tried to damage [target] but it's already damaged!")
|
||||
target.take_damage(rand(target.max_integrity * integrity_min_factor, target.max_integrity * integrity_max_factor))
|
||||
|
||||
//requests console helpers
|
||||
/obj/effect/mapping_helpers/requests_console
|
||||
desc = "You shouldn't see this. Report it please."
|
||||
layer = DOOR_HELPER_LAYER
|
||||
late = TRUE
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!mapload)
|
||||
log_mapping("[src] spawned outside of mapload!")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/LateInitialize(mapload)
|
||||
var/obj/machinery/airalarm/target = locate(/obj/machinery/requests_console) in loc
|
||||
if(isnull(target))
|
||||
var/area/target_area = get_area(target)
|
||||
log_mapping("[src] failed to find a requests console at [AREACOORD(src)] ([target_area.type]).")
|
||||
else
|
||||
payload(target)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/// Fills out the request console's variables
|
||||
/obj/effect/mapping_helpers/requests_console/proc/payload(obj/machinery/requests_console/console)
|
||||
return
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/announcement
|
||||
name = "request console announcement helper"
|
||||
icon_state = "requests_console_announcement_helper"
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/announcement/payload(obj/machinery/requests_console/console)
|
||||
console.can_send_announcements = TRUE
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/assistance
|
||||
name = "request console assistance requestable helper"
|
||||
icon_state = "requests_console_assistance_helper"
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/assistance/payload(obj/machinery/requests_console/console)
|
||||
GLOB.req_console_assistance |= console.department
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/supplies
|
||||
name = "request console supplies requestable helper"
|
||||
icon_state = "requests_console_supplies_helper"
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/supplies/payload(obj/machinery/requests_console/console)
|
||||
GLOB.req_console_supplies |= console.department
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/information
|
||||
name = "request console information relayable helper"
|
||||
icon_state = "requests_console_information_helper"
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/information/payload(obj/machinery/requests_console/console)
|
||||
GLOB.req_console_information |= console.department
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/ore_update
|
||||
name = "request console ore update helper"
|
||||
icon_state = "requests_console_ore_update_helper"
|
||||
|
||||
/obj/effect/mapping_helpers/requests_console/ore_update/payload(obj/machinery/requests_console/console)
|
||||
console.receive_ore_updates = TRUE
|
||||
|
||||
Reference in New Issue
Block a user