Merge remote-tracking branch 'upstream/master' into splitundie

This commit is contained in:
Yoshax
2016-03-12 02:27:54 +00:00
15 changed files with 352 additions and 346 deletions

View File

@@ -50,7 +50,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/slides,
/obj/item/device/uv_light,
/obj/item/weapon/reagent_containers/spray/luminol)
cost = 30
@@ -775,7 +774,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
cost = 125
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
access = access_heads
access = access_armory
group = "Security"
/datum/supply_packs/randomised/armor

View File

@@ -136,7 +136,6 @@
/obj/item/weapon/melee/baton,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/flame/lighter,
/obj/item/clothing/glasses/hud/security,
/obj/item/device/flashlight,
/obj/item/device/pda,
/obj/item/device/radio/headset,
@@ -166,7 +165,6 @@
/obj/item/weapon/forensics/sample_kit/powder,
/obj/item/weapon/forensics/swab,
/obj/item/device/uv_light,
/obj/item/weapon/forensics/slide,
/obj/item/weapon/forensics/sample_kit,
/obj/item/weapon/photo,
/obj/item/device/camera_film,

View File

@@ -140,7 +140,6 @@ var/list/debug_verbs = list (
,/client/proc/ticklag
,/client/proc/cmd_admin_grantfullaccess
,/client/proc/kaboom
,/client/proc/splash
,/client/proc/cmd_admin_areatest
,/client/proc/cmd_admin_rejuvenate
,/datum/admins/proc/show_traitor_panel

View File

@@ -16,7 +16,7 @@
user << "<span class='warning'>There is already a slide in the microscope.</span>"
return
if(istype(W, /obj/item/weapon/forensics/slide) || istype(W, /obj/item/weapon/sample/print))
if(istype(W, /obj/item/weapon/forensics/swab)|| istype(W, /obj/item/weapon/sample/fibers) || istype(W, /obj/item/weapon/sample/print))
user << "<span class='notice'>You insert \the [W] into the microscope.</span>"
user.unEquip(W)
W.forceMove(src)
@@ -33,6 +33,7 @@
user << "<span class='notice'>The microscope whirrs as you examine \the [sample].</span>"
if(!do_after(user, 25) || !sample)
user << "<span class='notice'>You stop examining \the [sample].</span>"
return
user << "<span class='notice'>Printing findings now...</span>"
@@ -41,10 +42,8 @@
report.overlays = list("paper_stamped")
report_num++
if(istype(sample, /obj/item/weapon/forensics/slide))
var/obj/item/weapon/forensics/slide/slide = sample
if(slide.has_swab)
var/obj/item/weapon/forensics/swab/swab = slide.has_swab
if(istype(sample, /obj/item/weapon/forensics/swab))
var/obj/item/weapon/forensics/swab/swab = sample
report.name = "GSR report #[++report_num]: [swab.name]"
report.info = "<b>Scanned item:</b><br>[swab.name]<br><br>"
@@ -54,8 +53,8 @@
else
report.info += "No gunpowder residue found."
else if(slide.has_sample)
var/obj/item/weapon/sample/fibers/fibers = slide.has_sample
else if(istype(sample, /obj/item/weapon/sample/fibers))
var/obj/item/weapon/sample/fibers/fibers = sample
report.name = "Fiber report #[++report_num]: [fibers.name]"
report.info = "<b>Scanned item:</b><br>[fibers.name]<br><br>"
if(fibers.evidence)
@@ -64,9 +63,6 @@
report.info += "<span class='notice'>Most likely match for fibers: [fiber]</span><br><br>"
else
report.info += "No fibers found."
else
report.name = "Empty slide report #[report_num]"
report.info = "Evidence suggests that there's nothing in this slide."
else if(istype(sample, /obj/item/weapon/sample/print))
report.name = "Fingerprint report #[report_num]: [sample.name]"
report.info = "<b>Fingerprint analysis report #[report_num]</b>: [sample.name]<br>"

View File

@@ -1,42 +0,0 @@
/obj/item/weapon/forensics/slide
name = "microscope slide"
desc = "A pair of thin glass panes used in the examination of samples beneath a microscope."
icon_state = "slide"
var/obj/item/weapon/forensics/swab/has_swab
var/obj/item/weapon/sample/fibers/has_sample
/obj/item/weapon/forensics/slide/attackby(var/obj/item/weapon/W, var/mob/user)
if(has_swab || has_sample)
user << "<span class='warning'>There is already a sample in the slide.</span>"
return
if(istype (W, /obj/item/weapon/forensics/swab))
has_swab = W
else if(istype(W, /obj/item/weapon/sample/fibers))
has_sample = W
else
user << "<span class='warning'>You don't think this will fit.</span>"
return
user << "<span class='notice'>You insert the sample into the slide.</span>"
user.unEquip(W)
W.forceMove(src)
update_icon()
/obj/item/weapon/forensics/slide/attack_self(var/mob/user)
if(has_swab || has_sample)
user << "<span class='notice'>You remove \the sample from \the [src].</span>"
if(has_swab)
has_swab.loc = get_turf(src)
has_swab = null
if(has_sample)
has_sample.forceMove(get_turf(src))
has_sample = null
update_icon()
return
/obj/item/weapon/forensics/slide/update_icon()
if(!has_swab && !has_sample)
icon_state = "slide"
else if(has_swab)
icon_state = "slideswab"
else if(has_sample)
icon_state = "slidefiber"

View File

@@ -11,16 +11,6 @@
for(var/i=0;i<storage_slots,i++) // Fill 'er up.
new /obj/item/weapon/forensics/swab(src)
/obj/item/weapon/storage/box/slides
name = "microscope slide box"
icon_state = "solution_trays"
storage_slots = 7
/obj/item/weapon/storage/box/slides/New()
..()
for(var/i=0;i<storage_slots,i++)
new /obj/item/weapon/forensics/slide(src)
/obj/item/weapon/storage/box/evidence
name = "evidence bag box"
desc = "A box claiming to contain evidence bags."

View File

@@ -68,7 +68,7 @@
/obj/item/weapon/forensics/swab/afterattack(var/atom/A, var/mob/user, var/proximity)
if(!proximity || istype(A, /obj/item/weapon/forensics/slide) || istype(A, /obj/machinery/dnaforensics))
if(!proximity || istype(A, /obj/machinery/dnaforensics))
return
if(is_used())

View File

@@ -51,10 +51,6 @@
overlays -= "register_cash"
else
open_cash_box()
// Reset if necessary
else if(transaction_amount)
reset_memory()
user << "<span class='notice'>You reset the machine's memory.</span>"
else
user.set_machine(src)
interact(user)
@@ -76,7 +72,12 @@
dat += "Linked account: <a href='?src=\ref[src];choice=link_account'>[linked_account ? linked_account.owner_name : "None"]</a><br>"
dat += "<a href='?src=\ref[src];choice=toggle_cash_lock'>[cash_locked? "Unlock" : "Lock"] Cash Box</a> | "
dat += "<a href='?src=\ref[src];choice=custom_order'>Custom Order</a><hr>"
for(var/i=1, i<=transaction_logs.len, i++)
if(item_list.len)
dat += get_current_transaction()
dat += "<br>"
for(var/i=transaction_logs.len, i>=1, i--)
dat += "[transaction_logs[i]]<br>"
if(transaction_logs.len)
@@ -118,12 +119,46 @@
if (!t_purpose || !Adjacent(usr)) return
transaction_purpose = t_purpose
item_list += t_purpose
var/t_amount = input("Enter price", "New price") as num
var/t_amount = round(input("Enter price", "New price") as num)
if (!t_amount || !Adjacent(usr)) return
transaction_amount += t_amount
price_list += t_amount
playsound(src, 'sound/machines/twobeep.ogg', 25)
src.visible_message("\icon[src][transaction_purpose]: [transaction_amount] Thaler\s.")
src.visible_message("\icon[src][transaction_purpose]: [t_amount] Thaler\s.")
if("set_amount")
var/item_name = locate(href_list["item"])
var/n_amount = round(input("Enter amount", "New amount") as num)
n_amount = Clamp(n_amount, 0, 20)
if (!item_list[item_name] || !Adjacent(usr)) return
transaction_amount += (n_amount - item_list[item_name]) * price_list[item_name]
if(!n_amount)
item_list -= item_name
price_list -= item_name
else
item_list[item_name] = n_amount
if("subtract")
var/item_name = locate(href_list["item"])
if(item_name)
transaction_amount -= price_list[item_name]
item_list[item_name]--
if(item_list[item_name] <= 0)
item_list -= item_name
price_list -= item_name
if("add")
var/item_name = locate(href_list["item"])
if(item_list[item_name] >= 20) return
transaction_amount += price_list[item_name]
item_list[item_name]++
if("clear")
var/item_name = locate(href_list["item"])
if(item_name)
transaction_amount -= price_list[item_name] * item_list[item_name]
item_list -= item_name
price_list -= item_name
else
transaction_amount = 0
item_list.Cut()
price_list.Cut()
if("reset_log")
transaction_logs.Cut()
usr << "\icon[src]<span class='notice'>Transaction log reset.</span>"
@@ -180,18 +215,18 @@
if (!transaction_amount)
return
if(!confirm(I))
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
if((item_list.len > 1 || item_list[item_list[1]] > 1) && !confirm(I))
return
if (!linked_account)
usr.visible_message("\icon[src]<span class='warning'>Unable to connect to linked account.</span>")
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
// Access account for transaction
if(check_account())
var/datum/money_account/D = get_account(I.associated_account_number)
@@ -245,14 +280,14 @@
if (!transaction_amount)
return
if(!confirm(E))
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
if((item_list.len > 1 || item_list[item_list[1]] > 1) && !confirm(E))
return
// Access account for transaction
if(check_account())
if(transaction_amount > E.worth)
@@ -283,14 +318,14 @@
if (!transaction_amount)
return
if(!confirm(SC))
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
return
if((item_list.len > 1 || item_list[item_list[1]] > 1) && !confirm(SC))
return
if(transaction_amount > SC.worth)
src.visible_message("\icon[src]<span class='warning'>Not enough money.</span>")
else
@@ -313,6 +348,9 @@
/obj/machinery/cash_register/proc/scan_item_price(obj/O)
if(!istype(O)) return
if(item_list.len > 10)
src.visible_message("\icon[src]<span class='warning'>Only up to ten different items allowed per purchase.</span>")
return
if (cash_open)
playsound(src, 'sound/machines/buzz-sigh.ogg', 25)
usr << "\icon[src]<span class='warning'>The cash box is open.</span>"
@@ -330,19 +368,43 @@
transaction_purpose += "<br>"
transaction_purpose += "[O]: [price] Thaler\s"
transaction_amount += price
item_list += "[O]"
price_list += price
for(var/previously_scanned in item_list)
if(price == price_list[previously_scanned] && O.name == previously_scanned)
. = item_list[previously_scanned]++
if(!.)
item_list[O.name] = 1
price_list[O.name] = price
. = 1
// Animation and sound
playsound(src, 'sound/machines/twobeep.ogg', 25)
// Reset confirmation
confirm_item = null
updateDialog()
/obj/machinery/cash_register/proc/get_current_transaction()
var/dat = {"
<head><style>
.tx-title-r {text-align: center; background-color:#ffdddd; font-weight: bold}
.tx-name-r {background-color: #eebbbb}
.tx-data-r {text-align: right; background-color: #ffcccc;}
</head></style>
<table width=300>
<tr><td colspan="2" class="tx-title-r">New Entry</td></tr>
<tr></tr>"}
var/item_name
for(var/i=1, i<=item_list.len, i++)
item_name = item_list[i]
dat += "<tr><td class=\"tx-name-r\">[item_list[item_name] ? "<a href='?src=\ref[src];choice=subtract;item=\ref[item_name]'>-</a> <a href='?src=\ref[src];choice=set_amount;item=\ref[item_name]'>Set</a> <a href='?src=\ref[src];choice=add;item=\ref[item_name]'>+</a> [item_list[item_name]] x " : ""][item_name] <a href='?src=\ref[src];choice=clear;item=\ref[item_name]'>Remove</a></td><td class=\"tx-data-r\" width=50>[price_list[item_name] * item_list[item_name]] &thorn</td></tr>"
dat += "</table><table width=300>"
dat += "<tr><td class=\"tx-name-r\"><a href='?src=\ref[src];choice=clear'>Clear Entry</a></td><td class=\"tx-name-r\" style='text-align: right'><b>Total Amount: [transaction_amount] &thorn</b></td></tr>"
dat += "</table></html>"
return dat
/obj/machinery/cash_register/proc/add_transaction_log(var/c_name, var/p_method, var/t_amount)
var/dat = {"
<!DOCTYPE html><html>
<head><style>
.tx-table {border: 1px solid black;}
.tx-title {text-align: center; background-color:#ddddff; font-weight: bold}
.tx-name {background-color: #bbbbee}
.tx-data {text-align: right; background-color: #ccccff;}
@@ -356,8 +418,10 @@
</table>
<table width=300>
"}
var/item_name
for(var/i=1, i<=item_list.len, i++)
dat += "<tr><td class=\"tx-name\">[item_list[i]]</td><td class=\"tx-data\" width=50>[price_list[i]] &thorn</td></tr>"
item_name = item_list[i]
dat += "<tr><td class=\"tx-name\">[item_list[item_name] ? "[item_list[item_name]] x " : ""][item_name]</td><td class=\"tx-data\" width=50>[price_list[item_name] * item_list[item_name]] &thorn</td></tr>"
dat += "<tr></tr><tr><td colspan=\"2\" class=\"tx-name\" style='text-align: right'><b>Total Amount: [transaction_amount] &thorn</b></td></tr>"
dat += "</table></html>"

View File

@@ -18,6 +18,9 @@
// Juices, soda and similar //
/datum/reagent/water
price_tag = 2
/datum/reagent/drink/juice
price_tag = 2
@@ -49,7 +52,6 @@
price_tag = 2
// Hot Drinks //
/datum/reagent/drink/rewriter
@@ -64,6 +66,15 @@
/datum/reagent/drink/hot_coco
price_tag = 3
/obj/item/weapon/reagent_containers/food/drinks/coffee
price_tag = 3
/obj/item/weapon/reagent_containers/food/drinks/tea
price_tag = 3
/obj/item/weapon/reagent_containers/food/drinks/h_chocolate
price_tag = 3
// Spirituous liquors //
@@ -103,6 +114,15 @@
/datum/reagent/ethanol/whiskey
price_tag = 5
/datum/reagent/ethanol/specialwhiskey
price_tag = 5
/datum/reagent/ethanol/patron
price_tag = 5
/datum/reagent/ethanol/goldschlager
price_tag = 5
/datum/reagent/ethanol/coffee/brave_bull // Not an original liquor in its own. But since it's a mix of purely Tequila
price_tag = 5 // and Kahlua, it's basically just another one and gets the same price.
@@ -202,15 +222,12 @@
/datum/reagent/ethanol/erikasurprise
price_tag = 4
/datum/reagent/ethanol/gargleblaster
/datum/reagent/ethanol/gargle_blaster
price_tag = 4
/datum/reagent/ethanol/gintonic
price_tag = 4
/datum/reagent/ethanol/goldschlager
price_tag = 4
/datum/reagent/ethanol/hippies_delight
price_tag = 4
@@ -250,9 +267,6 @@
/datum/reagent/ethanol/neurotoxin
price_tag = 4
/datum/reagent/ethanol/patron
price_tag = 4
/datum/reagent/ethanol/red_mead
price_tag = 4
@@ -301,9 +315,6 @@
/datum/reagent/ethanol/whiskeysoda
price_tag = 4
/datum/reagent/ethanol/specialwhiskey
price_tag = 4
// Cocktails without alcohol //
@@ -339,9 +350,105 @@
//***************//
//---Foodstuff---//
//----Bottles----//
//***************//
// Juices, soda and similar //
/obj/item/weapon/reagent_containers/food/drinks/bottle/cola
price_tag = 6
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up
price_tag = 6
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind
price_tag = 6
/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice
price_tag = 6
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream
price_tag = 6
/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice
price_tag = 6
/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice
price_tag = 6
// Beer //
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer
price_tag = 3
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale
price_tag = 3
// Spirituous Liquors //
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing
price_tag = 15
/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine
price_tag = 15
// Wines //
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine
price_tag = 25
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac
price_tag = 25
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth
price_tag = 25
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine
price_tag = 25
//***************//
//---Foodstuff---//
//***************//
// Snacks //
@@ -812,3 +919,38 @@
/obj/item/pizzabox
get_item_cost()
return get_item_cost(pizza)
//***************//
//----Smokes-----//
//***************//
/obj/item/weapon/storage/fancy/cigarettes
price_tag = 15
/obj/item/weapon/storage/fancy/cigarettes/luckystars
price_tag = 17
/obj/item/weapon/storage/fancy/cigarettes/jerichos
price_tag = 22
/obj/item/weapon/storage/fancy/cigarettes/menthols
price_tag = 18
/obj/item/weapon/storage/fancy/cigar
price_tag = 27
/obj/item/weapon/storage/fancy/cigarettes/carcinomas
price_tag = 23
/obj/item/weapon/storage/fancy/cigarettes/professionals
price_tag = 25
/obj/item/weapon/storage/box/matches
price_tag = 1
/obj/item/weapon/flame/lighter
price_tag = 2
/obj/item/weapon/flame/lighter/zippo
price_tag = 5

View File

@@ -47,11 +47,6 @@
/obj/item/device/retail_scanner/attack_self(mob/user as mob)
// Reset if necessary
if(transaction_amount)
reset_memory()
user << "<span class='notice'>You reset the device.</span>"
else
user.set_machine(src)
interact(user)
@@ -71,7 +66,12 @@
dat += "<a href='?src=\ref[src];choice=toggle_lock'>Lock</a><br>"
dat += "Linked account: <a href='?src=\ref[src];choice=link_account'>[linked_account ? linked_account.owner_name : "None"]</a><br>"
dat += "<a href='?src=\ref[src];choice=custom_order'>Custom Order</a><hr>"
for(var/i=1, i<=transaction_logs.len, i++)
if(item_list.len)
dat += get_current_transaction()
dat += "<br>"
for(var/i=transaction_logs.len, i>=1, i--)
dat += "[transaction_logs[i]]<br>"
if(transaction_logs.len)
@@ -111,12 +111,46 @@
if (!t_purpose || !Adjacent(usr)) return
transaction_purpose = t_purpose
item_list += t_purpose
var/t_amount = input("Enter price", "New price") as num
var/t_amount = round(input("Enter price", "New price") as num)
if (!t_amount || !Adjacent(usr)) return
transaction_amount += t_amount
price_list += t_amount
playsound(src, 'sound/machines/twobeep.ogg', 25)
src.visible_message("\icon[src][transaction_purpose]: [transaction_amount] Thaler\s.")
src.visible_message("\icon[src][transaction_purpose]: [t_amount] Thaler\s.")
if("set_amount")
var/item_name = locate(href_list["item"])
var/n_amount = round(input("Enter amount", "New amount") as num)
n_amount = Clamp(n_amount, 0, 20)
if (!item_list[item_name] || !Adjacent(usr)) return
transaction_amount += (n_amount - item_list[item_name]) * price_list[item_name]
if(!n_amount)
item_list -= item_name
price_list -= item_name
else
item_list[item_name] = n_amount
if("subtract")
var/item_name = locate(href_list["item"])
if(item_name)
transaction_amount -= price_list[item_name]
item_list[item_name]--
if(item_list[item_name] <= 0)
item_list -= item_name
price_list -= item_name
if("add")
var/item_name = locate(href_list["item"])
if(item_list[item_name] >= 20) return
transaction_amount += price_list[item_name]
item_list[item_name]++
if("clear")
var/item_name = locate(href_list["item"])
if(item_name)
transaction_amount -= price_list[item_name] * item_list[item_name]
item_list -= item_name
price_list -= item_name
else
transaction_amount = 0
item_list.Cut()
price_list.Cut()
if("reset_log")
transaction_logs.Cut()
usr << "\icon[src]<span class='notice'>Transaction log reset.</span>"
@@ -161,7 +195,7 @@
if (!transaction_amount)
return
if(!confirm(I))
if((item_list.len > 1 || item_list[item_list[1]] > 1) && !confirm(I))
return
if (!linked_account)
@@ -221,7 +255,7 @@
if (!transaction_amount)
return
if(!confirm(E))
if((item_list.len > 1 || item_list[item_list[1]] > 1) && !confirm(E))
return
// Access account for transaction
@@ -252,6 +286,10 @@
/obj/item/device/retail_scanner/proc/scan_item_price(var/obj/O)
if(!istype(O)) return
if(item_list.len > 10)
src.visible_message("\icon[src]<span class='warning'>Only up to ten different items allowed per purchase.</span>")
return
// First check if item has a valid price
var/price = O.get_item_cost()
if(isnull(price))
@@ -264,8 +302,13 @@
transaction_purpose += "<br>"
transaction_purpose += "[O]: [price] Thaler\s"
transaction_amount += price
item_list += "[O]"
price_list += price
for(var/previously_scanned in item_list)
if(price == price_list[previously_scanned] && O.name == previously_scanned)
. = item_list[previously_scanned]++
if(!.)
item_list[O.name] = 1
price_list[O.name] = price
. = 1
// Animation and sound
flick("retail_scan", src)
playsound(src, 'sound/machines/twobeep.ogg', 25)
@@ -273,10 +316,29 @@
confirm_item = null
/obj/item/device/retail_scanner/proc/get_current_transaction()
var/dat = {"
<head><style>
.tx-title-r {text-align: center; background-color:#ffdddd; font-weight: bold}
.tx-name-r {background-color: #eebbbb}
.tx-data-r {text-align: right; background-color: #ffcccc;}
</head></style>
<table width=300>
<tr><td colspan="2" class="tx-title-r">New Entry</td></tr>
<tr></tr>"}
var/item_name
for(var/i=1, i<=item_list.len, i++)
item_name = item_list[i]
dat += "<tr><td class=\"tx-name-r\">[item_list[item_name] ? "<a href='?src=\ref[src];choice=subtract;item=\ref[item_name]'>-</a> <a href='?src=\ref[src];choice=set_amount;item=\ref[item_name]'>Set</a> <a href='?src=\ref[src];choice=add;item=\ref[item_name]'>+</a> [item_list[item_name]] x " : ""][item_name] <a href='?src=\ref[src];choice=clear;item=\ref[item_name]'>Remove</a></td><td class=\"tx-data-r\" width=50>[price_list[item_name] * item_list[item_name]] &thorn</td></tr>"
dat += "</table><table width=300>"
dat += "<tr><td class=\"tx-name-r\"><a href='?src=\ref[src];choice=clear'>Clear Entry</a></td><td class=\"tx-name-r\" style='text-align: right'><b>Total Amount: [transaction_amount] &thorn</b></td></tr>"
dat += "</table></html>"
return dat
/obj/item/device/retail_scanner/proc/add_transaction_log(var/c_name, var/p_method, var/t_amount)
var/dat = {"
<head><style>
.tx-table {border: 1px solid black;}
.tx-title {text-align: center; background-color:#ddddff; font-weight: bold}
.tx-name {background-color: #bbbbee}
.tx-data {text-align: right; background-color: #ccccff;}
@@ -290,8 +352,10 @@
</table>
<table width=300>
"}
var/item_name
for(var/i=1, i<=item_list.len, i++)
dat += "<tr><td class=\"tx-name\">[item_list[i]]</td><td class=\"tx-data\" width=50>[price_list[i]] &thorn</td></tr>"
item_name = item_list[i]
dat += "<tr><td class=\"tx-name\">[item_list[item_name] ? "[item_list[item_name]] x " : ""][item_name]</td><td class=\"tx-data\" width=50>[price_list[item_name] * item_list[item_name]] &thorn</td></tr>"
dat += "<tr></tr><tr><td colspan=\"2\" class=\"tx-name\" style='text-align: right'><b>Total Amount: [transaction_amount] &thorn</b></td></tr>"
dat += "</table>"

View File

@@ -1,202 +0,0 @@
#define LIQUID_TRANSFER_THRESHOLD 0.05
var/liquid_delay = 4
var/list/datum/puddle/puddles = list()
datum/puddle
var/list/obj/effect/liquid/liquid_objects = list()
datum/puddle/proc/process()
//world << "DEBUG: Puddle process!"
for(var/obj/effect/liquid/L in liquid_objects)
L.spread()
for(var/obj/effect/liquid/L in liquid_objects)
L.apply_calculated_effect()
if(liquid_objects.len == 0)
qdel(src)
datum/puddle/New()
..()
puddles += src
datum/puddle/Destroy()
puddles -= src
for(var/obj/O in liquid_objects)
qdel(O)
..()
client/proc/splash()
var/volume = input("Volume?","Volume?", 0 ) as num
if(!isnum(volume)) return
if(volume <= LIQUID_TRANSFER_THRESHOLD) return
var/turf/T = get_turf(src.mob)
if(!isturf(T)) return
trigger_splash(T, volume)
proc/trigger_splash(turf/epicenter as turf, volume as num)
if(!epicenter)
return
if(volume <= 0)
return
var/obj/effect/liquid/L = new/obj/effect/liquid(epicenter)
L.volume = volume
L.update_icon2()
var/datum/puddle/P = new/datum/puddle()
P.liquid_objects.Add(L)
L.controller = P
obj/effect/liquid
icon = 'icons/effects/liquid.dmi'
icon_state = "0"
name = "liquid"
var/volume = 0
var/new_volume = 0
var/datum/puddle/controller
obj/effect/liquid/New()
..()
if( !isturf(loc) )
qdel(src)
for( var/obj/effect/liquid/L in loc )
if(L != src)
qdel(L)
obj/effect/liquid/proc/spread()
//world << "DEBUG: liquid spread!"
var/surrounding_volume = 0
var/list/spread_directions = list(1,2,4,8)
var/turf/loc_turf = loc
for(var/direction in spread_directions)
var/turf/T = get_step(src,direction)
if(!T)
spread_directions.Remove(direction)
//world << "ERROR: Map edge!"
continue //Map edge
if(!loc_turf.can_leave_liquid(direction)) //Check if this liquid can leave the tile in the direction
spread_directions.Remove(direction)
continue
if(!T.can_accept_liquid(turn(direction,180))) //Check if this liquid can enter the tile
spread_directions.Remove(direction)
continue
var/obj/effect/liquid/L = locate(/obj/effect/liquid) in T
if(L)
if(L.volume >= src.volume)
spread_directions.Remove(direction)
continue
surrounding_volume += L.volume //If liquid already exists, add it's volume to our sum
else
var/obj/effect/liquid/NL = new(T) //Otherwise create a new object which we'll spread to.
NL.controller = src.controller
controller.liquid_objects.Add(NL)
if(!spread_directions.len)
//world << "ERROR: No candidate to spread to."
return //No suitable candidate to spread to
var/average_volume = (src.volume + surrounding_volume) / (spread_directions.len + 1) //Average amount of volume on this and the surrounding tiles.
var/volume_difference = src.volume - average_volume //How much more/less volume this tile has than the surrounding tiles.
if(volume_difference <= (spread_directions.len*LIQUID_TRANSFER_THRESHOLD)) //If we have less than the threshold excess liquid - then there is nothing to do as other tiles will be giving us volume.or the liquid is just still.
//world << "ERROR: transfer volume lower than THRESHOLD!"
return
var/volume_per_tile = volume_difference / spread_directions.len
for(var/direction in spread_directions)
var/turf/T = get_step(src,direction)
if(!T)
//world << "ERROR: Map edge 2!"
continue //Map edge
var/obj/effect/liquid/L = locate(/obj/effect/liquid) in T
if(L)
src.volume -= volume_per_tile //Remove the volume from this tile
L.new_volume = L.new_volume + volume_per_tile //Add it to the volume to the other tile
obj/effect/liquid/proc/apply_calculated_effect()
volume += new_volume
if(volume < LIQUID_TRANSFER_THRESHOLD)
qdel(src)
new_volume = 0
update_icon2()
obj/effect/liquid/Move()
return 0
obj/effect/liquid/Destroy()
src.controller.liquid_objects.Remove(src)
..()
obj/effect/liquid/proc/update_icon2()
//icon_state = num2text( max(1,min(7,(floor(volume),10)/10)) )
switch(volume)
if(0 to 0.1)
qdel(src)
if(0.1 to 5)
icon_state = "1"
if(5 to 10)
icon_state = "2"
if(10 to 20)
icon_state = "3"
if(20 to 30)
icon_state = "4"
if(30 to 40)
icon_state = "5"
if(40 to 50)
icon_state = "6"
if(50 to INFINITY)
icon_state = "7"
turf/proc/can_accept_liquid(from_direction)
return 0
turf/proc/can_leave_liquid(from_direction)
return 0
turf/space/can_accept_liquid(from_direction)
return 1
turf/space/can_leave_liquid(from_direction)
return 1
turf/simulated/floor/can_accept_liquid(from_direction)
for(var/obj/structure/window/W in src)
if(W.dir in list(5,6,9,10))
return 0
if(W.dir & from_direction)
return 0
for(var/obj/O in src)
if(!O.liquid_pass())
return 0
return 1
turf/simulated/floor/can_leave_liquid(to_direction)
for(var/obj/structure/window/W in src)
if(W.dir in list(5,6,9,10))
return 0
if(W.dir & to_direction)
return 0
for(var/obj/O in src)
if(!O.liquid_pass())
return 0
return 1
turf/simulated/wall/can_accept_liquid(from_direction)
return 0
turf/simulated/wall/can_leave_liquid(from_direction)
return 0
obj/proc/liquid_pass()
return 1
obj/machinery/door/liquid_pass()
return !density
#undef LIQUID_TRANSFER_THRESHOLD

View File

@@ -1484,15 +1484,15 @@
name = "Iced Tea"
id = "icetea"
result = "icetea"
required_reagents = list("ice" = 1, "tea" = 4)
result_amount = 4
required_reagents = list("ice" = 1, "tea" = 2)
result_amount = 3
/datum/chemical_reaction/icecoffee
name = "Iced Coffee"
id = "icecoffee"
result = "icecoffee"
required_reagents = list("ice" = 1, "coffee" = 4)
result_amount = 4
required_reagents = list("ice" = 1, "coffee" = 2)
result_amount = 3
/datum/chemical_reaction/nuka_cola
name = "Nuka Cola"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -874,7 +874,7 @@
"aqP" = (/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,/turf/simulated/floor/carpet,/area/security/detectives_office)
"aqQ" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/carpet,/area/security/detectives_office)
"aqR" = (/obj/structure/filingcabinet/chestdrawer,/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/lino,/area/security/detectives_office)
"aqS" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/table/reinforced,/obj/item/weapon/storage/box/slides,/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled/freezer,/area/security/detectives_office)
"aqS" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/table/reinforced,/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled/freezer,/area/security/detectives_office)
"aqT" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled/white,/area/security/detectives_office)
"aqU" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled/white,/area/security/detectives_office)
"aqV" = (/obj/structure/disposalpipe/junction{icon_state = "pipe-j1"; dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/tiled/white,/area/security/detectives_office)

View File

@@ -1080,7 +1080,6 @@
#include "code\modules\detectivework\forensics.dm"
#include "code\modules\detectivework\microscope\dnascanner.dm"
#include "code\modules\detectivework\microscope\microscope.dm"
#include "code\modules\detectivework\microscope\slides.dm"
#include "code\modules\detectivework\tools\crimekit.dm"
#include "code\modules\detectivework\tools\evidencebag.dm"
#include "code\modules\detectivework\tools\luminol.dm"
@@ -1195,7 +1194,6 @@
#include "code\modules\lighting\lighting_system.dm"
#include "code\modules\lighting\lighting_turf.dm"
#include "code\modules\lighting\~lighting_undefs.dm"
#include "code\modules\liquid\splash_simulation.dm"
#include "code\modules\maps\dmm_suite.dm"
#include "code\modules\maps\reader.dm"
#include "code\modules\maps\swapmaps.dm"