mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Sell thaler for cargo points!
This commit is contained in:
@@ -141,6 +141,7 @@ var/list/mechtoys = list(
|
|||||||
var/points_per_slip = 2
|
var/points_per_slip = 2
|
||||||
var/points_per_platinum = 5 // 5 points per sheet
|
var/points_per_platinum = 5 // 5 points per sheet
|
||||||
var/points_per_phoron = 5
|
var/points_per_phoron = 5
|
||||||
|
var/points_per_money = 0.02
|
||||||
//control
|
//control
|
||||||
var/ordernum
|
var/ordernum
|
||||||
var/list/shoppinglist = list()
|
var/list/shoppinglist = list()
|
||||||
@@ -187,6 +188,7 @@ var/list/mechtoys = list(
|
|||||||
|
|
||||||
var/phoron_count = 0
|
var/phoron_count = 0
|
||||||
var/plat_count = 0
|
var/plat_count = 0
|
||||||
|
var/money_count = 0
|
||||||
|
|
||||||
for(var/atom/movable/MA in area_shuttle)
|
for(var/atom/movable/MA in area_shuttle)
|
||||||
if(MA.anchored) continue
|
if(MA.anchored) continue
|
||||||
@@ -215,6 +217,11 @@ var/list/mechtoys = list(
|
|||||||
switch(P.get_material_name())
|
switch(P.get_material_name())
|
||||||
if("phoron") phoron_count += P.get_amount()
|
if("phoron") phoron_count += P.get_amount()
|
||||||
if("platinum") plat_count += P.get_amount()
|
if("platinum") plat_count += P.get_amount()
|
||||||
|
|
||||||
|
//Sell spacebucks
|
||||||
|
if(istype(A, /obj/item/weapon/spacecash))
|
||||||
|
var/obj/item/weapon/spacecash/cashmoney = A
|
||||||
|
money_count += cashmoney.worth
|
||||||
qdel(MA)
|
qdel(MA)
|
||||||
|
|
||||||
if(phoron_count)
|
if(phoron_count)
|
||||||
@@ -223,6 +230,9 @@ var/list/mechtoys = list(
|
|||||||
if(plat_count)
|
if(plat_count)
|
||||||
points += plat_count * points_per_platinum
|
points += plat_count * points_per_platinum
|
||||||
|
|
||||||
|
if(money_count)
|
||||||
|
points += money_count * points_per_money
|
||||||
|
|
||||||
//Buyin
|
//Buyin
|
||||||
proc/buy()
|
proc/buy()
|
||||||
if(!shoppinglist.len) return
|
if(!shoppinglist.len) return
|
||||||
|
|||||||
Reference in New Issue
Block a user