mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Atmospherics refactor (#18460)
* Atmospherics refactor * META(GAMING) * Cleanup * RPD hotfix * Fox review * Do this * Well that escalated * Repath these * Ah yes, scope creep * Remove this comment * Regression #1
This commit is contained in:
@@ -2,21 +2,22 @@
|
||||
// Store Item
|
||||
/////////////////////////////
|
||||
/datum/storeitem
|
||||
var/name="Thing"
|
||||
var/desc="It's a thing."
|
||||
var/typepath=/obj/item/storage/box
|
||||
var/cost=0
|
||||
var/name = "Thing"
|
||||
var/desc = "It's a thing."
|
||||
var/typepath = /obj/item/storage/box
|
||||
var/cost = 0
|
||||
|
||||
/datum/storeitem/proc/deliver(mob/usr)
|
||||
/datum/storeitem/proc/deliver(mob/user)
|
||||
if(!istype(typepath,/obj/item/storage))
|
||||
var/obj/item/storage/box/box=new(usr.loc)
|
||||
var/obj/item/storage/box/box=new(user.loc)
|
||||
new typepath(box)
|
||||
box.name="[name] package"
|
||||
box.desc="A special gift for doing your job."
|
||||
usr.put_in_hands(box)
|
||||
user.put_in_hands(box)
|
||||
|
||||
else
|
||||
var/thing = new typepath(usr.loc)
|
||||
usr.put_in_hands(thing)
|
||||
var/thing = new typepath(user.loc)
|
||||
user.put_in_hands(thing)
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
@@ -52,14 +52,16 @@ GLOBAL_DATUM_INIT(centcomm_store, /datum/store, new())
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
/datum/store/proc/PlaceOrder(mob/living/usr, itemID)
|
||||
/datum/store/proc/PlaceOrder(mob/living/user, itemID)
|
||||
// Get our item, first.
|
||||
var/datum/storeitem/item = items[itemID]
|
||||
if(!item)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
// Try to deduct funds.
|
||||
if(!charge(usr.mind,item.cost,item))
|
||||
return 0
|
||||
if(!charge(user.mind,item.cost,item))
|
||||
return FALSE
|
||||
|
||||
// Give them the item.
|
||||
item.deliver(usr)
|
||||
return 1
|
||||
item.deliver(user)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user