This commit is contained in:
zerothebigboy
2021-06-13 18:19:01 -04:00
50 changed files with 477 additions and 117 deletions

View File

@@ -96,7 +96,7 @@
var/static/list/blacklisted_error = typecacheof(list(
/obj/structure/closet/crate/secure,
/obj/structure/closet/crate/large,
/obj/structure/closet/secure_closet/goodies
/obj/structure/closet/secure_closet/cargo
))
if(is_type_in_list(container, blacklisted_error))
P.errors &= ~MANIFEST_ERROR_ITEM

View File

@@ -22,8 +22,8 @@
/datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account)
var/obj/structure/closet/crate/C
if(paying_account)
if(ispath(crate_type, /obj/structure/closet/secure_closet/goodies)) // lets ensure private orders don't come in crates when the original one comes in lockers
C = new /obj/structure/closet/secure_closet/goodies/owned(A, paying_account) // that would lead to infinite money exploits
if(ispath(crate_type, /obj/structure/closet/secure_closet/cargo)) // lets ensure private orders don't come in crates when the original one comes in lockers
C = new /obj/structure/closet/secure_closet/cargo/owned(A, paying_account) // that would lead to infinite money exploits
else
C = new /obj/structure/closet/crate/secure/owned(A, paying_account)
C.name = "[crate_name] - Purchased by [paying_account.account_holder]"

View File

@@ -14,56 +14,56 @@
//////////////////////////////////////////////////////////////////////////////
/datum/supply_pack/materials/cardboard50
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "50 Cardboard Sheets"
desc = "Create a bunch of boxes."
cost = 300 //thrice their export value
contains = list(/obj/item/stack/sheet/cardboard/fifty)
/datum/supply_pack/materials/glass50
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "50 Glass Sheets"
desc = "Let some nice light in with fifty glass sheets!"
cost = 300 //double their export value
contains = list(/obj/item/stack/sheet/glass/fifty)
/datum/supply_pack/materials/metal50
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "50 Metal Sheets"
desc = "Any construction project begins with a good stack of fifty metal sheets!"
cost = 300 //double their export value
contains = list(/obj/item/stack/sheet/metal/fifty)
/datum/supply_pack/materials/plasteel20
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "20 Plasteel Sheets"
desc = "Reinforce the station's integrity with twenty plasteel sheets!"
cost = 4000
contains = list(/obj/item/stack/sheet/plasteel/twenty)
/datum/supply_pack/materials/plastic50
crate_type = /obj/structure/closet/secure_closet/goodies
name = "50 Plastic Sheets"
/datum/supply_pack/materials/plastic20
crate_type = /obj/structure/closet/secure_closet/cargo
name = "20 Plastic Sheets"
desc = "Build a limitless amount of toys with fifty plastic sheets!"
cost = 200 // double their export
contains = list(/obj/item/stack/sheet/plastic/twenty)
/datum/supply_pack/materials/sandstone30
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "30 Sandstone Blocks"
desc = "Neither sandy nor stoney, these thirty blocks will still get the job done."
cost = 150 // five times their export
contains = list(/obj/item/stack/sheet/mineral/sandstone/thirty)
/datum/supply_pack/materials/wood20
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "20 Wood Planks"
desc = "Turn cargo's boring metal groundwork into beautiful panelled flooring and much more with twenty wooden planks!"
cost = 400 // 6-7 planks shy from having equal import/export prices
contains = list(/obj/item/stack/sheet/mineral/wood/twenty)
/datum/supply_pack/materials/rcdammo
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "Large RCD ammo Single-Pack"
desc = "A single large compressed RCD matter pack, to help with any holes or projects people might be working on."
cost = 600

View File

@@ -370,7 +370,7 @@
//////////////////////////////////////////////////////////////////////////////
/datum/supply_pack/misc/carpet
crate_type = /obj/structure/closet/secure_closet/goodies
crate_type = /obj/structure/closet/secure_closet/cargo
name = "Classic Carpet Single-Pack"
desc = "Plasteel floor tiles getting on your nerves? This 50 units stack of extra soft carpet will tie any room together."
cost = 200

View File

@@ -56,7 +56,7 @@
desc = "Just looking at it makes you want to buy an SKS, go into the woods, and -operate-."
icon_state = "tactifool"
item_state = "bl_suit"
has_sensor = TRUE
has_sensor = HAS_SENSORS
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0, "wound" = 5)
/obj/item/clothing/under/syndicate/cosmetic/skirt
@@ -64,6 +64,7 @@
icon_state = "tactifool_skirt"
fitted = FEMALE_UNIFORM_TOP
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON
can_adjust = FALSE
/obj/item/clothing/under/syndicate/sniper
name = "Tactical turtleneck suit"

