Vending machines now work off of a point based system, A-la oldcode.

This commit is contained in:
SkyMarshal
2012-03-14 02:11:31 -07:00
parent ac03e51fd3
commit e74f7a4c39
4 changed files with 160 additions and 67 deletions

View File

@@ -5,7 +5,7 @@
icon_state = "wardrobe_sealed"
item_state = "wardrobe"
w_class = 4
layer = BACKGROUND_LAYER + OBJ_LAYER
layer = 2.99
var
descriptor = "various clothing"
seal_torn = 0
@@ -63,7 +63,7 @@
update_icon()
examine()
set src in oview(7)
set src in view()
..()
if(src in usr)
usr << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."

View File

@@ -11,10 +11,13 @@
var/vend_delay = 10 //How long does it take to vend?
var/product_paths = "" //String of product paths separated by semicolons. No spaces!
var/product_amounts = "" //String of product amounts separated by semicolons, must have amount for every path in product_paths
var/points = 10
var/product_prices = "" //String of product prices in Points separated by semicolons, must have amount for every path in product_paths
var/product_slogans = "" //String of slogans separated by semicolons, optional
var/product_ads = "" //String of small ad messages in the vending screen - random chance
var/product_hidden = "" //String of products that are hidden unless hacked.
var/product_hideamt = "" //String of hidden product amounts, separated by semicolons. Exact same as amounts. Must be left blank if hidden is.
var/hidden_prices = "" //String of product prices for hidden items
var/product_coin = ""
var/product_coin_amt = ""
var/list/product_records = list()
@@ -43,19 +46,23 @@
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
icon_state = "boozeomat" //////////////18 drink entities below, plus the glasses, in case someone wants to edit the number of bottles
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/bottle/gin;/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey;/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla;/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka;/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth;/obj/item/weapon/reagent_containers/food/drinks/bottle/rum;/obj/item/weapon/reagent_containers/food/drinks/bottle/wine;/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac;/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua;/obj/item/weapon/reagent_containers/food/drinks/beer;/obj/item/weapon/reagent_containers/food/drinks/ale;/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice;/obj/item/weapon/reagent_containers/food/drinks/bottle/cream;/obj/item/weapon/reagent_containers/food/drinks/tonic;/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/sodawater;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/weapon/reagent_containers/food/drinks/ice"
product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;15;30;9"
// product_amounts = "5;5;5;5;5;5;5;5;5;6;6;4;4;4;4;8;8;15;30;9"
product_prices = "6;6;6;6;6;6;6;6;6;6;6;7;7;7;7;4;4;2;1;4"
vend_delay = 15
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/tea"
product_hideamt = "10"
hidden_prices = "4"
points = 60
product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?"
product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!"
charge_type = "bar"
/obj/machinery/vending/assist
product_amounts = "5;3;4;1;4"
product_hidden = "/obj/item/device/flashlight;obj/item/device/assembly/timer"
product_paths = "/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/signaler;/obj/item/weapon/wirecutters;/obj/item/weapon/cartridge/signal"
product_hideamt = "5;2"
// product_amounts = "5;3;4;1;4"
product_prices = "2;3;3;10;3"
product_hidden = "/obj/item/device/flashlight;obj/item/device/assembly/timer"
// product_hideamt = "5;2"
hidden_prices = "2;5"
product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
/obj/machinery/vending/coffee
@@ -64,11 +71,12 @@
icon_state = "coffee"
icon_vend = "coffee-vend"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/coffee;/obj/item/weapon/reagent_containers/food/drinks/tea;/obj/item/weapon/reagent_containers/food/drinks/h_chocolate"
product_amounts = "25;25;25"
product_prices = "1;1;1"
vend_delay = 34
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/ice"
// product_hideamt = "10"
hidden_prices = "1"
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_hideamt = "10"
charge_type = "coffee"
/obj/machinery/vending/snack
@@ -76,10 +84,12 @@
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
icon_state = "snack"
product_paths = "/obj/item/weapon/reagent_containers/food/snacks/candy;/obj/item/weapon/reagent_containers/food/drinks/dry_ramen;/obj/item/weapon/reagent_containers/food/snacks/chips;/obj/item/weapon/reagent_containers/food/snacks/sosjerky;/obj/item/weapon/reagent_containers/food/snacks/no_raisin;/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie;/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers"
product_amounts = "10;10;10;10;10;10;10"
// product_amounts = "10;10;10;10;10;10;10"
product_prices = "1;1;1;1;1;1;1"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_hidden = "/obj/item/weapon/reagent_containers/food/snacks/syndicake"
product_hideamt = "10"
// product_hideamt = "10"
hidden_prices = "1"
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
charge_type = "snack"
@@ -89,9 +99,11 @@
icon_state = "Cola_Machine"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/cola;/obj/item/weapon/reagent_containers/food/drinks/space_mountain_wind;/obj/item/weapon/reagent_containers/food/drinks/dr_gibb;/obj/item/weapon/reagent_containers/food/drinks/starkist;/obj/item/weapon/reagent_containers/food/drinks/space_up"
product_amounts = "10;10;10;10;10"
product_prices = "1;1;1;1;1"
product_slogans = "Robust Softdrinks: More robust then a toolbox to the head!"
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/thirteenloko"
product_hideamt = "5"
hidden_prices = "2"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
charge_type = "soda"
@@ -101,10 +113,12 @@
icon_state = "cart"
icon_deny = "cart-deny"
product_paths = "/obj/item/weapon/cartridge/medical;/obj/item/weapon/cartridge/engineering;/obj/item/weapon/cartridge/security;/obj/item/weapon/cartridge/janitor;/obj/item/weapon/cartridge/signal/toxins;/obj/item/device/pda/heads;/obj/item/weapon/cartridge/captain;/obj/item/weapon/cartridge/quartermaster"
product_amounts = "10;10;10;10;10;10;3;10"
// product_amounts = "10;10;10;10;10;10;3;10"
product_prices = "1;1;1;1;1;1;3;1"
product_slogans = ""
product_hidden = ""
product_hideamt = ""
// product_hideamt = ""
hidden_prices = "2"
charge_type = "cart"
/obj/machinery/vending/cigarette
@@ -112,11 +126,13 @@
desc = "If you want to get cancer, might as well do it in style"
icon_state = "cigs"
product_paths = "/obj/item/weapon/cigpacket;/obj/item/weapon/matchbox"
product_amounts = "10;10"
// product_amounts = "10;10"
product_prices = "1;1"
product_slogans = "Space cigs taste good like a cigarette should.;I'd rather toolbox than switch.;Smoke!;Don't believe the reports - smoke today!"
vend_delay = 34
product_hidden = "/obj/item/weapon/zippo"
product_hideamt = "4"
// product_hideamt = "4"
hidden_prices = "2"
product_coin = "/obj/item/clothing/mask/cigarette/cigar/havanian"
product_coin_amt = "2"
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs."
@@ -128,10 +144,12 @@
icon_state = "med"
icon_deny = "med-deny"
req_access_txt = "5"
product_paths = "/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
product_amounts = "4;4;4;4;4;12;5;4;2"
product_paths = "/obj/item/clothing/under/rank/medical;/obj/item/clothing/under/rank/chemist;/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/shoes/white;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/syringe;/obj/item/device/healthanalyzer;/obj/item/weapon/reagent_containers/glass/beaker;/obj/item/weapon/reagent_containers/dropper"
// product_amounts = "4;4;4;4;4;12;5;4;2"
product_prices = "1;1;1;1;2;2;2;2;2;2;1;2;2;5"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox;/obj/item/weapon/reagent_containers/pill/stox;/obj/item/weapon/reagent_containers/pill/antitox"
product_hideamt = "3;4;6"
// product_hideamt = "3;4;6"
hidden_prices = "3;3;2"
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
charge_type = "medical"
@@ -142,9 +160,11 @@
icon_deny = "wallmed-deny"
req_access_txt = "5"
product_paths = "/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/weapon/reagent_containers/syringe/inaprovaline;/obj/item/device/healthanalyzer"
product_amounts = "2;2;4;1"
// product_amounts = "2;2;4;1"
product_prices = "5;5;2;10"
product_hidden = "/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/weapon/reagent_containers/syringe/antiviral;/obj/item/weapon/reagent_containers/pill/tox"
product_hideamt = "4;4;1"
// product_hideamt = "4;4;1"
hidden_prices = "3;3;10"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
charge_type = "medical"
@@ -156,9 +176,11 @@
icon_deny = "wallmed-deny"
req_access_txt = "5"
product_paths = "/obj/item/weapon/reagent_containers/syringe/inaprovaline;/obj/item/weapon/reagent_containers/syringe/antitoxin;/obj/item/stack/medical/bruise_pack;/obj/item/stack/medical/ointment;/obj/item/device/healthanalyzer"
product_amounts = "5;3;3;3;3"
// product_amounts = "5;3;3;3;3"
product_prices = "2;3;3;3;3"
product_hidden = "/obj/item/weapon/reagent_containers/pill/tox"
product_hideamt = "3"
// product_hideamt = "3"
hidden_prices = "3"
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
charge_type = "medical"
@@ -168,10 +190,12 @@
icon_state = "sec"
icon_deny = "sec-deny"
req_access_txt = "1"
product_paths = "/obj/item/weapon/handcuffs;/obj/item/weapon/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut;/obj/item/weapon/storage/box/evidence"
product_amounts = "8;4;5;12;6"
product_paths = "/obj/item/clothing/under/color/red;/obj/item/clothing/under/ftech;/obj/item/clothing/under/det;/obj/item/clothing/suit/storage/det_suit;/obj/item/clothing/head/det_hat;/obj/item/clothing/head/helmet;/obj/item/clothing/suit/armor/vest;/obj/item/clothing/suit/storage/gearharness;/obj/item/weapon/storage/belt/security;/obj/item/device/radio/headset/security;/obj/item/weapon/handcuffs;/obj/item/weapon/flashbang;/obj/item/device/flash;/obj/item/weapon/reagent_containers/food/snacks/donut;/obj/item/weapon/storage/box/evidence"
// product_amounts = "8;4;5;12;6"
product_prices = "1;1;1;1;1;3;3;3;2;1;1;3;2;1;2"
product_hidden = "/obj/item/clothing/glasses/sunglasses;/obj/item/kitchen/donut_box"
product_hideamt = "2;2"
// product_hideamt = "2;2"
hidden_prices = "5;5"
product_ads = "Crack capitalist skulls!;Beat some heads in!;Don't forget - harm is good!;Your weapons are right here.;Handcuffs!;Freeze, scumbag!;Don't tase me bro!;Tase them, bro.;Why not have a donut?"
charge_type = "security"
@@ -181,10 +205,13 @@
icon_state = "nutri"
icon_deny = "nutri-deny"
product_paths = "/obj/item/nutrient/ez;/obj/item/nutrient/l4z;/obj/item/nutrient/rh;/obj/item/weapon/pestspray;/obj/item/weapon/reagent_containers/syringe;/obj/item/weapon/plantbag"
product_amounts = "35;25;15;20;5;5"
// product_amounts = "35;25;15;20;5;5"
product_prices = "1;1;2;2;7;7"
product_slogans = "Aren't you glad you don't have to fertilize the natural way?;Now with 50% less stink!;Plants are people too!"
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/ammonia;/obj/item/weapon/reagent_containers/glass/bottle/diethylamine"
product_hideamt = "10;5"
// product_hideamt = "10;5"
hidden_prices = "1;2"
points = 20
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
charge_type = "hydroponics"
@@ -193,26 +220,32 @@
desc = "When you need seeds fast!"
icon_state = "seeds"
product_paths = "/obj/item/seeds/bananaseed;/obj/item/seeds/berryseed;/obj/item/seeds/carrotseed;/obj/item/seeds/chantermycelium;/obj/item/seeds/chiliseed;/obj/item/seeds/cornseed;/obj/item/seeds/eggplantseed;/obj/item/seeds/potatoseed;/obj/item/seeds/replicapod;/obj/item/seeds/soyaseed;/obj/item/seeds/sunflowerseed;/obj/item/seeds/tomatoseed;/obj/item/seeds/towermycelium;/obj/item/seeds/wheatseed;/obj/item/seeds/appleseed;/obj/item/seeds/poppyseed;/obj/item/seeds/ambrosiavulgarisseed;/obj/item/seeds/whitebeetseed;/obj/item/seeds/watermelonseed;/obj/item/seeds/limeseed;/obj/item/seeds/lemonseed;/obj/item/seeds/orangeseed;/obj/item/seeds/grassseed;/obj/item/seeds/sugarcaneseed;/obj/item/seeds/cocoapodseed;/obj/item/seeds/cabbageseed;/obj/item/seeds/grapeseed;/obj/item/seeds/pumpkinseed"
product_amounts = "3;2;2;2;2;2;2;2;3;2;2;2;2;2;3;5;4;3;3;3;3;3;3;3;3;3;3;3"
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/glowshroom;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium"
// product_amounts = "3;2;2;2;2;2;2;2;3;2;2;2;2;2;3;5;4;3;3;3;3;3;3;3;3;3;3;3"
product_prices = "3;5;5;5;5;5;5;5;3;5;5;5;5;5;3;2;3;3;3;3;3;3;3;3;3;3;3;3"
// product_hidden = "/obj/item/seeds/amanitamycelium;/obj/item/seeds/glowshroom;/obj/item/seeds/libertymycelium;/obj/item/seeds/nettleseed;/obj/item/seeds/plumpmycelium"
product_hideamt = "2;2;2;2;2"
hidden_prices = "5;5;5;5;5"
product_coin = "/obj/item/toy/waterflower"
product_coin_amt = "1"
points = 40
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
charge_type = "hydroponics"
/obj/machinery/vending/magivend
name = "MagiVend"
desc = "A magic vending machine."
icon_state = "MagiVend"
product_amounts = "1;1;1;1;1;2"
// product_amounts = "1;1;1;1;1;2"
product_prices = "10;10;10;10;10;5"
product_slogans = "Sling spells the proper way with MagiVend!;Be your own Houdini! Use MagiVend!"
product_paths = "/obj/item/clothing/head/wizard;/obj/item/clothing/suit/wizrobe;/obj/item/clothing/head/wizard/red;/obj/item/clothing/suit/wizrobe/red;/obj/item/clothing/shoes/sandal;/obj/item/weapon/staff"
vend_delay = 15
points = 55
vend_reply = "Have an enchanted evening!"
product_hidden = "/obj/item/weapon/reagent_containers/glass/bottle/wizarditis" //No one can get to the machine to hack it anyways
product_hideamt = "1" //Just one, for the lulz, not like anyone can get it - Microwave
// product_hideamt = "1" //Just one, for the lulz, not like anyone can get it - Microwave
hidden_prices = "10"
product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!"
/obj/machinery/vending/dinnerware
@@ -220,10 +253,12 @@
desc = "A kitchen and restaurant equipment vendor"
icon_state = "dinnerware"
product_paths = "/obj/item/weapon/tray;/obj/item/weapon/kitchen/utensil/fork;/obj/item/weapon/kitchenknife;/obj/item/weapon/reagent_containers/food/drinks/drinkingglass;/obj/item/clothing/suit/storage/chef/classic"
product_amounts = "8;6;3;8;2"
// product_amounts = "8;6;3;8;2"
product_prices = "1;2;3;1;5"
//product_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/kitchen/utensil/spoon;/obj/item/weapon/kitchen/utensil/knife;/obj/item/weapon/kitchen/rollingpin;/obj/item/weapon/butch"
product_hideamt = "2;2;2;2"
// product_hideamt = "2;2;2;2"
hidden_prices = "5;5;5;5"
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
charge_type = "kitchen"
@@ -232,10 +267,12 @@
desc = "Old sweet water vending machine"
icon_state = "sovietsoda"
product_paths = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda"
product_amounts = "30"
// product_amounts = "30"
product_prices = "1"
//product_amounts = "8;5;4" Old totals
product_hidden = "/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola"
product_hideamt = "20"
// product_hideamt = "20"
hidden_prices = "1"
product_ads = "What the fuck is this shit?;Why would you buy this;holy shit help;i'm stuck;in;a;universe;factory;AAAAAARGH!;HEIL... Stalin?;CAPITALIST PIGS;FUCK THE WEST"
charge_type = "soda"
@@ -246,13 +283,13 @@
icon_deny = "med-deny"
req_access_txt = "5"
product_paths = "/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/under/rank/geneticist;/obj/item/weapon/reagent_containers/glass/bottle/antitoxin;/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline;/obj/item/weapon/reagent_containers/glass/bottle/stoxin;/obj/item/weapon/reagent_containers/glass/bottle/toxin;/obj/item/weapon/reagent_containers/syringe"
product_amounts = "4;4;6;6;6;6;4"
//product_prices = "1;1;2;2;2;2;1"
// product_amounts = "4;4;6;6;6;6;4"
product_prices = "1;1;2;2;2;2;1"
product_hidden = ""
product_hideamt = ""
charge_type = "genetics"
/obj/machinery/vending/toxins
/*/obj/machinery/vending/toxins
name = "Toxins dispenser"
desc = "Medical drug dispenser."
icon = 'objects.dmi'
@@ -264,7 +301,7 @@
//product_prices = "1;2;2;1;1;1;2;3;2;2;2;2;2"
product_hidden = ""
product_hideamt = ""
charge_type = "toxins"
charge_type = "toxins"*/
/obj/machinery/vending/engineering
name = "Robco Tool Maker"
@@ -272,9 +309,9 @@
icon_state = "engi"
icon_deny = "engi-deny"
req_access_txt = "10"
product_paths = "/obj/item/clothing/under/rank/chief_engineer;/obj/item/clothing/under/rank/engineer;/obj/item/clothing/shoes/orange;/obj/item/clothing/head/helmet/hardhat;/obj/item/weapon/storage/belt/utility;/obj/item/clothing/glasses/meson;/obj/item/clothing/gloves/yellow;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar;/obj/item/weapon/wirecutters;/obj/item/device/multitool;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/weapon/CableCoil/power;/obj/item/weapon/circuitry;/obj/item/weapon/cell;/obj/item/weapon/weldingtool;/obj/item/clothing/head/helmet/welding;/obj/item/weapon/light/tube;/obj/item/clothing/suit/fire"
product_amounts = "4;4;4;4;4;4;4;12;12;12;12;12;12;8;4;8;8;8;10;4"
//product_prices = "1;1;1;2;2;1;2;1;1;2;2;1;1;1;2;2;1;1;1;2"
product_paths = "/obj/item/clothing/under/rank/chief_engineer;/obj/item/clothing/under/rank/engineer;/obj/item/clothing/shoes/orange;/obj/item/clothing/head/helmet/hardhat;/obj/item/weapon/storage/belt/utility;/obj/item/clothing/glasses/meson;/obj/item/clothing/gloves/yellow;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar;/obj/item/weapon/wirecutters;/obj/item/device/multitool;/obj/item/weapon/wrench;/obj/item/device/t_scanner;/obj/item/weapon/CableCoil/power;/obj/item/weapon/circuitry;/obj/item/weapon/cell;/obj/item/weapon/weldingtool;/obj/item/clothing/head/helmet/welding;/obj/item/weapon/light/tube;/obj/item/clothing/suit/fire;/obj/item/weapon/stock_parts/scanning_module;/obj/item/weapon/stock_parts/micro_laser;/obj/item/weapon/stock_parts/matter_bin;/obj/item/weapon/stock_parts/manipulator;/obj/item/weapon/stock_parts/console_screen"
// product_amounts = "4;4;4;4;4;4;4;12;12;12;12;12;12;8;4;8;8;8;10;4"
product_prices = "1;1;1;2;2;1;2;1;1;2;2;1;1;1;2;2;1;1;1;2;2;2;2;2;2"
product_hidden = ""
product_hideamt = ""
charge_type = "engineering"
@@ -284,13 +321,28 @@
desc = "All the fine parts you need in one vending machine!"
product_hidden = ""
product_hideamt = ""
product_paths = "/obj/item/device/transfer_valve;/obj/item/device/assembly/signaler;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/timer"
product_amounts = "6;6;6;6;6"
charge_type = "toxinslab"
product_paths = "/obj/item/clothing/under/rank/scientist;/obj/item/clothing/suit/bio_suit;/obj/item/clothing/head/bio_hood;/obj/item/device/transfer_valve;/obj/item/device/assembly/signaler;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/igniter;/obj/item/device/assembly/timer"
// product_amounts = "6;6;6;6;6"
product_prices = "1;2;2;2;2;2;2;2"
charge_type = "toxins"
/obj/machinery/vending/robotics
name = "Robotech Deluxe"
desc = "All the tools you need to create your own robot army."
icon_state = "robotics"
icon_deny = "robotics-deny"
req_access_txt = "29"
product_paths = "/obj/item/clothing/suit/storage/labcoat;/obj/item/clothing/under/rank/roboticist;/obj/item/weapon/cable_coil;/obj/item/device/flash;/obj/item/weapon/cell/high;/obj/item/device/assembly/prox_sensor;/obj/item/device/assembly/signaler;/obj/item/device/healthanalyzer;/obj/item/weapon/scalpel;/obj/item/weapon/circular_saw;/obj/item/weapon/tank/anesthetic;/obj/item/clothing/mask/medical;/obj/item/weapon/screwdriver;/obj/item/weapon/crowbar"
//product_amounts = "4;4;4;4;12"
product_prices = "1;1;1;1;3;2;2;2;4;4;2;1;1;1"
product_hidden = ""
hidden_prices = ""
charge_type = "robotics"
/obj/item/weapon/vending_charge
name = "Vending Charge"
var/charge_type = "generic"
var/charge_amt = 10
icon = 'vending.dmi'
icon_state = "generic-charge"
@@ -303,7 +355,7 @@
name = "Chemistry Charge"
charge_type = "chemistry"
icon_state = "chemistry-charge"
var/charge_amt = 25 // only used by chemistry now
charge_amt = 25 // only used by chemistry now
/obj/item/weapon/vending_charge/genetics
name = "Genetics Charge"
@@ -324,6 +376,7 @@
name = "Bar Charge"
charge_type = "bar"
icon_state = "bar-charge"
charge_amt = 40
/obj/item/weapon/vending_charge/kitchen
name = "Kitchen Charge"
@@ -370,7 +423,7 @@
charge_type = "soda"
icon_state = "soda-charge"
/obj/item/weapon/vending_charge/toxinslab
/*/obj/item/weapon/vending_charge/toxinslab
name = "Toxins Lab Charge"
charge_type = "toxinslab"
icon_state = "toxinslab-charge"
icon_state = "toxinslab-charge"*/

