mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
Added store computer & minor updates
This commit is contained in:
@@ -52,11 +52,11 @@ var/global/list/possibleEvents = list()
|
||||
possibleEvents[/datum/event/falsealarm] = 300
|
||||
possibleEvents[/datum/event/immovable_rod] = 200
|
||||
possibleEvents[/datum/event/vent_clog] = 300
|
||||
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_bluespace] = 150
|
||||
possibleEvents[/datum/event/anomaly/anomaly_flux] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_grav] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_pyro] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_vortex] = 200
|
||||
possibleEvents[/datum/event/anomaly/anomaly_vortex] = 150
|
||||
|
||||
possibleEvents[/datum/event/pda_spam] = max(min(25, player_list.len) * 4, 200)
|
||||
possibleEvents[/datum/event/money_lotto] = max(min(5, player_list.len), 50)
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/////////////////////////////
|
||||
// Store Item
|
||||
/////////////////////////////
|
||||
/datum/storeitem
|
||||
var/name="Thing"
|
||||
var/desc="It's a thing."
|
||||
var/typepath=/obj/item/weapon/storage/box
|
||||
var/cost=0
|
||||
|
||||
/datum/storeitem/proc/deliver(var/mob/usr)
|
||||
if(!istype(typepath,/obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/box/box=new(usr.loc)
|
||||
new typepath(box)
|
||||
box.name="[name] package"
|
||||
box.desc="A special gift for doing your job."
|
||||
usr.put_in_hands(box)
|
||||
else
|
||||
var/thing = new typepath(usr.loc)
|
||||
usr.put_in_hands(thing)
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
// Shit for robotics/science
|
||||
/////////////////////////////
|
||||
/*
|
||||
/datum/storeitem/robotnik_labcoat
|
||||
name = "Robotnik's Research Labcoat"
|
||||
desc = "Join the empire and display your hatred for woodland animals."
|
||||
typepath = /obj/item/clothing/suit/storage/labcoat/custom/N3X15/robotics
|
||||
cost = 350
|
||||
|
||||
/datum/storeitem/robotnik_jumpsuit
|
||||
name = "Robotics Interface Suit"
|
||||
desc = "A modern black and red design with reinforced seams and brass neural interface fittings."
|
||||
typepath = /obj/item/clothing/under/custom/N3X15/robotics
|
||||
cost = 500
|
||||
*/
|
||||
|
||||
/////////////////////////////
|
||||
// General
|
||||
/////////////////////////////
|
||||
/datum/storeitem/snap_pops
|
||||
name = "Snap-Pops"
|
||||
desc = "Ten-thousand-year-old chinese fireworks: IN SPACE"
|
||||
typepath = /obj/item/weapon/storage/box/snappops
|
||||
cost = 200
|
||||
|
||||
/datum/storeitem/crayons
|
||||
name = "Crayons"
|
||||
desc = "Let security know how they're doing by scrawling lovenotes all over their hallways."
|
||||
typepath = /obj/item/weapon/storage/fancy/crayons
|
||||
cost = 350
|
||||
|
||||
/datum/storeitem/pipe
|
||||
name = "smoking pipe"
|
||||
desc = "A pipe, for smoking. Probably made of meershaum or something."
|
||||
typepath = /obj/item/clothing/mask/cigarette/pipe
|
||||
cost = 350
|
||||
|
||||
/datum/storeitem/katana
|
||||
name = "replica katana"
|
||||
desc = "Woefully underpowered in D20."
|
||||
typepath = /obj/item/toy/katana
|
||||
cost = 500
|
||||
|
||||
/datum/storeitem/violin
|
||||
name = "space violin"
|
||||
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
|
||||
typepath = /obj/item/device/violin
|
||||
cost = 500
|
||||
|
||||
/datum/storeitem/baby
|
||||
name = "Toddler"
|
||||
desc = "This baby looks almost real. Wait, did it just burp?"
|
||||
typepath = /obj/item/weapon/toddler
|
||||
cost = 1000
|
||||
|
||||
/datum/storeitem/laserpointer
|
||||
name = "laser pointer"
|
||||
desc = "Don't shine it in your eyes!"
|
||||
typepath = /obj/item/device/laser_pointer
|
||||
cost = 1000
|
||||
|
||||
/datum/storeitem/banhammer
|
||||
desc = "A banhammer"
|
||||
name = "banhammer"
|
||||
typepath = /obj/item/weapon/banhammer
|
||||
cost = 2000
|
||||
@@ -0,0 +1,65 @@
|
||||
/*****************************
|
||||
* /vg/station In-Game Store *
|
||||
*****************************
|
||||
|
||||
By Nexypoo
|
||||
|
||||
The idea is to give people who do their jobs a reward.
|
||||
|
||||
Ideally, these items should be cosmetic in nature to avoid fucking up round balance.
|
||||
People joining the round get between $100 and $500. Keep this in mind.
|
||||
|
||||
Money should not persist between rounds, although a "bank" system to voluntarily store
|
||||
money between rounds might be cool. It'd need to be a bit volatile: perhaps completing
|
||||
job objectives = good stock market, shitty job objective completion = shitty economy.
|
||||
|
||||
Goal for now is to get the store itself working, however.
|
||||
*/
|
||||
|
||||
var/global/datum/store/centcomm_store=new
|
||||
|
||||
/datum/store
|
||||
var/list/datum/storeitem/items=list()
|
||||
var/list/datum/storeorder/orders=list()
|
||||
|
||||
var/obj/machinery/account_database/linked_db
|
||||
|
||||
/datum/store/New()
|
||||
for(var/itempath in typesof(/datum/storeitem) - /datum/storeitem/)
|
||||
items += new itempath()
|
||||
|
||||
/datum/store/proc/charge(var/datum/mind/mind,var/amount,var/datum/storeitem/item)
|
||||
if(!mind.initial_account)
|
||||
//testing("No initial_account")
|
||||
return 0
|
||||
if(mind.initial_account.money < amount)
|
||||
//testing("Not enough cash")
|
||||
return 0
|
||||
mind.initial_account.money -= amount
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[command_name()] Merchandising"
|
||||
T.purpose = "Purchase of [item.name]"
|
||||
T.amount = -amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = "\[CLASSIFIED\] Terminal #[rand(111,333)]"
|
||||
mind.initial_account.transaction_log.Add(T)
|
||||
return 1
|
||||
|
||||
/datum/store/proc/reconnect_database()
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
if(DB.z == 1)
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
/datum/store/proc/PlaceOrder(var/mob/living/usr, var/itemID)
|
||||
// Get our item, first.
|
||||
var/datum/storeitem/item = items[itemID]
|
||||
if(!item)
|
||||
return 0
|
||||
// Try to deduct funds.
|
||||
if(!charge(usr.mind,item.cost,item))
|
||||
return 0
|
||||
// Give them the item.
|
||||
item.deliver(usr)
|
||||
return 1
|
||||
Reference in New Issue
Block a user