Porting Goofconomy & co.

This commit is contained in:
Ghommie
2020-04-17 07:48:11 +02:00
parent 19328b8710
commit 4c6f1b622b
190 changed files with 2213 additions and 353 deletions
+12
View File
@@ -63,6 +63,7 @@
<A href='?src=[REF(src)];[HrefToken()];secrets=delayed_onlyone'>There can only be one! (40-second delay)</A><BR>
<A href='?src=[REF(src)];[HrefToken()];secrets=stupify'>Make all players stupid</A><BR>
<A href='?src=[REF(src)];[HrefToken()];secrets=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=[REF(src)];[HrefToken()];secrets=ancap'>Anarcho-Capitalist Station Mode</A><BR>
<A href='?src=[REF(src)];[HrefToken()];secrets=blackout'>Break all lights</A><BR>
<A href='?src=[REF(src)];[HrefToken()];secrets=whiteout'>Fix all lights</A><BR>
<A href='?src=[REF(src)];[HrefToken()];secrets=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
@@ -478,6 +479,17 @@
usr.client.ak47s()
sound_to_playing_players('sound/misc/ak47s.ogg')
if("ancap")
if(!check_rights(R_FUN))
return
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Anarcho-capitalist Station"))
SSeconomy.full_ancap = !SSeconomy.full_ancap
message_admins("[key_name_admin(usr)] toggled Anarcho-capitalist mode")
if(SSeconomy.full_ancap)
priority_announce("The NAP is now in full effect.", null, "commandreport")
else
priority_announce("The NAP has been revoked.", null, "commandreport")
if("guns")
if(!check_rights(R_FUN))
return
@@ -8,6 +8,13 @@
var/mach = 0
/datum/station_state/proc/count()
floor = 0
wall = 0
r_wall = 0
window = 0
door = 0
grille = 0
mach = 0
for(var/Z in SSmapping.levels_by_trait(ZTRAIT_STATION))
for(var/turf/T in block(locate(1,1,Z), locate(world.maxx,world.maxy,Z)))
// don't count shuttles since they may have just left
@@ -48,6 +55,10 @@
else if(ismachinery(O))
mach += 1
CHECK_TICK
CHECK_TICK
CHECK_TICK
/datum/station_state/proc/score(datum/station_state/result)
if(!result)
return 0
@@ -78,14 +78,28 @@
var/mob/living/carbon/human/target = M // After we remove items, at least give them what they need to live.
target.dna.species.give_important_for_life(target)
handleVictimExperience(M) // After pod is sent we start the victim narrative/heal.
var/points_to_check = SSshuttle.points // This is slightly delayed because of the sleep calls above to handle the narrative. We don't want to tell the station instantly.
if(points_to_check >= ransom)
SSshuttle.points -= ransom
else
SSshuttle.points -= points_to_check
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
var/points_to_check = min(D.account_balance, ransom)
D.adjust_money(min(points_to_check, ransom))
priority_announce("One of your crew was captured by a rival organisation - we've needed to pay their ransom to bring them back. \
As is policy we've taken a portion of the station's funds to offset the overall cost.", null, "attention", null, "Nanotrasen Asset Protection")
sleep(30)
// Pay contractor their portion of ransom
if (status == CONTRACT_STATUS_COMPLETE)
var/mob/living/carbon/human/H
var/obj/item/card/id/C
if(ishuman(contract.owner.current))
H = contract.owner.current
C = H.get_idcard(TRUE)
if(C && C.registered_account)
C.registered_account.adjust_money(points_to_check * 0.35)
C.registered_account.bank_card_talk("We've processed the ransom, agent. Here's your cut - your balance is now \
[C.registered_account.account_balance] cr.", TRUE)
/datum/syndicate_contract/proc/handleVictimExperience(var/mob/living/M) // They're off to holding - handle the return timer and give some text about what's going on.
addtimer(CALLBACK(src, .proc/returnVictim, M), 4 MINUTES) // Ship 'em back - dead or alive... 4 minutes wait.
if(M.stat != DEAD) //Even if they weren't the target, we're still treating them the same.
@@ -36,6 +36,7 @@
/obj/item/electronics/airalarm
name = "air alarm electronics"
icon_state = "airalarm_electronics"
custom_price = 50
/obj/item/wallframe/airalarm
name = "air alarm frame"
@@ -33,6 +33,9 @@
var/message_cooldown
var/breakout_time = 300
fair_market_price = 10
payment_department = ACCOUNT_MED
/obj/machinery/atmospherics/components/unary/cryo_cell/Initialize()
. = ..()
initialize_directions = dir
@@ -149,6 +152,9 @@
add_overlay("cover-on")
addtimer(CALLBACK(src, .proc/run_anim, anim_up, occupant_overlay), 7, TIMER_UNIQUE)
/obj/machinery/atmospherics/components/unary/cryo_cell/nap_violation(mob/violator)
open_machine()
/obj/machinery/atmospherics/components/unary/cryo_cell/process()
..()
@@ -162,7 +168,8 @@
return
var/mob/living/mob_occupant = occupant
if(!check_nap_violations())
return
if(mob_occupant.stat == DEAD) // We don't bother with dead people.
return
+6 -1
View File
@@ -1,5 +1,7 @@
// How much "space" we give the edge of the map
GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "[global.config.directory]/awaymissionconfig.txt"))
// So far only adds an additional trait to vr levels. But I'll probably use make VR separate from away missions in a near future.
GLOBAL_LIST_INIT(potentialRandomVRlevels, generateMapList(filename = "[global.config.directory]/vr_config.txt"))
/proc/createRandomZlevel()
if(GLOB.awaydestinations.len) //crude, but it saves another var!
@@ -8,7 +10,10 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "[global.con
if(GLOB.potentialRandomZlevels && GLOB.potentialRandomZlevels.len)
to_chat(world, "<span class='boldannounce'>Loading away mission...</span>")
var/map = pick(GLOB.potentialRandomZlevels)
load_new_z_level(map, "Away Mission")
var/list/traits = list(ZTRAIT_AWAY = TRUE)
if(map in GLOB.potentialRandomVRlevels)
traits[ZTRAIT_VIRTUAL_REALITY] = TRUE
load_new_z_level(map, "Away Mission", traits)
to_chat(world, "<span class='boldannounce'>Away mission loaded.</span>")
/proc/reset_gateway_spawns(reset = FALSE)
+1 -1
View File
@@ -55,7 +55,7 @@
/datum/bounty/item/science/advanced_mop
name = "Advanced Mop"
description = "Excuse me. I'd like to request 17 credits for a push broom rebristling. Either that, or an advanced mop."
description = "Excuse me. I'd like to request 17 cr for a push broom rebristling. Either that, or an advanced mop."
reward = 3000
wanted_types = list(/obj/item/mop/advanced)
+13 -11
View File
@@ -21,7 +21,9 @@ GLOBAL_LIST_EMPTY(bounties_list)
// Called when the claim button is clicked. Override to provide fancy rewards.
/datum/bounty/proc/claim()
if(can_claim())
SSshuttle.points += reward
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
D.adjust_money(reward)
claimed = TRUE
// If an item sent in the cargo shuttle can satisfy the bounty.
@@ -126,11 +128,11 @@ GLOBAL_LIST_EMPTY(bounties_list)
/proc/setup_bounties()
var/pick // instead of creating it a bunch let's go ahead and toss it here, we know we're going to use it for dynamics and subtypes!
/********************************Subtype Gens********************************/
var/list/easy_add_list_subtypes = list(/datum/bounty/item/assistant = 2,
/datum/bounty/item/mech = 1,
/datum/bounty/item/chef = 2,
/datum/bounty/item/mech = 1,
/datum/bounty/item/chef = 2,
/datum/bounty/item/security = 1,
/datum/bounty/virus = 1,
/datum/bounty/item/engineering = 1,
@@ -139,30 +141,30 @@ GLOBAL_LIST_EMPTY(bounties_list)
/datum/bounty/item/botany = 2,
/datum/bounty/item/silly = 1,
/datum/bounty/item/gardencook = 1)
for(var/the_type in easy_add_list_subtypes)
for(var/i in 1 to easy_add_list_subtypes[the_type])
pick = pick(subtypesof(the_type))
try_add_bounty(new pick)
/********************************Strict Type Gens********************************/
var/list/easy_add_list_strict_types = list(/datum/bounty/reagent/simple_drink = 1,
/datum/bounty/reagent/complex_drink = 1,
/datum/bounty/reagent/chemical = 1)
for(var/the_strict_type in easy_add_list_strict_types)
for(var/i in 1 to easy_add_list_strict_types[the_strict_type])
try_add_bounty(new the_strict_type)
/********************************Dynamic Gens********************************/
for(var/i in 0 to 1)
if(prob(50))
pick = pick(subtypesof(/datum/bounty/item/slime))
else
pick = pick(subtypesof(/datum/bounty/item/science))
try_add_bounty(new pick)
/********************************Cutoff for Non-Low Priority Bounties********************************/
var/datum/bounty/B = pick(GLOB.bounties_list)
B.mark_high_priority()
@@ -172,7 +174,7 @@ GLOBAL_LIST_EMPTY(bounties_list)
/datum/bounty/item/syndicate_documents,
/datum/bounty/item/adamantine,
/datum/bounty/more_bounties)
for(var/low_priority_bounty in low_priority_strict_type_list)
try_add_bounty(new low_priority_bounty)
+2 -2
View File
@@ -35,10 +35,10 @@
if(!GLOB.bounties_list.len)
setup_bounties()
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
var/list/dat = list({"<a href='?src=[REF(src)];refresh=1'>Refresh</a>
<a href='?src=[REF(src)];refresh=1;choice=Print'>Print Paper</a>
<p>Credits: <b>[SSshuttle.points]</b></p>
<p>Credits: <b>[D.account_balance]</b></p>
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
<tr><th>Name</th><th>Description</th><th>Reward</th><th>Completion</th><th>Status</th></tr>"})
for(var/datum/bounty/B in GLOB.bounties_list)
+23 -4
View File
@@ -74,9 +74,12 @@
/obj/machinery/computer/cargo/ui_data()
var/list/data = list()
data["location"] = SSshuttle.supply.getStatusText()
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
data["points"] = D.account_balance
data["away"] = SSshuttle.supply.getDockedId() == "supply_away"
data["self_paid"] = self_paid
data["docked"] = SSshuttle.supply.mode == SHUTTLE_IDLE
data["points"] = SSshuttle.points
data["loan"] = !!SSshuttle.shuttle_loan
data["loan_dispatched"] = SSshuttle.shuttle_loan && SSshuttle.shuttle_loan.dispatched
var/message = "Remember to stamp and send back the supply manifests."
@@ -92,6 +95,7 @@
"cost" = SO.pack.cost,
"id" = SO.id,
"orderer" = SO.orderer,
"paid" = !isnull(SO.paying_account) //paid by requester
))
data["requests"] = list()
@@ -165,6 +169,7 @@
. = TRUE
if("add")
var/id = text2path(params["id"])
var/self_paid = text2num(params["self_paid"])
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
if(!istype(pack))
return
@@ -182,19 +187,33 @@
name = usr.real_name
rank = "Silicon"
var/datum/bank_account/account
if(self_paid && ishuman(usr))
var/mob/living/carbon/human/H = usr
var/obj/item/card/id/id_card = H.get_idcard(TRUE)
if(!istype(id_card))
say("No ID card detected.")
return
account = id_card.registered_account
if(!istype(account))
say("Invalid bank account.")
return
var/reason = ""
if(requestonly)
if(requestonly && !self_paid)
reason = stripped_input("Reason:", name, "")
if(isnull(reason) || ..())
return
var/turf/T = get_turf(src)
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason, account)
SO.generateRequisition(T)
if(requestonly)
if(requestonly && !self_paid)
SSshuttle.requestlist += SO
else
SSshuttle.shoppinglist += SO
if(self_paid)
say("Order processed. The price will be charged to [account.account_holder]'s bank account on delivery.")
. = TRUE
if("remove")
var/id = text2num(params["id"])
+1
View File
@@ -26,6 +26,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
var/list/total_value = list() //export instance => total value of sold objects
var/list/reagents_volume = list()//export reagents => into the total volume of the object sold
var/list/reagents_value = list()//export reagents => into the reagent type total value.
var/list/exported_atoms_ref = list() //if they're not deleted they go in here for use.
// external_report works as "transaction" object, pass same one in if you're doing more than one export in single go
/proc/export_item_and_contents(atom/movable/AM, allowed_categories = EXPORT_CARGO, apply_elastic = TRUE, delete_unsold = TRUE, dry_run=FALSE, datum/export_report/external_report)
+21 -14
View File
@@ -96,17 +96,19 @@
/obj/machinery/computer/cargo/express/ui_data(mob/user)
var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location?
var/list/data = list()
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
data["points"] = D.account_balance
data["locked"] = locked//swipe an ID to unlock
data["siliconUser"] = hasSiliconAccessInArea(user)
data["beaconzone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui
data["usingBeacon"] = usingBeacon //is the mode set to deliver to the beacon or the cargobay?
data["canBeacon"] = !usingBeacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location?
data["canBuyBeacon"] = cooldown <= 0 && SSshuttle.points >= BEACON_COST
data["canBuyBeacon"] = cooldown <= 0 && D.account_balance >= BEACON_COST
data["beaconError"] = usingBeacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary
data["hasBeacon"] = beacon != null//is there a linked beacon?
data["beaconName"] = beacon ? beacon.name : "No Beacon Found"
data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons
data["points"] = SSshuttle.points
data["supplies"] = list()
message = "Sales are near-instantaneous - please choose carefully."
if(SSshuttle.supplyBlocked)
@@ -137,13 +139,14 @@
if (beacon)
beacon.update_status(SP_READY) //turns on the beacon's ready light
if("printBeacon")
if (SSshuttle.points >= BEACON_COST)
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
beacon.name = "Supply Pod Beacon #[printed_beacons]"
SSshuttle.points -= BEACON_COST
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
if(D.adjust_money(-BEACON_COST))
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
beacon.name = "Supply Pod Beacon #[printed_beacons]"
if("add")//Generate Supply Order first
var/id = text2path(params["id"])
@@ -163,8 +166,12 @@
var/reason = ""
var/list/empty_turfs
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
var/points_to_check
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
points_to_check = D.account_balance
if(!(obj_flags & EMAGGED))
if(SO.pack.cost <= SSshuttle.points)
if(SO.pack.cost <= points_to_check)
var/LZ
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
LZ = get_turf(beacon)
@@ -181,14 +188,14 @@
CHECK_TICK
if(empty_turfs && empty_turfs.len)
LZ = pick(empty_turfs)
if (SO.pack.cost <= SSshuttle.points && LZ)//we need to call the cost check again because of the CHECK_TICK call
SSshuttle.points -= SO.pack.cost
if (SO.pack.cost <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
D.adjust_money(-SO.pack.cost)
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
. = TRUE
update_icon()
else
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= SSshuttle.points) // bulk discount :^)
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= points_to_check) // bulk discount :^)
landingzone = GLOB.areas_by_type[pick(GLOB.the_station_areas)] //override default landing zone
for(var/turf/open/floor/T in landingzone.contents)
if(is_blocked_turf(T))
@@ -196,7 +203,7 @@
LAZYADD(empty_turfs, T)
CHECK_TICK
if(empty_turfs && empty_turfs.len)
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
D.adjust_money(-(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)))
SSblackbox.record_feedback("nested tally", "cargo_imports", MAX_EMAG_ROCKETS, list("[SO.pack.cost * 0.72]", "[SO.pack.name]"))
SO.generateRequisition(get_turf(src))
for(var/i in 1 to MAX_EMAG_ROCKETS)
+9 -2
View File
@@ -28,14 +28,16 @@
var/orderer_ckey
var/reason
var/datum/supply_pack/pack
var/datum/bank_account/paying_account
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason)
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason, paying_account)
id = SSshuttle.ordernum++
src.pack = pack
src.orderer = orderer
src.orderer_rank = orderer_rank
src.orderer_ckey = orderer_ckey
src.reason = reason
src.paying_account = paying_account
/datum/supply_order/proc/generateRequisition(turf/T)
var/obj/item/paper/P = new(T)
@@ -47,6 +49,8 @@
P.info += "Item: [pack.name]<br/>"
P.info += "Access Restrictions: [get_access_desc(pack.access)]<br/>"
P.info += "Requested by: [orderer]<br/>"
if(paying_account)
P.info += "Paid by: [paying_account.account_holder]<br/>"
P.info += "Rank: [orderer_rank]<br/>"
P.info += "Comment: [reason]<br/>"
@@ -61,6 +65,9 @@
P.name = "shipping manifest - #[id] ([pack.name])"
P.info += "<h2>[command_name()] Shipping Manifest</h2>"
P.info += "<hr/>"
if(paying_account)
P.info += "Direct purchase from [paying_account.account_holder]<br/>"
P.name += " - Purchased by [paying_account.account_holder]"
P.info += "Order #[id]<br/>"
P.info += "Destination: [station_name]<br/>"
P.info += "Item: [pack.name]<br/>"
@@ -84,7 +91,7 @@
return P
/datum/supply_order/proc/generate(atom/A)
var/obj/structure/closet/crate/C = pack.generate(A)
var/obj/structure/closet/crate/C = pack.generate(A, paying_account)
var/obj/item/paper/fluff/jobs/cargo/manifest/M = generateManifest(C)
if(M.errors & MANIFEST_ERROR_ITEM)
+8 -4
View File
@@ -16,16 +16,20 @@
var/DropPodOnly = FALSE //only usable by the Bluespace Drop Pod via the express cargo console
var/admin_spawned = FALSE //Can only an admin spawn this crate?
/datum/supply_pack/proc/generate(atom/A)
var/obj/structure/closet/crate/C = new crate_type(A)
C.name = crate_name
/datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account)
var/obj/structure/closet/crate/C
if(paying_account)
C = new /obj/structure/closet/crate/secure/owned(A, paying_account)
C.name = "[crate_name] - Purchased by [paying_account.account_holder]"
else
C = new crate_type(A)
C.name = crate_name
if(access)
C.req_access = list(access)
if(access_any)
C.req_one_access = access_any
fill(C)
return C
/datum/supply_pack/proc/fill(obj/structure/closet/crate/C)
+5
View File
@@ -900,7 +900,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Ghosts of Others:</b> <a href='?_src_=prefs;task=input;preference=ghostothers'>[button_name]</a><br>"
dat += "<br>"
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
dat += "<b>Income Updates:</b> <a href='?_src_=prefs;preference=income_pings'>[(chat_toggles & CHAT_BANKCARD) ? "Allowed" : "Muted"]</a><br>"
dat += "<br>"
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallaxdown' oncontextmenu='window.location.href=\"?_src_=prefs;preference=parallaxup\";return false;'>"
switch (parallax)
if (PARALLAX_LOW)
@@ -250,6 +250,16 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings, listen_ooc)()
/datum/verbs/menu/Settings/listen_ooc/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_OOC
TOGGLE_CHECKBOX(/datum/verbs/menu/Settings, listen_bank_card)()
set name = "Show/Hide Income Updates"
set category = "Preferences"
set desc = "Show or hide updates to your income"
usr.client.prefs.chat_toggles ^= CHAT_BANKCARD
usr.client.prefs.save_preferences()
to_chat(usr, "You will [(usr.client.prefs.chat_toggles & CHAT_BANKCARD) ? "now" : "no longer"] be notified when you get paid.")
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Income Notifications", "[(usr.client.prefs.chat_toggles & CHAT_BANKCARD) ? "Enabled" : "Disabled"]"))
/datum/verbs/menu/Settings/listen_bank_card/Get_checked(client/C)
return C.prefs.chat_toggles & CHAT_BANKCARD
GLOBAL_LIST_INIT(ghost_forms, list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
"ghost_blue","ghost_yellow","ghost_green","ghost_pink", \
+2
View File
@@ -6,6 +6,7 @@
throwforce = 0
slot_flags = ITEM_SLOT_EARS
resistance_flags = NONE
custom_price = 250
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
@@ -30,6 +31,7 @@
slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD | ITEM_SLOT_NECK //Fluff item, put it whereever you want!
actions_types = list(/datum/action/item_action/toggle_headphones)
var/headphones_on = FALSE
custom_price = 125
/obj/item/clothing/ears/headphones/Initialize()
. = ..()
+2
View File
@@ -10,6 +10,8 @@
permeability_coefficient = 0.05
resistance_flags = NONE
var/can_be_cut = 1
custom_price = 1200
custom_premium_price = 1200
/obj/item/clothing/gloves/color/fyellow //Cheap Chinese Crap
desc = "These gloves are cheap knockoffs of the coveted ones - no way this can end badly."
@@ -10,6 +10,7 @@
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
strip_mod = 0.9
custom_price = 75
/obj/item/clothing/gloves/fingerless/pugilist
name = "armwraps"
+1
View File
@@ -5,6 +5,7 @@
name = "white beanie"
desc = "A stylish beanie. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their heads."
icon_state = "beanie" //Default white
custom_price = 60
/obj/item/clothing/head/beanie/black
name = "black beanie"
+1
View File
@@ -58,6 +58,7 @@
desc = "A reliable, blue tinted helmet reminding you that you <i>still</i> owe that engineer a beer."
icon_state = "blueshift"
item_state = "blueshift"
custom_premium_price = 750
/obj/item/clothing/head/helmet/riot
name = "riot helmet"
+1
View File
@@ -129,6 +129,7 @@
dog_fashion = /datum/dog_fashion/head/pirate
/obj/item/clothing/head/pirate/captain
name = "pirate captain hat"
icon_state = "hgpiratecap"
item_state = "hgpiratecap"
+36
View File
@@ -22,6 +22,7 @@
icon_state = "bluetie"
item_state = "" //no inhands
w_class = WEIGHT_CLASS_SMALL
custom_price = 60
/obj/item/clothing/neck/tie/blue
name = "blue tie"
@@ -87,6 +88,7 @@
/obj/item/clothing/neck/scarf //Default white color, same functionality as beanies.
name = "white scarf"
icon_state = "scarf"
custom_price = 60
desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
dog_fashion = /datum/dog_fashion/head
@@ -251,6 +253,40 @@
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bling"
/obj/item/clothing/neck/necklace/dope/merchant
desc = "Don't ask how it works, the proof is in the holochips!"
/// scales the amount received in case an admin wants to emulate taxes/fees.
var/profit_scaling = 1
/// toggles between sell (TRUE) and get price post-fees (FALSE)
var/selling = FALSE
/obj/item/clothing/neck/necklace/dope/merchant/attack_self(mob/user)
. = ..()
selling = !selling
to_chat(user, "<span class='notice'>[src] has been set to [selling ? "'Sell'" : "'Get Price'"] mode.</span>")
/obj/item/clothing/neck/necklace/dope/merchant/afterattack(obj/item/I, mob/user, proximity)
. = ..()
if(!proximity)
return
var/datum/export_report/ex = export_item_and_contents(I, allowed_categories = (ALL), dry_run=TRUE)
var/price = 0
for(var/x in ex.total_amount)
price += ex.total_value[x]
if(price)
var/true_price = round(price*profit_scaling)
to_chat(user, "<span class='notice'>[selling ? "Sold" : "Getting the price of"] [I], value: <b>[true_price]</b> credits[I.contents.len ? " (exportable contents included)" : ""].[profit_scaling < 1 && selling ? "<b>[round(price-true_price)]</b> credit\s taken as processing fee\s." : ""]</span>")
if(selling)
new /obj/item/holochip(get_turf(user),true_price)
for(var/i in ex.exported_atoms_ref)
var/atom/movable/AM = i
if(QDELETED(AM))
continue
qdel(AM)
else
to_chat(user, "<span class='warning'>There is no export value for [I] or any items within it.</span>")
//////////////////////////////////
//VERY SUPER BADASS NECKERCHIEFS//
//////////////////////////////////
+11 -4
View File
@@ -3,15 +3,21 @@
uniform = /obj/item/clothing/under/color/random
shoes = /obj/item/clothing/shoes/sneakers/black
ears = /obj/item/radio/headset
id = /obj/item/card/id
id = /obj/item/card/id/locked_banking
var/starting_funds = 350
/datum/outfit/vr/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
H.dna.species.before_equip_job(null, H)
/datum/outfit/vr/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
var/obj/item/card/id/id = H.wear_id
if (istype(id))
id.access |= get_all_accesses()
if(!istype(id))
return
id.access |= get_all_accesses()
if(id.registered_account)
id.registered_account.account_holder = "[H.real_name] (VR)"
if(starting_funds && id.bank_support == ID_LOCKED_BANK_ACCOUNT) //No payroll or ability to virtually transfer funds to an external account.
id.registered_account.adjust_money(starting_funds)
/datum/outfit/vr/syndicate
name = "Syndicate VR Operative - Basic"
@@ -19,11 +25,12 @@
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
back = /obj/item/storage/backpack
id = /obj/item/card/id/syndicate
id = /obj/item/card/id/syndicate/locked_banking
belt = /obj/item/gun/ballistic/automatic/pistol
l_pocket = /obj/item/paper/fluff/vr/fluke_ops
backpack_contents = list(/obj/item/storage/box/syndie=1,\
/obj/item/kitchen/knife/combat/survival)
starting_funds = 0 //Should be operating, not shopping.
/datum/outfit/vr/syndicate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
. = ..()
+1
View File
@@ -1,5 +1,6 @@
/obj/item/clothing/shoes/sneakers
dying_key = DYE_REGISTRY_SNEAKERS
custom_price = 50
/obj/item/clothing/shoes/sneakers/black
name = "black shoes"
@@ -71,6 +71,7 @@
equip_delay_other = 50
resistance_flags = NONE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 75)
custom_price = 600
/obj/item/clothing/shoes/galoshes/dry
name = "absorbent galoshes"
@@ -371,6 +372,7 @@
/obj/item/clothing/shoes/cowboyboots
name = "cowboy boots"
desc = "A standard pair of brown cowboy boots."
custom_price = 60 //remember to replace these lame cosmetics with tg's YEEEEHAW counterparts.
icon_state = "cowboyboots"
/obj/item/clothing/shoes/cowboyboots/black
+1
View File
@@ -47,6 +47,7 @@
desc = "A large, yet comfortable piece of armor, protecting you from some threats."
icon_state = "blueshift"
item_state = "blueshift"
custom_premium_price = 750
/obj/item/clothing/suit/armor/hos
name = "armored greatcoat"
@@ -86,6 +86,7 @@
icon_state = "overalls"
item_state = "lb_suit"
can_adjust = FALSE
custom_price = 60
/obj/item/clothing/under/misc/assistantformal
name = "assistant's formal uniform"
+2
View File
@@ -3,6 +3,7 @@
body_parts_covered = GROIN|LEGS
fitted = NO_FEMALE_UNIFORM
can_adjust = FALSE
custom_price = 60
/obj/item/clothing/under/pants/classicjeans
name = "classic jeans"
@@ -13,6 +14,7 @@
name = "Must Hang jeans"
desc = "Made in the finest space jeans factory this side of Alpha Centauri."
icon_state = "jeansmustang"
custom_price = 180
/obj/item/clothing/under/pants/blackjeans
name = "black jeans"
@@ -15,6 +15,7 @@
body_parts_covered = CHEST|GROIN|ARMS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
custom_price = 60
/obj/item/clothing/under/dress/skirt/red
name = "red skirt"
@@ -24,6 +25,7 @@
body_parts_covered = CHEST|GROIN|ARMS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
custom_price = 60
/obj/item/clothing/under/dress/skirt/purple
name = "purple skirt"
@@ -33,6 +35,7 @@
body_parts_covered = CHEST|GROIN|ARMS
fitted = FEMALE_UNIFORM_TOP
can_adjust = FALSE
custom_price = 60
/obj/item/clothing/under/dress/sundress
name = "sundress"
@@ -146,6 +149,7 @@
fitted = FEMALE_UNIFORM_TOP
can_adjust = TRUE
alt_covers_chest = TRUE
custom_price = 60
/obj/item/clothing/under/dress/skirt/plaid/blue
name = "blue plaid skirt"
+2
View File
@@ -0,0 +1,2 @@
/obj/item/proc/get_item_credit_value()
return
+118
View File
@@ -0,0 +1,118 @@
#define DUMPTIME 3000
/datum/bank_account
var/account_holder = "Rusty Venture"
var/account_balance = 0
var/datum/job/account_job
var/list/bank_cards = list()
var/add_to_accounts = TRUE
var/transferable = TRUE
var/account_id
var/being_dumped = FALSE //pink levels are rising
var/withdrawDelay = 0
/datum/bank_account/New(newname, job)
if(add_to_accounts)
SSeconomy.bank_accounts += src
account_holder = newname
account_job = job
account_id = rand(111111,999999)
/datum/bank_account/Destroy()
if(add_to_accounts)
SSeconomy.bank_accounts -= src
return ..()
/datum/bank_account/proc/dumpeet()
being_dumped = TRUE
withdrawDelay = world.time + DUMPTIME
/datum/bank_account/proc/_adjust_money(amt)
account_balance += amt
if(account_balance < 0)
account_balance = 0
/datum/bank_account/proc/has_money(amt)
return account_balance >= amt
/datum/bank_account/proc/adjust_money(amt)
if((amt < 0 && has_money(-amt)) || amt > 0)
_adjust_money(amt)
return TRUE
return FALSE
/datum/bank_account/proc/transfer_money(datum/bank_account/from, amount)
if(!transferable || !from.has_money(amount))
return FALSE
adjust_money(amount)
from.adjust_money(-amount)
return TRUE
/datum/bank_account/proc/payday(amt_of_paychecks, free = FALSE)
var/money_to_transfer = account_job.paycheck * amt_of_paychecks
if(free)
adjust_money(money_to_transfer)
else
var/datum/bank_account/D = SSeconomy.get_dep_account(account_job.paycheck_department)
if(D)
if(!transfer_money(D, money_to_transfer))
bank_card_talk("ERROR: Payday aborted, departmental funds insufficient.")
return FALSE
else
bank_card_talk("Payday processed, account now holds [account_balance] cr.")
return TRUE
bank_card_talk("ERROR: Payday aborted, unable to contact departmental account.")
return FALSE
/datum/bank_account/proc/bank_card_talk(message, force)
if(!message || !bank_cards.len)
return
for(var/obj/A in bank_cards)
var/icon_source = A
/*
if(istype(A, /obj/item/card/id))
var/obj/item/card/id/id_card = A
if(id_card.uses_overlays)
icon_source = id_card.get_cached_flat_icon()
*/
var/mob/card_holder = recursive_loc_check(A, /mob)
if(ismob(card_holder)) //If on a mob
if(card_holder.client && !(card_holder.client.prefs.chat_toggles & CHAT_BANKCARD) && !force)
return
card_holder.playsound_local(get_turf(card_holder), 'sound/machines/twobeep.ogg', 50, TRUE)
if(card_holder.can_hear())
to_chat(card_holder, "[icon2html(icon_source, card_holder)] <span class='notice'>[message]</span>")
else if(isturf(A.loc)) //If on the ground
for(var/mob/M in hearers(1,get_turf(A)))
if(M.client && !(M.client.prefs.chat_toggles & CHAT_BANKCARD) && !force)
return
playsound(A, 'sound/machines/twobeep.ogg', 50, TRUE)
A.audible_message("[icon2html(icon_source, hearers(A))] <span class='notice'>[message]</span>", null, 1)
break
else
for(var/mob/M in A.loc) //If inside a container with other mobs (e.g. locker)
if(M.client && !(M.client.prefs.chat_toggles & CHAT_BANKCARD) && !force)
return
M.playsound_local(get_turf(M), 'sound/machines/twobeep.ogg', 50, TRUE)
if(M.can_hear())
to_chat(M, "[icon2html(icon_source, M)] <span class='notice'>[message]</span>")
/datum/bank_account/department
account_holder = "Guild Credit Agency"
var/department_id = "REPLACE_ME"
add_to_accounts = FALSE
/datum/bank_account/department/New(dep_id, budget)
department_id = dep_id
account_balance = budget
account_holder = SSeconomy.department_accounts[dep_id]
SSeconomy.generated_accounts += src
/datum/bank_account/remote // Bank account not belonging to the local station
add_to_accounts = FALSE
/datum/bank_account/remote/non_transferable
transferable = FALSE
#undef DUMPTIME
+138
View File
@@ -0,0 +1,138 @@
/obj/machinery/paystand
name = "unregistered pay stand"
desc = "See title."
icon = 'icons/obj/economy.dmi'
icon_state = "card_scanner"
density = TRUE
anchored = TRUE
var/locked = FALSE
var/obj/item/card/id/my_card
var/obj/item/assembly/signaler/signaler //attached signaler, let people attach signalers that get activated if the user's transaction limit is achieved.
var/signaler_threshold = 0 //signaler threshold amount
var/amount_deposited = 0 //keep track of the amount deposited over time so you can pay multiple times to reach the signaler threshold
var/force_fee = 0 //replaces the "pay whatever" functionality with a set amount when non-zero.
/obj/machinery/paystand/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/card/id))
if(W == my_card)
if(user.a_intent == INTENT_DISARM)
var/rename_msg = stripped_input(user, "Rename the Paystand:", "Paystand Naming", name)
if(!rename_msg || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
name = rename_msg
return
else if(user.a_intent == INTENT_GRAB)
var/force_fee_input = input(user,"Set the fee!","Set a fee!",0) as num|null
if(isnull(force_fee_input) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
force_fee = force_fee_input
return
locked = !locked
to_chat(user, "<span class='notice'>You [src.locked ? "lock" : "unlock"] the paystand, protecting the bolts from [anchored ? "loosening" : "tightening"].</span>")
return
if(!my_card)
var/obj/item/card/id/assistant_mains_need_to_die = W
if(!assistant_mains_need_to_die.registered_account)
return
var/msg = stripped_input(user, "Name of pay stand:", "Paystand Naming", "[user]'s Awesome Paystand")
if(!msg)
return
name = msg
desc = "Owned by [assistant_mains_need_to_die.registered_account.account_holder], pays directly into [user.p_their()] account."
my_card = assistant_mains_need_to_die
to_chat(user, "You link the stand to your account.")
return
var/obj/item/card/id/vbucks = W
if(vbucks.registered_account)
var/momsdebitcard = 0
if(!force_fee)
momsdebitcard = input(user, "How much would you like to deposit?", "Money Deposit") as null|num
else
momsdebitcard = force_fee
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
if(momsdebitcard < 1)
to_chat(user, "<span class='warning'>ERROR: Invalid amount designated.</span>")
return
if(vbucks.registered_account.adjust_money(-momsdebitcard))
purchase(vbucks.registered_account.account_holder, momsdebitcard)
to_chat(user, "Thanks for purchasing! The vendor has been informed.")
return
else
to_chat(user, "<span class='warning'>ERROR: Account has insufficient funds to make transaction.</span>")
return
else
to_chat(user, "<span class='warning'>ERROR: No bank account assigned to identification card.</span>")
return
if(istype(W, /obj/item/holochip))
var/obj/item/holochip/H = W
var/cashmoney = input(user, "How much would you like to deposit?", "Money Deposit") as null|num
if(H.spend(cashmoney, FALSE))
purchase(user, cashmoney)
to_chat(user, "Thanks for purchasing! The vendor has been informed.")
return
else
to_chat(user, "<span class='warning'>ERROR: Insufficient funds to make transaction.</span>")
return
if(istype(W, /obj/item/stack/spacecash))
to_chat(user, "What is this, the 2000s? We only take card here.")
return
if(istype(W, /obj/item/coin))
to_chat(user, "What is this, the 1800s? We only take card here.")
return
if(istype(W, /obj/item/assembly/signaler))
var/obj/item/assembly/signaler/S = W
if(S.secured)
to_chat(user, "<span class='warning'>The signaler needs to be in attachable mode to add it to the paystand!</span>")
return
if(!my_card)
to_chat(user, "<span class='warning'>ERROR: No identification card has been assigned to this paystand yet!</span>")
return
if(!signaler)
var/cash_limit = input(user, "Enter the minimum amount of cash needed to deposit before the signaler is activated.", "Signaler Activation Threshold") as null|num
if(cash_limit < 1)
to_chat(user, "<span class='warning'>ERROR: Invalid amount designated.</span>")
return
if(cash_limit)
S.forceMove(src)
signaler = S
signaler_threshold = cash_limit
to_chat(user, "You attach the signaler to the paystand.")
desc += " A signaler appears to be attached to the scanner."
else
to_chat(user, "<span class='warning'>A signaler is already attached to this unit!</span>")
if(default_deconstruction_screwdriver(user, "card_scanner", "card_scanner", W))
return
else if(default_pry_open(W))
return
else if(default_unfasten_wrench(user, W))
return
else if(default_deconstruction_crowbar(W))
return
else
return ..()
/obj/machinery/paystand/proc/purchase(buyer, price)
my_card.registered_account.adjust_money(price)
my_card.registered_account.bank_card_talk("Purchase made at your vendor by [buyer] for [price] credits.")
amount_deposited = amount_deposited + price
if(signaler && amount_deposited >= signaler_threshold)
signaler.activate()
amount_deposited = 0
/obj/machinery/paystand/default_unfasten_wrench(mob/user, obj/item/I, time = 20)
if(locked)
to_chat(user, "<span class='warning'>The bolts on this paystand are currently covered!</span>")
return FALSE
. = ..()
/obj/machinery/paystand/examine(mob/user)
. = ..()
if(force_fee)
. += "<span class='warning'>This paystand forces a payment of <b>[force_fee]</b> credit\s per swipe instead of a variable amount.</span>"
if(user.get_active_held_item() == my_card)
. += "<span class='notice'>Paystands can be edited through swiping your card with different intents. <b>Disarm</b> allows editing the name while <b>Grab</b> changes payment functionality.</span>"
+25 -17
View File
@@ -29,7 +29,9 @@
if(fake)
return
threat_message = new
payoff = round(SSshuttle.points * 0.80)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
payoff = round(D.account_balance * 0.80)
threat_message.title = "Business proposition"
threat_message.content = "This is [ship_name]. Pay up [payoff] credits or you'll walk the plank."
threat_message.possible_answers = list("We'll pay.","No way.")
@@ -38,13 +40,14 @@
/datum/round_event/pirates/proc/answered()
if(threat_message && threat_message.answered == 1)
if(SSshuttle.points >= payoff)
SSshuttle.points -= payoff
priority_announce("Thanks for the credits, landlubbers.",sender_override = ship_name)
paid_off = TRUE
return
else
priority_announce("Trying to cheat us? You'll regret this!",sender_override = ship_name)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
if(D.adjust_money(-payoff))
priority_announce("Thanks for the credits, landlubbers.",sender_override = ship_name)
paid_off = TRUE
return
else
priority_announce("Trying to cheat us? You'll regret this!",sender_override = ship_name)
if(!shuttle_spawned)
spawn_shuttle()
@@ -101,9 +104,10 @@
/obj/machinery/shuttle_scrambler/process()
if(active)
if(is_station_level(z))
var/siphoned = min(SSshuttle.points,siphon_per_tick)
SSshuttle.points -= siphoned
credits_stored += siphoned
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
var/siphoned = min(D.account_balance,siphon_per_tick)
D.adjust_money(-siphoned)
interrupt_research()
else
return
@@ -139,12 +143,7 @@
new /obj/effect/temp_visual/emp(get_turf(S))
/obj/machinery/shuttle_scrambler/proc/dump_loot(mob/user)
if(credits_stored < 200)
to_chat(user,"<span class='notice'>Not enough credits to retrieve.</span>")
return
while(credits_stored >= 200)
new /obj/item/stack/spacecash/c200(drop_location())
credits_stored -= 200
new /obj/item/holochip(drop_location(), credits_stored)
to_chat(user,"<span class='notice'>You retrieve the siphoned credits!</span>")
credits_stored = 0
@@ -456,3 +455,12 @@
/datum/export/pirate/cash/get_amount(obj/O)
var/obj/item/stack/spacecash/C = O
return ..() * C.amount * C.value
/datum/export/pirate/holochip
cost = 1
unit_name = "holochip"
export_types = list(/obj/item/holochip)
/datum/export/pirate/holochip/get_cost(atom/movable/AM)
var/obj/item/holochip/H = AM
return H.credits
+3 -1
View File
@@ -69,7 +69,9 @@
priority_announce(thanks_msg, "Cargo shuttle commandeered by CentCom.")
dispatched = 1
SSshuttle.points += bonus_points
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
D.adjust_money(bonus_points)
endWhen = activeFor + 1
SSshuttle.supply.mode = SHUTTLE_CALL
@@ -147,7 +147,7 @@
return
if (!(locate(/obj/structure/table) in src_location) || !(locate(/obj/structure/table) in over_location))
return
//Are we an expert slider?
var/datum/action/innate/D = get_action_of_type(user, /datum/action/innate/drink_fling)
if(!D?.active)
@@ -268,6 +268,7 @@
/obj/item/reagent_containers/food/drinks/ice
name = "ice cup"
desc = "Careful, cold ice, do not chew."
custom_price = 15
icon_state = "coffee"
list_reagents = list(/datum/reagent/consumable/ice = 30)
spillable = TRUE
@@ -281,7 +282,7 @@
spillable = TRUE
/obj/item/reagent_containers/food/drinks/mug/on_reagent_change(changetype)
cut_overlays()
cut_overlays()
if(reagents.total_volume)
var/mutable_appearance/MA = mutable_appearance(icon,"mugoverlay")
MA.color = mix_color_from_reagents(reagents.reagent_list)
@@ -302,6 +303,7 @@
list_reagents = list(/datum/reagent/consumable/hot_coco = 30, /datum/reagent/consumable/sugar = 5)
foodtype = SUGAR
resistance_flags = FREEZE_PROOF
custom_price = 120
/obj/item/reagent_containers/food/drinks/dry_ramen
name = "cup ramen"
@@ -310,6 +312,7 @@
list_reagents = list(/datum/reagent/consumable/dry_ramen = 30)
foodtype = GRAIN
isGlass = FALSE
custom_price = 95
/obj/item/reagent_containers/food/drinks/beer
name = "space beer"
@@ -317,6 +320,7 @@
icon_state = "beer"
list_reagents = list(/datum/reagent/consumable/ethanol/beer = 30)
foodtype = GRAIN | ALCOHOL
custom_price = 60
/obj/item/reagent_containers/food/drinks/beer/light
name = "Carp Lite"
@@ -417,6 +421,7 @@
custom_materials = list(/datum/material/iron=250)
volume = 60
isGlass = FALSE
custom_price = 200
/obj/item/reagent_containers/food/drinks/flask/gold
name = "captain's flask"
@@ -447,6 +452,7 @@
reagent_flags = NONE
spillable = FALSE
isGlass = FALSE
custom_price = 45
/obj/item/reagent_containers/food/drinks/soda_cans/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] is trying to eat \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -254,6 +254,7 @@
var/shortname = pickweight(
list("T&T" = 1, "A&A" = 1, "Generic" = 1))
var/fullname
var/removals = GLOB.redacted_strings.Copy()
switch(shortname)
if("T&T")
fullname = "Teal and Tealer"
@@ -261,9 +262,6 @@
fullname = "Ash and Asher"
if("Generic")
fullname = "Nanotrasen Cheap Imitations"
var/removals = list("\[REDACTED\]", "\[EXPLETIVE DELETED\]",
"\[EXPUNGED\]", "\[INFORMATION ABOVE YOUR SECURITY CLEARANCE\]",
"\[MOVE ALONG CITIZEN\]", "\[NOTHING TO SEE HERE\]")
var/chance = 50
if(prob(chance))
@@ -348,6 +346,7 @@
/obj/item/reagent_containers/food/drinks/bottle/applejack
name = "Buckin' Bronco's Applejack"
desc = "Kicks like a horse, tastes like an apple!"
custom_price = 100
icon_state = "applejack_bottle"
list_reagents = list(/datum/reagent/consumable/ethanol/applejack = 100)
foodtype = FRUIT
@@ -358,6 +357,7 @@
/obj/item/reagent_containers/food/drinks/bottle/champagne
name = "Eau d' Dandy Brut Champagne"
desc = "Finely sourced from only the most pretentious French vineyards."
custom_premium_price = 250
icon_state = "champagne_bottle"
list_reagents = list(/datum/reagent/consumable/ethanol/champagne = 100)
@@ -376,6 +376,7 @@
/obj/item/reagent_containers/food/drinks/bottle/trappist
name = "Mont de Requin Trappistes Bleu"
desc = "Brewed in space-Belgium. Fancy!"
custom_premium_price = 170
icon_state = "trappistbottle"
volume = 50
list_reagents = list(/datum/reagent/consumable/ethanol/trappist = 50)
@@ -388,6 +389,7 @@
/obj/item/reagent_containers/food/drinks/bottle/orangejuice
name = "orange juice"
desc = "Full of vitamins and deliciousness!"
custom_price = 100
icon_state = "orangejuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
@@ -399,6 +401,7 @@
/obj/item/reagent_containers/food/drinks/bottle/cream
name = "milk cream"
desc = "It's cream. Made from milk. What else did you think you'd find in there?"
custom_price = 100
icon_state = "cream"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
@@ -410,6 +413,7 @@
/obj/item/reagent_containers/food/drinks/bottle/tomatojuice
name = "tomato juice"
desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness."
custom_price = 100
icon_state = "tomatojuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
@@ -421,6 +425,7 @@
/obj/item/reagent_containers/food/drinks/bottle/limejuice
name = "lime juice"
desc = "Sweet-sour goodness."
custom_price = 100
icon_state = "limejuice"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
@@ -454,6 +459,7 @@
/obj/item/reagent_containers/food/drinks/bottle/menthol
name = "menthol"
desc = "Tastes naturally minty, and imparts a very mild numbing sensation."
custom_price = 100
icon_state = "mentholbox"
item_state = "carton"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
@@ -464,6 +470,7 @@
/obj/item/reagent_containers/food/drinks/bottle/grenadine
name = "Jester Grenadine"
desc = "Contains 0% real cherries!"
custom_price = 100
icon_state = "grenadine"
isGlass = TRUE
list_reagents = list(/datum/reagent/consumable/grenadine = 100)
@@ -11,6 +11,7 @@
spillable = TRUE
resistance_flags = ACID_PROOF
obj_flags = UNIQUE_RENAME
custom_price = 25
/obj/item/reagent_containers/food/drinks/drinkingglass/on_reagent_change(changetype)
cut_overlays()
@@ -46,6 +47,7 @@
possible_transfer_amounts = list()
volume = 15
custom_materials = list(/datum/material/glass=100)
custom_price = 20
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change(changetype)
cut_overlays()
@@ -41,6 +41,7 @@
filling_color = "#FFD700"
tastes = list("salt" = 1, "crisps" = 1)
foodtype = JUNKFOOD | FRIED
custom_price = 90
/obj/item/reagent_containers/food/snacks/no_raisin
name = "4no raisins"
@@ -68,6 +69,7 @@
junkiness = 25
filling_color = "#FFD700"
foodtype = JUNKFOOD | GRAIN | SUGAR
custom_price = 30
/obj/item/reagent_containers/food/snacks/cheesiehonkers
name = "cheesie honkers"
@@ -79,6 +81,7 @@
filling_color = "#FFD700"
tastes = list("cheese" = 5, "crisps" = 2)
foodtype = JUNKFOOD | DAIRY | SUGAR
custom_price = 45
/obj/item/reagent_containers/food/snacks/syndicake
name = "syndi-cakes"
+17 -2
View File
@@ -56,6 +56,9 @@
//can be overridden by antag_rep.txt config
var/antag_rep = 10
var/paycheck = PAYCHECK_MINIMAL
var/paycheck_department = ACCOUNT_CIV
var/list/mind_traits // Traits added to the mind of the mob assigned this job
var/list/blacklisted_quirks //list of quirk typepaths blacklisted.
@@ -99,7 +102,13 @@
/datum/job/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source)
if(!H)
return FALSE
if(!visualsOnly)
var/datum/bank_account/bank_account = new(H.real_name, src)
bank_account.account_holder = H.real_name
bank_account.account_job = src
bank_account.account_id = rand(111111,999999)
bank_account.payday(STARTING_PAYCHECKS, TRUE)
H.account_id = bank_account.account_id
if(CONFIG_GET(flag/enforce_human_authority) && (title in GLOB.command_positions))
if(H.dna.species.id != "human")
H.set_species(/datum/species/human)
@@ -227,12 +236,18 @@
H.real_name = "[J.title] #[rand(10000, 99999)]"
var/obj/item/card/id/C = H.wear_id
if(istype(C))
if(istype(C) && C.bank_support)
C.access = J.get_access()
shuffle_inplace(C.access) // Shuffle access list to make NTNet passkeys less predictable
C.registered_name = H.real_name
C.assignment = J.title
C.update_label()
for(var/A in SSeconomy.bank_accounts)
var/datum/bank_account/B = A
if(B.account_id == H.account_id)
C.registered_account = B
B.bank_cards += C
break
H.sec_hud_set_ID()
var/obj/item/pda/PDA = H.get_item_by_slot(pda_slot)
+2
View File
@@ -14,6 +14,8 @@ Assistant
minimal_access = list() //See /datum/job/assistant/get_access()
outfit = /datum/outfit/job/assistant
antag_rep = 7
paycheck = PAYCHECK_ASSISTANT // Get a job. Job reassignment changes your paycheck now. Get over it.
paycheck_department = ACCOUNT_CIV
display_order = JOB_DISPLAY_ORDER_ASSISTANT
dresscodecompliant = FALSE
threat = 0.2
@@ -17,6 +17,8 @@
ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_ATMOSPHERICS, ACCESS_MAINT_TUNNELS, ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ENGINE,
ACCESS_ENGINE_EQUIP, ACCESS_EMERGENCY_STORAGE, ACCESS_CONSTRUCTION, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_ENG
display_order = JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN
threat = 0.5
+2
View File
@@ -14,6 +14,8 @@
access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_BAR, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_SRV
display_order = JOB_DISPLAY_ORDER_BARTENDER
threat = 0.5
+2
View File
@@ -13,6 +13,8 @@
access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_HYDROPONICS, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_SRV
display_order = JOB_DISPLAY_ORDER_BOTANIST
threat = 1.5 // lol powergame
+4
View File
@@ -15,11 +15,15 @@
exp_type = EXP_TYPE_COMMAND
exp_type_department = EXP_TYPE_COMMAND
outfit = /datum/outfit/job/captain
access = list() //See get_access()
minimal_access = list() //See get_access()
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_SEC
mind_traits = list(TRAIT_CAPTAIN_METABOLISM, TRAIT_DISK_VERIFIER)
display_order = JOB_DISPLAY_ORDER_CAPTAIN
@@ -14,6 +14,8 @@
access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MINING,
ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_CAR
display_order = JOB_DISPLAY_ORDER_CARGO_TECHNICIAN
threat = 0.2
+2
View File
@@ -13,6 +13,8 @@
access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE)
minimal_access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_CIV
display_order = JOB_DISPLAY_ORDER_CHAPLAIN
threat = 0.5
+2
View File
@@ -15,6 +15,8 @@
access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_MED
display_order = JOB_DISPLAY_ORDER_CHEMIST
threat = 1.5
@@ -26,6 +26,8 @@
ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ATMOSPHERICS, ACCESS_EVA,
ACCESS_HEADS, ACCESS_CONSTRUCTION, ACCESS_SEC_DOORS, ACCESS_MINISAT,
ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_ENG
display_order = JOB_DISPLAY_ORDER_CHIEF_ENGINEER
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/paraplegic, /datum/quirk/insanity)
@@ -24,6 +24,8 @@
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_HEADS, ACCESS_MINERAL_STOREROOM,
ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_SURGERY, ACCESS_RC_ANNOUNCE,
ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS)
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_MED
display_order = JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
+2
View File
@@ -13,6 +13,8 @@
access = list(ACCESS_THEATRE)
minimal_access = list(ACCESS_THEATRE)
paycheck = PAYCHECK_MINIMAL
paycheck_department = ACCOUNT_SRV
mind_traits = list(TRAIT_CLOWN_MENTALITY)
+2
View File
@@ -14,6 +14,8 @@
access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_SRV
display_order = JOB_DISPLAY_ORDER_COOK
threat = 0.2
+2
View File
@@ -13,6 +13,8 @@
access = list(ACCESS_LIBRARY)
minimal_access = list(ACCESS_LIBRARY, ACCESS_CONSTRUCTION, ACCESS_MINING_STATION)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_CIV
display_order = JOB_DISPLAY_ORDER_CURATOR
threat = 0.3
+2
View File
@@ -17,6 +17,8 @@
access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_SEC
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
@@ -15,6 +15,8 @@
access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_ROBOTICS, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE)
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_MED
display_order = JOB_DISPLAY_ORDER_GENETICIST
threat = 1.5
@@ -30,6 +30,8 @@
ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_HYDROPONICS, ACCESS_LAWYER,
ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION,
ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_SRV
display_order = JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL
@@ -27,6 +27,8 @@
ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_ALL_PERSONAL_LOCKERS,
ACCESS_RESEARCH, ACCESS_ENGINE, ACCESS_MINING, ACCESS_MEDICAL, ACCESS_CONSTRUCTION, ACCESS_MAILSORTING,
ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_SEC
display_order = JOB_DISPLAY_ORDER_HEAD_OF_SECURITY
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/insanity)
+2
View File
@@ -13,6 +13,8 @@
access = list(ACCESS_JANITOR, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_JANITOR, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_SRV
display_order = JOB_DISPLAY_ORDER_JANITOR
threat = 0.2
+2
View File
@@ -14,6 +14,8 @@
access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS)
minimal_access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS)
paycheck = PAYCHECK_EASY
paycheck_department = ACCOUNT_CIV
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
@@ -13,6 +13,8 @@
access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_VIROLOGY, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_MED
display_order = JOB_DISPLAY_ORDER_MEDICAL_DOCTOR
threat = 0.5
+2
View File
@@ -13,6 +13,8 @@
access = list(ACCESS_THEATRE)
minimal_access = list(ACCESS_THEATRE)
paycheck = PAYCHECK_MINIMAL
paycheck_department = ACCOUNT_SRV
display_order = JOB_DISPLAY_ORDER_MIME
+2
View File
@@ -14,6 +14,8 @@
access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM, ACCESS_MAINT_TUNNELS)
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM, ACCESS_MAINT_TUNNELS)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_MED
display_order = JOB_DISPLAY_ORDER_PARAMEDIC
@@ -24,6 +24,8 @@
minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING,
ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_KEYCARD_AUTH, ACCESS_RC_ANNOUNCE,
ACCESS_SEC_DOORS, ACCESS_HEADS)
paycheck = PAYCHECK_HARD //They can already buy stuff using cargo budget, don't give em a command-level paycheck.
paycheck_department = ACCOUNT_CAR
display_order = JOB_DISPLAY_ORDER_QUARTERMASTER
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
@@ -28,6 +28,8 @@
ACCESS_RESEARCH, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_AI_UPLOAD,
ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM,
ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK)
paycheck = PAYCHECK_COMMAND
paycheck_department = ACCOUNT_SCI
display_order = JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
@@ -15,6 +15,8 @@
access = list(ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM, ACCESS_XENOBIOLOGY, ACCESS_GENETICS)
minimal_access = list(ACCESS_ROBOTICS, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_SCI
display_order = JOB_DISPLAY_ORDER_ROBOTICIST
threat = 1
+2
View File
@@ -15,6 +15,8 @@
access = list(ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE, ACCESS_GENETICS)
minimal_access = list(ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_SCI
display_order = JOB_DISPLAY_ORDER_SCIENTIST
threat = 1.2
@@ -17,6 +17,8 @@
access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, ACCESS_MINERAL_STOREROOM) // See /datum/job/officer/get_access()
paycheck = PAYCHECK_HARD
paycheck_department = ACCOUNT_SEC
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
@@ -16,6 +16,8 @@
access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MINING,
ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_HARD
paycheck_department = ACCOUNT_CAR
display_order = JOB_DISPLAY_ORDER_SHAFT_MINER
@@ -17,6 +17,8 @@
ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS,
ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_ENG
display_order = JOB_DISPLAY_ORDER_STATION_ENGINEER
@@ -15,6 +15,8 @@
access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_MEDICAL, ACCESS_VIROLOGY, ACCESS_MINERAL_STOREROOM)
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_MED
display_order = JOB_DISPLAY_ORDER_VIROLOGIST
+3
View File
@@ -18,6 +18,9 @@
access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, ACCESS_MINERAL_STOREROOM) // See /datum/job/warden/get_access()
paycheck = PAYCHECK_HARD
paycheck_department = ACCOUNT_SEC
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
display_order = JOB_DISPLAY_ORDER_WARDEN
+4 -4
View File
@@ -55,11 +55,11 @@
SSmachines.setup_template_powernets(cables)
SSair.setup_template_machinery(atmos_machines)
/datum/map_template/proc/load_new_z()
/datum/map_template/proc/load_new_z(list/traits = list(ZTRAIT_AWAY = TRUE))
var/x = round((world.maxx - width)/2)
var/y = round((world.maxy - height)/2)
var/datum/space_level/level = SSmapping.add_new_zlevel(name, list(ZTRAIT_AWAY = TRUE))
var/datum/space_level/level = SSmapping.add_new_zlevel(name, traits)
var/datum/parsed_map/parsed = load_map(file(mappath), x, y, level.z_value, no_changeturf=(SSatoms.initialized == INITIALIZATION_INSSATOMS), placeOnTop=TRUE)
var/list/bounds = parsed.bounds
if(!bounds)
@@ -121,6 +121,6 @@
//for your ever biggening badminnery kevinz000
//❤ - Cyberboss
/proc/load_new_z_level(var/file, var/name)
/proc/load_new_z_level(file, name, list/traits = list(ZTRAIT_AWAY = TRUE))
var/datum/map_template/template = new(file, name)
template.load_new_z()
template.load_new_z(traits)
+1 -1
View File
@@ -15,7 +15,7 @@
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_items = 40
STR.max_combined_w_class = 40
STR.can_hold = typecacheof(list(/obj/item/coin, /obj/item/stack/spacecash))
STR.can_hold = typecacheof(list(/obj/item/coin, /obj/item/stack/spacecash, /obj/item/holochip))
/obj/item/storage/bag/money/vault/PopulateContents()
new /obj/item/coin/silver(src)
@@ -11,7 +11,7 @@
status_flags = CANSTUN|CANKNOCKDOWN|CANUNCONSCIOUS|CANPUSH|CANSTAGGER
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
//Hair colour and style
var/hair_color = "000"
var/hair_style = "Bald"
@@ -72,4 +72,5 @@
var/creamed = FALSE //to use with creampie overlays
var/static/list/can_ride_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot))
var/lastpuke = 0
var/account_id
var/last_fire_update
@@ -127,6 +127,17 @@
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
return FALSE
/mob/living/carbon/human/proc/get_bank_account()
RETURN_TYPE(/datum/bank_account)
var/datum/bank_account/account
var/obj/item/card/id/I = get_idcard()
if(I && I.registered_account)
account = I.registered_account
return account
return FALSE
/mob/living/carbon/human/can_see_reagents()
. = ..()
if(.) //No need to run through all of this if it's already true.
@@ -698,9 +698,9 @@
/obj/item/toy/crayon/spraycan/borg,
/obj/item/hand_labeler/borg,
/obj/item/razor,
/obj/item/rsf,
/obj/item/instrument/violin,
/obj/item/instrument/guitar,
/obj/item/rsf/cyborg,
/obj/item/reagent_containers/dropper,
/obj/item/lighter,
/obj/item/storage/bag/tray,
@@ -157,6 +157,7 @@
max_capacity = 64
icon_state = "ssd_mini"
w_class = WEIGHT_CLASS_TINY
custom_price = 150
/obj/item/computer_hardware/hard_drive/small/syndicate // Syndicate variant - very slight better
desc = "An efficient SSD for portable devices developed by a rival organisation."
@@ -244,12 +244,12 @@
visible_message("<span class='info'><span class='name'>[user]</span> inserts [c.value] credits into [src].</span>")
qdel(c)
return
/*else if(istype(I, /obj/item/holochip))
else if(istype(I, /obj/item/holochip))
var/obj/item/holochip/HC = I
credits += HC.credits
visible_message("<span class='info'>[user] inserts a $[HC.credits] holocredit chip into [src].</span>")
visible_message("<span class='info'>[user] inserts a [HC.credits] cr holocredit chip into [src].</span>")
qdel(HC)
return
return
else if(istype(I, /obj/item/card/id))
if(state != 2)
return
@@ -260,8 +260,8 @@
say("Insufficient money on card to purchase!")
return
credits += target_credits
say("$[target_credits] has been desposited from your account.")
return */ //Goonconomy when
say("[target_credits] cr has been desposited from your account.")
return
return ..()
// Simplified payment processing, returns 1 on success.
@@ -15,6 +15,7 @@
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_NECK
custom_materials = list(/datum/material/iron = 50, /datum/material/glass = 150)
custom_price = 120
var/flash_enabled = TRUE
var/state_on = "camera"
var/state_off = "camera_off"
+2 -1
View File
@@ -1350,7 +1350,7 @@
lighting = autoset(lighting, 0)
environ = autoset(environ, 0)
area.poweralert(0, src)
else if(cell_percent < 15 && longtermpower < 0) // <15%, turn off lighting & equipment
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
@@ -1579,4 +1579,5 @@
/obj/item/electronics/apc
name = "power control module"
icon_state = "power_mod"
custom_price = 50
desc = "Heavy-duty switching circuits for power control."
+3 -2
View File
@@ -472,6 +472,7 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/item/stack/cable_coil
name = "cable coil"
custom_price = 75
gender = NEUTER //That's a cable coil sounds better than that's some cable coils
icon = 'icons/obj/power.dmi'
icon_state = "coil"
@@ -566,7 +567,7 @@ By design, d1 is the smallest direction and d2 is the highest
return
var/obj/item/restraints/handcuffs/cable/result = new(get_turf(user))
user.put_in_hands(result)
result.color = color
result.color = color
to_chat(user, "<span class='notice'>You make some restraints out of cable</span>")
//add cables to the stack
@@ -849,4 +850,4 @@ By design, d1 is the smallest direction and d2 is the highest
. = ..()
var/list/cable_colors = GLOB.cable_colors
color = pick(cable_colors)
+5 -1
View File
@@ -62,7 +62,11 @@
loaded_tank.air_contents.gases[/datum/gas/oxygen] -= gasdrained
loaded_tank.air_contents.gases[/datum/gas/carbon_dioxide] += gasdrained*2
GAS_GARBAGE_COLLECT(loaded_tank.air_contents.gases)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, stored_power*RAD_COLLECTOR_MINING_CONVERSION_RATE)
var/bitcoins_mined = stored_power*RAD_COLLECTOR_MINING_CONVERSION_RATE
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
if(D)
D.adjust_money(bitcoins_mined)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, bitcoins_mined)
last_push = stored_power
stored_power = 0
+6
View File
@@ -83,6 +83,9 @@
flick("coilhit", src)
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 5, power_produced, tesla_flags, shocked_targets)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
if(D)
D.adjust_money(min(power_produced, 1))
if(istype(linked_techweb))
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min(power_produced, 1)) // x4 coils = ~240/m point bonus for R&D
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
@@ -118,6 +121,9 @@
flick("rpcoilhit", src)
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 5, power_produced, tesla_flags, shocked_things)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
if(D)
D.adjust_money(min(power_produced, 3))
if(istype(linked_techweb))
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min(power_produced, 3)) // x4 coils with a pulse per second or so = ~720/m point bonus for R&D
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
@@ -7,6 +7,7 @@
possible_transfer_amounts = list(1, 2, 3, 4, 5)
volume = 5
reagent_flags = TRANSPARENT
custom_price = 75
/obj/item/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
. = ..()
@@ -362,6 +362,7 @@
icon = 'icons/obj/drinks.dmi'
icon_state = "smallbottle"
item_state = "bottle"
custom_price = 30
list_reagents = list(/datum/reagent/water = 49.5, /datum/reagent/fluorine = 0.5)//see desc, don't think about it too hard
custom_materials = list(/datum/material/glass=0)
volume = 50
@@ -96,6 +96,8 @@
reagent_flags = DRAWABLE
flags_1 = null
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/preservahyde = 3)
custom_price = 150
custom_premium_price = 300
/obj/item/reagent_containers/hypospray/medipen/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins to choke on \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -15,6 +15,7 @@
var/show_filling = TRUE
custom_materials = list(/datum/material/iron=10, /datum/material/glass=20)
reagent_flags = TRANSPARENT
custom_price = 150
/obj/item/reagent_containers/syringe/Initialize()
. = ..()
@@ -256,3 +256,19 @@
materials = list(/datum/material/iron = 300, /datum/material/glass = 150)
build_path = /obj/item/key/collar
category = list("initial", "Misc")
/datum/design/price_tagger
name = "Price Tagger"
id = "price_tagger"
build_type = AUTOLATHE
materials = list(/datum/material/iron = 1500, /datum/material/glass = 500)
build_path = /obj/item/price_tagger
category = list("initial", "Misc")
/datum/design/custom_vendor_refill
name = "Custom Vendor Refill"
id = "custom_vendor_refill"
build_type = AUTOLATHE
materials = list(/datum/material/iron = 5000, /datum/material/glass = 2000)
build_path = /obj/item/vending_refill/custom
category = list("initial", "Misc")
@@ -107,6 +107,14 @@
departmental_flags = DEPARTMENTAL_FLAG_ALL
category = list ("Medical Machinery")
/datum/design/board/paystand
name = "Machine Design (Pay Stand)"
desc = "The circuit board for a paystand."
id = "paystand"
build_path = /obj/item/circuitboard/machine/paystand
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ALL
/datum/design/board/autoylathe
name = "Machine Design (Autoylathe)"
desc = "The circuit board for an autoylathe."
@@ -199,6 +199,10 @@
researched_designs -= design.id
return TRUE
/datum/techweb/proc/get_point_total(list/pointlist)
for(var/i in pointlist)
. += pointlist[i]
/datum/techweb/proc/can_afford(list/pointlist)
for(var/i in pointlist)
if(research_points[i] < pointlist[i])
@@ -227,6 +231,10 @@
for(var/id in node.design_ids)
add_design_by_id(id)
update_node_status(node)
if(!istype(src, /datum/techweb/admin))
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI)
if(D)
D.adjust_money(SSeconomy.techweb_bounty)
return TRUE
/datum/techweb/proc/unresearch_node_id(id)
+1 -1
View File
@@ -9,7 +9,7 @@
description = "NT default research technologies."
// Default research tech, prevents bricking
design_ids = list("basic_matter_bin", "basic_cell", "basic_scanning", "basic_capacitor", "basic_micro_laser", "micro_mani", "desttagger", "handlabel", "packagewrap",
"destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab",
"destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", "paystand",
"space_heater", "beaker", "large_beaker", "bucket", "xlarge_beaker", "sec_beanbag", "sec_rshot", "sec_bshot", "sec_slug", "sec_Islug", "sec_dart", "sec_38", "sec_38lethal",
"rglass","plasteel","plastitanium","plasmaglass","plasmareinforcedglass","titaniumglass","plastitaniumglass")
@@ -32,7 +32,7 @@
/obj/item/paper/fluff/ruins/listeningstation/receipt
name = "receipt"
info = "1 x Stechkin pistol - $600<br>1 x silencer - $200<br>shipping charge - $4360<br>total - $5160"
info = "1 x Stechkin pistol - 600 cr<br>1 x silencer - 200 cr<br>shipping charge - 4360 cr<br>total - 5160 cr"
/obj/item/paper/fluff/ruins/listeningstation/odd_report
name = "odd report"
+27 -10
View File
@@ -109,30 +109,46 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
continue
empty_turfs += T
var/datum/bank_account/cargo_budget = SSeconomy.get_dep_account(ACCOUNT_CAR)
var/value = 0
var/purchases = 0
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
if(!empty_turfs.len)
break
if(SO.pack.cost > SSshuttle.points)
continue
SSshuttle.points -= SO.pack.cost
var/price = SO.pack.cost
var/datum/bank_account/D
if(SO.paying_account) //Someone paid out of pocket
D = SO.paying_account
price *= 1.1 //TODO make this customizable by the quartermaster
else
D = cargo_budget
if(D)
if(!D.adjust_money(-SO.pack.cost))
if(SO.paying_account)
D.bank_card_talk("Cargo order #[SO.id] rejected due to lack of funds. Credits required: [price]")
continue
if(SO.paying_account)
D.bank_card_talk("Cargo order #[SO.id] has shipped. [price] credits have been charged to your bank account.")
var/datum/bank_account/department/cargo = SSeconomy.get_dep_account(ACCOUNT_CAR)
cargo.adjust_money(price - SO.pack.cost) //Cargo gets the handling fee
value += SO.pack.cost
SSshuttle.shoppinglist -= SO
SSshuttle.orderhistory += SO
SO.generate(pick_n_take(empty_turfs))
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
investigate_log("Order #[SO.id] ([SO.pack.name], placed by [key_name(SO.orderer_ckey)]) has shipped.", INVESTIGATE_CARGO)
investigate_log("Order #[SO.id] ([SO.pack.name], placed by [key_name(SO.orderer_ckey)]), paid by [D.account_holder] has shipped.", INVESTIGATE_CARGO)
if(SO.pack.dangerous)
message_admins("\A [SO.pack.name] ordered by [ADMIN_LOOKUPFLW(SO.orderer_ckey)] has shipped.")
message_admins("\A [SO.pack.name] ordered by [ADMIN_LOOKUPFLW(SO.orderer_ckey)], paid by [D.account_holder] has shipped.")
purchases++
investigate_log("[purchases] orders in this shipment, worth [value] credits. [SSshuttle.points] credits left.", INVESTIGATE_CARGO)
investigate_log("[purchases] orders in this shipment, worth [value] credits. [cargo_budget.account_balance] credits left.", INVESTIGATE_CARGO)
/obj/docking_port/mobile/supply/proc/sell()
var/presale_points = SSshuttle.points
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
var/gain = 0
if(!GLOB.exports_list.len) // No exports list? Generate it!
setupExports()
@@ -164,14 +180,15 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
continue
msg += export_text + "\n"
SSshuttle.points += ex.total_value[E]
gain += ex.total_value[E]
for(var/chem in ex.reagents_value)
var/value = ex.reagents_value[chem]
msg += "[value > 0 ? "+" : ""][value] credits: received [ex.reagents_volume[chem]]u of [chem].\n"
SSshuttle.points += value
gain += value
D.adjust_money(gain)
msg = copytext_char(msg, 1, MAX_MESSAGE_LEN)
SSshuttle.centcom_message = msg
investigate_log("Shuttle contents sold for [SSshuttle.points - presale_points] credits. Contents: [ex.exported_atoms || "none."] Message: [SSshuttle.centcom_message || "none."]", INVESTIGATE_CARGO)
investigate_log("Shuttle contents sold for [gain] credits. Contents: [ex.exported_atoms || "none."] Message: [SSshuttle.centcom_message || "none."]", INVESTIGATE_CARGO)
@@ -16,14 +16,14 @@
for(var/mob/living/carbon/C in targets)
if(user.dropItemToGround(user.get_active_held_item()))
var/obj/item = pick(
new /obj/item/coin/gold(user.loc),
new /obj/item/coin/diamond(user.loc),
new /obj/item/coin/silver(user.loc),
new /obj/item/clothing/accessory/medal/gold(user.loc),
new /obj/item/stack/sheet/mineral/gold(user.loc),
new /obj/item/stack/sheet/mineral/silver(user.loc),
new /obj/item/stack/sheet/mineral/diamond(user.loc),
new /obj/item/stack/spacecash/c1000(user.loc))
new /obj/item/coin/gold(user.drop_location()),
new /obj/item/coin/diamond(user.drop_location()),
new /obj/item/coin/silver(user.drop_location()),
new /obj/item/clothing/accessory/medal/gold(user.drop_location()),
new /obj/item/stack/sheet/mineral/gold(user.drop_location()),
new /obj/item/stack/sheet/mineral/silver(user.drop_location()),
new /obj/item/stack/sheet/mineral/diamond(user.drop_location()),
new /obj/item/holochip(user.drop_location(), 1000))
C.put_in_hands(item)
/obj/effect/proc_holder/spell/targeted/view_range
@@ -58,6 +58,7 @@
manufactured to pack a little bit more of a punch if your client needs some convincing."
item = /obj/item/storage/secure/briefcase/syndie
cost = 1
restricted = TRUE
/datum/uplink_item/badass/syndiecards
name = "Syndicate Playing Cards"
@@ -40,6 +40,7 @@
cost = 20
player_minimum = 30
exclude_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
restricted = TRUE
/datum/uplink_item/suits/infiltrator_bundle
name = "Insidious Infiltration Gear Case"
@@ -262,3 +262,13 @@
cost = 2
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
restricted = TRUE
/* for now
/datum/uplink_item/device_tools/suspiciousphone
name = "Protocol CRAB-17 Phone"
desc = "The Protocol CRAB-17 Phone, a phone borrowed from an unknown third party, it can be used to crash the space market, funneling the losses of the crew to your bank account.\
The crew can move their funds to a new banking site though, unless they HODL, in which case they deserve it."
item = /obj/item/suspiciousphone
cost = 7
restricted = TRUE
*/
+282 -62
View File
@@ -30,6 +30,10 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
var/amount = 0
///How many we can store at maximum
var/max_amount = 0
///Does the item have a custom price override
var/custom_price
///Does the item have a custom premium price override
var/custom_premium_price
/**
* # vending machines
@@ -50,6 +54,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
integrity_failure = 0.33
armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
circuit = /obj/item/circuitboard/machine/vendor
payment_department = ACCOUNT_SRV
light_power = 0.5
light_range = MINIMUM_USEFUL_LIGHT_RANGE
/// Is the machine active (No sales pitches if off)!
@@ -120,7 +125,12 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
var/scan_id = TRUE
///Coins that we accept?
var/obj/item/coin/coin
///Bills we accept?
var/obj/item/stack/spacecash/bill
///Default price of items if not overridden
var/default_price = 25
///Default price of premium items if not overridden
var/extra_price = 50
/**
* Is this item on station or not
*
@@ -142,7 +152,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
var/obj/item/vending_refill/refill_canister = null
/// how many items have been inserted in a vendor
var/loaded_items
var/loaded_items = 0
///Name of lighting mask for the vending machine
var/light_mask
@@ -178,6 +188,15 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
// so if slogantime is 10 minutes, it will say it at somewhere between 10 and 20 minutes after the machine is crated.
last_slogan = world.time + rand(0, slogan_delay)
power_change()
if(onstation_override) //overrides the checks if true.
onstation = TRUE
return
if(mapload && !is_station_level(z)) //check if it was initially created off station during mapload.
onstation = FALSE
if(circuit)
circuit.onstation = onstation //sync up the circuit so the pricing schema is carried over if it's reconstructed.
else if(circuit && (circuit.onstation != onstation)) //check if they're not the same to minimize the amount of edited values.
onstation = circuit.onstation //if it was constructed outside mapload, sync the vendor up with the circuit's var so you can't bypass price requirements by moving / reconstructing it off station.
/obj/machinery/vending/Destroy()
QDEL_NULL(wires)
@@ -281,6 +300,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(!start_empty)
R.amount = amount
R.max_amount = amount
R.custom_price = initial(temp.custom_price)
recordlist += R
/**
* Refill a vending machine from a refill canister
@@ -372,19 +392,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(panel_open && is_wire_tool(I))
wires.interact(user)
return
else if(istype(I, /obj/item/coin))
if(coin)
to_chat(user, "<span class='warning'>[src] already has [coin] inserted</span>")
return
if(!premium.len)
to_chat(user, "<span class='warning'>[src] doesn't have a coin slot.</span>")
return
if(!user.transferItemToLoc(I, src))
return
coin = I
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
return
else if(refill_canister && istype(I, refill_canister))
if(refill_canister && istype(I, refill_canister))
if (!panel_open)
to_chat(user, "<span class='warning'>You should probably unscrew the service panel first!</span>")
else if (stat & (BROKEN|NOPOWER))
@@ -439,7 +447,7 @@ GLOBAL_LIST_EMPTY(vending_products)
vending_machine_input[format_text(I.name)] = 1
to_chat(user, "<span class='notice'>You insert [I] into [src]'s input compartment.</span>")
loaded_items++
/**
* Is the passed in user allowed to load this vending machines compartments
*
@@ -520,11 +528,14 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/machinery/vending/ui_static_data(mob/user)
. = list()
.["onstation"] = onstation
.["department"] = payment_department
.["product_records"] = list()
for (var/datum/data/vending_product/R in product_records)
var/list/data = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = R.custom_price || default_price,
max_amount = R.max_amount,
ref = REF(R)
)
@@ -534,6 +545,7 @@ GLOBAL_LIST_EMPTY(vending_products)
var/list/data = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = R.custom_premium_price || extra_price,
max_amount = R.max_amount,
ref = REF(R),
premium = TRUE
@@ -544,6 +556,7 @@ GLOBAL_LIST_EMPTY(vending_products)
var/list/data = list(
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
name = R.name,
price = R.custom_price || default_price,
max_amount = R.max_amount,
ref = REF(R),
premium = TRUE
@@ -552,11 +565,25 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/machinery/vending/ui_data(mob/user)
. = list()
var/mob/living/carbon/human/H
var/obj/item/card/id/C
if(ishuman(user))
H = user
C = H.get_idcard(TRUE)
if(C?.registered_account)
.["user"] = list()
.["user"]["name"] = C.registered_account.account_holder
.["user"]["cash"] = C.registered_account.account_balance
if(C.registered_account.account_job)
.["user"]["job"] = C.registered_account.account_job.title
.["user"]["department"] = C.registered_account.account_job.paycheck_department
else
.["user"]["job"] = "No Job"
.["user"]["department"] = "No Department"
.["stock"] = list()
for(var/datum/data/vending_product/R in product_records + coin_records + hidden_records)
for (var/datum/data/vending_product/R in product_records + coin_records + hidden_records)
.["stock"][R.name] = R.amount
.["extended_inventory"] = extended_inventory
.["coin"] = coin
/obj/machinery/vending/ui_act(action, params)
. = ..()
@@ -570,74 +597,74 @@ GLOBAL_LIST_EMPTY(vending_products)
if(panel_open)
to_chat(usr, "<span class='warning'>The vending machine cannot dispense products while its service panel is open!</span>")
return
if((!allowed(usr)) && !(obj_flags & EMAGGED) && scan_id) //For SECURE VENDING MACHINES YEAH
to_chat(usr, "<span class='warning'>Access denied.</span>" )
flick(icon_deny,src)
return
vend_ready = FALSE //One thing at a time!!
var/datum/data/vending_product/R = locate(params["ref"])
var/list/record_to_check = product_records + coin_records
if(extended_inventory)
record_to_check = product_records + coin_records + hidden_records
if(!R || !istype(R) || !R.product_path)
vend_ready = TRUE
return
var/price_to_use = default_price
if(R.custom_price)
price_to_use = R.custom_price
if(R in hidden_records)
if(!extended_inventory)
vend_ready = TRUE
return
else if(R in coin_records)
if(!(coin))
to_chat(usr, "<span class='warning'>You need to a coin to get this item!</span>")
vend_ready = TRUE
return
if(coin && coin.string_attached)
if(!prob(50))
to_chat(usr, "<span class='warning'>You weren't able to pull [coin] out fast enough, the machine ate it, string and all!</span>")
QDEL_NULL(coin)
return
if(!usr.CanReach(src))
to_chat(usr, "<span class='notice'>You successfully pull [coin] out of [src] to the floor.</span>")
coin = null
if(!usr.put_in_hands(coin))
to_chat(usr, "<span class='warning'>You couldn't pull [coin] out because your hands are full!</span>")
QDEL_NULL(coin)
to_chat(usr, "<span class='notice'>You successfully pull [coin] out before [src] could swallow it.</span>")
coin = null
QDEL_NULL(coin)
else if(!(R in product_records))
else if (!(R in record_to_check))
vend_ready = TRUE
message_admins("Vending machine exploit attempted by [ADMIN_LOOKUPFLW(usr)]!")
return
if(R.amount <= 0)
to_chat(usr, "<span class='warning'>Sold out.</span>")
if (R.amount <= 0)
say("Sold out of [R.name].")
flick(icon_deny,src)
vend_ready = TRUE
return
else
R.amount--
if(((last_reply + 200) <= world.time) && vend_reply)
speak(vend_reply)
last_reply = world.time
if(onstation && ishuman(usr))
var/mob/living/carbon/human/H = usr
var/obj/item/card/id/C = H.get_idcard(TRUE)
if(!C)
say("No card found.")
flick(icon_deny,src)
vend_ready = TRUE
return
else if (!C.registered_account)
say("No account found.")
flick(icon_deny,src)
vend_ready = TRUE
return
var/datum/bank_account/account = C.registered_account
if(account.account_job && account.account_job.paycheck_department == payment_department)
price_to_use = 0
if(coin_records.Find(R) || hidden_records.Find(R))
price_to_use = R.custom_premium_price ? R.custom_premium_price : extra_price
if(price_to_use && !account.adjust_money(-price_to_use))
say("You do not possess the funds to purchase [R.name].")
flick(icon_deny,src)
vend_ready = TRUE
return
var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department)
if(D)
D.adjust_money(price_to_use)
if(last_shopper != usr || purchase_message_cooldown < world.time)
say("Thank you for shopping with [src]!")
purchase_message_cooldown = world.time + 5 SECONDS
last_shopper = usr
use_power(5)
if(icon_vend) //Show the vending animation if needed
flick(icon_vend,src)
var/vended = new R.product_path(get_turf(src))
playsound(src, 'sound/machines/machine_vend.ogg', 50, TRUE, extrarange = -3)
var/obj/item/vended = new R.product_path(get_turf(src))
R.amount--
if(usr.CanReach(src) && usr.put_in_hands(vended))
to_chat(usr, "<span class='notice'>You take [R.name] out of the slot.</span>")
else
to_chat(usr, "<span class='warning'>[capitalize(R.name)] falls onto the floor!</span>")
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
vend_ready = TRUE
return
if("takeoutcoin")
usr.put_in_hands(coin)
to_chat(usr, "<span class='notice'>You remove [coin] from [src].</span>")
coin = null
return
if("togglevoice")
if(panel_open)
shut_up = !shut_up
/obj/machinery/vending/process()
if(stat & (BROKEN|NOPOWER))
return PROCESS_KILL
@@ -748,3 +775,196 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/machinery/vending/onTransitZ()
return
/obj/machinery/vending/custom
name = "Custom Vendor"
icon_state = "robotics"
icon_deny = "robotics-deny"
max_integrity = 400
payment_department = NO_FREEBIES
refill_canister = /obj/item/vending_refill/custom
/// where the money is sent
var/datum/bank_account/private_a
/// max number of items that the custom vendor can hold
var/max_loaded_items = 20
/// Base64 cache of custom icons.
var/list/base64_cache = list()
/obj/machinery/vending/custom/compartmentLoadAccessCheck(mob/user)
. = FALSE
var/mob/living/carbon/human/H
var/obj/item/card/id/C
if(ishuman(user))
H = user
C = H.get_idcard(FALSE)
if(C?.registered_account && C.registered_account == private_a)
return TRUE
/obj/machinery/vending/custom/canLoadItem(obj/item/I, mob/user)
. = FALSE
if(loaded_items >= max_loaded_items)
say("There are too many items in stock.")
return
if(istype(I, /obj/item/stack))
say("Loose items may cause problems, try use it inside wrapping paper.")
return
if(I.custom_price)
return TRUE
/obj/machinery/vending/custom/ui_data(mob/user)
. = ..()
.["access"] = compartmentLoadAccessCheck(user)
.["vending_machine_input"] = list()
for (var/O in vending_machine_input)
if(vending_machine_input[O] > 0)
var/base64
var/price = 0
for(var/obj/T in contents)
if(T.name == O)
price = T.custom_price
if(!base64)
if(base64_cache[T.type])
base64 = base64_cache[T.type]
else
base64 = icon2base64(icon(T.icon, T.icon_state))
base64_cache[T.type] = base64
break
var/list/data = list(
name = O,
price = price,
img = base64
)
.["vending_machine_input"] += list(data)
/obj/machinery/vending/custom/ui_act(action, params)
. = ..()
if(.)
return
switch(action)
if("dispense")
. = TRUE
if(!vend_ready)
return
var/N = params["item"]
var/obj/S
vend_ready = FALSE
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
var/obj/item/card/id/C = H.get_idcard(TRUE)
if(!C)
say("No card found.")
flick(icon_deny,src)
vend_ready = TRUE
return
else if (!C.registered_account)
say("No account found.")
flick(icon_deny,src)
vend_ready = TRUE
return
var/datum/bank_account/account = C.registered_account
for(var/obj/O in contents)
if(O.name == N)
S = O
break
if(S)
if(compartmentLoadAccessCheck(usr))
vending_machine_input[N] = max(vending_machine_input[N] - 1, 0)
S.forceMove(drop_location())
loaded_items--
use_power(5)
vend_ready = TRUE
updateUsrDialog()
return
if(account.has_money(S.custom_price))
account.adjust_money(-S.custom_price)
var/datum/bank_account/owner = private_a
if(owner)
owner.adjust_money(S.custom_price)
vending_machine_input[N] = max(vending_machine_input[N] - 1, 0)
S.forceMove(drop_location())
loaded_items--
use_power(5)
if(last_shopper != usr || purchase_message_cooldown < world.time)
say("Thank you for buying local and purchasing [S]!")
purchase_message_cooldown = world.time + 5 SECONDS
last_shopper = usr
vend_ready = TRUE
updateUsrDialog()
return
else
say("You do not possess the funds to purchase this.")
vend_ready = TRUE
/obj/machinery/vending/custom/attackby(obj/item/I, mob/user, params)
if(!private_a)
var/mob/living/carbon/human/H
var/obj/item/card/id/C
if(ishuman(user))
H = user
C = H.get_idcard(TRUE)
if(C?.registered_account)
private_a = C.registered_account
say("\The [src] has been linked to [C].")
if(compartmentLoadAccessCheck(user))
if(istype(I, /obj/item/pen))
name = stripped_input(user,"Set name","Name", name, 20)
desc = stripped_input(user,"Set description","Description", desc, 60)
slogan_list += stripped_input(user,"Set slogan","Slogan","Epic", 60)
last_slogan = world.time + rand(0, slogan_delay)
return
if(canLoadItem(I))
loadingAttempt(I,user)
updateUsrDialog()
return
if(panel_open && is_wire_tool(I))
wires.interact(user)
return
return ..()
/obj/machinery/vending/custom/crowbar_act(mob/living/user, obj/item/I)
return FALSE
/obj/machinery/vending/custom/Destroy()
unbuckle_all_mobs(TRUE)
var/turf/T = get_turf(src)
if(T)
for(var/obj/item/I in contents)
I.forceMove(T)
explosion(T, -1, 0, 3)
return ..()
/obj/machinery/vending/custom/unbreakable
name = "Indestructible Vendor"
resistance_flags = INDESTRUCTIBLE
/obj/item/vending_refill/custom
machine_name = "Custom Vendor"
icon_state = "refill_custom"
custom_premium_price = 100
/obj/item/price_tagger
name = "price tagger"
desc = "This tool is used to set a price for items used in custom vendors."
icon = 'icons/obj/device.dmi'
icon_state = "pricetagger"
custom_premium_price = 25
///the price of the item
var/price = 1
/obj/item/price_tagger/attack_self(mob/user)
price = max(1, round(input(user,"set price","price") as num|null, 1))
to_chat(user, "<span class='notice'> The [src] will now give things a [price] cr tag.</span>")
/obj/item/price_tagger/afterattack(atom/target, mob/user, proximity)
. = ..()
if(!proximity)
return
if(isitem(target))
var/obj/item/I = target
I.custom_price = price
to_chat(user, "<span class='notice'>You set the price of [I] to [price] cr.</span>")
+3
View File
@@ -19,6 +19,9 @@
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
refill_canister = /obj/item/vending_refill/assist
resistance_flags = FIRE_PROOF
default_price = 125
extra_price = 100
payment_department = NO_FREEBIES
/obj/item/vending_refill/assist
icon_state = "refill_engi"
+7
View File
@@ -138,12 +138,19 @@
/obj/item/clothing/head/christmashat = 3,
/obj/item/clothing/head/christmashatg = 3,
/obj/item/clothing/under/costume/drfreeze = 1) //End of Cit Changes
refill_canister = /obj/item/vending_refill/autodrobe
default_price = 180
extra_price = 360
payment_department = ACCOUNT_SRV
/obj/machinery/vending/autodrobe/all_access
desc = "A vending machine for costumes. This model appears to have no access restrictions."
req_access = null
/obj/machinery/vending/autodrobe/canLoadItem(obj/item/I,mob/user)
return (I.type in products)
/obj/item/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"

Some files were not shown because too many files have changed in this diff Show More