Fixing Aux base camera/drone RCD actions.
This commit is contained in:
@@ -163,6 +163,8 @@ RLD
|
||||
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
|
||||
var/delay_mod = 1
|
||||
var/canRturf = FALSE //Variable for R walls to deconstruct them
|
||||
var/adjacency_check = TRUE //Wheter it checks if the tool has to be in our hands or not. Wsed for the aux base construction drone's internal RCD
|
||||
|
||||
|
||||
/obj/item/construction/rcd/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
|
||||
@@ -273,7 +275,7 @@ RLD
|
||||
/obj/item/construction/rcd/proc/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
if(user.incapacitated() || (adjacency_check && !user.Adjacent(src)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -286,7 +288,7 @@ RLD
|
||||
"SOUTH" = image(icon = 'icons/mob/radial.dmi', icon_state = "csouth"),
|
||||
"WEST" = image(icon = 'icons/mob/radial.dmi', icon_state = "cwest")
|
||||
)
|
||||
var/computerdirs = show_radial_menu(user, src, computer_dirs, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
var/computerdirs = show_radial_menu(user, src, computer_dirs, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check, tooltips = TRUE)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(computerdirs)
|
||||
@@ -345,13 +347,13 @@ RLD
|
||||
"External Maintenance" = get_airlock_image(/obj/machinery/door/airlock/maintenance/external/glass)
|
||||
)
|
||||
|
||||
var/airlockcat = show_radial_menu(user, src, solid_or_glass_choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
|
||||
var/airlockcat = show_radial_menu(user, src, solid_or_glass_choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(airlockcat)
|
||||
if("Solid")
|
||||
if(advanced_airlock_setting == 1)
|
||||
var/airlockpaint = show_radial_menu(user, src, solid_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
|
||||
var/airlockpaint = show_radial_menu(user, src, solid_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(airlockpaint)
|
||||
@@ -396,7 +398,7 @@ RLD
|
||||
|
||||
if("Glass")
|
||||
if(advanced_airlock_setting == 1)
|
||||
var/airlockpaint = show_radial_menu(user, src , glass_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE)
|
||||
var/airlockpaint = show_radial_menu(user, src , glass_choices, radius = 42, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = adjacency_check)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(airlockpaint)
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
max_matter = 600 //Bigger container and faster speeds due to being specialized and stationary.
|
||||
no_ammo_message = "<span class='warning'>Internal matter exhausted. Please add additional materials.</span>"
|
||||
delay_mod = 0.5
|
||||
adjacency_check = FALSE
|
||||
upgraded = TRUE
|
||||
var/obj/machinery/computer/camera_advanced/base_construction/master
|
||||
|
||||
/obj/item/construction/rcd/internal/check_menu(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated() || !user.Adjacent(master))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/camera_advanced/base_construction
|
||||
name = "base construction console"
|
||||
@@ -49,12 +57,10 @@
|
||||
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/camera_advanced/base_construction/Initialize()
|
||||
. = ..()
|
||||
RCD = new(src)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/base_construction/Initialize(mapload)
|
||||
. = ..()
|
||||
RCD = new(src)
|
||||
RCD.master = src
|
||||
if(mapload) //Map spawned consoles have a filled RCD and stocked special structures
|
||||
RCD.matter = RCD.max_matter
|
||||
fans_remaining = 4
|
||||
@@ -85,7 +91,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/base_construction/Destroy()
|
||||
qdel(RCD)
|
||||
QDEL_NULL(RCD)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/base_construction/GrantActions(mob/living/user)
|
||||
@@ -140,7 +146,8 @@
|
||||
remote_eye = C.remote_control
|
||||
B = target
|
||||
if(!B.RCD) //The console must always have an RCD.
|
||||
B.RCD = new /obj/item/construction/rcd/internal(src) //If the RCD is lost somehow, make a new (empty) one!
|
||||
B.RCD = new /obj/item/construction/rcd/internal(B) //If the RCD is lost somehow, make a new (empty) one!
|
||||
RCD.master = B
|
||||
|
||||
/datum/action/innate/aux_base/proc/check_spot()
|
||||
//Check a loction to see if it is inside the aux base at the station. Camera visbility checks omitted so as to not hinder construction.
|
||||
@@ -195,34 +202,40 @@
|
||||
|
||||
var/list/buildlist = list("Walls and Floors" = 1,"Airlocks" = 2,"Deconstruction" = 3,"Windows and Grilles" = 4)
|
||||
var/buildmode = input("Set construction mode.", "Base Console", null) in buildlist
|
||||
B.RCD.mode = buildlist[buildmode]
|
||||
to_chat(owner, "Build mode is now [buildmode].")
|
||||
if(buildmode)
|
||||
B.RCD.mode = buildlist[buildmode]
|
||||
to_chat(owner, "Build mode is now [buildmode].")
|
||||
|
||||
/datum/action/innate/aux_base/airlock_type
|
||||
name = "Select Airlock Type"
|
||||
name = "Change Airlock Settings"
|
||||
button_icon_state = "airlock_select"
|
||||
|
||||
datum/action/innate/aux_base/airlock_type/Activate()
|
||||
/datum/action/innate/aux_base/airlock_type/Activate()
|
||||
if(..())
|
||||
return
|
||||
|
||||
B.RCD.change_airlock_setting()
|
||||
var/mode = input("Modify Type or Access?", "Airlock Settings", "Type", "Access", "None") in buildlist
|
||||
switch(mode)
|
||||
if("Type")
|
||||
B.RCD.change_airlock_setting(usr)
|
||||
if("Access")
|
||||
B.RCD.change_airlock_access(usr)
|
||||
|
||||
|
||||
datum/action/innate/aux_base/window_type
|
||||
/datum/action/innate/aux_base/window_type
|
||||
name = "Select Window Type"
|
||||
button_icon_state = "window_select"
|
||||
|
||||
datum/action/innate/aux_base/window_type/Activate()
|
||||
/datum/action/innate/aux_base/window_type/Activate()
|
||||
if(..())
|
||||
return
|
||||
B.RCD.toggle_window_type()
|
||||
B.RCD.toggle_window_type(usr)
|
||||
|
||||
datum/action/innate/aux_base/place_fan
|
||||
/datum/action/innate/aux_base/place_fan
|
||||
name = "Place Tiny Fan"
|
||||
button_icon_state = "build_fan"
|
||||
|
||||
datum/action/innate/aux_base/place_fan/Activate()
|
||||
/datum/action/innate/aux_base/place_fan/Activate()
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -244,11 +257,11 @@ datum/action/innate/aux_base/place_fan/Activate()
|
||||
to_chat(owner, "<span class='notice'>Tiny fan placed. [B.fans_remaining] remaining.</span>")
|
||||
playsound(fan_turf, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
datum/action/innate/aux_base/install_turret
|
||||
/datum/action/innate/aux_base/install_turret
|
||||
name = "Install Plasma Anti-Wildlife Turret"
|
||||
button_icon_state = "build_turret"
|
||||
|
||||
datum/action/innate/aux_base/install_turret/Activate()
|
||||
/datum/action/innate/aux_base/install_turret/Activate()
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user