mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Ghosts cant mess with RCD & Plumbing RCD (#72069)
## About The Pull Request Fixes #72036 ## Changelog 🆑 fix: ghosts cant mess with RCD & PLumbing RCD /🆑
This commit is contained in:
@@ -192,7 +192,10 @@ RLD
|
||||
|
||||
///shared action for toggling silo link rcd,rld & plumbing
|
||||
/obj/item/construction/ui_act(action, list/params)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
if(action == "toggle_silo")
|
||||
if(silo_mats)
|
||||
if(!silo_mats.mat_container && !silo_link) // Allow them to turn off an invalid link
|
||||
@@ -203,7 +206,6 @@ RLD
|
||||
else
|
||||
to_chat(usr, span_warning("[src] doesn't have remote storage connection."))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/construction/proc/checkResource(amount, mob/user)
|
||||
if(!silo_mats || !silo_mats.mat_container || !silo_link)
|
||||
@@ -379,9 +381,8 @@ RLD
|
||||
var/design_category = "Structures"
|
||||
var/root_category = "Construction"
|
||||
var/closed = FALSE
|
||||
///used by construction_console
|
||||
var/ui_always_active = FALSE
|
||||
|
||||
///owner of this rcd. It can either be an construction console or an player
|
||||
var/owner
|
||||
var/mode = RCD_FLOORWALL
|
||||
var/construction_mode = RCD_FLOORWALL
|
||||
var/ranged = FALSE
|
||||
@@ -555,30 +556,25 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
|
||||
GLOB.rcd_list -= src
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/construction/rcd/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet/rcd),
|
||||
)
|
||||
|
||||
/obj/item/construction/rcd/ui_host(mob/user)
|
||||
return owner || ..()
|
||||
|
||||
/obj/item/construction/rcd/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "RapidConstructionDevice", name)
|
||||
ui.open()
|
||||
|
||||
/**
|
||||
* if ui_always_active = TRUE display & update window even if nothing changed, required for construction_console else window wont show up
|
||||
* else use parent method to decide the state for normal usage
|
||||
*/
|
||||
/obj/item/construction/rcd/ui_state(mob/user)
|
||||
return ui_always_active ? GLOB.always_state : ..()
|
||||
|
||||
/obj/item/construction/rcd/ui_static_data(mob/user)
|
||||
return airlock_electronics.ui_static_data(user)
|
||||
|
||||
/obj/item/construction/rcd/ui_data(mob/user)
|
||||
var/list/data = ..(user)
|
||||
var/list/data = ..()
|
||||
|
||||
//main categories
|
||||
data["selected_root"] = root_category
|
||||
@@ -640,7 +636,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
|
||||
return data
|
||||
|
||||
/obj/item/construction/rcd/ui_act(action, params)
|
||||
..()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -918,7 +914,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
|
||||
display_options[option] = icon(original_options[option])
|
||||
|
||||
/obj/item/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if((upgrade & RCD_UPGRADE_SILO_LINK) && display_options["Silo Link"] == null) //silo upgrade instaled but option was not updated then update it just one
|
||||
display_options["Silo Link"] = icon(icon = 'icons/obj/mining.dmi', icon_state = "silo")
|
||||
@@ -1166,6 +1162,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
|
||||
return ..()
|
||||
|
||||
/obj/item/construction/plumbing/attack_self(mob/user)
|
||||
. = ..()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/construction/plumbing/examine(mob/user)
|
||||
|
||||
@@ -367,8 +367,6 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(.)
|
||||
return
|
||||
|
||||
if(!usr.canUseTopic(src, be_close = TRUE))
|
||||
return
|
||||
var/playeffect = TRUE
|
||||
switch(action)
|
||||
if("color")
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if(..())
|
||||
return
|
||||
check_rcd()
|
||||
base_console.internal_rcd.ui_always_active = TRUE
|
||||
base_console.internal_rcd.owner = base_console
|
||||
base_console.internal_rcd.ui_interact(owner)
|
||||
|
||||
///Generic action used with base construction consoles to build anything that can't be built with an RCD
|
||||
|
||||
Reference in New Issue
Block a user