Skip to content

Commit

Permalink
Merge remote-tracking branch 'CMSS13/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 16, 2023
2 parents 33c61b3 + d04fbdb commit 846afef
Show file tree
Hide file tree
Showing 49 changed files with 267 additions and 202 deletions.
5 changes: 2 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
/tools/docker/ @Fira
/Dockerfile @Fira

# MorrowWolf
# Zonespace

/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm @morrowwolf
/code/modules/gear_presets/survivors.dm @morrowwolf
/code/modules/gear_presets/survivors.dm @zonespace27

# MULTIPLE OWNERS
3 changes: 3 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
/// Can lockout blackmarket from ASRS console circuits.
#define TRAIT_TOOL_TRADEBAND "t_tool_tradeband"

/// Can hack ASRS consoles to access the black market
#define TRAIT_TOOL_BLACKMARKET_HACKER "t_tool_blackmarket_hacker"

// CLOTHING TRAITS
#define TRAIT_CLOTHING_HOOD "t_clothing_hood"

Expand Down
7 changes: 7 additions & 0 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
return
var/mob/living/carbon/human/H = mymob
var/mob/screenmob = viewer || H

if(!screenmob?.client)
return

if(!gear.len)
inventory_shown = FALSE
return //species without inv slots don't show items.
Expand Down Expand Up @@ -181,6 +185,9 @@
var/mob/living/carbon/human/H = mymob
var/mob/screenmob = viewer || H

if(!screenmob?.client)
return

if(H.hud_used)
if(H.hud_used.hud_shown)
if(H.s_store)
Expand Down
89 changes: 22 additions & 67 deletions code/datums/supply_packs/black_market.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,70 +127,42 @@ Non-USCM items, from CLF, UPP, colonies, etc. Mostly combat-related.
spawn_guns() //the crate gives 2 guns