View File

@@ -23,6 +23,7 @@ To combat this, I changed the window name. -- Doohl
var/product_name = "generic"
var/product_path = null
var/amount = 0
var/price = 0
var/charge_amount = 0
var/display_color = "blue"
@@ -33,20 +34,21 @@ To combat this, I changed the window name. -- Doohl
src.slogan_list = dd_text2List(src.product_slogans, ";")
//src.small_ads = dd_text2List(src.product_ads, ";") // huehue
var/list/temp_paths = dd_text2List(src.product_paths, ";")
var/list/temp_amounts = dd_text2List(src.product_amounts, ";")
// var/list/temp_amounts = dd_text2List(src.product_amounts, ";")
var/list/temp_hidden = dd_text2List(src.product_hidden, ";")
var/list/temp_hideamt = dd_text2List(src.product_hideamt, ";")
// var/list/temp_hideamt = dd_text2List(src.product_hideamt, ";")
var/list/temp_coin = dd_text2List(src.product_coin, ";")
var/list/temp_coin_amt = dd_text2List(src.product_coin_amt, ";")
var/list/temp_prices = dd_text2list(src.product_prices, ";")
var/list/temp_hiddenprices = dd_text2list(src.hidden_prices, ";")
//Little sanity check here
if ((isnull(temp_paths)) || (isnull(temp_amounts)) || (temp_paths.len != temp_amounts.len) || (temp_hidden.len != temp_hideamt.len))
if ((isnull(temp_paths)) || (isnull(temp_prices)) || (temp_paths.len != temp_prices.len))
stat |= BROKEN
power_change()
return
src.build_inventory(temp_paths,temp_amounts)
src.build_inventory(temp_paths,temp_prices)
//Add hidden inventory
src.build_inventory(temp_hidden,temp_hideamt, 1)
src.build_inventory(temp_hidden,temp_hiddenprices,1)
src.build_inventory(temp_coin,temp_coin_amt, 0, 1)
power_change()
@@ -91,14 +93,16 @@ To combat this, I changed the window name. -- Doohl
var/datum/data/vending_product/R = new /datum/data/vending_product( )
R.product_name = capitalize(temp.name)
R.product_path = path_list[p]
R.amount = text2num(amt_list[p])
R.charge_amount = R.amount
if(hidden)
R.price = text2num(amt_list[p])
src.hidden_records += R
else if(req_coin)
R.amount = text2num(amt_list[p])
src.coin_records += R
else
R.price = text2num(amt_list[p])
src.product_records += R
del(temp)
@@ -111,6 +115,7 @@ To combat this, I changed the window name. -- Doohl
winset(user, "vendingwindow_n.title", "text=\"[src.name]\"")
winset(user, "vendingwindow_n.advert", "text=\"\"")
winset(user, "vendingwindow_n.label2", "text=\"Points: [points]\"")
/*if(prob(25) && small_ads.len)
var/advert = pick(small_ads)
@@ -152,10 +157,13 @@ To combat this, I changed the window name. -- Doohl
if(product)
winshow(user, "vendingwindow_n.stock[i]", 1) // unhide things
winshow(user, "vendingwindow_n.product[i]", 1) // unhide things
winset(user, "vendingwindow_n.stock[i]", "text=\"[product.amount]\"") // set stock number label
if(!(product in coin_records))
winset(user, "vendingwindow_n.stock[i]", "text=\"[product.price]\"") // set stock number label
else
winset(user, "vendingwindow_n.stock[i]", "text=\"[product.amount]\"") // set stock number label
winset(user, "vendingwindow_n.product[i]", "text=\"[product.product_name]\"") // set product button name
if(product.amount <= 0)
if(product.amount <= 0 && product.price > points)
winset(user, "vendingwindow_n.product[i]", "is-disabled=true") // disable product button, makes it unclickable and gives it that "disabled" look
winset(user, "vendingwindow_n.product[i]", "background-color=#526F7C") // Darken the button
@@ -263,7 +271,7 @@ To combat this, I changed the window name. -- Doohl
var/datum/data/vending_product/R = products[base + num]
var/product_path = text2path(R.product_path)
if (R.amount <= 0)
if (R.amount <= 0 && !R.price)
return
if (!src.vend_ready)
return
@@ -286,7 +294,8 @@ To combat this, I changed the window name. -- Doohl
else
del(coin)
R.amount--
if(R.amount)
R.amount--
//src.vend_ready = 0
/*
@@ -306,7 +315,11 @@ To combat this, I changed the window name. -- Doohl
// spawn(src.vend_delay) NOPE.jpg
//src.vend_ready = 1
new product_path(get_turf(src))
if(R.price <= points)
new product_path(get_turf(src))
points -= R.price
else
usr << "The machine does not have enough points to do this!"
if(R)
if(R in coin_records)
@@ -357,11 +370,12 @@ To combat this, I changed the window name. -- Doohl
/obj/machinery/vending/proc/DoCharge(obj/item/weapon/vending_charge/V as obj, mob/user as mob)
if(charge_type == V.charge_type)
var/datum/data/vending_product/R
for(var/i=1, i<=product_records.len, i++)
R = product_records[i]
R.amount += R.charge_amount
product_records[i] = R
// var/datum/data/vending_product/R
// for(var/i=1, i<=product_records.len, i++)
// R = product_records[i]
// R.amount += R.charge_amount
// product_records[i] = R
points += V.charge_amt
del(V)
user << "You insert the charge into the machine."

View File

@@ -1689,7 +1689,7 @@ window "vendingslot"
window "vendingwindow_n"
elem "vendingwindow_n"
type = MAIN
pos = 281,0
pos = 1604,378
size = 300x438
anchor1 = none
anchor2 = none
@@ -1726,6 +1726,32 @@ window "vendingwindow_n"
macro = "vending"
menu = ""
on-close = ""
elem "label2"
type = LABEL
pos = 0,0
size = 80x16
anchor1 = none
anchor2 = none
font-family = ""
font-size = 0
font-style = ""
text-color = #0000a0
background-color = #ff8000
is-visible = true
is-disabled = false
is-transparent = false
is-default = false
border = sunken
drop-zone = false
right-click = false
saved-params = ""
on-size = ""
text = ""
image = ""
image-mode = center
keep-aspect = false
align = center
text-wrap = false
elem "page"
type = LABEL
pos = 64,416