Skip to content

Commit

Permalink
Merge branch 'master' into fix-unable-to-change-rank-security-records
Browse files Browse the repository at this point in the history
  • Loading branch information
BartDrown authored Jan 5, 2025
2 parents 9d206e4 + 73c97c1 commit 1f28364
Show file tree
Hide file tree
Showing 51 changed files with 1,694 additions and 641 deletions.
42 changes: 39 additions & 3 deletions code/datums/supply_packs/_supply_packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle.
//NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points.

// The lists of supply groups and contraband groups have been moved to /obj/structure/machinery/computer/supplycomp definition as static variables.
// The lists of supply groups and contraband groups have been moved to /obj/structure/machinery/computer/supply/asrs definition as static variables.

/datum/supply_packs
var/name = "Basic supply pack."
Expand All @@ -29,7 +29,43 @@
if(randomised_num_contained)
manifest += "Contains any [randomised_num_contained] of:"
manifest += "<ul>"
for(var/atom/movable/path in contains)
if(!path) continue
for(var/atom/movable/path as anything in contains)
manifest += "<li>[initial(path.name)]</li>"
manifest += "</ul>"

/datum/supply_packs/proc/get_list_representation()
var/types_in_contents = list()
for(var/contents_type in contains)
if(!types_in_contents[contents_type])
types_in_contents[contents_type] = 1
continue

types_in_contents[contents_type]++

var/pack_contents = list()
for(var/atom/deduped_type as anything in types_in_contents)
pack_contents += list(
list(
"name" = deduped_type::name,
"quantity" = types_in_contents[deduped_type],
"icon" = list(
"icon" = deduped_type::icon,
"icon_state" = deduped_type::icon_state
)
)
)

var/atom/container = containertype

return list(
"name" = name,
"cost" = cost,
"dollar_cost" = dollar_cost,
"contains" = pack_contents,
"category" = group,
"type" = type,
"icon" = container ? list(
"icon" = container::icon,
"icon_state" = container::icon_state
) : null
)
10 changes: 0 additions & 10 deletions code/datums/supply_packs/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@
containername = "\improper M4RA magazines crate"
group = "Ammo"