/obj/structure/largecrate/black_market/confiscated_weaponry/proc/spawn_guns()
switch(rand(1,6))
switch(rand(1, 5))
if(1) //pmc
if(prob(50))
new /obj/item/weapon/gun/rifle/nsg23/no_lock(src)
new /obj/item/ammo_magazine/rifle/nsg23(src)
new /obj/item/ammo_magazine/rifle/nsg23(src)
new /obj/item/ammo_magazine/rifle/nsg23/ap(src)
new /obj/item/ammo_magazine/rifle/nsg23/extended(src)
else
new /obj/item/weapon/gun/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/weapon/gun/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
new /obj/item/ammo_magazine/smg/fp9000(src)
if(2) //pizza
new /obj/item/weapon/gun/pistol/holdout(src)
new /obj/item/ammo_magazine/pistol/holdout(src)
if(3) //clf
switch(rand(1, 3))
switch(rand(1, 2))
if(1)
new /obj/item/weapon/twohanded/lungemine/damaged(src)
if(2)
new /obj/item/weapon/gun/smg/uzi(src)
new /obj/item/ammo_magazine/smg/uzi/extended(src)
new /obj/item/ammo_magazine/smg/uzi(src)
new /obj/item/ammo_magazine/smg/uzi(src)
if(3)
if(2)
new /obj/item/weapon/gun/smg/mac15(src)
new /obj/item/ammo_magazine/smg/mac15/extended(src)
new /obj/item/ammo_magazine/smg/mac15(src)
new /obj/item/ammo_magazine/smg/mac15(src)
if(4) //upp
if(prob(50))
new /obj/item/weapon/gun/rifle/type71(src)
new /obj/item/ammo_magazine/rifle/type71/ap(src)
new /obj/item/ammo_magazine/rifle/type71(src)
new /obj/item/ammo_magazine/rifle/type71(src)
else
new /obj/item/weapon/gun/shotgun/type23/riot_control(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/beanbag(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/beanbag(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/flechette(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/flechette(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/slug(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/slug(src) //NO buckshot!
new /obj/item/weapon/gun/shotgun/type23/riot_control(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/beanbag(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/beanbag(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/flechette(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/flechette(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/slug(src)
new /obj/item/ammo_magazine/handful/shotgun/heavy/slug(src) //NO buckshot!
if(5) //freelancer
if(prob(80))
new /obj/item/weapon/gun/rifle/mar40(src)
new /obj/item/ammo_magazine/rifle/mar40/extended(src)
new /obj/item/ammo_magazine/rifle/mar40(src)
new /obj/item/ammo_magazine/rifle/mar40(src)
else
new /obj/item/weapon/gun/rifle/mar40/lmg(src)
new /obj/item/ammo_magazine/rifle/mar40/lmg(src)
if(6) //VAIPO
if(prob(50))
new /obj/item/weapon/gun/rifle/mar40/tactical(src)
new /obj/item/ammo_magazine/rifle/mar40/extended(src)
new /obj/item/ammo_magazine/rifle/mar40/extended(src)
new /obj/item/ammo_magazine/rifle/mar40(src)
else
new /obj/item/weapon/gun/rifle/mar40/lmg(src)
new /obj/item/ammo_magazine/rifle/mar40/lmg(src)
new /obj/item/ammo_magazine/rifle/mar40/lmg(src)
new /obj/item/weapon/gun/rifle/mar40(src)
new /obj/item/ammo_magazine/rifle/mar40/extended(src)
new /obj/item/ammo_magazine/rifle/mar40(src)
new /obj/item/ammo_magazine/rifle/mar40(src)


/* Misc. Individual Guns */

Expand Down Expand Up @@ -561,10 +533,6 @@ Primarily made up of things that would be best utilized, well, shipside. Recreat
/obj/item/reagent_container/food/snacks/egg/random,
/obj/item/reagent_container/food/snacks/egg/random, //not a dupe
/obj/item/reagent_container/food/snacks/xemeatpie,
/obj/item/reagent_container/food/snacks/monkeycube,
/obj/item/reagent_container/food/snacks/monkeycube/farwacube,
/obj/item/reagent_container/food/snacks/monkeycube/stokcube,
/obj/item/reagent_container/food/snacks/monkeycube/yirencube,
/obj/item/reagent_container/food/snacks/upp,
/obj/item/reagent_container/food/snacks/mre_pack/xmas1,
/obj/item/reagent_container/food/snacks/mre_pack/xmas2,
Expand Down Expand Up @@ -722,13 +690,6 @@ USCM spare items, miscellaneous gear that's too niche and distant (or restricted
dollar_cost = 50
containertype = /obj/structure/largecrate/black_market

/datum/supply_packs/contraband/surplus/surplus_m4ra_extended
name = "surplus magazine box (Ext M4RA x 12)"
contains = list(/obj/item/ammo_box/magazine/m4ra/ext)
dollar_cost = 45
crate_heat = 3
containertype = /obj/structure/largecrate/black_market

/* - Misc. USCM weaponry - */

/datum/supply_packs/contraband/surplus/mk45_automag
Expand Down Expand Up @@ -1108,21 +1069,15 @@ Things that don't fit anywhere else. If they're meant for shipside use, they pro
new /obj/item/ammo_magazine/smg/mac15/extended(loc)
new /obj/item/ammo_magazine/smg/mac15/extended(loc)
loot_message = SPAN_NOTICE("It's some CLF SMG armaments.")
if(21 to 25)
if(21 to 29)
// Discovered Yautja ruins.. (None of these will trigger any alarms. They are far too old, degraded, and useless for any Yautja to care.)
new /obj/item/clothing/mask/yautja_flavor(loc)
new /obj/item/clothing/suit/armor/yautja_flavor(loc)
new /obj/item/clothing/shoes/yautja_flavor(loc)
new /obj/item/weapon/twohanded/yautja/glaive/damaged(loc)
new /obj/item/stack/yautja_rope(loc)
loot_message = SPAN_NOTICE("It's some strange ancient gear...?")
if(26 to 30)
// Damaged lunge mines, don't let the marines near these. Not even *close* to effective against even a runner.
new /obj/item/weapon/twohanded/lungemine/damaged(loc)
new /obj/item/weapon/twohanded/lungemine/damaged(loc)
new /obj/item/weapon/twohanded/lungemine/damaged(loc)
loot_message = SPAN_NOTICE("It's a bunch of lunge mines..?")
if(31 to 35)
if(30 to 35)
// CLF nades!
loot_message = SPAN_NOTICE("It's a package of assorted CLF grenades!")
var/list/nades_to_pick = list(
Expand Down
6 changes: 4 additions & 2 deletions code/game/gamemodes/cm_self_destruct.dm
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi
var/list/alive_mobs = list() //Everyone who will be destroyed on the zlevel(s).
var/list/dead_mobs = list() //Everyone who only needs to see the cinematic.
for(var/mob/current_mob as anything in GLOB.mob_list) //This only does something cool for the people about to die, but should prove pretty interesting.
if(!current_mob || !current_mob.loc)
var/turf/current_turf = get_turf(current_mob)
if(!current_mob || !current_mob.loc || !current_turf)
continue //In case something changes when we sleep().
if(current_mob.stat == DEAD)
dead_mobs |= current_mob
continue
var/turf/current_turf = get_turf(current_mob)
if(current_turf.z in z_levels)
alive_mobs |= current_mob
shake_camera(current_mob, 110, 4)
Expand All @@ -286,6 +286,8 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi
for(var/mob/current_mob in alive_mobs)
if(current_mob && current_mob.loc) //Who knows, maybe they escaped, or don't exist anymore.
var/turf/current_mob_turf = get_turf(current_mob)
if(!current_mob_turf)
continue
if(current_mob_turf.z in z_levels)
if(istype(current_mob.loc, /obj/structure/closet/secure_closet/freezer/fridge))
continue
Expand Down
10 changes: 10 additions & 0 deletions code/game/machinery/bioprinter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@

switch(action)
if("print")
if(working)
//If we're already printing something then we're too busy to multi task.
to_chat(usr, SPAN_NOTICE("[src] is busy at the moment."))
return FALSE
var/recipe = params["recipe_id"]
var/valid_recipe = FALSE
for(var/datum/bioprinter_recipe/product_recipes in products)
Expand All @@ -124,6 +128,10 @@
message_admins("[key_name(usr)] attempted to print an invalid recipe on \the [src].")
return FALSE
var/datum/bioprinter_recipe/recipe_datum = new recipe
if(stored_metal < recipe_datum.metal)
to_chat(usr, SPAN_NOTICE("[src] does not have enough stored metal."))
QDEL_NULL(recipe_datum)
return FALSE
stored_metal -= recipe_datum.metal
to_chat(usr, SPAN_NOTICE("\The [src] is now printing the selected organ. Please hold."))
working = TRUE
Expand All @@ -146,6 +154,8 @@

/obj/structure/machinery/bioprinter/proc/print_limb(limb_path)
if(inoperable())
//In case we lose power or anything between the print and the callback we don't want to permenantly break the printer
working = FALSE
return
new limb_path(get_turf(src))
working = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li

//Lifted from Unity stasis.dm and refactored. ~Zuhayr
/obj/structure/machinery/cryopod/process()
if(occupant && !(WEAKREF(occupant) in GLOB.freed_mob_list)) //ignore freed mobs
if(occupant && !(occupant in GLOB.freed_mob_list)) //ignore freed mobs
//if occupant ghosted, time till despawn is severely shorter
if(!occupant.key && time_till_despawn == 10 MINUTES)
time_till_despawn -= 8 MINUTES
Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/fax_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -324,22 +324,22 @@ var/list/alldepartments = list()

switch(target_department)
if(DEPARTMENT_HC)
GLOB.USCMFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\[view message at [world.timeofday]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
GLOB.USCMFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_PROVOST)
GLOB.ProvostFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\[view message at [world.timeofday]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
GLOB.ProvostFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_CMB)
GLOB.CMBFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\[view message at [world.timeofday]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CMBFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
GLOB.CMBFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CMBFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CMBFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_WY)
GLOB.WYFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\[view message at [world.timeofday]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
GLOB.WYFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_PRESS)
GLOB.PressFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\[view message at [world.timeofday]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];PressFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
GLOB.PressFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];PressFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];PressFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
else
GLOB.GeneralFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\[view message at [world.timeofday]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
GLOB.GeneralFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "

msg_admin += SPAN_STAFF_IC("Receiving fax via secure connection ... <a href='?FaxView=\ref[faxcontents]'>view message</a>")
Expand Down
11 changes: 7 additions & 4 deletions code/game/objects/effects/spawners/random.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@
icon_state = "atmos"

/obj/effect/spawner/random/technology_scanner/item_to_spawn()
return pick(prob(5);/obj/item/device/t_scanner,\
prob(2);/obj/item/device/radio,\
prob(5);/obj/item/device/analyzer)

return pick_weight(list(
"none" = 10,
/obj/item/device/t_scanner = 10,
/obj/item/device/radio = 8,
/obj/item/device/analyzer = 10,
/obj/item/device/black_market_hacking_device = 2,
))

/obj/effect/spawner/random/powercell
name = "Random Powercell"
Expand Down
9 changes: 6 additions & 3 deletions code/game/objects/items/circuitboards/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@

/obj/item/circuitboard/computer/supplycomp/attackby(obj/item/tool, mob/user)
if(HAS_TRAIT(tool, TRAIT_TOOL_MULTITOOL))
to_chat(user, SPAN_WARNING("You start messing around with the electronics of \the [src]..."))
to_chat(user, SPAN_WARNING("You try to pulse the circuit board, but nothing happens. Maybe you need something more specialized?"))
return

else if(HAS_TRAIT(tool, TRAIT_TOOL_BLACKMARKET_HACKER))
to_chat(user, SPAN_WARNING("You start messing around with the electronics of [src]..."))
if(do_after(user, 8 SECONDS, INTERRUPT_ALL, BUSY_ICON_FRIENDLY))
if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI))
to_chat(user, SPAN_WARNING("You have no idea what you're doing."))
Expand All @@ -191,8 +195,7 @@
to_chat(user, SPAN_WARNING("You weaken the broadcasting function with \the [tool], and the red light stops blinking, turning off. It's probably good now."))
contraband_enabled = FALSE

if(HAS_TRAIT(tool, TRAIT_TOOL_TRADEBAND))

else if(HAS_TRAIT(tool, TRAIT_TOOL_TRADEBAND))
if(!skillcheck(user, SKILL_POLICE, SKILL_POLICE_SKILLED))
to_chat(user, SPAN_NOTICE("You do not know how to use [tool]"))
return
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,16 @@ FORENSIC SCANNER
playsound(user, 'sound/machines/twobeep.ogg', 15, TRUE)
to_chat(user, SPAN_NOTICE("You scan [hit_atom] and notice a reading on [src]'s pad, it says:<b> ITEM HAS [market_value] VALUE <b>"))

/obj/item/device/black_market_hacking_device
name = "modified security access tuner"
desc = "A security access tuner with wires and electrical pins sticking out at odd angles. A handwritten label on the bottom says something about the ASRS system."
icon_state = "bm_hacker"
item_state = "analyzer"
w_class = SIZE_SMALL
flags_atom = FPRINT
flags_equip_slot = SLOT_WAIST
inherent_traits = list(TRAIT_TOOL_BLACKMARKET_HACKER)

/obj/item/device/cmb_black_market_tradeband
name = "\improper CMB Tradeband Compliance Device"
desc = "A device used to reset any tampering done to trading devices' signal range. Occasionally used to fix any signal chips damaged in an accident, but often for malpractice in trading. Use this with caution, as it will also reset any evidence of potential illicit trade. Created to fulfill a joint-organization requirement for CMB-ICC teams on the frontier, where tampered machinery was difficult to move and refurbish. Smugglers beware."
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/taperecorder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
mytape.timestamp += mytape.used_capacity
var/language_known = (M.universal_speak || (speaking && (speaking.name in known_languages)))
var/mob_name = language_known ? M.GetVoice() : "Unknown"
var/message = language_known ? msg : speaking.scramble(msg)
var/message = (!speaking || language_known) ? msg : speaking.scramble(msg)
mytape.storedinfo += "\[[time2text(mytape.used_capacity,"mm:ss")]\] [mob_name] [verb], \"[italics ? "<i>" : null][message][italics ? "</i>" : null]\""


Expand Down
Loading

0 comments on commit 846afef

Please sign in to comment.