View File

@@ -1,11 +0,0 @@
/datum/round_event_control/meteor_wave/cat
name = "Meteor Wave: CATastrophic"
typepath = /datum/round_event/meteor_wave/cat
weight = 10
max_occurrences = 1
/datum/round_event/meteor_wave/cat
wave_name = "cat"
/datum/round_event/meteor_wave/cat/announce(fake)
priority_announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert", "meteors")

View File

@@ -56,8 +56,6 @@
wave_type = GLOB.meteorsC
if("halloween")
wave_type = GLOB.meteorsSPOOKY
if("cat")
wave_type = GLOB.meteorsCat
else
WARNING("Wave name of [wave_name] not recognised.")
kill()

View File

@@ -213,7 +213,7 @@
)
result = /obj/item/reagent_containers/food/snacks/salad/gumbo
subcategory = CAT_MEAT
/datum/crafting_recipe/food/goliathcalamari
name = "Goliath Calamari"
reqs = list(
@@ -221,4 +221,4 @@
/datum/reagent/consumable/cooking_oil = 10
)
result = /obj/item/reagent_containers/food/snacks/goliathcalamari
subcategory = CAT_MEAT

View File

@@ -58,12 +58,17 @@
var/icon_base = "bee"
var/static/beehometypecache = typecacheof(/obj/structure/beebox)
var/static/hydroponicstypecache = typecacheof(/obj/machinery/hydroponics)
var/held_icon = "" // bees are small and have no held icon (aka the coder doesn't know how to sprite it)
/mob/living/simple_animal/hostile/poison/bees/Initialize()
. = ..()
generate_bee_visuals()
AddComponent(/datum/component/swarming)
/mob/living/simple_animal/hostile/poison/bees/ComponentInitialize()
. = ..()
AddElement(/datum/element/mob_holder, held_icon, escape_on_find = TRUE)
/mob/living/simple_animal/hostile/poison/bees/Destroy()
if(beehome)
beehome.bees -= src

View File

@@ -63,4 +63,4 @@
if(printer_slot)
. += "It has a printer installed."
if(user_is_adjacent)
. += "The printer's paper levels are at: [printer_slot.stored_paper]/[printer_slot.max_paper].</span>]"
. += "The printer's paper levels are at: [printer_slot.stored_paper]/[printer_slot.max_paper].</span>"

View File

@@ -114,6 +114,12 @@
update_icon()
if(user && istype(user))
ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
if("eject_pen")
if(istype(src, /obj/item/modular_computer/tablet))
var/obj/item/modular_computer/tablet/self = src
if(self.can_have_pen)
self.remove_pen()
return
if("PC_killprogram")
var/prog = params["name"]

View File

@@ -18,6 +18,69 @@
var/has_variants = TRUE
var/finish_color = null
//Pen stuff
var/list/contained_item = list(/obj/item/pen, /obj/item/toy/crayon, /obj/item/lipstick, /obj/item/flashlight/pen, /obj/item/clothing/mask/cigarette)
var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above.
var/can_have_pen = TRUE
/obj/item/modular_computer/tablet/examine(mob/user)
. = ..()
if(inserted_item && (!isturf(loc)))
. += "<span class='notice'>Ctrl-click to remove [inserted_item].</span>"
/obj/item/modular_computer/tablet/Initialize()
. = ..()
if(can_have_pen)
if(inserted_item)
inserted_item = new inserted_item(src)
else
inserted_item = new /obj/item/pen(src)
/obj/item/modular_computer/tablet/proc/insert_pen(obj/item/pen)
if(!usr.transferItemToLoc(pen, src))
return
to_chat(usr, "<span class='notice'>You slide \the [pen] into \the [src]'s pen slot.</span>")
inserted_item = pen
playsound(src, 'sound/machines/button.ogg', 50, 1)
/obj/item/modular_computer/tablet/proc/remove_pen()
if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(inserted_item)
usr.put_in_hands(inserted_item)
to_chat(usr, "<span class='notice'>You remove [inserted_item] from \the [src]'s pen slot.</span>")
inserted_item = null
else
to_chat(usr, "<span class='warning'>\The [src] does not have a pen in it!</span>")
/obj/item/modular_computer/tablet/CtrlClick(mob/user)
. = ..()
if(isturf(loc))
return
if(can_have_pen)
remove_pen(user)
/obj/item/modular_computer/tablet/attackby(obj/item/W, mob/user)
if(can_have_pen && is_type_in_list(W, contained_item))
if(inserted_item)
to_chat(user, "<span class='warning'>There is \a [inserted_item] blocking \the [src]'s pen slot!</span>")
return
else
insert_pen(W)
return
. = ..()
/obj/item/modular_computer/tablet/Destroy()
if(istype(inserted_item))
QDEL_NULL(inserted_item)
return ..()
/obj/item/modular_computer/tablet/ui_data(mob/user)
. = ..()
.["PC_showpeneject"] = inserted_item ? 1 : 0
/obj/item/modular_computer/tablet/update_icon_state()
if(has_variants)
if(!finish_color)
@@ -64,6 +127,7 @@
var/datum/computer_file/program/robotact/robotact
///IC log that borgs can view in their personal management app
var/list/borglog = list()
can_have_pen = FALSE
/obj/item/modular_computer/tablet/integrated/Initialize(mapload)
. = ..()

