This commit is contained in:
Fordoxia
2024-05-01 04:00:48 +01:00
24 changed files with 1051 additions and 546 deletions

View File

@@ -101,7 +101,7 @@ jobs:
# Check if a workflow file would be modified by the merge (permissions prevent pushes if so)
latest_workflow_commit=$(git log -n 1 --pretty=format:"%H" upstream/$BASE_BRANCH -- .github/workflows)
if ! git branch --contains $latest_workflow_commit | grep -q "$(git rev-parse --abbrev-ref HEAD)"; then
gh pr comment ${{ github.event.issue.html_url }} --body "GitHub Actions can not push to this branch as workflow files have been changed since your branch was last updated. Please update your branch past https://github.com/ParadiseSS13/Paradise/commit/$latest_workflow_commit before using this command again."#
gh pr comment ${{ github.event.issue.html_url }} --body "GitHub Actions can not push to this branch as workflow files have been changed since your branch was last updated. Please update your branch past https://github.com/ParadiseSS13/Paradise/commit/$latest_workflow_commit before using this command again."
echo "FAIL_NOTIFIED=true" >> "$GITHUB_ENV"
exit 1
fi

File diff suppressed because it is too large Load Diff

View File

@@ -95,10 +95,11 @@
/obj/item/clothing/glasses/hud/debug
name = "AVD-CNED glasses"
desc = "Medical, security and diagnostic hud. Alt click to toggle xray."
desc = "Diagnostic, Hydroponic, Medical, Security, and Skills HUD. Built-in advanced reagent scanner. Alt-click to toggle X-ray vision."
icon_state = "nvgmeson"
flags_cover = GLASSESCOVERSEYES
flash_protect = FLASH_PROTECTION_WELDER
scan_reagents_advanced = TRUE
prescription_upgradable = FALSE

View File

@@ -394,24 +394,53 @@
/atom/proc/build_reagent_description(mob/user)
. = list()
if(reagents)
if(!reagents)
return
var/one_percent = reagents.total_volume / 100
var/blood_type = ""
if(user.advanced_reagent_vision()) // You can see absolute unit concentrations in transparent containers and % concentrations in opaque containers. You can also see blood types.
. += "<span class='notice'>It contains:</span>"
if(!length(reagents.reagent_list))
. += "<span class='notice'>Nothing.</span>"
return
if(container_type & TRANSPARENT)
. += "<span class='notice'>It contains:</span>"
if(length(reagents.reagent_list))
if(user.can_see_reagents()) //Show each individual reagent
for(var/I in reagents.reagent_list)
var/datum/reagent/R = I
. += "<span class='notice'>[R.volume] units of [R.name]</span>"
else //Otherwise, just show the total volume
if(reagents && length(reagents.reagent_list))
. += "<span class='notice'>[reagents.total_volume] units of various reagents.</span>"
for(var/I in reagents.reagent_list)
var/datum/reagent/R = I
if(R.id != "blood")
. += "<span class='notice'>[R.volume] units of [R] ([round(R.volume / one_percent)]%)</span>"
else
blood_type = R.data["blood_type"]
. += "<span class='notice'>[R.volume] units of [R] ([blood_type ? "[blood_type]" : ""]) ([round(R.volume / one_percent)]%)</span>"
return
// Opaque containers
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id != "blood")
. += "<span class='notice'>[R] ([round(R.volume / one_percent)]%)</span>"
else
. += "<span class='notice'>Nothing.</span>"
else if(container_type & AMOUNT_VISIBLE)
if(reagents.total_volume)
. += "<span class='notice'>It has [reagents.total_volume] unit\s left.</span>"
else
. += "<span class='danger'>It's empty.</span>"
blood_type = R.data["blood_type"]
. += "<span class='notice'>[R] ([blood_type ? "[blood_type]" : ""]) ([round(R.volume / one_percent)]%)</span>"
return
if(container_type & TRANSPARENT)
. += "<span class='notice'>It contains:</span>"
if(user.reagent_vision()) // You can see absolute unit quantities of reagents in transparent containers.
for(var/I in reagents.reagent_list)
var/datum/reagent/R = I
. += "<span class='notice'>[R.volume] units of [R] ([round(R.volume / one_percent)]%)</span>"
return
//Otherwise, just show the total volume
if(length(reagents?.reagent_list))
. += "<span class='notice'>[reagents.total_volume] units of various reagents.</span>"
else
. += "<span class='notice'>Nothing.</span>"
return
if(container_type & AMOUNT_VISIBLE)
if(reagents.total_volume)
. += "<span class='notice'>It has [reagents.total_volume] unit\s left.</span>"
else
. += "<span class='danger'>It's empty.</span>"
/atom/proc/examine(mob/user, infix = "", suffix = "")
. = build_base_description(infix, suffix)

