mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
Conflicts: baystation12.dme
This commit is contained in:
@@ -95,7 +95,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
if(uses > 6)
|
||||
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
|
||||
randomItems.Add("/obj/machinery/singularity_beacon/syndicate") //Singularity Beacon
|
||||
randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
|
||||
|
||||
if(uses > 5)
|
||||
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
|
||||
@@ -108,7 +108,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
|
||||
randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
|
||||
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
|
||||
randomItems.Add("/obj/item/clothing/glasses/thermal") //Syndicate Space Suit
|
||||
|
||||
if(uses > 2)
|
||||
randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
|
||||
@@ -120,15 +119,19 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit
|
||||
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
|
||||
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant
|
||||
randomItems.Add("/obj/item/clothing/glasses/thermal") //Thermal Imaging Goggles
|
||||
|
||||
if(uses > 1)
|
||||
var/list/usrItems = usr.get_contents()
|
||||
/*
|
||||
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
|
||||
var/hasRevolver = 0
|
||||
for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
|
||||
if(istype(I,/obj/item/weapon/gun/projectile))
|
||||
hasRevolver = 1
|
||||
|
||||
if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
*/
|
||||
randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
|
||||
randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
|
||||
randomItems.Add("/obj/item/weapon/plastique") //C4
|
||||
|
||||
@@ -145,19 +148,19 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
switch(href_list["buy_item"]) //Ok, this gets a little messy, sorry.
|
||||
if("/obj/item/weapon/circuitboard/teleporter")
|
||||
uses -= 20
|
||||
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink")
|
||||
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
|
||||
uses -= 10
|
||||
if("/obj/item/weapon/aiModule/syndicate" , "/obj/machinery/singularity_beacon/syndicate" , "/obj/item/weapon/storage/box/syndicate")
|
||||
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
|
||||
uses -= 7
|
||||
if("/obj/item/weapon/gun/projectile")
|
||||
uses -= 6
|
||||
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
|
||||
uses -= 5
|
||||
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon" , "/obj/item/clothing/glasses/thermal")
|
||||
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
|
||||
uses -= 4
|
||||
if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
|
||||
"/obj/item/weapon/card/id/syndicate" , "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
|
||||
"/obj/item/weapon/storage/syndie_kit/imp_freedom")
|
||||
"/obj/item/weapon/storage/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal")
|
||||
uses -= 3
|
||||
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique")
|
||||
uses -= 2
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/turf/T = get_turf(A)
|
||||
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
|
||||
P.loc = locate(T.x,T.y,T.z)
|
||||
P.icon_state = "door"
|
||||
P.icon_state = "[src.icon_base]_door"
|
||||
P.layer = 3.2
|
||||
user << "\blue You finish placing the [src]."
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
new /obj/item/device/flashlight/pen(src)
|
||||
new /obj/item/clothing/gloves/latex(src)
|
||||
new /obj/item/clothing/suit/bio_suit/cmo(src)
|
||||
new /obj/item/clothing/head/bio_hood/general(src)
|
||||
new /obj/item/clothing/head/bio_hood/cmo(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/cmoalt(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
@@ -432,6 +432,7 @@
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/weapon/camera_film(src)
|
||||
|
||||
/obj/item/wardrobe/officer
|
||||
name = "\improper Security Officer Wardrobe"
|
||||
@@ -538,7 +539,7 @@
|
||||
new /obj/item/device/pda/quartermaster(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/under/rank/cargo(src)
|
||||
new /obj/item/clothing/under/rank/cargotech(src)
|
||||
|
||||
/obj/item/wardrobe/mining
|
||||
name = "\improper Shaft Miner Wardrobe"
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
|
||||
TODO:
|
||||
give money an actual use (QM stuff, vending machines)
|
||||
send money to people (might be worth attaching money to custom database thing for this, instead of being in the ID)
|
||||
log transactions
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/atm
|
||||
name = "\improper NanoTrasen Automatic Teller Machine"
|
||||
desc = "For all your monetary needs!"
|
||||
icon = 'terminals.dmi'
|
||||
icon_state = "atm"
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
var
|
||||
obj/item/weapon/card/id/card
|
||||
obj/item/weapon/spacecash/cashes = list()
|
||||
inserted = 0
|
||||
accepted = 0
|
||||
pincode = 0
|
||||
|
||||
attackby(var/obj/A, var/mob/user)
|
||||
if(istype(A,/obj/item/weapon/spacecash))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
inserted += A:worth
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/coin))
|
||||
if(istype(A,/obj/item/weapon/coin/iron))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
inserted += 1
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/coin/silver))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
inserted += 10
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/coin/gold))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
inserted += 50
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/coin/plasma))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
inserted += 2
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/coin/diamond))
|
||||
cashes += A
|
||||
user.drop_item()
|
||||
A.loc = src
|
||||
inserted += 300
|
||||
return
|
||||
user << "You insert your [A.name] in ATM"
|
||||
..()
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
if(istype(user, /mob/living/silicon))
|
||||
user << "\red Artificial unit recognized. Artificial units do not currently receive monetary compensation, as per NanoTrasen regulation #1005."
|
||||
return
|
||||
|
||||
if(!(stat && NOPOWER) && ishuman(user))
|
||||
var/dat
|
||||
user.machine = src
|
||||
if(!accepted)
|
||||
if(scan(user))
|
||||
pincode = input(usr,"Enter a pin-code") as num
|
||||
if(card.checkaccess(pincode,usr))
|
||||
accepted = 1
|
||||
// usr << sound('nya.mp3')
|
||||
else
|
||||
dat = null
|
||||
dat += "<h1>NanoTrasen Automatic Teller Machine</h1><br/>"
|
||||
dat += "For all your monetary needs!<br/><br/>"
|
||||
dat += "Welcome, [card.registered_name]. You have [card.money] credits deposited.<br>"
|
||||
dat += "Current inserted item value: [inserted] credits.<br><br>"
|
||||
dat += "Please, select action<br>"
|
||||
dat += "<a href=\"?src=\ref[src]&with=1\">Withdraw Physical Credits</a><br/>"
|
||||
dat += "<a href=\"?src=\ref[src]&eca=1\">Eject Inserted Items</a><br/>"
|
||||
dat += "<a href=\"?src=\ref[src]&ins=1\">Convert Inserted Items to Credits</a><br/>"
|
||||
dat += "<a href=\"?src=\ref[src]&lock=1\">Lock ATM</a><br/>"
|
||||
user << browse(dat,"window=atm")
|
||||
onclose(user,"close")
|
||||
proc
|
||||
withdraw(var/mob/user)
|
||||
if(accepted)
|
||||
var/amount = input("How much would you like to withdraw?", "Amount", 0) in list(1,10,20,50,100,200,500,1000, 0)
|
||||
if(amount == 0)
|
||||
return
|
||||
if(card.money >= amount)
|
||||
card.money -= amount
|
||||
switch(amount)
|
||||
if(1)
|
||||
new /obj/item/weapon/spacecash(loc)
|
||||
if(10)
|
||||
new /obj/item/weapon/spacecash/c10(loc)
|
||||
if(20)
|
||||
new /obj/item/weapon/spacecash/c20(loc)
|
||||
if(50)
|
||||
new /obj/item/weapon/spacecash/c50(loc)
|
||||
if(100)
|
||||
new /obj/item/weapon/spacecash/c100(loc)
|
||||
if(200)
|
||||
new /obj/item/weapon/spacecash/c200(loc)
|
||||
if(500)
|
||||
new /obj/item/weapon/spacecash/c500(loc)
|
||||
if(1000)
|
||||
new /obj/item/weapon/spacecash/c1000(loc)
|
||||
else
|
||||
user << "\red Error: Insufficient funds."
|
||||
return
|
||||
|
||||
scan(var/mob/user)
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.wear_id)
|
||||
if(istype(H.wear_id, /obj/item/weapon/card/id))
|
||||
card = H.wear_id
|
||||
return 1
|
||||
if(istype(H.wear_id,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/P = H.wear_id
|
||||
if(istype(P.id,/obj/item/weapon/card/id))
|
||||
card = P.id
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
insert()
|
||||
if(accepted)
|
||||
card.money += inserted
|
||||
inserted = 0
|
||||
|
||||
Topic(href,href_list)
|
||||
if (usr.machine==src && get_dist(src, usr) <= 1 || istype(usr, /mob/living/silicon/ai))
|
||||
if(href_list["eca"])
|
||||
if(accepted)
|
||||
for(var/obj/item/weapon/spacecash/M in cashes)
|
||||
M.loc = loc
|
||||
inserted = 0
|
||||
if(!cashes)
|
||||
cashes = null
|
||||
if(href_list["with"] && card)
|
||||
withdraw(usr)
|
||||
if(href_list["ins"] && card)
|
||||
if(accepted)
|
||||
card.money += inserted
|
||||
inserted = 0
|
||||
if(href_list["lock"])
|
||||
card = null
|
||||
accepted = 0
|
||||
usr.machine = null
|
||||
usr << browse(null,"window=atm")
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
usr.machine = null
|
||||
usr << browse(null,"window=atm")
|
||||
Reference in New Issue
Block a user