View File

@@ -126,7 +126,8 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
var/value = 0
var/purchases = 0
var/list/goodies_by_buyer = list() // if someone orders more than GOODY_FREE_SHIPPING_MAX goodies, we upcharge to a normal crate so they can't carry around 20 combat shotties
// var/list/lockers_by_buyer = list() // TODO, combine orders that come in lockers into a single locker to not crowd the shuttle
var/list/lockers_by_buyer = list() // used to combine orders that come in lockers into a single locker to not crowd the shuttle
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
if(!empty_turfs.len)
break
@@ -147,11 +148,15 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
D.bank_card_talk("Goody order size exceeds free shipping limit: Assessing [CRATE_TAX] credit S&H fee.")
else
D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
if(!D.adjust_money(-price))
if(SO.paying_account)
D.bank_card_talk("Cargo order #[SO.id] rejected due to lack of funds. Credits required: [price]")
continue
else if(ispath(SO.pack.crate_type, /obj/structure/closet/secure_closet/cargo))
LAZYADD(lockers_by_buyer[D], SO)
if(SO.paying_account)
if(SO.pack.goody)
@@ -164,7 +169,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
SSshuttle.orderhistory += SO
QDEL_NULL(SO.applied_coupon)
if(!SO.pack.goody) //we handle goody crates below
if(!SO.pack.goody && !ispath(SO.pack.crate_type, /obj/structure/closet/secure_closet/cargo)) //we handle goody crates and material closets below
SO.generate(pick_n_take(empty_turfs))
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
@@ -198,6 +203,33 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
misc_contents[buyer] += item
misc_order_num[buyer] = "[misc_order_num[buyer]]#[our_order.id] "
// handling locker bundles
for(var/D in lockers_by_buyer)
var/list/buying_account_orders = lockers_by_buyer[D]
var/buyer
if(!istype(D, /datum/bank_account/department)) // department accounts break the secure closet for some reason
var/obj/structure/closet/secure_closet/cargo/owned/our_closet = new /obj/structure/closet/secure_closet/cargo/owned(pick_n_take(empty_turfs))
var/datum/bank_account/buying_account = D
buyer = buying_account.account_holder
our_closet.buyer_account = buying_account
our_closet.name = "private cargo locker - purchased by [buyer]"
miscboxes[buyer] = our_closet
else
var/obj/structure/closet/secure_closet/cargo/our_closet = new /obj/structure/closet/secure_closet/cargo(pick_n_take(empty_turfs))
buyer = "Cargo"
miscboxes[buyer] = our_closet
misc_contents[buyer] = list()
for(var/O in buying_account_orders)
var/datum/supply_order/our_order = O
for(var/item in our_order.pack.contains)
misc_contents[buyer] += item
misc_order_num[buyer] = "[misc_order_num[buyer]]#[our_order.id] "
for(var/I in miscboxes)
var/datum/supply_order/SO = new/datum/supply_order()
SO.id = misc_order_num[I]

View File

@@ -0,0 +1,7 @@
/datum/unit_test/crafting_recipes/Run()
for(var/i in GLOB.crafting_recipes)
var/datum/crafting_recipe/R = i
if(!R.subcategory)
Fail("Invalid subcategory on [R] ([R.type]).")
if(!R.category && (R.cateogry != CAT_NONE))
Fail("Invalid category on [R] ([R.type])")