/datum/supply_packs/ammo_dmr_mag_box_ap
name = "Magazine box (M4RA, 16x AP mags)"
contains = list(
/obj/item/ammo_box/magazine/m4ra/ap,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "\improper M4RA AP magazines crate"
group = "Ammo"

//------------------------For M39----------------

/datum/supply_packs/ammo_smg_mag_box
Expand Down
10 changes: 10 additions & 0 deletions code/datums/supply_packs/black_market.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,16 @@ This is where the RO can reclaim their lost honor and purchase the M44 custom, t
crate_heat = 4
containertype = /obj/structure/largecrate/black_market

/datum/supply_packs/contraband/deep_storage/gunslinger_holster
name = "Red Ranger Cowboy Gunbelt Crate (x2)"
contains = list(
/obj/item/storage/belt/gun/m44/gunslinger,
/obj/item/storage/belt/gun/m44/gunslinger,
)
dollar_cost = 20
crate_heat = 4
containertype = /obj/structure/largecrate/black_market

/* --- MISCELLANEOUS --- */

/*
Expand Down
12 changes: 0 additions & 12 deletions code/datums/supply_packs/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@
containername = "Shoulder Holster Crate"
group = "Clothing"

/datum/supply_packs/gunslinger_holster
contains = list(
/obj/item/storage/belt/gun/m44/gunslinger,
/obj/item/storage/belt/gun/m44/gunslinger,
)
name = "Red Ranger Cowboy Gunbelt Crate (x2)"
cost = 20
contraband = 1
containertype = /obj/structure/closet/crate
containername = "Cowboy Costume Crate"
group = "Clothing"

/datum/supply_packs/officer_outfits//lmao this shit is so hideously out of date
contains = list(
/obj/item/clothing/under/rank/qm_suit,
Expand Down
9 changes: 0 additions & 9 deletions code/datums/supply_packs/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,3 @@
containername = "M707 crate"
group = "Weapons"
*/

/datum/supply_packs/gun/merc
contains = list()
name = "black market firearms (x1)"
cost = 40
contraband = 1
containertype = /obj/structure/largecrate/guns/merc
containername = "\improper black market firearms crate"
group = "Weapons"
14 changes: 7 additions & 7 deletions code/game/objects/items/circuitboards/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

/obj/item/circuitboard/computer/ordercomp
name = "Circuit board (Supply ordering console)"
build_path = /obj/structure/machinery/computer/ordercomp
build_path = /obj/structure/machinery/computer/supply

/obj/item/circuitboard/computer/supply_drop_console
name = "Circuit board (Supply Drop Console)"
Expand All @@ -153,17 +153,17 @@

/obj/item/circuitboard/computer/supplycomp
name = "Circuit board (ASRS console)"
build_path = /obj/structure/machinery/computer/supplycomp
build_path = /obj/structure/machinery/computer/supply/asrs

var/contraband_enabled = FALSE
var/black_market_lock = FALSE

/obj/item/circuitboard/computer/supplycomp/construct(obj/structure/machinery/computer/supplycomp/SC)
/obj/item/circuitboard/computer/supplycomp/construct(obj/structure/machinery/computer/supply/asrs/SC)
if (..(SC))
SC.toggle_contraband(contraband_enabled)
SC.lock_black_market(black_market_lock)

/obj/item/circuitboard/computer/supplycomp/disassemble(obj/structure/machinery/computer/supplycomp/SC)
/obj/item/circuitboard/computer/supplycomp/disassemble(obj/structure/machinery/computer/supply/asrs/SC)
if(SC.can_order_contraband)
contraband_enabled = TRUE
if(SC.black_market_lockout)
Expand Down Expand Up @@ -223,16 +223,16 @@

/obj/item/circuitboard/computer/supplycomp/vehicle
name = "Circuit board (vehicle ASRS console)"
build_path = /obj/structure/machinery/computer/supplycomp/vehicle
build_path = /obj/structure/machinery/computer/supply/asrs/vehicle
var/spent = FALSE //so that they can't just reconstruct the console to get another APC
var/tank_unlocked = FALSE

/obj/item/circuitboard/computer/supplycomp/vehicle/construct(obj/structure/machinery/computer/supplycomp/vehicle/SCV)
/obj/item/circuitboard/computer/supplycomp/vehicle/construct(obj/structure/machinery/computer/supply/asrs/vehicle/SCV)
if (..(SCV))
SCV.spent = spent
SCV.tank_unlocked = tank_unlocked

/obj/item/circuitboard/computer/supplycomp/vehicle/disassemble(obj/structure/machinery/computer/supplycomp/vehicle/SCV)
/obj/item/circuitboard/computer/supplycomp/vehicle/disassemble(obj/structure/machinery/computer/supply/asrs/vehicle/SCV)
if (..(SCV))
spent = SCV.spent
tank_unlocked = SCV.tank_unlocked
Expand Down
34 changes: 32 additions & 2 deletions code/game/objects/items/devices/defibrillator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@


/obj/item/device/defibrillator/synthetic
name = "synthetic reset key"
name = "W-Y synthetic reset key"
desc = "Result of collaboration between Hyperdyne and Weyland-Yutani, this device can fix major glitches or programming errors of synthetic units, as well as being able to restart a synthetic that has suffered critical failure. It can only be used once before being reset."
icon = 'icons/obj/items/synth/synth_reset_key.dmi'
icon_state = "reset_key"
Expand All @@ -334,6 +334,8 @@
blocked_by_suit = FALSE
should_spark = FALSE

var/synthetic_type_locked = null

fluff_tool = "electrodes"
fluff_target_part = "insertion port"
fluff_revive_message = "Reset complete"
Expand All @@ -359,6 +361,9 @@
balloon_alert(user, "activate it first!")
to_chat(user, SPAN_WARNING("You need to activate [src] first."))
return FALSE
if(synthetic_type_locked && !istype(H.assigned_equipment_preset, synthetic_type_locked))
to_chat(user, SPAN_WARNING("You can't use [src] on this type of synthetic!"))
return FALSE
if(dcell.charge < charge_cost)
user.visible_message(SPAN_WARNING("[icon2html(src, viewers(src))] \The [src] has already been used! It needs to be recharged."))
return FALSE
Expand All @@ -373,7 +378,32 @@
return TRUE

/obj/item/device/defibrillator/synthetic/noskill
name = "SMART synthetic reset key"
name = "SMART W-Y synthetic reset key"
desc = "Result of collaboration between Hyperdyne and Weyland-Yutani, this device can fix major glitches or programming errors of synthetic units, as well as being able to restart a synthetic that has suffered critical failure. It can only be used once before being reset. This one has a microfunction AI and can be operated by anyone."
icon_state = "reset_key_ns"
noskill = TRUE

/obj/item/device/defibrillator/synthetic/hyperdyne
name = "Hyperdyne synthetic reset key"
desc = "An independant Hyperdyne design, based on a previous collaboration with Weyland-Yutani, this device can fix major glitches or programming errors of synthetic units, as well as being able to restart a synthetic that has suffered critical failure. It can only be used once before being reset."
icon_state = "hyper_reset_key"

/obj/item/device/defibrillator/synthetic/hyperdyne/noskill
name = "SMART Hyperdyne synthetic reset key"
desc = "An independant Hyperdyne design, based on a previous collaboration with Weyland-Yutani, this device can fix major glitches or programming errors of synthetic units, as well as being able to restart a synthetic that has suffered critical failure. It can only be used once before being reset. This one has a microfunction AI and can be operated by anyone."
icon_state = "hyper_reset_ns_key"
noskill = TRUE

/obj/item/device/defibrillator/synthetic/seegson
name = "Seegson Working Joe reboot key"
desc = "Seegson tool required in a repair of Working Joe units that suffered critical failures, reboots unit system to a factory settings. Isn't compatible with sythetics of Hyperdyne, Weyland-Yutani and other designs. It can only be used once before being reset."
icon_state = "seeg_reset_key"
sound_success = 'sound/items/synth_reset_key/seegson_revive.ogg'
synthetic_type_locked = /datum/equipment_preset/synth/working_joe

/obj/item/device/defibrillator/synthetic/makeshift
name = "makeshift synthetic sparker"
desc = "A tool resembling a synthetic reset key, but extremely crude and made from spare parts, only capable of rebooting the system of a synthetic, with a small chance of corrupting that system. It can only be used once before being reset."
icon_state = "makeshift_key"
should_spark = TRUE
sound_success = "sparks"
Loading

0 comments on commit 1f28364

Please sign in to comment.