View File

@@ -691,10 +691,10 @@ SLIME SCANNER
var/one_percent = O.reagents.total_volume / 100
for(var/datum/reagent/R in O.reagents.reagent_list)
if(R.id != "blood")
dat += "<br>[TAB]<span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]</span>"
dat += "<br>[TAB]<span class='notice'>[R] [details ? ":([R.volume / one_percent]%)" : ""]</span>"
else
blood_type = R.data["blood_type"]
dat += "<br>[TAB]<span class='notice'>[R][blood_type ? " [blood_type]" : ""][details ? ": [R.volume / one_percent]%" : ""]</span>"
dat += "<br>[TAB]<span class='notice'>[blood_type ? "[blood_type]" : ""] [R.name] [details ? ":([R.volume / one_percent]%)" : ""]</span>"
if(dat)
to_chat(user, "<span class='notice'>Chemicals found: [dat]</span>")
datatoprint = dat

View File

@@ -3,8 +3,12 @@
max_integrity = 200
integrity_failure = 80
resistance_flags = FLAMMABLE
var/list/species_restricted = null //Only these species can wear this kit.
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
/// Only these species can wear this kit.
var/list/species_restricted
/// Can the wearer see reagents inside transparent containers while it's equipped?
var/scan_reagents = FALSE
/// Can the wearer see reagents inside any container and identify blood types while it's equipped?
var/scan_reagents_advanced = FALSE
/*
Sprites used when the clothing item is refit. This is done by setting icon_override.
@@ -256,8 +260,8 @@
attack_verb = list("challenged")
var/transfer_prints = FALSE
///Master pickpocket?
var/pickpocket = 0
var/clipped = 0
var/pickpocket = FALSE
var/clipped = FALSE
///Do they protect the wearer from poison ink?
var/safe_from_poison = FALSE
strip_delay = 20

View File

@@ -157,7 +157,7 @@
item_state = "glasses"
origin_tech = "magnets=2;engineering=1"
prescription_upgradable = TRUE
scan_reagents = 1 //You can see reagents while wearing science goggles
scan_reagents = TRUE // You can see reagents while wearing science goggles
resistance_flags = ACID_PROOF
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 200, ACID = INFINITY)
sprite_sheets = list(
@@ -170,7 +170,7 @@
/obj/item/clothing/glasses/science/item_action_slot_check(slot)
if(slot == SLOT_HUD_GLASSES)
return 1
return TRUE
/obj/item/clothing/glasses/science/night
name = "night vision science goggles"
@@ -371,7 +371,7 @@
/obj/item/clothing/glasses/sunglasses/noir/item_action_slot_check(slot)
if(slot == SLOT_HUD_GLASSES)
return 1
return TRUE
/obj/item/clothing/glasses/sunglasses/noir/proc/toggle_noir(mob/user)
color_view = color_view ? null : MATRIX_GREYSCALE //Toggles between null and grayscale, with null being the default option.
@@ -399,8 +399,8 @@
/obj/item/clothing/glasses/sunglasses/reagent
name = "sunscanners"
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Outfitted with an apparatus to scan individual reagents, tech potentials, and machines internal components."
scan_reagents = 1
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Outfitted with an apparatus to scan individual reagents, tech potentials, and the internal components of machines."
scan_reagents = TRUE
actions_types = list(/datum/action/item_action/toggle_research_scanner)
/obj/item/clothing/glasses/sunglasses/reagent/item_action_slot_check(slot)

View File

@@ -15,13 +15,6 @@
item_state = "captain_fly"
item_color = "captain_fly"
/obj/item/clothing/under/costume/rebeloutfit
name = "rebel outfit"
desc = "Made in Seattle, 2216."
icon_state = "colin_earle"
item_state = "colin_earle"
item_color = "colin_earle"
/obj/item/clothing/under/costume/patriotsuit
name = "Patriotic Suit"
desc = "Motorcycle not included."

View File

@@ -1832,5 +1832,13 @@
desc = "Make your ID look like the property of a nerd. Applies to any ID."
decal_icon_state = "lifetimeid"
// TheFlagbearer: Colin Earle
/obj/item/clothing/under/costume/rebeloutfit
name = "rebel outfit"
desc = "Made in Seattle, 2216."
icon_state = "colin_earle"
item_state = "colin_earle"
item_color = "colin_earle"
#undef USED_MOD_HELM
#undef USED_MOD_SUIT

View File

@@ -705,7 +705,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
updateghostimages()
/mob/dead/observer/can_see_reagents()
/mob/dead/observer/advanced_reagent_vision() // Ghosts can see all the reagents inside things.
return TRUE
/proc/updateallghostimages()

View File

@@ -789,12 +789,12 @@
/mob/living/carbon/human/abiotic(full_body = 0)
if(full_body && ((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
return 1
return TRUE
if((src.l_hand && !(src.l_hand.flags & ABSTRACT)) || (src.r_hand && !(src.r_hand.flags & ABSTRACT)))
return 1
return TRUE
return 0
return FALSE
/mob/living/carbon/human/proc/check_dna()
@@ -873,8 +873,8 @@
// Todo, check stomach organ when implemented.
var/obj/item/organ/external/head/H = get_organ("head")
if(!H || !H.can_intake_reagents)
return 0
return 1
return FALSE
return TRUE
/mob/living/carbon/human/proc/get_visible_gender()
var/list/obscured = check_obscured_slots()
@@ -1275,7 +1275,7 @@
set desc = "Use blood on your hands to write a short message on the floor or a wall, murder mystery style."
if(usr != src)
return 0 //something is terribly wrong
return FALSE //something is terribly wrong
if(incapacitated())
to_chat(src, "<span class='warning'>You can't write on the floor in your current state!</span>")
return
@@ -1652,15 +1652,25 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
return
return md5(dna.uni_identity)
/mob/living/carbon/human/can_see_reagents() //If they have some glasses or helmet equipped that lets them see reagents, they can see reagents
/mob/living/carbon/human/reagent_vision() // If they have some glasses or helmet equipped that lets them see reagents inside transparent containers, they can see them.
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = head
if(hat.scan_reagents)
return 1
return TRUE
if(istype(glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/rscan = glasses
if(rscan.scan_reagents)
return 1
return TRUE
/mob/living/carbon/human/advanced_reagent_vision() // If they have some glasses or helmet equipped that lets them see reagents inside everything, they can see reagents inside everything.
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = head
if(hat.scan_reagents_advanced)
return TRUE
if(istype(glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/rscan = glasses
if(rscan.scan_reagents_advanced)
return TRUE
/mob/living/carbon/human/can_eat(flags = 255)
return dna.species && (dna.species.dietflags & flags)
@@ -1668,26 +1678,26 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
/mob/living/carbon/human/selfFeed(obj/item/food/toEat, fullness)
if(!check_has_mouth())
to_chat(src, "Where do you intend to put \the [toEat]? You don't have a mouth!")
return 0
return FALSE
return ..()
/mob/living/carbon/human/forceFed(obj/item/food/toEat, mob/user, fullness)
if(!check_has_mouth())
if(!((istype(toEat, /obj/item/reagent_containers/drinks) && (ismachineperson(src)))))
to_chat(user, "Where do you intend to put \the [toEat]? \The [src] doesn't have a mouth!")
return 0
return FALSE
return ..()
/mob/living/carbon/human/selfDrink(obj/item/reagent_containers/drinks/toDrink)
if(!check_has_mouth())
if(!ismachineperson(src))
to_chat(src, "Where do you intend to put \the [src]? You don't have a mouth!")
return 0
return FALSE
else
to_chat(src, "<span class='notice'>You pour a bit of liquid from [toDrink] into your connection port.</span>")
else
to_chat(src, "<span class='notice'>You swallow a gulp of [toDrink].</span>")
return 1
return TRUE
/mob/living/carbon/human/can_track(mob/living/user)
if(wear_id)

View File

@@ -114,9 +114,9 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
var/datum/action/item_action/toggle_research_scanner/scanner = null
var/list/module_actions = list()
var/see_reagents = FALSE // Determines if the cyborg can see reagents
var/has_advanced_reagent_vision = FALSE // Determines if the cyborg has advanced reagent vision.
/// Integer used to determine self-mailing location, used only by drones and saboteur borgs
/// Integer used to determine self-mailing location, used only by drones and saboteur borgs.
var/mail_destination = 1
var/datum/ui_module/robot_self_diagnosis/self_diagnosis
var/datum/ui_module/destination_tagger/mail_setter
@@ -574,7 +574,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(camera && ("Robots" in camera.network))
camera.network += "Medical"
status_flags &= ~CANPUSH
see_reagents = TRUE
has_advanced_reagent_vision = TRUE
if("Mining")
module = new /obj/item/robot_module/miner(src)
module.channels = list("Supply" = 1)
@@ -583,7 +583,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if("Service")
module = new /obj/item/robot_module/butler(src)
module.channels = list("Service" = 1)
see_reagents = TRUE
has_advanced_reagent_vision = TRUE
if(selected_sprite == "Bro")
module.module_type = "Brobot"
if("Combat")
@@ -1484,7 +1484,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
is_emaggable = FALSE
can_lock_cover = TRUE
default_cell_type = /obj/item/stock_parts/cell/bluespace
see_reagents = TRUE
has_advanced_reagent_vision = TRUE
/mob/living/silicon/robot/deathsquad/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
laws = new /datum/ai_laws/deathsquad
@@ -1517,7 +1517,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
can_lock_cover = TRUE
default_cell_type = /obj/item/stock_parts/cell/super
var/eprefix = "Amber"
see_reagents = TRUE
has_advanced_reagent_vision = TRUE
/mob/living/silicon/robot/ert/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
@@ -1573,7 +1573,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
damage_protection = 20 // Reduce all incoming damage by this number. Very high in the case of /destroyer borgs, since it is an admin-only borg.
can_lock_cover = TRUE
default_cell_type = /obj/item/stock_parts/cell/bluespace
see_reagents = TRUE
has_advanced_reagent_vision = TRUE
/mob/living/silicon/robot/destroyer/init(alien = FALSE, connect_to_AI = TRUE, mob/living/silicon/ai/ai_to_sync_to = null)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
@@ -1692,8 +1692,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
playsound(loc, 'sound/machines/warning-buzzer.ogg', 75, TRUE)
to_chat(src, "<span class='userdanger'>CRITICAL ERROR: All modules OFFLINE.</span>")
/mob/living/silicon/robot/can_see_reagents()
return see_reagents
/mob/living/silicon/robot/advanced_reagent_vision()
return has_advanced_reagent_vision
/mob/living/silicon/robot/verb/powerwarn()
set category = "Robot Commands"

View File

@@ -333,7 +333,6 @@
/obj/item/crowbar/cyborg/red,
/obj/item/healthanalyzer/advanced,
/obj/item/robotanalyzer,
/obj/item/reagent_scanner/adv,
/obj/item/borg_defib,
/obj/item/handheld_defibrillator,
/obj/item/roller_holder,
@@ -600,7 +599,6 @@
/obj/item/razor,
/obj/item/instrument/piano_synth,
/obj/item/healthanalyzer/advanced,
/obj/item/reagent_scanner/adv,
/obj/item/rsf,
/obj/item/reagent_containers/dropper/cyborg,
/obj/item/lighter/zippo,

View File

@@ -1077,8 +1077,12 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return TRUE
//Can the mob see reagents inside of containers?
/mob/proc/can_see_reagents()
// Can the mob see reagents inside of transparent containers?
/mob/proc/reagent_vision()
return FALSE
// Can the mob see reagents inside any container and also identify blood types?
/mob/proc/advanced_reagent_vision()
return FALSE
//Can this mob leave its location without breaking things terrifically?

View File

@@ -84,6 +84,7 @@
else
built.send_report(ID.assignment ? "[ID.assignment] [ID.registered_name]" : ID.registered_name)
SSticker.mode.secondary_goals += built
SSblackbox.record_feedback("nested tally", "secondary goals", 1, list(built.name, "times generated"))
/datum/station_goal/secondary/Topic(href, href_list)
if(!check_rights(R_EVENT))

View File

@@ -125,28 +125,31 @@ task-install-git-hooks() {
git_root="$(git rev-parse --show-toplevel)"
git_base_dir="${base_dir/${git_root}/.}"
git config --replace-all merge.tgui-merge-bundle.driver \
"${git_base_dir}/bin/tgui --merge=bundle %P %O %A %B %L"
"${git_base_dir}/bin/tgui --merge=bundle %P %A"
echo "tgui: Merge drivers have been successfully installed!"
}
## Bundle merge driver
task-merge-bundle() {
local file_path="${1}"
local file_ancestor="${2}"
local file_current="${3}"
local file_other="${4}"
local conflict_marker_size="${5}"
local file_current="${2}"
echo "----------------------"
echo "tgui: prepping to replace a conflicted bundle"
cat $file_path > $file_current
task-rebuild-conflicted-bundle &
exit 0
}
task-rebuild-conflicted-bundle() {
echo "----------------------"
echo "tgui: rebuilding a conflicted tgui bundle, ${file_path}"
task-install
task-webpack --mode=production
echo "tgui: replacing conflicted bundle with newly compiled bundle"
cd ../
cat $file_path > $file_current
echo "tgui: committing new bundle"
git commit -am "TGUI Bundle Rebuild"
exit 0
}
## Main
## --------------------------------------------------------

View File

@@ -107,7 +107,7 @@ function task-validate-build {
## Installs merge drivers and git hooks
function task-install-git-hooks () {
Set-Location $global:basedir
git config --replace-all merge.tgui-merge-bundle.driver "tgui/bin/tgui --merge=bundle %P %O %A %B %L"
git config --replace-all merge.tgui-merge-bundle.driver "tgui/bin/tgui --merge=bundle %P %A"
Write-Output "tgui: Merge drivers have been successfully installed!"
}

View File

@@ -29,6 +29,7 @@ type LabeledListItemProps = {
textAlign?: string | BooleanLike;
buttons?: InfernoNode;
tooltip?: string | BooleanLike;
preserveWhitespace?: BooleanLike;
/** @deprecated */
content?: any;
children?: InfernoNode;
@@ -45,6 +46,7 @@ const LabeledListItem = (props: LabeledListItemProps) => {
tooltip,
content,
children,
preserveWhitespace,
} = props;
let listItem = (
<tr className={classes(['LabeledList__row', className])}>
@@ -61,6 +63,7 @@ const LabeledListItem = (props: LabeledListItemProps) => {
textAlign={textAlign}
className={classes(['LabeledList__cell', 'LabeledList__content'])}
colSpan={buttons ? undefined : 2}
preserveWhitespace={preserveWhitespace}
>
{content}
{children}

View File

@@ -1,4 +1,4 @@
import { createSearch } from 'common/string';
import { createSearch, decodeHtmlEntities } from 'common/string';
import { useBackend, useLocalState } from '../backend';
import {
Box,
@@ -394,14 +394,13 @@ const MedicalRecordsViewMedical = (_properties, context) => {
<Stack.Item grow>
<LabeledList>
{medical.fields.map((field, i) => (
<LabeledList.Item key={i} label={field.field}>
<Box height="20px" inline>
{field.value}
</Box>
<LabeledList.Item key={i} label={field.field} preserveWhitespace>
{decodeHtmlEntities(field.value)}
{!!field.edit && (
<Button
icon="pen"
ml="0.5rem"
mb={field.line_break ? '1rem' : 'initial'}
onClick={() => doEdit(context, field)}
/>
)}
@@ -434,7 +433,7 @@ const MedicalRecordsViewComments = (_properties, context) => {
<Box color="label">No comments found.</Box>
) : (
medical.comments.map((comment, i) => (
<Box key={i} prewrap>
<Box key={i}>
<Box color="label" inline>
{comment.header}
</Box>

View File

@@ -244,7 +244,7 @@ const MessageResponse = (props, context) => {
sectionTitle = 'Message sent successfully';
break;
case 'FAIL':
sectionTitle = 'Request supplies from another department';
sectionTitle = 'Unable to contact messaging server';
break;
}
@@ -278,6 +278,7 @@ const MessageLog = (props, context) => {
sectionTitle = 'Shipping label print log';
break;
}
list2iterate.reverse();
return (
<Stack.Item grow textAlign="center">

View File

@@ -316,7 +316,11 @@ const SecurityRecordsPageView = (properties, context) => {
<Stack.Item>
<LabeledList>
{security.fields.map((field, i) => (
<LabeledList.Item key={i} label={field.field} prewrap>
<LabeledList.Item
key={i}
label={field.field}
preserveWhitespace
>
{decodeHtmlEntities(field.value)}
{!!field.edit && (
<Button
@@ -356,7 +360,7 @@ const SecurityRecordsViewGeneral = (_properties, context) => {
<Stack.Item grow>
<LabeledList>
{general.fields.map((field, i) => (
<LabeledList.Item key={i} label={field.field} prewrap>
<LabeledList.Item key={i} label={field.field} preserveWhitespace>
{decodeHtmlEntities('' + field.value)}
{!!field.edit && (
<Button
@@ -412,7 +416,7 @@ const SecurityRecordsViewSecurity = (_properties, context) => {
<Box color="label">No comments found.</Box>
) : (
security.comments.map((comment, i) => (
<Box key={i} prewrap>
<Box key={i} preserveWhitespace>
<Box color="label" inline>
{comment.header || 'Auto-generated'}
</Box>

View File

@@ -101,7 +101,7 @@ const RecordView = (props, context) => {
<LabeledList.Item label="Details">
{medical.cdi_d}
</LabeledList.Item>
<LabeledList.Item label="Important Notes">
<LabeledList.Item label="Important Notes" preserveWhitespace>
{medical.notes}
</LabeledList.Item>
</LabeledList>
@@ -133,7 +133,7 @@ const RecordView = (props, context) => {
<LabeledList.Item label="Details">
{security.ma_crim_d}
</LabeledList.Item>
<LabeledList.Item label="Important Notes">
<LabeledList.Item label="Important Notes" preserveWhitespace>
{security.notes}
</LabeledList.Item>
</LabeledList>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long