mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -369,9 +369,10 @@ var/datum/cameranet/cameranet = new()
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/switchCamera(var/obj/machinery/camera/C)
|
||||
eyeobj.loc = C.loc
|
||||
cameranet.visibility(eyeobj)
|
||||
return
|
||||
if(C && isturf(C.loc))
|
||||
eyeobj.loc = C.loc
|
||||
cameranet.visibility(eyeobj)
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
|
||||
if (user != src)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
voice_name = "tajaran"
|
||||
icon = 'tajaran.dmi'
|
||||
icon_state = "m-none"
|
||||
var/list/tajspeak_letters
|
||||
var/list/tajspeak_letters = list("~","*","-")
|
||||
//
|
||||
universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans
|
||||
taj_talk_understand = 1
|
||||
@@ -12,8 +12,6 @@
|
||||
examine_text = "one of the cat-like Tajarans."
|
||||
|
||||
/mob/living/carbon/human/tajaran/New()
|
||||
tajspeak_letters = new/list("~","*","-")
|
||||
|
||||
var/g = "m"
|
||||
if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
@@ -26,6 +26,10 @@ log transactions
|
||||
del I
|
||||
|
||||
/obj/machinery/atm/attack_hand(mob/user as mob)
|
||||
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
|
||||
|
||||
var/obj/item/weapon/card/id/user_id = src.scan_user(user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -71,11 +71,107 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
src.menu_message += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
|
||||
category_items++
|
||||
|
||||
// src.menu_message += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
|
||||
src.menu_message += "<HR>"
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
if (href_list["buy_item"])
|
||||
/* if(href_list["buy_item"] == "random")
|
||||
var/list/randomItems = list()
|
||||
|
||||
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
|
||||
//Add only items the player can afford:
|
||||
if(uses > 19)
|
||||
randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
|
||||
|
||||
if(uses > 9)
|
||||
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
|
||||
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter
|
||||
randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
|
||||
|
||||
//if(uses > 8) //Nothing... yet.
|
||||
//if(uses > 7) //Nothing... yet.
|
||||
|
||||
if(uses > 6)
|
||||
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
|
||||
randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
|
||||
|
||||
if(uses > 5)
|
||||
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
|
||||
|
||||
if(uses > 4)
|
||||
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
|
||||
randomItems.Add("/obj/item/device/powersink") //Powersink
|
||||
|
||||
if(uses > 3)
|
||||
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
|
||||
|
||||
if(uses > 2)
|
||||
randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
|
||||
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
|
||||
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
|
||||
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
|
||||
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
|
||||
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
|
||||
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() //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
|
||||
|
||||
if(uses > 0)
|
||||
randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
|
||||
randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
|
||||
|
||||
if(!randomItems)
|
||||
del(randomItems)
|
||||
return 0
|
||||
else
|
||||
href_list["buy_item"] = pick(randomItems)
|
||||
|
||||
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" , "/obj/item/weapon/storage/box/syndicate")
|
||||
uses -= 10
|
||||
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")
|
||||
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/clothing/glasses/thermal")
|
||||
uses -= 3
|
||||
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique")
|
||||
uses -= 2
|
||||
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
|
||||
uses -= 1
|
||||
|
||||
del(randomItems)
|
||||
return 1
|
||||
*/
|
||||
|
||||
|
||||
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
|
||||
return 0
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/obj/item/tape/engineering
|
||||
name = "engineering tape"
|
||||
desc = "A length of engineering tape. Better not cross it."
|
||||
req_one_access = list(access_engine,access_atmospherics)
|
||||
req_access = list(access_engine,access_atmospherics)
|
||||
icon_base = "engineering"
|
||||
|
||||
/obj/item/taperoll/attack_self(mob/user as mob)
|
||||
@@ -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"
|
||||
|
||||
@@ -380,23 +380,31 @@
|
||||
return "I couldn't find [name]'s PDA."
|
||||
|
||||
// send message
|
||||
pda.tnote += "<i><b>← From [eliza.callsign]:</b></i><br>[object]<br>"
|
||||
if(!istype(eliza.speaker.loc.loc, /obj/item/device/pda))//Looking if we are in a PDA
|
||||
pda.tnote += "<i><b>← From [eliza.callsign]:</b></i><br>[object]<br>"
|
||||
|
||||
if(prob(15) && eliza.speaker) //Give the AI a chance of intercepting the message
|
||||
var/who = eliza.speaker
|
||||
if(prob(50))
|
||||
who = "[eliza.speaker:master] via [eliza.speaker]"
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [object]</i>")
|
||||
if(prob(15) && eliza.speaker) //Give the AI a chance of intercepting the message
|
||||
var/who = eliza.speaker
|
||||
if(prob(50))
|
||||
who = "[eliza.speaker:master] via [eliza.speaker]"
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [object]</i>")
|
||||
|
||||
if (!pda.silent)
|
||||
playsound(pda.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, pda.loc))
|
||||
O.show_message(text("\icon[pda] *[pda.ttone]*"))
|
||||
|
||||
pda.overlays = null
|
||||
pda.overlays += image('pda.dmi', "pda-r")
|
||||
if (!pda.silent)
|
||||
playsound(pda.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, pda.loc))
|
||||
O.show_message(text("\icon[pda] *[pda.ttone]*"))
|
||||
|
||||
pda.overlays = null
|
||||
pda.overlays += image('pda.dmi', "pda-r")
|
||||
else
|
||||
var/list/href_list = list()
|
||||
href_list["src"] = "\ref[eliza.speaker.loc.loc]"
|
||||
href_list["choice"] = "Message"
|
||||
href_list["target"] = "\ref[pda]"
|
||||
href_list["pAI_mess"] = "\"[object]\" \[Via pAI Unit\]"
|
||||
var/obj/item/device/pda/pda_im_in = eliza.speaker.loc.loc
|
||||
pda_im_in.Topic("src=\ref[eliza.speaker.loc.loc];choice=Message;target=\ref[pda];pAI_mess=\"[object] \[Via pAI Unit\]",href_list)
|
||||
return "Told [name], [object]."
|
||||
|
||||
/datum/text_parser/keyword/yes
|
||||
|
||||
165
code/WorkInProgress/animusstation/atm.dm
Normal file
165
code/WorkInProgress/animusstation/atm.dm
Normal file
@@ -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