Merge remote-tracking branch 'origin/master'

This commit is contained in:
Amaya
2020-10-03 17:58:04 +02:00
18 changed files with 68 additions and 73 deletions
@@ -98,12 +98,13 @@
if(module.charges && module.charges.len)
module_data["charges"] = list()
var/datum/rig_charge/selected = module.charges[module.charge_selected]
var/datum/rig_charge/selected = module.charges["[module.charge_selected]"]
module_data["realchargetype"] = module.charge_selected
module_data["chargetype"] = selected ? "[selected.display_name]" : "none"
for(var/chargetype in module.charges)
var/datum/rig_charge/charge = module.charges[chargetype]
module_data["charges"] += list(list("caption" = "[chargetype] ([charge.charges])", "index" = "[chargetype]"))
module_data["charges"] += list(list("caption" = "[charge.display_name] ([charge.charges])", "index" = "[chargetype]"))
module_list += list(module_data)
i++
+3 -2
View File
@@ -73,8 +73,9 @@ proc/get_deepspace(x,y)
/mob/lost_in_space()
return isnull(client)
/mob/living/carbon/human/lost_in_space()
return isnull(client) && !key && stat == DEAD
/mob/living/lost_in_space()
return FALSE
// return isnull(client) && !key && stat == DEAD // Allows bodies that players have ghosted from to be deleted - Ater
proc/overmap_spacetravel(var/turf/space/T, var/atom/movable/A)
if (!T || !A)
+1 -1
View File
@@ -26,7 +26,7 @@
set name = "Use PDA"
set src in usr
if(!can_use())
if(!can_use(usr))
return
tgui_interact(usr)
+2 -2
View File
@@ -109,7 +109,7 @@
// Specifically here for the chat message.
/datum/data/pda/app/messenger/Topic(href, href_list)
if(!pda.can_use())
if(!pda.can_use(usr))
return
unnotify()
@@ -140,7 +140,7 @@
if(last_text && world.time < last_text + 5)
return
if(!pda.can_use())
if(!pda.can_use(usr))
return
last_text = world.time
+3 -11
View File
@@ -147,16 +147,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
log_debug("Invalid switch for PDA, defaulting to old PDA icons. [pdachoice] chosen.")
start_program(find_program(/datum/data/pda/app/main_menu))
/obj/item/device/pda/proc/can_use()
if(!ismob(loc))
return FALSE
var/mob/M = loc
if(M.incapacitated(INCAPACITATION_ALL))
return FALSE
if(src in M.contents)
return TRUE
return FALSE
/obj/item/device/pda/proc/can_use(mob/user)
return (tgui_status(user, GLOB.tgui_inventory_state) == STATUS_INTERACTIVE)
/obj/item/device/pda/GetAccess()
if(id)
@@ -169,7 +161,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && can_use())
if((!istype(over_object, /obj/screen)) && can_use(usr))
return attack_self(M)
return
+3 -11
View File
@@ -2,11 +2,6 @@
/obj/item/device/pda/tgui_state(mob/user)
return GLOB.tgui_inventory_state
/obj/item/device/pda/tgui_status(mob/user, datum/tgui_state/state)
. = ..()
if(!can_use())
. = min(., STATUS_UPDATE)
/obj/item/device/pda/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
@@ -50,6 +45,7 @@
data["idLink"] = (id ? text("[id.registered_name], [id.assignment]") : "--------")
data["useRetro"] = retro_mode
data["touch_silent"] = touch_silent
data["cartridge_name"] = cartridge ? cartridge.name : ""
data["stationTime"] = stationtime2text() //worldtime2stationtime(world.time) // Aaa which fucking one is canonical there's SO MANY
@@ -68,12 +64,6 @@
if(..())
return TRUE
if(!can_use())
usr.unset_machine()
if(ui)
ui.close()
return FALSE
add_fingerprint(usr)
usr.set_machine(src)
@@ -113,6 +103,8 @@
id_check(usr, 1)
if("Retro")
retro_mode = !retro_mode
if("TouchSounds")
touch_silent = !touch_silent
if("Ringtone")
return set_ringtone()
else
@@ -2,6 +2,7 @@ import { useBackend } from "../backend";
import { Box, Section, Table } from "../components";
import { Window } from "../layouts";
import { COLORS } from "../constants";
import { decodeHtmlEntities } from "common/string";
/*
* Shared by the following templates (and used individually too)
@@ -54,7 +55,7 @@ export const CrewManifestContent = (props, context) => {
</Table.Row>
{cat.elems.map(person => (
<Table.Row color="average" key={person.name + person.rank}>
<Table.Cell>{person.name}</Table.Cell>
<Table.Cell>{decodeHtmlEntities(person.name)}</Table.Cell>
<Table.Cell>{person.rank}</Table.Cell>
<Table.Cell>{person.active}</Table.Cell>
</Table.Row>
@@ -203,7 +203,7 @@ const GeneralRecordsViewGeneral = (_properties, context) => {
))}
</LabeledList>
<Section title="Employment/skills summary" level={2}>
{general.skills || "No data found."}
{general.skills.split("\n").map(m => <Box key={m}>{m}</Box>) || "No data found."}
</Section>
<Section title="Comments/Log" level={2}>
{general.comments.length === 0 ? (
+2 -2
View File
@@ -22,8 +22,8 @@ export const ICAssembly = (props, context) => {
} = data;
return (
<Window width={600} height={380}>
<Window.Content>
<Window width={600} height={380} resizable>
<Window.Content scrollable>
<Section title="Status">
<LabeledList>
<LabeledList.Item label="Space in Assembly">
@@ -231,7 +231,7 @@ const MedicalRecordsViewGeneral = (_properties, context) => {
{general.fields.map((field, i) => (
<LabeledList.Item key={i} label={field.field}>
<Box height="20px" display="inline-block">
{field.value}
{field.value.split("\n").map(m => <Box key={m}>{m}</Box>)}
</Box>
{!!field.edit && (
<Button
@@ -294,7 +294,7 @@ const MedicalRecordsViewMedical = (_properties, context) => {
<LabeledList.Item
key={i}
label={field.field}>
{field.value}
{field.value.split("\n").map(m => <Box key={m}>{m}</Box>)}
<Button
icon="pen"
ml="0.5rem"
@@ -6,7 +6,7 @@ import { Window } from "../layouts";
export const OvermapShieldGenerator = (props, context) => {
return (
<Window width={500} height={800} resizable>
<Window width={500} height={760} resizable>
<Window.Content scrollable>
<OvermapShieldGeneratorContent />
</Window.Content>
+8
View File
@@ -127,6 +127,7 @@ const PDASettings = (props, context) => {
idInserted,
idLink,
cartridge_name,
touch_silent,
} = data;
return (
@@ -138,6 +139,13 @@ const PDASettings = (props, context) => {
content={"Retro Theme"}
onClick={() => act("Retro")} />
</LabeledList.Item>
<LabeledList.Item label="Touch Sounds">
<Button
icon="cog"
selected={!touch_silent}
content={touch_silent ? "Disabled" : "Enabled"}
onClick={() => act("TouchSounds")} />
</LabeledList.Item>
{!!cartridge_name && (
<LabeledList.Item label="Cartridge">
<Button
+30 -30
View File
@@ -153,7 +153,7 @@ const RIGSuitHardware = (props, context) => {
selected={helmetDeployed}
onClick={() => act("toggle_piece", { piece: 'helmet' })} />
)}>
{capitalize(helmet)}
{helmet ? capitalize(helmet) : "ERROR"}
</LabeledList.Item>
<LabeledList.Item
label="Gauntlets"
@@ -165,7 +165,7 @@ const RIGSuitHardware = (props, context) => {
selected={gauntletsDeployed}
onClick={() => act("toggle_piece", { piece: 'gauntlets' })} />
)}>
{capitalize(gauntlets)}
{gauntlets ? capitalize(gauntlets) : "ERROR"}
</LabeledList.Item>
<LabeledList.Item
label="Boots"
@@ -177,7 +177,7 @@ const RIGSuitHardware = (props, context) => {
selected={bootsDeployed}
onClick={() => act("toggle_piece", { piece: 'boots' })} />
)}>
{capitalize(boots)}
{boots ? capitalize(boots) : "ERROR"}
</LabeledList.Item>
<LabeledList.Item
label="Chestpiece"
@@ -189,7 +189,7 @@ const RIGSuitHardware = (props, context) => {
selected={chestDeployed}
onClick={() => act("toggle_piece", { piece: 'chest' })} />
)}>
{capitalize(chest)}
{chest ? capitalize(chest) : "ERROR"}
</LabeledList.Item>
</LabeledList>
</Section>
@@ -269,7 +269,7 @@ const RIGSuitModules = (props, context) => {
{module.damage >= 2 ? (
<Box color="bad">-- MODULE DESTROYED --</Box>
) : (
<Flex>
<Flex spacing={1}>
<Flex.Item grow={1}>
<Box color="average">Engage: {module.engagecost}</Box>
<Box color="average">Active: {module.activecost}</Box>
@@ -278,33 +278,33 @@ const RIGSuitModules = (props, context) => {
<Flex.Item grow={1}>
{module.desc}
</Flex.Item>
{module.charges ? (
<Flex.Item grow={1}>
<Section title="Module Charges">
<LabeledList>
<LabeledList.Item label="Selected">
{capitalize(module.chargetype)}
</LabeledList.Item>
{module.charges.map((charge, i) => (
<LabeledList.Item
key={charge.caption}
label={capitalize(charge.caption)}
buttons={(
<Button
icon="arrow-right"
onClick={() => act("interact_module", {
"module": module.index,
"module_mode": "select_charge_type",
"charge_type": i,
})} />
)} />
))}
</LabeledList>
</Section>
</Flex.Item>
) : null}
</Flex>
)}
{module.charges ? (
<Flex.Item>
<Section title="Module Charges">
<LabeledList>
<LabeledList.Item label="Selected">
{capitalize(module.chargetype)}
</LabeledList.Item>
{module.charges.map((charge, i) => (
<LabeledList.Item
key={charge.caption}
label={capitalize(charge.caption)}>
<Button
selected={module.realchargetype === charge.index}
icon="arrow-right"
onClick={() => act("interact_module", {
"module": module.index,
"module_mode": "select_charge_type",
"charge_type": charge.index,
})} />
</LabeledList.Item>
))}
</LabeledList>
</Section>
</Flex.Item>
) : null}
</Section>
))}
</Section>
@@ -180,7 +180,7 @@ const SecurityRecordsViewGeneral = (_properties, context) => {
{general.fields.map((field, i) => (
<LabeledList.Item key={i} label={field.field}>
<Box height="20px" display="inline-block">
{field.value}
{field.value.split("\n").map(m => <Box key={m}>{m}</Box>)}
</Box>
{!!field.edit && (
<Button
@@ -251,7 +251,7 @@ const SecurityRecordsViewSecurity = (_properties, context) => {
<LabeledList.Item
key={i}
label={field.field}>
{field.value}
{field.value.split("\n").map(m => <Box key={m}>{m}</Box>)}
<Button
icon="pen"
ml="0.5rem"
+1 -1
View File
@@ -17,7 +17,7 @@ export const SeedStorage = (props, context) => {
const sortedSeeds = sortBy(seed => seed.name.toLowerCase())(seeds);
return (
<Window width={600} height={800} resizable>
<Window width={600} height={760} resizable>
<Window.Content scrollable>
<Section title="Seeds">
{sortedSeeds.map(seed => (
+1 -1
View File
@@ -41,7 +41,7 @@ export const Sleeper = (props, context) => {
return (
<Window
width={550}
height={820}
height={760}
resizable>
<Window.Content className="Layout__content--flexColumn">
{body}
@@ -32,7 +32,7 @@ export const XenoarchSpectrometer = (props, context) => {
} = data;
return (
<Window width={900} height={825} resizable>
<Window width={900} height={760} resizable>
<Window.Content scrollable>
<Section title="Status" buttons={
<Fragment>
File diff suppressed because one or more lines are too long