Merge branch 'master' into plumb
This commit is contained in:
@@ -479,7 +479,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
|
||||
var/crit_case
|
||||
if(crit)
|
||||
crit_case = rand(1,5)
|
||||
crit_case = rand(1,6)
|
||||
|
||||
if(forcecrit)
|
||||
crit_case = forcecrit
|
||||
@@ -491,7 +491,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
if(istype(C))
|
||||
var/crit_rebate = 0 // lessen the normal damage we deal for some of the crits
|
||||
|
||||
if(crit_case != 5) // the head asplode case has its own description
|
||||
if(crit_case < 5) // the head asplode case has its own description
|
||||
C.visible_message("<span class='danger'>[C] is crushed by [src]!</span>", \
|
||||
"<span class='userdanger'>You are crushed by [src]!</span>")
|
||||
|
||||
@@ -526,7 +526,17 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
// the new paraplegic gets like 4 lines of losing their legs so skip them
|
||||
visible_message("<span class='danger'>[C]'s spinal cord is obliterated with a sickening crunch!</span>", ignored_mobs = list(C))
|
||||
C.gain_trauma(/datum/brain_trauma/severe/paralysis/spinesnapped)
|
||||
if(5) // skull squish!
|
||||
if(5) // limb squish!
|
||||
for(var/i in C.bodyparts)
|
||||
var/obj/item/bodypart/squish_part = i
|
||||
if(squish_part.is_organic_limb())
|
||||
var/type_wound = pick(list(/datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/moderate))
|
||||
squish_part.force_wound_upwards(type_wound)
|
||||
else
|
||||
squish_part.receive_damage(brute=30)
|
||||
C.visible_message("<span class='danger'>[C]'s body is maimed underneath the mass of [src]!</span>", \
|
||||
"<span class='userdanger'>Your body is maimed underneath the mass of [src]!</span>")
|
||||
if(6) // skull squish!
|
||||
var/obj/item/bodypart/head/O = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(O)
|
||||
C.visible_message("<span class='danger'>[O] explodes in a shower of gore beneath [src]!</span>", \
|
||||
@@ -536,7 +546,11 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
qdel(O)
|
||||
new /obj/effect/gibspawner/human/bodypartless(get_turf(C))
|
||||
|
||||
C.apply_damage(max(0, squish_damage - crit_rebate), forced=TRUE, spread_damage=TRUE)
|
||||
if(prob(30))
|
||||
C.apply_damage(max(0, squish_damage - crit_rebate), forced=TRUE, spread_damage=TRUE) // the 30% chance to spread the damage means you escape breaking any bones
|
||||
else
|
||||
C.take_bodypart_damage((squish_damage - crit_rebate)*0.5, wound_bonus = 5) // otherwise, deal it to 2 random limbs (or the same one) which will likely shatter something
|
||||
C.take_bodypart_damage((squish_damage - crit_rebate)*0.5, wound_bonus = 5)
|
||||
C.AddElement(/datum/element/squish, 18 SECONDS)
|
||||
else
|
||||
L.visible_message("<span class='danger'>[L] is crushed by [src]!</span>", \
|
||||
@@ -562,7 +576,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
"<span class='notice'>You right [src].")
|
||||
|
||||
unbuckle_all_mobs(TRUE)
|
||||
|
||||
anchored = FALSE //so you can push it back into position
|
||||
tilted = FALSE
|
||||
layer = initial(layer)
|
||||
|
||||
@@ -658,21 +672,21 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/vending/ui_base_html(html)
|
||||
var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/vending)
|
||||
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
|
||||
/obj/machinery/vending/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet/vending),
|
||||
)
|
||||
|
||||
/obj/machinery/vending/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/machinery/vending/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/vending)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "Vending", ui_key, 450, 600, master_ui, state)
|
||||
ui = new(user, src, "Vending")
|
||||
ui.open()
|
||||
|
||||
/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(
|
||||
@@ -699,7 +713,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,
|
||||
price = R.custom_premium_price || extra_price, //may cause breakage. please note
|
||||
max_amount = R.max_amount,
|
||||
ref = REF(R),
|
||||
premium = TRUE
|
||||
@@ -708,28 +722,24 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
|
||||
/obj/machinery/vending/ui_data(mob/user)
|
||||
. = list()
|
||||
var/obj/item/card/id/C = user.get_idcard(TRUE)
|
||||
.["cost_mult"] = 1
|
||||
.["cost_text"] = ""
|
||||
if(C && 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
|
||||
else
|
||||
.["user"]["job"] = "No Job"
|
||||
var/cost_mult = get_best_discount(C)
|
||||
if(cost_mult != 1)
|
||||
.["cost_mult"] = cost_mult
|
||||
if(cost_mult < 1)
|
||||
.["cost_text"] = " ([(1 - cost_mult) * 100]% OFF)"
|
||||
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
|
||||
.["cost_text"] = " ([(cost_mult - 1) * 100]% EXTRA)"
|
||||
.["user"]["job"] = "No Job"
|
||||
.["user"]["department"] = "No Department"
|
||||
.["stock"] = list()
|
||||
for (var/datum/data/vending_product/R in product_records + coin_records + hidden_records)
|
||||
.["stock"][R.name] = R.amount
|
||||
.
|
||||
.["extended_inventory"] = extended_inventory
|
||||
|
||||
/obj/machinery/vending/ui_act(action, params)
|
||||
@@ -752,7 +762,9 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
if(!R || !istype(R) || !R.product_path)
|
||||
vend_ready = TRUE
|
||||
return
|
||||
var/price_to_use = R.custom_price || default_price
|
||||
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
|
||||
@@ -766,8 +778,10 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
flick(icon_deny,src)
|
||||
vend_ready = TRUE
|
||||
return
|
||||
if(onstation && price_to_use >= 0)
|
||||
var/obj/item/card/id/C = usr.get_idcard(TRUE)
|
||||
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)
|
||||
@@ -778,11 +792,20 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
flick(icon_deny,src)
|
||||
vend_ready = TRUE
|
||||
return
|
||||
// else if(age_restrictions && R.age_restricted && (!C.registered_age || C.registered_age < AGE_MINOR))
|
||||
// say("You are not of legal age to purchase [R.name].")
|
||||
// if(!(usr in GLOB.narcd_underages))
|
||||
// Radio.set_frequency(FREQ_SECURITY)
|
||||
// Radio.talk_into(src, "SECURITY ALERT: Underaged crewmember [H] recorded attempting to purchase [R.name] in [get_area(src)]. Please watch for substance abuse.", FREQ_SECURITY)
|
||||
// GLOB.narcd_underages += H
|
||||
// flick(icon_deny,src)
|
||||
// vend_ready = TRUE
|
||||
// return
|
||||
var/datum/bank_account/account = C.registered_account
|
||||
if(coin_records.Find(R))
|
||||
price_to_use = R.custom_premium_price || extra_price
|
||||
else if(!hidden_records.Find(R))
|
||||
price_to_use = round(price_to_use * get_best_discount(C))
|
||||
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)
|
||||
@@ -791,6 +814,8 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department)
|
||||
if(D)
|
||||
D.adjust_money(price_to_use)
|
||||
SSblackbox.record_feedback("amount", "vending_spent", price_to_use)
|
||||
//log_econ("[price_to_use] credits were inserted into [src] by [D.account_holder] to buy [R].")
|
||||
if(last_shopper != usr || purchase_message_cooldown < world.time)
|
||||
say("Thank you for shopping with [src]!")
|
||||
purchase_message_cooldown = world.time + 5 SECONDS
|
||||
|
||||
@@ -84,8 +84,10 @@
|
||||
/obj/item/clothing/suit/poncho = 1,
|
||||
/obj/item/clothing/suit/poncho/green = 1,
|
||||
/obj/item/clothing/suit/poncho/red = 1,
|
||||
/obj/item/clothing/head/maid = 1,
|
||||
/obj/item/clothing/under/costume/maid = 1,
|
||||
/obj/item/clothing/under/rank/civilian/janitor/maid = 1,
|
||||
/obj/item/clothing/gloves/evening = 1,
|
||||
/obj/item/clothing/glasses/cold=1,
|
||||
/obj/item/clothing/glasses/heat=1,
|
||||
/obj/item/clothing/suit/whitedress = 1,
|
||||
@@ -114,7 +116,8 @@
|
||||
/obj/item/gun/magic/wand = 2,
|
||||
/obj/item/clothing/glasses/sunglasses/garb = 2,
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold = 1,
|
||||
/obj/item/clothing/mask/muzzle = 2)
|
||||
/obj/item/clothing/mask/muzzle = 2,
|
||||
/obj/item/clothing/under/syndicate/camo/cosmetic = 3)
|
||||
premium = list(/obj/item/clothing/suit/pirate/captain = 2,
|
||||
/obj/item/clothing/head/pirate/captain = 2,
|
||||
/obj/item/clothing/head/helmet/roman/fake = 1,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
/obj/item/cartridge/security = 10,
|
||||
/obj/item/cartridge/janitor = 10,
|
||||
/obj/item/cartridge/signal/toxins = 10,
|
||||
/obj/item/cartridge/roboticist = 10,
|
||||
/obj/item/pda/heads = 10)
|
||||
premium = list(/obj/item/cartridge/captain = 2,
|
||||
/obj/item/cartridge/quartermaster = 2)
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
/obj/item/clothing/head/beret/blue = 3,
|
||||
/obj/item/clothing/glasses/monocle = 3,
|
||||
/obj/item/clothing/suit/jacket = 4,
|
||||
/obj/item/clothing/suit/jacket/flannel = 4,
|
||||
/obj/item/clothing/suit/jacket/flannel/red = 4,
|
||||
/obj/item/clothing/suit/jacket/flannel/aqua = 4,
|
||||
/obj/item/clothing/suit/jacket/flannel/brown = 4,
|
||||
/obj/item/clothing/suit/jacket/puffer/vest = 4,
|
||||
/obj/item/clothing/suit/jacket/puffer = 4,
|
||||
/obj/item/clothing/suit/hooded/cloak/david = 4,
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
/obj/machinery/vending/coffee
|
||||
name = "\improper Solar's Best Hot Drinks"
|
||||
desc = "A vending machine which dispenses hot drinks."
|
||||
product_ads = "Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies"
|
||||
product_ads = "Just what you need!;Have a drink!;Drink up!;It's good for you!;Would you like a hot joe?;I'd kill for some coffee!;The best beans in the galaxy.;Only the finest brew for you.;Mmmm. Nothing like a coffee.;I like coffee, don't you?;Coffee helps you work!;Try some tea.;We hope you like the best!;Try our new chocolate!;Admin conspiracies"
|
||||
icon_state = "coffee"
|
||||
icon_vend = "coffee-vend"
|
||||
products = list(/obj/item/reagent_containers/food/drinks/coffee = 25,
|
||||
/obj/item/reagent_containers/food/drinks/mug/tea = 25,
|
||||
/obj/item/reagent_containers/food/drinks/mug/tea/red = 10,
|
||||
/obj/item/reagent_containers/food/drinks/mug/tea/green = 10,
|
||||
/obj/item/reagent_containers/food/drinks/mug/coco = 25)
|
||||
contraband = list(/obj/item/reagent_containers/food/drinks/ice = 12)
|
||||
contraband = list(/obj/item/reagent_containers/food/drinks/ice = 12,
|
||||
/obj/item/reagent_containers/food/drinks/mug/tea/mush = 3,)
|
||||
premium = list(/obj/item/reagent_containers/food/condiment/milk = 2,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/cream = 2,
|
||||
/obj/item/reagent_containers/food/condiment/sugar = 1)
|
||||
/obj/item/reagent_containers/food/condiment/sugar = 1,
|
||||
/obj/item/reagent_containers/food/drinks/mug/tea/forest = 3,)
|
||||
|
||||
refill_canister = /obj/item/vending_refill/coffee
|
||||
default_price = PRICE_REALLY_CHEAP
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
product_slogans = "Kinky!;Sexy!;Check me out, big boy!"
|
||||
vend_reply = "Have fun, you shameless pervert!"
|
||||
products = list(
|
||||
/obj/item/clothing/head/maid = 5,
|
||||
/obj/item/clothing/under/costume/maid = 5,
|
||||
/obj/item/clothing/under/rank/civilian/janitor/maid = 5,
|
||||
/obj/item/clothing/gloves/evening = 5,
|
||||
/obj/item/clothing/neck/petcollar = 5,
|
||||
/obj/item/clothing/neck/petcollar/choker = 5,
|
||||
/obj/item/clothing/neck/petcollar/leather = 5,
|
||||
@@ -34,13 +36,10 @@
|
||||
/obj/item/clothing/under/misc/keyholesweater = 2,
|
||||
/obj/item/clothing/under/misc/stripper/mankini = 2,
|
||||
/obj/item/clothing/under/costume/jabroni = 2,
|
||||
/obj/item/dildo/flared/huge = 3,
|
||||
/obj/item/reagent_containers/glass/bottle/crocin = 5,
|
||||
/obj/item/reagent_containers/glass/bottle/camphor = 5
|
||||
/obj/item/dildo/flared/huge = 3
|
||||
)
|
||||
premium = list(
|
||||
/obj/item/clothing/accessory/skullcodpiece/fake = 3,
|
||||
/obj/item/reagent_containers/glass/bottle/hexacrocin = 10,
|
||||
/obj/item/clothing/under/pants/chaps = 5
|
||||
)
|
||||
refill_canister = /obj/item/vending_refill/kink
|
||||
|
||||
@@ -29,7 +29,12 @@
|
||||
/obj/item/storage/hypospraykit/brute = 2,
|
||||
/obj/item/storage/hypospraykit/enlarge = 2,
|
||||
/obj/item/reagent_containers/glass/bottle/vial/small = 5,
|
||||
/obj/item/storage/briefcase/medical = 2)
|
||||
/obj/item/storage/briefcase/medical = 2,
|
||||
/obj/item/stack/sticky_tape/surgical = 3,
|
||||
/obj/item/healthanalyzer/wound = 4,
|
||||
/obj/item/stack/medical/ointment = 2,
|
||||
/obj/item/stack/medical/suture = 2,
|
||||
/obj/item/stack/medical/bone_gel = 4)
|
||||
contraband = list(/obj/item/reagent_containers/pill/tox = 3,
|
||||
/obj/item/reagent_containers/pill/morphine = 4,
|
||||
/obj/item/reagent_containers/pill/charcoal = 6)
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
/obj/item/reagent_containers/medspray/silver_sulf = 2,
|
||||
/obj/item/reagent_containers/pill/charcoal = 2,
|
||||
/obj/item/reagent_containers/medspray/sterilizine = 1,
|
||||
/obj/item/healthanalyzer/wound = 2,
|
||||
/obj/item/stack/medical/bone_gel = 2,
|
||||
/obj/item/reagent_containers/syringe/dart = 10)
|
||||
contraband = list(/obj/item/reagent_containers/pill/tox = 2,
|
||||
/obj/item/reagent_containers/pill/morphine = 2)
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
/obj/item/reagent_containers/food/snacks/no_raisin = 5,
|
||||
/obj/item/reagent_containers/food/snacks/spacetwinkie = 5,
|
||||
/obj/item/reagent_containers/food/snacks/cheesiehonkers = 5,
|
||||
/obj/item/reagent_containers/food/snacks/cornchips = 5)
|
||||
/obj/item/reagent_containers/food/snacks/cornchips = 5,
|
||||
/obj/item/reagent_containers/food/snacks/energybar = 6)
|
||||
contraband = list(
|
||||
/obj/item/reagent_containers/food/snacks/cracker = 10,
|
||||
/obj/item/reagent_containers/food/snacks/honeybar = 5,
|
||||
|
||||
@@ -248,6 +248,7 @@
|
||||
vend_reply = "Thank you for using the BarDrobe!"
|
||||
products = list(/obj/item/clothing/head/that = 3,
|
||||
/obj/item/radio/headset/headset_srv = 3,
|
||||
/obj/item/clothing/suit/hooded/wintercoat/bar = 3,
|
||||
/obj/item/clothing/under/suit/sl = 3,
|
||||
/obj/item/clothing/under/rank/civilian/bartender = 3,
|
||||
/obj/item/clothing/under/rank/civilian/bartender/skirt = 2,
|
||||
|
||||
Reference in New Issue
Block a user