Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into clean_squa_vendors_inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Huffie56 authored Jul 23, 2023
2 parents 7278627 + 277ab77 commit d75b0bc
Show file tree
Hide file tree
Showing 54 changed files with 335 additions and 163 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
run_linters:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Run Linters
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
concurrency:
group: run_linters-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Compile Maps
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Restore BYOND cache
Expand All @@ -80,7 +80,7 @@ jobs:
find_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Find Maps to Test
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
outputs:
maps: ${{ steps.map_finder.outputs.maps }}
alternate_tests: ${{ steps.alternate_test_finder.outputs.alternate_tests }}
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]') && needs.find_all_maps.outputs.alternate_tests != '[]'"
name: Check Alternate Tests
needs: [run_alternate_tests]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- run: echo Alternate tests passed.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile_changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [ready_for_review, opened, synchronize, reopened]
jobs:
triage:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: eps1lon/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
generate_documentation:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
concurrency: gen-docs
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_approval.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Automatic Approve Workflows
on:
schedule:
schedule:
- cron: "*/10 * * * *"
jobs:
automatic-approve:
name: Automatic Approve Workflows
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Automatic Approve
uses: mheap/automatic-approve-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
type: string
jobs:
run_unit_tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Restore BYOND cache
Expand All @@ -27,7 +27,7 @@ jobs:
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
sudo apt install -o APT::Immediate-Configure=false zlib1g-dev:i386 libssl-dev:i386
bash tools/ci/install_rust_g.sh
- name: Configure version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
stale:

runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
update-changelog:
concurrency: changelog
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
update-dmapi:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: Update the TGS DMAPI
steps:
- name: Clone
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
//the define for visible message range in combat
#define COMBAT_MESSAGE_RANGE 3
#define DEFAULT_MESSAGE_RANGE 7

#define BAYONET_DRAW_DELAY (1 SECONDS)
3 changes: 2 additions & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
#define FACTION_CLF "CLF"
#define FACTION_PMC "PMC"
#define FACTION_CONTRACTOR "VAI"
#define FACTION_MARSHAL "Colonial Marshal"
#define FACTION_WY_DEATHSQUAD "WY Death Squad"
#define FACTION_MERCENARY "Mercenary"
#define FACTION_FREELANCER "Freelancer"
Expand All @@ -238,7 +239,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,

#define FACTION_LIST_MARINE list(FACTION_MARINE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL)
#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_UPP list(FACTION_MARINE, FACTION_UPP)
Expand Down
10 changes: 10 additions & 0 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,16 @@ SUBSYSTEM_DEF(minimaps)
else
return UI_CLOSE

/datum/tacmap/xeno/ui_status(mob/user)
if(!isxeno(user))
return UI_CLOSE

var/mob/living/carbon/xenomorph/xeno = user
if(!xeno.hive?.living_xeno_queen?.ovipositor)
return UI_CLOSE

return UI_INTERACTIVE

/datum/tacmap_holder
var/map_ref
var/atom/movable/screen/minimap/map
Expand Down
6 changes: 3 additions & 3 deletions code/datums/emergency_calls/goons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
/datum/emergency_call/goon/chem_retrieval/New()
..()
dispatch_message = "[MAIN_SHIP_NAME], this is USCSS Royce. Our squad is boarding to retrieve all samples of a chemical recently scanned from your research department. You should already have received a significant sum of money for your department's discovery. In return we ask that you cooperate and provide everything related to the chemical to our retrieval team."
objectives = "Secure all documents, samples, and chemicals containing the property DNA_Disintegrating from [MAIN_SHIP_NAME] research department."
objectives = "Secure all documents, samples, and chemicals containing the property DNA_Disintegrating from [MAIN_SHIP_NAME] research department and return them to Response Team Station."

/datum/emergency_call/goon/chem_retrieval/proc/check_objective_info()
if(objective_info)
objectives = "Secure all documents, samples and chemicals related to [objective_info] from [MAIN_SHIP_NAME] research department."
objectives += "Assume at least 30 units are located within the department. If they can not make more that should be all. Cooperate with the onboard CL to ensure all who know the complete recipe are kept silenced with a contract of confidentiality. All humans who have ingested the chemical must be brought back dead or alive. Viral scan is required for any humans who is suspected of ingestion. The professor may call for PMC back up if things get out of hand."
objectives = "Secure all documents, samples and chemicals related to [objective_info] from [MAIN_SHIP_NAME] research department and return them to Response Team Station."
objectives += "Assume at least 30 units are located within the department. If they can not make more that should be all. Cooperate with the onboard CL to ensure all who know the complete recipe are kept silenced with a contract of confidentiality. All humans who have ingested the chemical must be brought back dead or alive. Viral scan is required for any humans who is suspected of ingestion. You must not deploy to the colony without explicit permission from PMC Dispatch. The professor may call for PMC back up if things get out of hand."
checked_objective = TRUE

