mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
More testmerge fixes
This commit is contained in:
@@ -2,10 +2,14 @@
|
|||||||
name = "airlock electronics"
|
name = "airlock electronics"
|
||||||
req_access = list(ACCESS_MAINT_TUNNELS)
|
req_access = list(ACCESS_MAINT_TUNNELS)
|
||||||
custom_price = PRICE_CHEAP
|
custom_price = PRICE_CHEAP
|
||||||
|
/// A list of all granted accesses
|
||||||
var/list/accesses = list()
|
var/list/accesses = list()
|
||||||
|
/// If the airlock should require ALL or only ONE of the listed accesses
|
||||||
var/one_access = 0
|
var/one_access = 0
|
||||||
var/unres_sides = 0 //unrestricted sides, or sides of the airlock that will open regardless of access
|
/// Unrestricted sides, or sides of the airlock that will open regardless of access
|
||||||
|
var/unres_sides = 0
|
||||||
|
/// A holder of the electronics, in case of them working as an integrated part
|
||||||
|
var/holder
|
||||||
|
|
||||||
/obj/item/electronics/airlock/examine(mob/user)
|
/obj/item/electronics/airlock/examine(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -13,31 +17,37 @@
|
|||||||
|
|
||||||
/obj/item/electronics/airlock/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
/obj/item/electronics/airlock/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||||
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||||
if(!ui)
|
if(!ui)
|
||||||
ui = new(user, src, ui_key, "AirlockElectronics", name, 420, 485, master_ui, state)
|
ui = new(user, src, ui_key, "AirlockElectronics", name, 420, 485, master_ui, state)
|
||||||
ui.open()
|
ui.open()
|
||||||
|
|
||||||
/obj/item/electronics/airlock/ui_data()
|
/obj/item/electronics/airlock/ui_static_data(mob/user)
|
||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
var/list/regions = list()
|
var/list/regions = list()
|
||||||
|
|
||||||
for(var/i in 1 to 7)
|
for(var/i in 1 to 7)
|
||||||
var/list/region = list()
|
|
||||||
var/list/accesses = list()
|
var/list/accesses = list()
|
||||||
for(var/j in get_region_accesses(i))
|
for(var/access in get_region_accesses(i))
|
||||||
var/list/access = list()
|
if (get_access_desc(access))
|
||||||
access["name"] = get_access_desc(j)
|
accesses += list(list(
|
||||||
access["id"] = j
|
"desc" = replacetext(get_access_desc(access), " ", " "),
|
||||||
access["req"] = (j in src.accesses)
|
"ref" = access,
|
||||||
accesses[++accesses.len] = access
|
))
|
||||||
region["name"] = get_region_accesses_name(i)
|
|
||||||
region["accesses"] = accesses
|
regions += list(list(
|
||||||
regions[++regions.len] = region
|
"name" = get_region_accesses_name(i),
|
||||||
|
"regid" = i,
|
||||||
|
"accesses" = accesses
|
||||||
|
))
|
||||||
|
|
||||||
data["regions"] = regions
|
data["regions"] = regions
|
||||||
|
return data
|
||||||
|
|
||||||
|
/obj/item/electronics/airlock/ui_data()
|
||||||
|
var/list/data = list()
|
||||||
|
data["accesses"] = accesses
|
||||||
data["oneAccess"] = one_access
|
data["oneAccess"] = one_access
|
||||||
data["unres_direction"] = unres_sides
|
data["unres_direction"] = unres_sides
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
/obj/item/electronics/airlock/ui_act(action, params)
|
/obj/item/electronics/airlock/ui_act(action, params)
|
||||||
@@ -48,12 +58,12 @@
|
|||||||
accesses = list()
|
accesses = list()
|
||||||
one_access = 0
|
one_access = 0
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("one_access")
|
|
||||||
one_access = !one_access
|
|
||||||
. = TRUE
|
|
||||||
if("grant_all")
|
if("grant_all")
|
||||||
accesses = get_all_accesses()
|
accesses = get_all_accesses()
|
||||||
. = TRUE
|
. = TRUE
|
||||||
|
if("one_access")
|
||||||
|
one_access = !one_access
|
||||||
|
. = TRUE
|
||||||
if("set")
|
if("set")
|
||||||
var/access = text2num(params["access"])
|
var/access = text2num(params["access"])
|
||||||
if (!(access in accesses))
|
if (!(access in accesses))
|
||||||
@@ -65,3 +75,20 @@
|
|||||||
var/unres_direction = text2num(params["unres_direction"])
|
var/unres_direction = text2num(params["unres_direction"])
|
||||||
unres_sides ^= unres_direction //XOR, toggles only the bit that was clicked
|
unres_sides ^= unres_direction //XOR, toggles only the bit that was clicked
|
||||||
. = TRUE
|
. = TRUE
|
||||||
|
if("grant_region")
|
||||||
|
var/region = text2num(params["region"])
|
||||||
|
if(isnull(region))
|
||||||
|
return
|
||||||
|
accesses |= get_region_accesses(region)
|
||||||
|
. = TRUE
|
||||||
|
if("deny_region")
|
||||||
|
var/region = text2num(params["region"])
|
||||||
|
if(isnull(region))
|
||||||
|
return
|
||||||
|
accesses -= get_region_accesses(region)
|
||||||
|
. = TRUE
|
||||||
|
|
||||||
|
/obj/item/electronics/airlock/ui_host()
|
||||||
|
if(holder)
|
||||||
|
return holder
|
||||||
|
return src
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
|||||||
// Variable window height, depending on how many GPS units there are
|
// Variable window height, depending on how many GPS units there are
|
||||||
// to show, clamped to relatively safe range.
|
// to show, clamped to relatively safe range.
|
||||||
var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
|
var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
|
||||||
ui = new(user, src, ui_key, "gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
|
ui = new(user, src, ui_key, "Gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
|
||||||
ui.open()
|
ui.open()
|
||||||
|
|
||||||
ui.set_autoupdate(state = updating)
|
ui.set_autoupdate(state = updating)
|
||||||
|
|||||||
@@ -261,6 +261,19 @@
|
|||||||
if(S.invokers_required > 1)
|
if(S.invokers_required > 1)
|
||||||
data["invokers"] = "Invokers: [S.invokers_required]"
|
data["invokers"] = "Invokers: [S.invokers_required]"
|
||||||
|
|
||||||
|
.["rec_binds"] = list()
|
||||||
|
for(var/i in 1 to maximum_quickbound)
|
||||||
|
if(GLOB.ratvar_awakens)
|
||||||
|
return
|
||||||
|
if(LAZYLEN(quickbound) < i || !quickbound[i])
|
||||||
|
.["rec_binds"] += list(list())
|
||||||
|
else
|
||||||
|
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
|
||||||
|
.["rec_binds"] += list(list(
|
||||||
|
"name" = initial(quickbind_slot.name),
|
||||||
|
"color" = get_component_color_bright(initial(quickbind_slot.primary_component))
|
||||||
|
))
|
||||||
|
|
||||||
.["scripture"][S.tier] += list(data)
|
.["scripture"][S.tier] += list(data)
|
||||||
|
|
||||||
/obj/item/clockwork/slab/ui_static_data(mob/user)
|
/obj/item/clockwork/slab/ui_static_data(mob/user)
|
||||||
@@ -290,18 +303,6 @@
|
|||||||
list("name" = "Power", "desc" = "The power system that certain objects use to function."),
|
list("name" = "Power", "desc" = "The power system that certain objects use to function."),
|
||||||
list("name" = "Conversion", "desc" = "Converting the crew, cyborgs, and very walls to your cause.")
|
list("name" = "Conversion", "desc" = "Converting the crew, cyborgs, and very walls to your cause.")
|
||||||
)
|
)
|
||||||
.["rec_binds"] = list()
|
|
||||||
for(var/i in 1 to maximum_quickbound)
|
|
||||||
if(GLOB.ratvar_awakens)
|
|
||||||
return
|
|
||||||
if(LAZYLEN(quickbound) < i || !quickbound[i])
|
|
||||||
.["rec_binds"] += list(list())
|
|
||||||
else
|
|
||||||
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
|
|
||||||
.["rec_binds"] += list(list(
|
|
||||||
"name" = initial(quickbind_slot.name),
|
|
||||||
"color" = get_component_color_bright(initial(quickbind_slot.primary_component))
|
|
||||||
))
|
|
||||||
// .["rec_section"]["title"] //this is here if ever we decided to return these back.
|
// .["rec_section"]["title"] //this is here if ever we decided to return these back.
|
||||||
// .["rec_section"]["info"]// wall of info for the thing
|
// .["rec_section"]["info"]// wall of info for the thing
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,7 @@
|
|||||||
terminal = new/obj/machinery/power/terminal(T)
|
terminal = new/obj/machinery/power/terminal(T)
|
||||||
terminal.setDir(get_dir(T,src))
|
terminal.setDir(get_dir(T,src))
|
||||||
terminal.master = src
|
terminal.master = src
|
||||||
machine_stat &= ~BROKEN
|
stat &= ~BROKEN
|
||||||
|
|
||||||
/obj/machinery/power/smes/disconnect_terminal()
|
/obj/machinery/power/smes/disconnect_terminal()
|
||||||
if(terminal)
|
if(terminal)
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ export const AirlockElectronics = (props, context) => {
|
|||||||
})} />
|
})} />
|
||||||
<Button
|
<Button
|
||||||
icon={unres_direction & 2 ? 'check-square-o' : 'square-o'}
|
icon={unres_direction & 2 ? 'check-square-o' : 'square-o'}
|
||||||
content="East"
|
content="South"
|
||||||
selected={unres_direction & 2}
|
selected={unres_direction & 2}
|
||||||
onClick={() => act('direc_set', {
|
onClick={() => act('direc_set', {
|
||||||
unres_direction: '2',
|
unres_direction: '2',
|
||||||
})} />
|
})} />
|
||||||
<Button
|
<Button
|
||||||
icon={unres_direction & 4 ? 'check-square-o' : 'square-o'}
|
icon={unres_direction & 4 ? 'check-square-o' : 'square-o'}
|
||||||
content="South"
|
content="East"
|
||||||
selected={unres_direction & 4}
|
selected={unres_direction & 4}
|
||||||
onClick={() => act('direc_set', {
|
onClick={() => act('direc_set', {
|
||||||
unres_direction: '4',
|
unres_direction: '4',
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ export const TelecommsMonitor = (props, context) => {
|
|||||||
.find(channel => channel.freq === thing);
|
.find(channel => channel.freq === thing);
|
||||||
return (
|
return (
|
||||||
(valid) ? (
|
(valid) ? (
|
||||||
<Box as="span" style={`color: ${valid.color}`}>
|
<Box as="span" color={valid.color}>
|
||||||
{`[${thing}] (${valid.name}) `}
|
{`[${thing}] (${valid.name}) `}
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ export const TeleLogs = (props, context) => {
|
|||||||
icon="sync"
|
icon="sync"
|
||||||
onClick={() => act('refresh')}
|
onClick={() => act('refresh')}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button.Confirm
|
||||||
content="Delete All Logs"
|
content="Delete All Logs"
|
||||||
icon="trash"
|
icon="trash"
|
||||||
disabled={!log_to_use || !(log_to_use && log_to_use.length)}
|
disabled={!log_to_use || !(log_to_use && log_to_use.length)}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user