mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise
Conflicts: maps/cyberiad.dmm
This commit is contained in:
@@ -213,58 +213,61 @@
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
var/transaction_amount = total()
|
||||
if(transaction_amount <= D.money)
|
||||
// if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
var/transaction_amount = total()
|
||||
if(transaction_amount <= D.money)
|
||||
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
vendor_account.money += transaction_amount
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
D.update_balance(D.account_number,D.money)
|
||||
//vendor_account.money += transaction_amount
|
||||
|
||||
//Transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[vendor_account.owner_name] (via [src.name])"
|
||||
T.purpose = "Purchase of Laptop"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of Laptop"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
newlap = new /obj/machinery/computer3/laptop/vended(src.loc)
|
||||
|
||||
choose_progs(C)
|
||||
vend()
|
||||
popup.close()
|
||||
newlap.close_computer()
|
||||
newlap = null
|
||||
cardreader = 0
|
||||
floppy = 0
|
||||
radionet = 0
|
||||
camera = 0
|
||||
network = 0
|
||||
power = 0
|
||||
//Transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "(via [src.name])"
|
||||
T.purpose = "Purchase of Laptop"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
/*
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of Laptop"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
*/
|
||||
|
||||
newlap = new /obj/machinery/computer3/laptop/vended(src.loc)
|
||||
|
||||
choose_progs(C)
|
||||
vend()
|
||||
popup.close()
|
||||
newlap.close_computer()
|
||||
newlap = null
|
||||
cardreader = 0
|
||||
floppy = 0
|
||||
radionet = 0
|
||||
camera = 0
|
||||
network = 0
|
||||
power = 0
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
// else
|
||||
// usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
|
||||
/obj/machinery/lapvend/proc/total()
|
||||
var/total = 0
|
||||
@@ -360,49 +363,50 @@
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
var/transaction_amount = total()
|
||||
// if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
var/transaction_amount = total()
|
||||
|
||||
//transfer the money
|
||||
D.money += transaction_amount
|
||||
vendor_account.money -= transaction_amount
|
||||
|
||||
//Transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[vendor_account.owner_name] (via [src.name])"
|
||||
T.purpose = "Return purchase of Laptop"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Return purchase of Laptop"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
del(relap)
|
||||
|
||||
vendmode = 0
|
||||
cardreader = 0
|
||||
floppy = 0
|
||||
radionet = 0
|
||||
camera = 0
|
||||
network = 0
|
||||
power = 0
|
||||
//transfer the money
|
||||
D.money += transaction_amount
|
||||
//vendor_account.money -= transaction_amount
|
||||
|
||||
//Transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "(via [src.name])"
|
||||
T.purpose = "Return purchase of Laptop"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
/*
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Return purchase of Laptop"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
*/
|
||||
del(relap)
|
||||
|
||||
vendmode = 0
|
||||
cardreader = 0
|
||||
floppy = 0
|
||||
radionet = 0
|
||||
camera = 0
|
||||
network = 0
|
||||
power = 0
|
||||
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
// else
|
||||
// usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
@@ -1035,6 +1035,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
group = "Engineering"
|
||||
access = access_ce
|
||||
|
||||
/*
|
||||
/datum/supply_packs/eftpos
|
||||
contains = list(/obj/item/device/eftpos)
|
||||
name = "EFTPOS scanner"
|
||||
@@ -1042,6 +1043,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "EFTPOS crate"
|
||||
group = "Operations"
|
||||
*/
|
||||
|
||||
/datum/supply_packs/teg
|
||||
contains = list(/obj/machinery/power/generator)
|
||||
|
||||
@@ -84,14 +84,14 @@
|
||||
if(changed)
|
||||
// Gene active (or ALWAYS ACTIVATE)
|
||||
if(gene_active || (gene.flags & GENE_ALWAYS_ACTIVATE))
|
||||
testing("[gene.name] activated!")
|
||||
//testing("[gene.name] activated!")
|
||||
gene.activate(M,connected,flags)
|
||||
if(M)
|
||||
M.active_genes |= gene.type
|
||||
M.update_icon = 1
|
||||
// If Gene is NOT active:
|
||||
else
|
||||
testing("[gene.name] deactivated!")
|
||||
//testing("[gene.name] deactivated!")
|
||||
gene.deactivate(M,connected,flags)
|
||||
if(M)
|
||||
M.active_genes -= gene.type
|
||||
|
||||
@@ -211,7 +211,15 @@
|
||||
world << "<b>The crew's final score is:</b>"
|
||||
world << "<b><font size='4'>[score_crewscore]</font></b>"
|
||||
for(var/mob/E in player_list)
|
||||
if(E.client) E.scorestats()
|
||||
if(E.client)
|
||||
E.scorestats()
|
||||
if(!istype(E,/mob/living/carbon/human)) continue
|
||||
if(E.z != 2) continue
|
||||
var/mob/living/carbon/human/H = E
|
||||
var/datum/money_account/player_account = H.mind.initial_account
|
||||
player_account.money += 1000
|
||||
player_account.update_balance(player_account.account_number, player_account.money)
|
||||
H << "You have been paid 1000 credits for having survived the shift."
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@ var/global/datum/controller/occupations/job_master
|
||||
H.buckled.loc = H.loc
|
||||
H.buckled.dir = H.dir
|
||||
|
||||
var/datum/money_account/M = create_account(H.real_name, rand(50,500)*10, null)
|
||||
var/datum/money_account/M = create_account(H.real_name, 1000, null)
|
||||
if(H.mind)
|
||||
var/remembered_info = ""
|
||||
|
||||
@@ -413,13 +413,11 @@ var/global/datum/controller/occupations/job_master
|
||||
remembered_info += "<b>Your account pin is:</b> [M.remote_access_pin]<br>"
|
||||
remembered_info += "<b>Your account funds are:</b> $[M.money]<br>"
|
||||
|
||||
if(M.transaction_log.len)
|
||||
var/datum/transaction/T = M.transaction_log[1]
|
||||
remembered_info += "<b>Your account was created:</b> [T.time], [T.date] at [T.source_terminal]<br>"
|
||||
H.mind.store_memory(remembered_info)
|
||||
|
||||
H.mind.initial_account = M
|
||||
|
||||
/*
|
||||
// If they're head, give them the account info for their department
|
||||
if(H.mind && job.head_position)
|
||||
var/remembered_info = ""
|
||||
@@ -431,7 +429,7 @@ var/global/datum/controller/occupations/job_master
|
||||
remembered_info += "<b>Your department's account funds are:</b> $[department_account.money]<br>"
|
||||
|
||||
H.mind.store_memory(remembered_info)
|
||||
|
||||
*/
|
||||
spawn(0)
|
||||
H << "\blue<b>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</b>"
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
|
||||
radio_frequency = AIPRIV_FREQ
|
||||
radio_name = "AI Private"
|
||||
|
||||
/obj/machinery/bot/secbot/ofitser
|
||||
name = "Prison Ofitser"
|
||||
desc = "It's Prison Ofitser! Powered by the tears and sweat of prisoners."
|
||||
|
||||
/obj/machinery/bot/secbot/buzzsky
|
||||
name = "Officer Buzzsky"
|
||||
|
||||
@@ -248,48 +248,51 @@
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
if(vendor_account)
|
||||
var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number)
|
||||
if(D)
|
||||
var/transaction_amount = currently_vending.price
|
||||
if(transaction_amount <= D.money)
|
||||
// if(vendor_account)
|
||||
var/datum/money_account/D = attempt_account_access_nosec(C.associated_account_number)
|
||||
if(D)
|
||||
var/transaction_amount = currently_vending.price
|
||||
if(transaction_amount <= D.money)
|
||||
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
vendor_account.money += transaction_amount
|
||||
//transfer the money
|
||||
D.money -= transaction_amount
|
||||
D.update_balance(D.account_number,D.money)
|
||||
//vendor_account.money += transaction_amount
|
||||
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "[vendor_account.owner_name] (via [src.name])"
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
// Vend the item
|
||||
src.vend(src.currently_vending, usr)
|
||||
currently_vending = null
|
||||
src.updateUsrDialog()
|
||||
//create entries in the two account transaction logs
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = "(via [src.name])"
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
if(transaction_amount > 0)
|
||||
T.amount = "([transaction_amount])"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
/*
|
||||
T = new()
|
||||
T.target_name = D.owner_name
|
||||
T.purpose = "Purchase of [currently_vending.product_name]"
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
*/
|
||||
|
||||
// Vend the item
|
||||
src.vend(src.currently_vending, usr)
|
||||
currently_vending = null
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
// else
|
||||
// usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
|
||||
/obj/machinery/vending/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -890,7 +893,8 @@
|
||||
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
|
||||
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
|
||||
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
|
||||
/obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3,
|
||||
/obj/item/seeds/tobaccoseed = 3, /obj/item/seeds/coffeeaseed = 3, /obj/item/seeds/teaasperaseed = 3)
|
||||
|
||||
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/nettleseed = 2,
|
||||
/obj/item/seeds/plumpmycelium = 2,/obj/item/seeds/reishimycelium = 2)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
/obj/item/weapon/storage/lockbox,
|
||||
/obj/item/weapon/storage/secure,
|
||||
/obj/item/weapon/circuitboard,
|
||||
/obj/item/device/eftpos,
|
||||
// /obj/item/device/eftpos,
|
||||
/obj/item/device/lightreplacer,
|
||||
/obj/item/device/taperecorder,
|
||||
/obj/item/device/hailer,
|
||||
|
||||
@@ -133,9 +133,9 @@
|
||||
/*
|
||||
* Sun/Novaflower
|
||||
*/
|
||||
/obj/item/weapon/grown/sunflower/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='green'><b> [user] smacks you with a sunflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
|
||||
user << "<font color='green'> Your sunflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
||||
/obj/item/weapon/grown/novaflower/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='green'><b> [user] smacks you with a novaflower!</font><font color='yellow'><b>FLOWER POWER<b></font>"
|
||||
user << "<font color='green'> Your novaflower's </font><font color='yellow'><b>FLOWER POWER</b></font><font color='green'> strikes [M]</font>"
|
||||
|
||||
/obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if(!..()) return
|
||||
|
||||
@@ -577,8 +577,10 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
"nanotrasen representative",
|
||||
"nanotrasen officer",
|
||||
"nanotrasen captain",
|
||||
"hawke - combat",
|
||||
"hawke - formal"
|
||||
"singuloth knight",
|
||||
"deathsquad officer - combat",
|
||||
"deathsquad officer - formal"
|
||||
|
||||
)
|
||||
var/dostrip = input("Do you want to strip [M] before equipping them? (0=no, 1=yes)", "STRIPTEASE") as null|anything in list(0,1)
|
||||
if(isnull(dostrip))
|
||||
@@ -742,7 +744,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Tunnel Clown!)"
|
||||
W.access = get_all_accesses()
|
||||
W.assignment = "Tunnel Clown!"
|
||||
W.registered_name = M.real_name
|
||||
@@ -786,7 +788,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(robe, slot_wear_suit)
|
||||
|
||||
var/obj/item/weapon/card/id/syndicate/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Dark Lord)"
|
||||
W.access = get_all_accesses()
|
||||
W.assignment = "Dark Lord"
|
||||
W.registered_name = M.real_name
|
||||
@@ -821,7 +823,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(pda, slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/syndicate/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Reaper)"
|
||||
W.access = get_all_accesses()
|
||||
W.assignment = "Reaper"
|
||||
W.registered_name = M.real_name
|
||||
@@ -849,7 +851,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/weapon/clipboard(M), slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Nanotrasen Navy Representative)"
|
||||
W.icon_state = "centcom"
|
||||
W.item_state = "id_inv"
|
||||
W.access = get_all_accesses()
|
||||
@@ -875,7 +877,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/weapon/gun/energy(M), slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Nanotrasen Navy Officer)"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Nanotrasen Navy Officer"
|
||||
@@ -900,7 +902,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
|
||||
|
||||
var/obj/item/weapon/card/id/centcom/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Nanotrasen Navy Captain)"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Nanotrasen Navy Captain"
|
||||
@@ -917,7 +919,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Emergency Response Team)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
@@ -940,7 +942,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Emergency Response Team Leader)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
@@ -976,7 +978,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(pda, slot_wear_pda)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Special Operations Officer)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
@@ -1006,7 +1008,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/weapon/melee/telebaton(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Special Operations Officer)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
@@ -1014,67 +1016,30 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
if("hawke - combat")
|
||||
if("singuloth knight")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/combat(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad/officer(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/singuloth(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(src), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(src), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/cyber(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/singuloth(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/claymore(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/tank/oxygen(M), slot_s_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/knighthammer(M), slot_back)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/dualsaber/red(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_in_backpack)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Singuloth Knight)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Special Operations Officer"
|
||||
W.assignment = "Singuloth Knight"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
|
||||
if("hawke - formal")
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(src), slot_l_ear)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/color/white(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_in_backpack)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Special Operations Officer"
|
||||
pda.icon_state = "pda-syndi"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
pda.desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition designed for military field work."
|
||||
pda.default_cartridge = /obj/item/weapon/cartridge/captain
|
||||
|
||||
M.equip_if_possible(pda, slot_wear_pda)
|
||||
|
||||
M.equip_if_possible(new /obj/item/weapon/melee/telebaton(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Special Operations Officer"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
if("blue wizard")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
|
||||
@@ -1122,7 +1087,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card"
|
||||
W.name = "[M.real_name]'s ID Card (Admiral)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
@@ -1130,6 +1095,67 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
if("deathsquad officer - combat")
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/combat(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad/officer(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(src), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/dualsaber/red(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_in_backpack)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card (Deathsquad Officer)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Deathsquad Officer"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
|
||||
if("deathsquad officer - formal")
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert/alt(src), slot_l_ear)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/color/white(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_in_backpack)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_in_backpack)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
pda.ownjob = "Deathsquad Officer"
|
||||
pda.icon_state = "pda-syndi"
|
||||
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
|
||||
pda.desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a special edition designed for military field work."
|
||||
pda.default_cartridge = /obj/item/weapon/cartridge/captain
|
||||
|
||||
M.equip_if_possible(pda, slot_wear_pda)
|
||||
|
||||
M.equip_if_possible(new /obj/item/weapon/melee/telebaton(M), slot_r_store)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(M)
|
||||
W.name = "[M.real_name]'s ID Card (Deathsquad Officer)"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Deathsquad Officer"
|
||||
W.registered_name = M.real_name
|
||||
M.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
M.regenerate_icons()
|
||||
|
||||
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
|
||||
@@ -98,6 +98,7 @@ log transactions
|
||||
if(istype(I,/obj/item/weapon/spacecash))
|
||||
//consume the money
|
||||
authenticated_account.money += I:worth * I:amount
|
||||
authenticated_account.update_balance(authenticated_account.account_number,authenticated_account.money)
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
@@ -196,6 +197,7 @@ log transactions
|
||||
<A href='?src=\ref[src];choice=view_screen;view_screen=1'>Change account security level</a><br>
|
||||
<A href='?src=\ref[src];choice=view_screen;view_screen=2'>Make transfer</a><br>
|
||||
<A href='?src=\ref[src];choice=view_screen;view_screen=3'>View transaction log</a><br>
|
||||
<A href='?src=\ref[src];choice=change_pin'>Change PIN</a><br>
|
||||
<A href='?src=\ref[src];choice=balance_statement'>Print balance statement</a><br>
|
||||
<A href='?src=\ref[src];choice=logout'>Logout</a><br>"}
|
||||
else if(linked_db)
|
||||
@@ -217,6 +219,7 @@ log transactions
|
||||
/obj/machinery/atm/Topic(var/href, var/href_list)
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
|
||||
if("transfer")
|
||||
if(authenticated_account && linked_db)
|
||||
var/transfer_amount = text2num(href_list["funds_amount"])
|
||||
@@ -228,6 +231,7 @@ log transactions
|
||||
if(linked_db.charge_to_account(target_account_number, authenticated_account.owner_name, transfer_purpose, machine_id, transfer_amount))
|
||||
usr << "\icon[src]<span class='info'>Funds transfer successful.</span>"
|
||||
authenticated_account.money -= transfer_amount
|
||||
authenticated_account.update_balance(authenticated_account.account_number,authenticated_account.money)
|
||||
|
||||
//create an entry in the account transaction log
|
||||
var/datum/transaction/T = new()
|
||||
@@ -240,7 +244,6 @@ log transactions
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Funds transfer failed.</span>"
|
||||
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have enough funds to do that!</span>"
|
||||
if("view_screen")
|
||||
@@ -312,6 +315,7 @@ log transactions
|
||||
usr << "\blue The ATM's screen flashes, 'Maximum single withdrawl limit reached, defaulting to 10,000.'"
|
||||
amount = 10000
|
||||
authenticated_account.money -= amount
|
||||
authenticated_account.update_balance(authenticated_account.account_number,authenticated_account.money)
|
||||
withdraw_arbitrary_sum(amount)
|
||||
|
||||
//create an entry in the account transaction log
|
||||
@@ -368,6 +372,15 @@ log transactions
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
held_card = I
|
||||
if("change_pin")
|
||||
if(authenticated_account)
|
||||
var/new_pin = input(usr,"Enter new pin code", "PIN code changer") as num
|
||||
authenticated_account.remote_access_pin = new_pin
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE characters SET account_pin='[new_pin]' WHERE account_number='[authenticated_account.account_number]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR changing bank pin. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR changing bank pin. Error : \[[err]\]\n")
|
||||
if("logout")
|
||||
authenticated_account = null
|
||||
//usr << browse(null,"window=atm")
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
var/global/current_date_string
|
||||
var/global/num_financial_terminals = 1
|
||||
var/global/datum/money_account/station_account
|
||||
var/global/list/datum/money_account/department_accounts = list()
|
||||
//var/global/datum/money_account/station_account
|
||||
//var/global/list/datum/money_account/department_accounts = list()
|
||||
var/global/next_account_number = 0
|
||||
var/global/obj/machinery/account_database/centcomm_account_db
|
||||
var/global/datum/money_account/vendor_account
|
||||
//var/global/datum/money_account/vendor_account
|
||||
var/global/list/all_money_accounts = list()
|
||||
|
||||
/*
|
||||
/proc/create_station_account()
|
||||
if(!station_account)
|
||||
next_account_number = rand(111111, 999999)
|
||||
@@ -56,67 +57,40 @@ var/global/list/all_money_accounts = list()
|
||||
|
||||
//the current ingame time (hh:mm) can be obtained by calling:
|
||||
//worldtime2text()
|
||||
|
||||
*/
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/account_database/source_db)
|
||||
|
||||
//create a new account
|
||||
var/datum/money_account/M = new()
|
||||
M.owner_name = new_owner_name
|
||||
M.remote_access_pin = rand(1111, 111111)
|
||||
M.money = starting_funds
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT account_number,account_pin,account_balance FROM characters WHERE real_name='[sql_sanitize_text(new_owner_name)]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR retrieving bank account information. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR retrieving bank account information. Error : \[[err]\]\n")
|
||||
return
|
||||
|
||||
//create an entry in the account transaction log for when it was created
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = new_owner_name
|
||||
T.purpose = "Account creation"
|
||||
T.amount = starting_funds
|
||||
if(!source_db)
|
||||
//set a random date, time and location some time over the past few decades
|
||||
T.date = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 25[rand(10,56)]"
|
||||
T.time = "[rand(0,24)]:[rand(11,59)]"
|
||||
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
|
||||
|
||||
M.account_number = rand(111111, 999999)
|
||||
else
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = source_db.machine_id
|
||||
//general preferences
|
||||
while(query.NextRow())
|
||||
//create a new account
|
||||
var/datum/money_account/M = new()
|
||||
M.owner_name = new_owner_name
|
||||
if(text2num(query.item[1]) == 0)
|
||||
M.remote_access_pin = rand(1111, 111111)
|
||||
M.money = 1000
|
||||
M.account_number = rand(111111, 999999)
|
||||
var/DBQuery/query2 = dbcon.NewQuery("UPDATE characters SET account_number='[M.account_number]',account_pin='[M.remote_access_pin]', account_balance='[M.money]' WHERE real_name='[sql_sanitize_text(new_owner_name)]'")
|
||||
if(!query2.Execute())
|
||||
var/err = query2.ErrorMsg()
|
||||
log_game("SQL ERROR creating bank account. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR creating bank account. Error : \[[err]\]\n")
|
||||
return
|
||||
|
||||
M.account_number = next_account_number
|
||||
next_account_number += rand(1,25)
|
||||
else
|
||||
M.remote_access_pin = text2num(query.item[2])
|
||||
M.money = text2num(query.item[3])
|
||||
M.account_number = text2num(query.item[1])
|
||||
|
||||
//create a sealed package containing the account details
|
||||
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(source_db.loc)
|
||||
|
||||
var/obj/item/weapon/paper/R = new /obj/item/weapon/paper(P)
|
||||
P.wrapped = R
|
||||
R.name = "Account information: [M.owner_name]"
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:94: R.info = "<b>Account details (confidential)</b><br><hr><br>"
|
||||
R.info = {"<b>Account details (confidential)</b><br><hr><br>
|
||||
<i>Account holder:</i> [M.owner_name]<br>
|
||||
<i>Account number:</i> [M.account_number]<br>
|
||||
<i>Account pin:</i> [M.remote_access_pin]<br>
|
||||
<i>Starting balance:</i> $[M.money]<br>
|
||||
<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>
|
||||
<i>Creation terminal ID:</i> [source_db.machine_id]<br>
|
||||
<i>Authorised NT officer overseeing creation:</i> [source_db.held_card.registered_name]<br>"}
|
||||
// END AUTOFIX
|
||||
//stamp the paper
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!R.stamped)
|
||||
R.stamped = new
|
||||
R.stamped += /obj/item/weapon/stamp
|
||||
R.overlays += stampoverlay
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Accounts Database.</i>"
|
||||
|
||||
//add the account
|
||||
M.transaction_log.Add(T)
|
||||
all_money_accounts.Add(M)
|
||||
|
||||
return M
|
||||
all_money_accounts.Add(M)
|
||||
return M
|
||||
|
||||
/datum/money_account
|
||||
var/owner_name = ""
|
||||
@@ -140,225 +114,7 @@ var/global/list/all_money_accounts = list()
|
||||
var/date = ""
|
||||
var/time = ""
|
||||
var/source_terminal = ""
|
||||
/*
|
||||
/obj/machinery/account_database
|
||||
name = "Accounts database"
|
||||
desc = "Holds transaction logs, account data and all kinds of other financial records."
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "analyser"
|
||||
density = 1
|
||||
req_one_access = list(access_hop, access_captain)
|
||||
var/receipt_num
|
||||
var/machine_id = ""
|
||||
var/obj/item/weapon/card/id/held_card
|
||||
var/access_level = 0
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
..()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
if(department_accounts.len == 0)
|
||||
for(var/department in station_departments)
|
||||
create_department_account(department)
|
||||
if(!vendor_account)
|
||||
create_department_account("Vendor")
|
||||
vendor_account = department_accounts["Vendor"]
|
||||
|
||||
if(!current_date_string)
|
||||
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
|
||||
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
|
||||
/obj/machinery/account_database/attack_hand(mob/user as mob)
|
||||
if(ishuman(user) && !user.stat && get_dist(src,user) <= 1)
|
||||
var/dat = "<b>Accounts Database</b><br>"
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:171: dat += "<i>[machine_id]</i><br>"
|
||||
dat += {"<i>[machine_id]</i><br>
|
||||
Confirm identity: <a href='?src=\ref[src];choice=insert_card'>[held_card ? held_card : "-----"]</a><br>"}
|
||||
// END AUTOFIX
|
||||
if(access_level > 0)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:175: dat += "<a href='?src=\ref[src];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>"
|
||||
dat += {"<a href='?src=\ref[src];toggle_activated=1'>[activated ? "Disable" : "Enable"] remote access</a><br>
|
||||
You may not edit accounts at this terminal, only create and view them.<br>"}
|
||||
// END AUTOFIX
|
||||
if(creating_new_account)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:178: dat += "<br>"
|
||||
dat += {"<br>
|
||||
<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a>
|
||||
<form name='create_account' action='?src=\ref[src]' method='get'>
|
||||
<input type='hidden' name='src' value='\ref[src]'>
|
||||
<input type='hidden' name='choice' value='finalise_create_account'>
|
||||
<b>Holder name:</b> <input type='text' id='holder_name' name='holder_name' style='width:250px; background-color:white;'><br>
|
||||
<b>Initial funds:</b> <input type='text' id='starting_funds' name='starting_funds' style='width:250px; background-color:white;'> (subtracted from station account)<br>
|
||||
<i>New accounts are automatically assigned a secret number and pin, which are printed separately in a sealed package.</i><br>
|
||||
<input type='submit' value='Create'><br>
|
||||
</form>"}
|
||||
// END AUTOFIX
|
||||
else
|
||||
if(detailed_account_view)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:190: dat += "<br>"
|
||||
dat += {"<br>
|
||||
<a href='?src=\ref[src];choice=view_accounts_list;'>Return to accounts list</a><hr>
|
||||
<b>Account number:</b> #[detailed_account_view.account_number]<br>
|
||||
<b>Account holder:</b> [detailed_account_view.owner_name]<br>
|
||||
<b>Account balance:</b> $[detailed_account_view.money]<br>
|
||||
<table border=1 style='width:100%'>
|
||||
<tr>
|
||||
<td><b>Date</b></td>
|
||||
<td><b>Time</b></td>
|
||||
<td><b>Target</b></td>
|
||||
<td><b>Purpose</b></td>
|
||||
<td><b>Value</b></td>
|
||||
<td><b>Source terminal ID</b></td>
|
||||
</tr>"}
|
||||
// END AUTOFIX
|
||||
for(var/datum/transaction/T in detailed_account_view.transaction_log)
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:205: dat += "<tr>"
|
||||
dat += {"<tr>
|
||||
<td>[T.date]</td>
|
||||
<td>[T.time]</td>
|
||||
<td>[T.target_name]</td>
|
||||
<td>[T.purpose]</td>
|
||||
<td>$[T.amount]</td>
|
||||
<td>[T.source_terminal]</td>
|
||||
</tr>"}
|
||||
// END AUTOFIX
|
||||
dat += "</table>"
|
||||
else
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:215: dat += "<a href='?src=\ref[src];choice=create_account;'>Create new account</a><br><br>"
|
||||
dat += {"<a href='?src=\ref[src];choice=create_account;'>Create new account</a><br><br>
|
||||
<table border=1 style='width:100%'>"}
|
||||
// END AUTOFIX
|
||||
for(var/i=1, i<=all_money_accounts.len, i++)
|
||||
var/datum/money_account/D = all_money_accounts[i]
|
||||
|
||||
// AUTOFIXED BY fix_string_idiocy.py
|
||||
// C:\Users\Rob\Documents\Projects\vgstation13\code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm:219: dat += "<tr>"
|
||||
dat += {"<tr>
|
||||
<td>#[D.account_number]</td>
|
||||
<td>[D.owner_name]</td>
|
||||
<td><a href='?src=\ref[src];choice=view_account_detail;account_index=[i]'>View in detail</a></td>
|
||||
</tr>"}
|
||||
// END AUTOFIX
|
||||
dat += "</table>"
|
||||
|
||||
user << browse(dat,"window=account_db;size=700x650")
|
||||
else
|
||||
user << browse(null,"window=account_db")
|
||||
|
||||
/obj/machinery/account_database/attackby(O as obj, user as mob)//TODO:SANITY
|
||||
if(istype(O, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/id/idcard = O
|
||||
if(!held_card)
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
held_card = idcard
|
||||
|
||||
if(access_cent_captain in idcard.access)
|
||||
access_level = 2
|
||||
else if(access_hop in idcard.access || access_captain in idcard.access)
|
||||
access_level = 1
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/account_database/Topic(var/href, var/href_list)
|
||||
..()
|
||||
if(href_list["toggle_activated"])
|
||||
activated = !activated
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if("create_account")
|
||||
creating_new_account = 1
|
||||
if("finalise_create_account")
|
||||
var/account_name = href_list["holder_name"]
|
||||
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
|
||||
create_account(account_name, starting_funds, src)
|
||||
if(starting_funds > 0)
|
||||
//subtract the money
|
||||
station_account.money -= starting_funds
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = account_name
|
||||
T.purpose = "New account funds initialisation"
|
||||
T.amount = "([starting_funds])"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = machine_id
|
||||
station_account.transaction_log.Add(T)
|
||||
|
||||
creating_new_account = 0
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
access_level = 0
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if(access_cent_captain in C.access)
|
||||
access_level = 2
|
||||
else if(access_hop in C.access || access_captain in C.access)
|
||||
access_level = 1
|
||||
if("view_account_detail")
|
||||
var/index = text2num(href_list["account_index"])
|
||||
if(index && index <= all_money_accounts.len)
|
||||
detailed_account_view = all_money_accounts[index]
|
||||
if("view_accounts_list")
|
||||
detailed_account_view = null
|
||||
creating_new_account = 0
|
||||
|
||||
src.attack_hand(usr)
|
||||
*/
|
||||
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number && !D.suspended)
|
||||
D.money += amount
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = source_name
|
||||
T.purpose = purpose
|
||||
if(amount < 0)
|
||||
T.amount = "([amount])"
|
||||
else
|
||||
T.amount = "[amount]"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
//this returns the first account datum that matches the supplied accnum/pin combination, it returns null if the combination did not match any account
|
||||
/proc/attempt_account_access(var/attempt_account_number, var/attempt_pin_number, var/security_level_passed = 0,var/pin_needed=1)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/machine_id = ""
|
||||
var/obj/item/weapon/card/id/held_card
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
// var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
proc/get_access_level()
|
||||
@@ -39,8 +39,32 @@
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
|
||||
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == attempt_account_number && !D.suspended)
|
||||
D.money += amount
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = source_name
|
||||
T.purpose = purpose
|
||||
if(amount < 0)
|
||||
T.amount = "([amount])"
|
||||
else
|
||||
T.amount = "[amount]"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
if(!station_account)
|
||||
/* if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
if(department_accounts.len == 0)
|
||||
@@ -48,7 +72,7 @@
|
||||
create_department_account(department)
|
||||
if(!vendor_account)
|
||||
create_department_account("Vendor")
|
||||
vendor_account = department_accounts["Vendor"]
|
||||
vendor_account = department_accounts["Vendor"]*/
|
||||
|
||||
if(!current_date_string)
|
||||
current_date_string = "[num2text(rand(1,31))] [pick("January","February","March","April","May","June","July","August","September","October","November","December")], 2557"
|
||||
@@ -82,9 +106,9 @@
|
||||
data["id_card"] = held_card ? text("[held_card.registered_name], [held_card.assignment]") : "-----"
|
||||
data["access_level"] = get_access_level()
|
||||
data["machine_id"] = machine_id
|
||||
data["creating_new_account"] = creating_new_account
|
||||
// data["creating_new_account"] = creating_new_account
|
||||
data["detailed_account_view"] = !!detailed_account_view
|
||||
data["station_account_number"] = station_account.account_number
|
||||
// data["station_account_number"] = station_account.account_number
|
||||
data["transactions"] = null
|
||||
data["accounts"] = null
|
||||
|
||||
@@ -129,10 +153,11 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main")
|
||||
// var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main")
|
||||
|
||||
if(href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
/*
|
||||
if("create_account")
|
||||
creating_new_account = 1
|
||||
|
||||
@@ -145,12 +170,12 @@
|
||||
var/amount = input("Enter the amount you wish to remove", "Silently remove funds") as num
|
||||
if(detailed_account_view)
|
||||
detailed_account_view.money -= amount
|
||||
|
||||
*/
|
||||
if("toggle_suspension")
|
||||
if(detailed_account_view)
|
||||
detailed_account_view.suspended = !detailed_account_view.suspended
|
||||
callHook("change_account_status", list(detailed_account_view))
|
||||
|
||||
/*
|
||||
if("finalise_create_account")
|
||||
var/account_name = href_list["holder_name"]
|
||||
var/starting_funds = max(text2num(href_list["starting_funds"]), 0)
|
||||
@@ -167,6 +192,7 @@
|
||||
ui.close()
|
||||
|
||||
creating_new_account = 0
|
||||
*/
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
@@ -190,7 +216,7 @@
|
||||
|
||||
if("view_accounts_list")
|
||||
detailed_account_view = null
|
||||
creating_new_account = 0
|
||||
/* creating_new_account = 0
|
||||
|
||||
if("revoke_payroll")
|
||||
var/funds = detailed_account_view.money
|
||||
@@ -204,7 +230,7 @@
|
||||
station_account.transaction_log.Add(station_trx)
|
||||
|
||||
callHook("revoke_payroll", list(detailed_account_view))
|
||||
|
||||
*/
|
||||
if("print")
|
||||
var/text
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
if(D.remote_access_pin != attempt_pin)
|
||||
return null
|
||||
return D
|
||||
else if(issilicon(src))
|
||||
return station_account
|
||||
// else if(issilicon(src))
|
||||
// return station_account
|
||||
|
||||
/datum/money_account/proc/fmtBalance()
|
||||
return "$[num2septext(money)]"
|
||||
@@ -48,6 +48,7 @@
|
||||
if(transaction_amount <= money)
|
||||
//transfer the money
|
||||
money -= transaction_amount
|
||||
update_balance(account_number,money)
|
||||
if(dest)
|
||||
dest.money += transaction_amount
|
||||
|
||||
@@ -83,4 +84,11 @@
|
||||
return 1
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>You don't have that much money!</span>"
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/datum/money_account/proc/update_balance(var/account_number,var/newbalance)
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE characters SET account_balance='[newbalance]' WHERE account_number='[account_number]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR charging bank account. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR charging bank account. Error : \[[err]\]\n")
|
||||
@@ -466,7 +466,7 @@ proc/populate_seed_list()
|
||||
display_name = "chili plants"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/chili)
|
||||
chems = list("capsaicin" = list(3,5), "nutriment" = list(1,25))
|
||||
mutants = list("icechili")
|
||||
mutants = list("icechili", "ghostchili")
|
||||
packet_icon = "seed-chili"
|
||||
plant_icon = "chili"
|
||||
harvest_repeat = 1
|
||||
@@ -490,6 +490,21 @@ proc/populate_seed_list()
|
||||
maturation = 4
|
||||
production = 4
|
||||
|
||||
/datum/seed/chili/ghost
|
||||
name = "ghostchili"
|
||||
seed_name = "ghost chili pepper"
|
||||
display_name = "ghost chili pepper plants"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chilli)
|
||||
chems = list("capsaicin" = list(8,2), "condensedcapsaicin" = list(4,4), "nutriment" = list(1,25))
|
||||
packet_icon = "seed-chilighost"
|
||||
plant_icon = "chilighost"
|
||||
growth_stages = 6
|
||||
|
||||
maturation = 10
|
||||
production = 10
|
||||
yield = 3
|
||||
|
||||
// Berry plants/variants.
|
||||
/datum/seed/berry
|
||||
name = "berries"
|
||||
@@ -601,7 +616,7 @@ proc/populate_seed_list()
|
||||
seed_name = "blood tomato"
|
||||
display_name = "blood tomato plant"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato)
|
||||
mutants = list("killer")
|
||||
mutants = list("killertomato")
|
||||
packet_icon = "seed-bloodtomato"
|
||||
plant_icon = "bloodtomato"
|
||||
chems = list("nutriment" = list(1,10), "blood" = list(1,5))
|
||||
@@ -938,13 +953,13 @@ proc/populate_seed_list()
|
||||
production = 6
|
||||
yield = 6
|
||||
growth_stages = 3
|
||||
plant_icon = ""
|
||||
|
||||
/datum/seed/flower/sunflower
|
||||
name = "sunflowers"
|
||||
seed_name = "sunflower"
|
||||
display_name = "sunflowers"
|
||||
packet_icon = "seed-sunflower"
|
||||
mutants = list("moonflower", "novaflower")
|
||||
products = list(/obj/item/weapon/grown/sunflower)
|
||||
plant_icon = "sunflower"
|
||||
|
||||
@@ -952,6 +967,33 @@ proc/populate_seed_list()
|
||||
maturation = 6
|
||||
growth_stages = 3
|
||||
|
||||
/datum/seed/flower/moonflower
|
||||
name = "moonflowers"
|
||||
seed_name = "moonflower"
|
||||
display_name = "moonflowers"
|
||||
packet_icon = "seed-moonflower"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower)
|
||||
plant_icon = "moonflower"
|
||||
chems = list("nutriment" = list(1,50), "moonshine" = list(1,10))
|
||||
|
||||
lifespan = 25
|
||||
maturation = 6
|
||||
growth_stages = 3
|
||||
|
||||
/datum/seed/flower/novaflower
|
||||
name = "novaflowers"
|
||||
seed_name = "novaflower"
|
||||
display_name = "novaflowers"
|
||||
packet_icon = "seed-novaflower"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/grown/novaflower)
|
||||
plant_icon = "novaflower"
|
||||
|
||||
lifespan = 25
|
||||
maturation = 6
|
||||
growth_stages = 3
|
||||
|
||||
//Grapes/varieties
|
||||
/datum/seed/grapes
|
||||
name = "grapes"
|
||||
@@ -980,6 +1022,151 @@ proc/populate_seed_list()
|
||||
plant_icon = "greengrape"
|
||||
chems = list("nutriment" = list(1,10), "kelotane" = list(3,5))
|
||||
|
||||
//Soybeans/varieties
|
||||
/datum/seed/soybean
|
||||
name = "soybean"
|
||||
seed_name = "soybean"
|
||||
display_name = "soybeans"
|
||||
packet_icon = "seed-soybean"
|
||||
mutants = list("koibean")
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans)
|
||||
plant_icon = "soybean"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,20))
|
||||
|
||||
lifespan = 25
|
||||
maturation = 4
|
||||
production = 4
|
||||
yield = 3
|
||||
potency = 5
|
||||
|
||||
/datum/seed/soybean/koi
|
||||
name = "koibean"
|
||||
seed_name = "koibean"
|
||||
display_name = "koi beans"
|
||||
packet_icon = "seed-koibean"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/koibeans)
|
||||
plant_icon = "soybean"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,30), "carpotoxin" = list(1,20))
|
||||
|
||||
lifespan = 25
|
||||
maturation = 4
|
||||
production = 4
|
||||
yield = 3
|
||||
potency = 5
|
||||
|
||||
//Tobacco/varieties
|
||||
/datum/seed/tobacco
|
||||
name = "tobacco"
|
||||
seed_name = "tobacco"
|
||||
display_name = "tobacco"
|
||||
packet_icon = "seed-tobacco"
|
||||
mutants = list("stobacco")
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco)
|
||||
plant_icon = "tobacco"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,40), "nicotine" = list(1,40))
|
||||
|
||||
lifespan = 25
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 6
|
||||
potency = 10
|
||||
growth_stages = 3
|
||||
|
||||
/datum/seed/tobacco/space
|
||||
name = "stobacco"
|
||||
seed_name = "space tobacco"
|
||||
display_name = "space tobacco"
|
||||
packet_icon = "seed-stobacco"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space)
|
||||
plant_icon = "stobacco"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,40), "nicotine" = list(1,20), "inaprovaline" = list(1,30))
|
||||
|
||||
lifespan = 25
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 4
|
||||
potency = 5
|
||||
growth_stages = 3
|
||||
|
||||
//Tea/varieties
|
||||
/datum/seed/teaaspera
|
||||
name = "teaaspera"
|
||||
seed_name = "tea aspera"
|
||||
display_name = "tea aspera"
|
||||
packet_icon = "seed-teaaspera"
|
||||
mutants = list("teaastra")
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/teaaspera)
|
||||
plant_icon = "teaaspera"
|
||||
harvest_repeat = 1
|
||||
chems = list("teapowder" = list(1,20), "anti_toxin" = list(1,30))
|
||||
|
||||
lifespan = 30
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 6
|
||||
potency = 10
|
||||
growth_stages = 5
|
||||
|
||||
/datum/seed/teaastra
|
||||
name = "teaastra"
|
||||
seed_name = "tea astra"
|
||||
display_name = "tea astra"
|
||||
packet_icon = "seed-teaastra"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/teaastra)
|
||||
plant_icon = "teaastra"
|
||||
harvest_repeat = 1
|
||||
chems = list("teapowder" = list(1,20), "impedrezene" = list(1,30))
|
||||
|
||||
lifespan = 30
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 6
|
||||
potency = 10
|
||||
growth_stages = 5
|
||||
|
||||
//Coffee/varieties
|
||||
/datum/seed/coffeea
|
||||
name = "coffeea"
|
||||
seed_name = "coffee arabica"
|
||||
display_name = "coffee arabica"
|
||||
packet_icon = "seed-coffeea"
|
||||
mutants = list("coffeer")
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/coffeea)
|
||||
plant_icon = "coffeea"
|
||||
harvest_repeat = 1
|
||||
chems = list("coffeepowder" = list(1,20), "synaptizine" = list(1,40))
|
||||
|
||||
lifespan = 30
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 6
|
||||
potency = 10
|
||||
growth_stages = 5
|
||||
|
||||
/datum/seed/coffeer
|
||||
name = "coffeer"
|
||||
seed_name = "coffee robusta"
|
||||
display_name = "coffee robusta"
|
||||
mutants = null
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/coffeer)
|
||||
plant_icon = "coffeer"
|
||||
harvest_repeat = 1
|
||||
chems = list("coffeepowder" = list(1,20), "synaptizine" = list(1,20), "hyperzine" = list(1,40))
|
||||
|
||||
lifespan = 30
|
||||
maturation = 5
|
||||
production = 5
|
||||
yield = 4
|
||||
potency = 10
|
||||
growth_stages = 5
|
||||
|
||||
//Everything else
|
||||
/datum/seed/peanuts
|
||||
name = "peanut"
|
||||
@@ -1093,22 +1280,6 @@ proc/populate_seed_list()
|
||||
potency = 10
|
||||
growth_stages = 4
|
||||
|
||||
/datum/seed/soybean
|
||||
name = "soybean"
|
||||
seed_name = "soybean"
|
||||
display_name = "soybeans"
|
||||
packet_icon = "seed-soybean"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans)
|
||||
plant_icon = "soybean"
|
||||
harvest_repeat = 1
|
||||
chems = list("nutriment" = list(1,20))
|
||||
|
||||
lifespan = 25
|
||||
maturation = 4
|
||||
production = 4
|
||||
yield = 3
|
||||
potency = 5
|
||||
|
||||
/datum/seed/wheat
|
||||
name = "wheat"
|
||||
seed_name = "wheat"
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
/obj/item/seeds/soyaseed
|
||||
seed_type = "soybean"
|
||||
|
||||
/obj/item/seeds/koiseed
|
||||
seed_type = "koibean"
|
||||
|
||||
/obj/item/seeds/wheatseed
|
||||
seed_type = "wheat"
|
||||
|
||||
@@ -221,4 +224,29 @@
|
||||
seed_type = "cherry"
|
||||
|
||||
/obj/item/seeds/kudzuseed
|
||||
seed_type = "kudzu"
|
||||
seed_type = "kudzu"
|
||||
|
||||
/obj/item/seeds/tobaccoseed
|
||||
seed_type = "tobacco"
|
||||
|
||||
/obj/item/seeds/stobaccoseed
|
||||
seed_type = "stobacco"
|
||||
|
||||
/obj/item/seeds/teaasperaseed
|
||||
seed_type = "teaaspera"
|
||||
|
||||
/obj/item/seeds/teaastraseed
|
||||
seed_type = "teaastra"
|
||||
|
||||
/obj/item/seeds/coffeeaseed
|
||||
seed_type = "coffeea"
|
||||
|
||||
/obj/item/seeds/coffeerseed
|
||||
seed_type = "coffeer"
|
||||
|
||||
/obj/item/seeds/moonflowerseed
|
||||
seed_type = "moonflower"
|
||||
|
||||
/obj/item/seeds/novaflowerseed
|
||||
seed_type = "novaflower"
|
||||
|
||||
|
||||
@@ -314,8 +314,8 @@ emp_act
|
||||
forcesay(hit_appends) //forcesay checks stat already
|
||||
|
||||
if (I.damtype == BRUTE)
|
||||
if((I.edge && prob(2 * I.force)) || (I.force > 20 && prob(I.force)))
|
||||
if(affecting.brute_dam >= affecting.max_damage * config.organ_health_multiplier)
|
||||
if((affecting.brute_dam + I.force) >= affecting.max_damage * config.organ_health_multiplier)
|
||||
if(I.edge && prob(I.force))
|
||||
affecting.dismember_limb()
|
||||
|
||||
/* //Melee weapon embedded object code. Commented out, as most people on the forums seem to find this annoying and think it does not contribute to general gameplay. - Dave
|
||||
|
||||
@@ -1200,7 +1200,7 @@ mob/proc/yank_out_object()
|
||||
H.shock_stage+=10
|
||||
|
||||
if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-.
|
||||
var/datum/wound/internal_bleeding/I = new (15)
|
||||
var/datum/wound/internal_bleeding/I = new ()
|
||||
affected.wounds += I
|
||||
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//Possibly trigger an internal wound, too.
|
||||
var/local_damage = brute_dam + burn_dam + damage
|
||||
if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT))
|
||||
var/datum/wound/internal_bleeding/I = new (15)
|
||||
var/datum/wound/internal_bleeding/I = new ()
|
||||
wounds += I
|
||||
owner.custom_pain("You feel something rip in your [display_name]!", 1)
|
||||
|
||||
@@ -567,7 +567,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
O.setAmputatedTree()
|
||||
|
||||
//Handles dismemberment
|
||||
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0, var/spawn_limb=0)
|
||||
/datum/organ/external/proc/droplimb(var/override = 0,var/no_explode = 0,var/amputation=0, var/spawn_limb=0)
|
||||
if(destspawn) return
|
||||
if(override)
|
||||
status |= ORGAN_DESTROYED
|
||||
@@ -585,9 +585,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
germ_level = 0
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1, no_explode, amputation)
|
||||
|
||||
//Replace all wounds on that arm with one wound on parent organ.
|
||||
wounds.Cut()
|
||||
if (parent)
|
||||
if (parent && !amputation)
|
||||
var/datum/wound/W
|
||||
if(max_damage < 50)
|
||||
W = new/datum/wound/lost_limb/small(max_damage)
|
||||
@@ -597,10 +601,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
parent.update_damages()
|
||||
update_damages()
|
||||
|
||||
// If any organs are attached to this, destroy them
|
||||
for(var/datum/organ/external/O in children)
|
||||
O.droplimb(1)
|
||||
|
||||
var/obj/organ //Dropped limb object
|
||||
|
||||
switch(body_part)
|
||||
|
||||
@@ -2797,14 +2797,14 @@ datum
|
||||
toxin/coffeepowder
|
||||
name = "Coffee Grounds"
|
||||
id = "coffeepowder"
|
||||
description = "Finely ground coffee beans, used to make coffee."
|
||||
description = "Finely ground Coffee beans, used to make coffee."
|
||||
reagent_state = SOLID
|
||||
color = "#5B2E0D" // rgb: 91, 46, 13
|
||||
|
||||
toxin/teapowder
|
||||
name = "Ground Tea Leaves"
|
||||
id = "teapowder"
|
||||
description = "Finely shredded tea leaves, used for making tea."
|
||||
description = "Finely shredded Tea leaves, used for making tea."
|
||||
reagent_state = SOLID
|
||||
color = "#7F8400" // rgb: 127, 132, 0
|
||||
|
||||
@@ -3048,8 +3048,8 @@ datum
|
||||
M.Jitter(5)
|
||||
if(adj_temp > 0 && holder.has_reagent("frostoil"))
|
||||
holder.remove_reagent("frostoil", 10*REAGENTS_METABOLISM)
|
||||
|
||||
holder.remove_reagent(src.id, 0.1)
|
||||
|
||||
icecoffee
|
||||
name = "Iced Coffee"
|
||||
id = "icecoffee"
|
||||
@@ -3088,7 +3088,7 @@ datum
|
||||
tea
|
||||
name = "Tea"
|
||||
id = "tea"
|
||||
description = "Tasty black tea, it has antioxidants, it's good for you!"
|
||||
description = "Tasty black tea: It has antioxidants. It's good for you!"
|
||||
color = "#101000" // rgb: 16, 16, 0
|
||||
adj_dizzy = -2
|
||||
adj_drowsy = -1
|
||||
@@ -3101,13 +3101,12 @@ datum
|
||||
M.adjustToxLoss(-1)
|
||||
return
|
||||
|
||||
|
||||
icetea
|
||||
name = "Iced Tea"
|
||||
id = "icetea"
|
||||
description = "No relation to a certain rap artist/ actor."
|
||||
color = "#104038" // rgb: 16, 64, 56
|
||||
adj_temp = -5
|
||||
icetea
|
||||
name = "Iced Tea"
|
||||
id = "icetea"
|
||||
description = "No relation to a certain rap artist/ actor."
|
||||
color = "#104038" // rgb: 16, 64, 56
|
||||
adj_temp = -5
|
||||
|
||||
kahlua
|
||||
name = "Kahlua"
|
||||
|
||||
@@ -1601,7 +1601,6 @@ datum
|
||||
required_reagents = list("teapowder" = 1, "water" = 5)
|
||||
result_amount = 5
|
||||
|
||||
|
||||
soysauce
|
||||
name = "Soy Sauce"
|
||||
id = "soysauce"
|
||||
|
||||
@@ -516,6 +516,10 @@
|
||||
icon_state = "brownstar"
|
||||
name = "Brown Star"
|
||||
desc = "Its not what it sounds like..."
|
||||
if("tea")
|
||||
icon_state = "glass_brown"
|
||||
name = "Glass of Tea"
|
||||
desc = "A glass of hot tea. Perhaps a cup with a handle would have been smarter?"
|
||||
if("icetea")
|
||||
icon_state = "icetea"
|
||||
name = "Iced Tea"
|
||||
|
||||
@@ -393,36 +393,17 @@
|
||||
name = "koibean"
|
||||
desc = "Something about these seems fishy."
|
||||
icon_state = "koibeans"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 30), 1))
|
||||
reagents.add_reagent("carpotoxin", 1+round((potency / 20), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/moonflower
|
||||
name = "moonflower"
|
||||
desc = "Store in a location at least 50 yards away from werewolves."
|
||||
icon_state = "moonflower"
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 50), 1))
|
||||
reagents.add_reagent("moonshine", 1+round((potency / 10), 1))
|
||||
bitesize = 1+round(reagents.total_volume / 2, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chilli
|
||||
name = "ghost chili"
|
||||
desc = "It seems to be vibrating gently."
|
||||
icon_state = "ghostchilipepper"
|
||||
var/mob/held_mob
|
||||
New()
|
||||
..()
|
||||
spawn(5) //So potency can be set in the proc that creates these crops
|
||||
reagents.add_reagent("nutriment", 1+round((potency / 25), 1))
|
||||
reagents.add_reagent("capsaicin", 8+round(potency / 2, 1))
|
||||
reagents.add_reagent("condensedcapsaicin", 4+round(potency / 4, 1))
|
||||
bitesize = 1+round(reagents.total_volume / 4, 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato
|
||||
name = "tomato"
|
||||
@@ -643,6 +624,50 @@
|
||||
user.SetLuminosity(round(user.luminosity - (potency/10),1))
|
||||
SetLuminosity(round(potency/10,1))
|
||||
|
||||
//Tobacco/varieties
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco
|
||||
name = "tobacco leaves"
|
||||
desc = "It's tobacco... Put that in your pipe and smoke it."
|
||||
icon_state = "tobacco_leaves"
|
||||
filling_color = "#FFE991"
|
||||
plantname = "tobacco"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tobacco/space
|
||||
name = "space-tobacco leaves"
|
||||
desc = "It's tobacco... From SPACE!"
|
||||
icon_state = "stobacco_leaves"
|
||||
filling_color = "#FFE991"
|
||||
plantname = "stobacco"
|
||||
|
||||
//Tea/varieties
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/teaaspera
|
||||
name = "tea-aspera leaves"
|
||||
desc = "Tea Aspera is well documented to have beneficial health effects!"
|
||||
icon_state = "tea_aspera_leaves"
|
||||
filling_color = "#7F8400"
|
||||
plantname = "teaaspera"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/teaastra
|
||||
name = "tea-astra leaves"
|
||||
desc = "Tea Astra is well documented to have significant health effects."
|
||||
icon_state = "tea_astra_leaves"
|
||||
filling_color = "#7F8400"
|
||||
plantname = "teaastra"
|
||||
|
||||
//Coffee/varieties
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffeea
|
||||
name = "coffee-arabica beans"
|
||||
desc = "Coffee Arabica: A great way start to your morning, or to prolong your nights."
|
||||
icon_state = "coffee_arabica"
|
||||
filling_color = "#5B2E0D"
|
||||
plantname = "coffeea"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/coffeer
|
||||
name = "coffee-robusta beans"
|
||||
desc = "Coffee Robusta: Coffe so robust we had to put it in the name."
|
||||
icon_state = "coffee_robusta"
|
||||
filling_color = "#5B2E0D"
|
||||
plantname = "coffeer"
|
||||
|
||||
// *************************************
|
||||
// Complex Grown Object Defines -
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.droplimb(1,0)
|
||||
affected.droplimb(1,1,1)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
|
||||
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
|
||||
user << "\red You tear some vessels trying to fit such big object in this cavity."
|
||||
var/datum/wound/internal_bleeding/I = new (15)
|
||||
var/datum/wound/internal_bleeding/I = new ()
|
||||
affected.wounds += I
|
||||
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1)
|
||||
user.drop_item()
|
||||
|
||||
Reference in New Issue
Block a user