/datum/emergency_call/goon/chem_retrieval/create_member(datum/mind/M, turf/override_spawn_loc)
Expand Down
17 changes: 17 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@
var/client/C = usr.client
C?.open_particle_editor(src)

/atom/movable/vv_edit_var(var_name, var_value)
var/static/list/banned_edits = list(NAMEOF_STATIC(src, step_x) = TRUE, NAMEOF_STATIC(src, step_y) = TRUE, NAMEOF_STATIC(src, step_size) = TRUE, NAMEOF_STATIC(src, bounds) = TRUE)
var/static/list/careful_edits = list(NAMEOF_STATIC(src, bound_x) = TRUE, NAMEOF_STATIC(src, bound_y) = TRUE, NAMEOF_STATIC(src, bound_width) = TRUE, NAMEOF_STATIC(src, bound_height) = TRUE)
var/static/list/not_falsey_edits = list(NAMEOF_STATIC(src, bound_width) = TRUE, NAMEOF_STATIC(src, bound_height) = TRUE)
if(banned_edits[var_name])
return FALSE //PLEASE no.
if(careful_edits[var_name] && (var_value % world.icon_size) != 0)
return FALSE
if(not_falsey_edits[var_name] && !var_value)
return FALSE

if(!isnull(.))
datum_flags |= DF_VAR_EDITED
return

return ..()

//when a mob interact with something that gives them a special view,
//check_eye() is called to verify that they're still eligible.
//if they are not check_eye() usually reset the mob's view.
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
sleep(15)

vendor.stat &= ~IN_USE
vendor.icon_state = initial(vendor.icon_state)
vendor.update_icon()

/proc/vendor_successful_vend_one(obj/structure/machinery/cm_vending/vendor, prod_type, mob/living/carbon/human/user, turf/target_turf, insignas_override)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/vending/vendor_types/crew/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_researcher, list(

list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null),
list("Gloves", 0, /obj/item/clothing/gloves/latex, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY),
list("Headset", 0, /obj/item/device/radio/headset/almayer/doc, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY),
list("Headset", 0, /obj/item/device/radio/headset/almayer/research, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY),
list("Medical HUD Glasses", 0, /obj/item/clothing/glasses/hud/health, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_MANDATORY),
list("Reagent Scanner HUD Goggles", 0, /obj/item/clothing/glasses/science, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_RECOMMENDED),

Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/items/devices/radio/encryptionkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
icon_state = "med_key"
channels = list(RADIO_CHANNEL_MEDSCI = TRUE)

/obj/item/device/encryptionkey/medres
name = "Research Radio Encryption Key"
icon_state = "med_key"
channels = list(RADIO_CHANNEL_MEDSCI = TRUE, RADIO_CHANNEL_INTEL = TRUE)

// MARINE MILITARY POLICE

/obj/item/device/encryptionkey/cmpcom
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,12 @@
icon_state = "med_headset"
initial_keys = list(/obj/item/device/encryptionkey/med)

/obj/item/device/radio/headset/almayer/research
name = "researcher radio headset"
desc = "A headset used by medbay's skilled researchers. Channels are as follows: :m - medical, :t - intel."
icon_state = "med_headset"
initial_keys = list(/obj/item/device/encryptionkey/medres)

/obj/item/device/radio/headset/almayer/ct
name = "supply radio headset"
desc = "Used by the lowly Cargo Technicians of the USCM, light weight and portable. To access the supply channel, use :u."
Expand Down
41 changes: 28 additions & 13 deletions code/game/objects/items/reagent_containers/blood_pack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#define BLOOD_BAG_TAKING 0

/obj/item/reagent_container/blood
name = "BloodPack"
desc = "Contains blood used for transfusion."
name = "blood pack"
desc = "A blood pack. Contains fluids, typically used for transfusions."
icon = 'icons/obj/items/bloodpack.dmi'
icon_state = "empty"
icon_state = "bloodpack"
volume = 300
matter = list("plastic" = 500)
flags_atom = CAN_BE_SYRINGED
Expand All @@ -20,7 +20,7 @@
/obj/item/reagent_container/blood/Initialize()
. = ..()
if(blood_type != null)
name = "BloodPack [blood_type]"
name = "[blood_type] blood pack"
reagents.add_reagent("blood", initial(volume), list("viruses" = null, "blood_type" = blood_type, "resistances" = null))
update_icon()

Expand All @@ -29,10 +29,26 @@

/obj/item/reagent_container/blood/update_icon()
var/percent = round((reagents.total_volume / volume) * 100)
switch(percent)
if(0 to 9) icon_state = "empty"
if(10 to 50) icon_state = "half"
if(51 to INFINITY) icon_state = "full"
overlays = null
underlays = null

if(blood_type)
overlays += image('icons/obj/items/bloodpack.dmi', src, blood_type)

