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:
AffectedArc07
2022-08-01 21:27:35 +01:00
committed by GitHub
parent 1d552ab0e4
commit 2da68e9b64
75 changed files with 1230 additions and 1265 deletions
+10 -9
View File
@@ -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)
/////////////////////////////
+8 -6
View File
@@ -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