if(reagents && reagents.total_volume)
var/image/filling = image('icons/obj/items/reagentfillings.dmi', src, "[icon_state]10")

switch(percent)
if(1 to 9) filling.icon_state = "[icon_state]5"
if(10 to 19) filling.icon_state = "[icon_state]10"
if(20 to 39) filling.icon_state = "[icon_state]25"
if(40 to 64) filling.icon_state = "[icon_state]50"
if(65 to 79) filling.icon_state = "[icon_state]75"
if(80 to 90) filling.icon_state = "[icon_state]80"
if(91 to INFINITY) filling.icon_state = "[icon_state]100"

filling.color = mix_color_from_reagents(reagents.reagent_list)
underlays += filling

/obj/item/reagent_container/blood/proc/update_beam()
if(current_beam)
Expand Down Expand Up @@ -65,7 +81,7 @@
if(user.action_busy)
return

if(!do_after(user, 3 SECONDS * user.get_skill_duration_multiplier(SKILL_SURGERY), INTERRUPT_ALL, BUSY_ICON_FRIENDLY, attacked_mob, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
if(!do_after(user, (1 SECONDS) * user.get_skill_duration_multiplier(SKILL_SURGERY), INTERRUPT_ALL, BUSY_ICON_FRIENDLY, attacked_mob, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
to_chat(user, SPAN_WARNING("You were interrupted before you could finish!"))
return

Expand Down Expand Up @@ -132,7 +148,7 @@
connected_to.visible_message("[src] breaks free of [connected_to]!", "[src] is pulled out of you!")
connected_to.apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
if(connected_to.pain.feels_pain)
connected_to.emote("scream")
connected_to.emote("pain")
connected_to.active_transfusions -= src
connected_to.base_pixel_x = 0
connected_to = null
Expand Down Expand Up @@ -173,9 +189,8 @@
blood_type = "O-"

/obj/item/reagent_container/blood/empty
name = "Empty BloodPack"
desc = "Seems pretty useless... Maybe if there were a way to fill it?"
icon_state = "empty"
name = "empty blood pack"
desc = "An empty blood pack. Sorry, vampires, no luck here."

#undef BLOOD_BAG_INJECTING
#undef BLOOD_BAG_TAKING
8 changes: 4 additions & 4 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@
)
cant_hold = list()
flap = FALSE
var/draw_cooldown = 0
var/draw_cooldown_interval = 1 SECONDS

COOLDOWN_DECLARE(draw_cooldown)

/obj/item/storage/belt/knifepouch/fill_preset_inventory()
for(var/i = 1 to storage_slots)
Expand All @@ -759,9 +759,9 @@
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)

/obj/item/storage/belt/knifepouch/attack_hand(mob/user, mods)
if(draw_cooldown < world.time)
if(COOLDOWN_FINISHED(src, draw_cooldown))
..()
draw_cooldown = world.time + draw_cooldown_interval
COOLDOWN_START(src, draw_cooldown, BAYONET_DRAW_DELAY)
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
else
to_chat(user, SPAN_WARNING("You need to wait before drawing another knife!"))
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/storage/pouch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@
icon_state = "bayonet"
storage_slots = 5
storage_flags = STORAGE_FLAGS_POUCH|STORAGE_USING_DRAWING_METHOD|STORAGE_ALLOW_QUICKDRAW
var/draw_cooldown = 0
var/draw_cooldown_interval = 1 SECONDS
var/default_knife_type = /obj/item/weapon/throwing_knife

COOLDOWN_DECLARE(draw_cooldown)

/obj/item/storage/pouch/bayonet/Initialize()
. = ..()
for(var/total_storage_slots in 1 to storage_slots)
Expand All @@ -149,9 +149,9 @@
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)

/obj/item/storage/pouch/bayonet/attack_hand(mob/user, mods)
if(draw_cooldown < world.time)
if(COOLDOWN_FINISHED(src, draw_cooldown))
..()
draw_cooldown = world.time + draw_cooldown_interval
COOLDOWN_START(src, draw_cooldown, BAYONET_DRAW_DELAY)
playsound(src, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
else
to_chat(user, SPAN_WARNING("You need to wait before drawing another knife!"))
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/storage/surgical_tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon_state = "surgical_tray"
flags_atom = FPRINT|CONDUCT
w_class = SIZE_LARGE //Should not fit in backpacks
storage_slots = 13
storage_slots = 14
max_storage_space = 24
use_sound = "toolbox"
matter = list("plastic" = 3000)
Expand All @@ -31,6 +31,7 @@
new /obj/item/tool/surgery/FixOVein(src)
new /obj/item/stack/nanopaste(src)
new /obj/item/tool/surgery/surgical_line(src)
new /obj/item/tool/surgery/synthgraft(src)

/obj/item/storage/surgical_tray/update_icon()
if(!contents.len)
Expand Down
Loading

0 comments on commit d75b0bc

Please sign in to comment.