mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 18:11:47 +00:00
Merge pull request #3078 from Limeliz/patch-5
Vending and autolathe beauty fixes
This commit is contained in:
@@ -120,7 +120,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
if (stat)
|
if (stat)
|
||||||
return 1
|
return 1
|
||||||
if (busy)
|
if (busy)
|
||||||
user << "\red The autolathe is busy. Please wait for completion of previous operation."
|
user << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
|
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
|
||||||
@@ -145,13 +145,13 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
if (src.m_amount + O.m_amt > max_m_amount)
|
if (src.m_amount + O.m_amt > max_m_amount)
|
||||||
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
|
user << "<span class=\"alert\">The autolathe is full. Please remove metal from the autolathe in order to insert more.</span>"
|
||||||
return 1
|
return 1
|
||||||
if (src.g_amount + O.g_amt > max_g_amount)
|
if (src.g_amount + O.g_amt > max_g_amount)
|
||||||
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
|
user << "<span class=\"alert\">The autolathe is full. Please remove glass from the autolathe in order to insert more.</span>"
|
||||||
return 1
|
return 1
|
||||||
if (O.m_amt == 0 && O.g_amt == 0)
|
if (O.m_amt == 0 && O.g_amt == 0)
|
||||||
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
|
user << "<span class=\"alert\">This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials.</span>"
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
var/amount = 1
|
var/amount = 1
|
||||||
@@ -227,7 +227,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
src.g_amount = 0
|
src.g_amount = 0
|
||||||
busy = 0
|
busy = 0
|
||||||
else
|
else
|
||||||
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
|
usr << "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>"
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -246,27 +246,27 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
var/dat
|
var/dat
|
||||||
if(!panel_open)
|
if(!panel_open)
|
||||||
var/coeff = 2 ** prod_coeff
|
var/coeff = 2 ** prod_coeff
|
||||||
dat = "<div class='statusDisplay'><B>Metal Amount:</B> [src.m_amount] / [max_m_amount] cm<sup>3</sup><BR>"
|
dat = "<div class='statusDisplay'><b>Metal amount:</b> [src.m_amount] / [max_m_amount] cm<sup>3</sup><br>"
|
||||||
dat += "<B>Glass Amount:</B> [src.g_amount] / [max_g_amount] cm<sup>3</sup><HR>"
|
dat += "<b>Glass amount:</b> [src.g_amount] / [max_g_amount] cm<sup>3</sup><hr>"
|
||||||
var/list/objs = list()
|
var/list/objs = list()
|
||||||
objs += src.L
|
objs += src.L
|
||||||
if(src.hacked)
|
if(src.hacked)
|
||||||
objs += src.LL
|
objs += src.LL
|
||||||
for(var/obj/t in objs)
|
for(var/obj/t in objs)
|
||||||
if(disabled || m_amount<t.m_amt || g_amount<t.g_amt)
|
if(disabled || m_amount<t.m_amt || g_amount<t.g_amt)
|
||||||
dat += "<span class='linkOff'>[t.name]</span>"
|
dat += replacetext("<span class='linkOff'>[t]</span>", "The ", "")
|
||||||
else
|
else
|
||||||
dat += "<A href='?src=\ref[src];make=\ref[t]'>[t.name]</A>"
|
dat += replacetext("<a href='?src=\ref[src];make=\ref[t]'>[t]</a>", "The ", "")
|
||||||
|
|
||||||
if(istype(t, /obj/item/stack))
|
if(istype(t, /obj/item/stack))
|
||||||
var/obj/item/stack/S = t
|
var/obj/item/stack/S = t
|
||||||
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
|
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
|
||||||
if (max_multiplier>10 && !disabled)
|
if (max_multiplier>10 && !disabled)
|
||||||
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
|
dat += " <a href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</a>"
|
||||||
if (max_multiplier>25 && !disabled)
|
if (max_multiplier>25 && !disabled)
|
||||||
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
|
dat += " <a href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</a>"
|
||||||
if (max_multiplier>1 && !disabled)
|
if (max_multiplier>1 && !disabled)
|
||||||
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
|
dat += " <a href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</a>"
|
||||||
dat += " [t.m_amt] m / [t.g_amt] g"
|
dat += " [t.m_amt] m / [t.g_amt] g"
|
||||||
else
|
else
|
||||||
dat += " [t.m_amt/coeff] m / [t.g_amt/coeff] g"
|
dat += " [t.m_amt/coeff] m / [t.g_amt/coeff] g"
|
||||||
|
|||||||
@@ -222,12 +222,12 @@
|
|||||||
if(premium.len > 0)
|
if(premium.len > 0)
|
||||||
dat += "<b>Coin slot:</b> "
|
dat += "<b>Coin slot:</b> "
|
||||||
if (coin)
|
if (coin)
|
||||||
dat += "[coin] <a href='byond://?src=\ref[src];remove_coin=1'>Remove</A>"
|
dat += "[coin] <a href='byond://?src=\ref[src];remove_coin=1'>Remove</a>"
|
||||||
else
|
else
|
||||||
dat += "<i>No coin</i> <span class='linkOff'>Remove</span>"
|
dat += "<i>No coin</i> <span class='linkOff'>Remove</span>"
|
||||||
|
|
||||||
if(!panel_open)//Vending machines do not dispense items when they are unscrewed
|
if(!panel_open)//Vending machines do not dispense items when they are unscrewed
|
||||||
dat += "<h3>Select an Item</h3>"
|
dat += "<h3>Select an item</h3>"
|
||||||
dat += "<div class='statusDisplay'>"
|
dat += "<div class='statusDisplay'>"
|
||||||
if(product_records.len == 0)
|
if(product_records.len == 0)
|
||||||
dat += "<font color = 'red'>No product loaded!</font>"
|
dat += "<font color = 'red'>No product loaded!</font>"
|
||||||
@@ -243,10 +243,10 @@
|
|||||||
for (var/datum/data/vending_product/R in display_records)
|
for (var/datum/data/vending_product/R in display_records)
|
||||||
dat += "<li>"
|
dat += "<li>"
|
||||||
if(R.amount > 0)
|
if(R.amount > 0)
|
||||||
dat += "<a href='byond://?src=\ref[src];vend=\ref[R]'>Vend</A> "
|
dat += "<a href='byond://?src=\ref[src];vend=\ref[R]'>Vend</a> "
|
||||||
else
|
else
|
||||||
dat += "<span class='linkOff'>Sold Out</span> "
|
dat += "<span class='linkOff'>Sold out</span> "
|
||||||
dat += "<FONT color = '[R.display_color]'><B>[R.product_name]</B>:</font>"
|
dat += "<font color = '[R.display_color]'><b>[sanitize(R.product_name)]</b>:</font>"
|
||||||
dat += " <b>[R.amount]</b>"
|
dat += " <b>[R.amount]</b>"
|
||||||
dat += "</li>"
|
dat += "</li>"
|
||||||
dat += "</ul>"
|
dat += "</ul>"
|
||||||
@@ -833,9 +833,6 @@
|
|||||||
/obj/item/weapon/stock_parts/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8,
|
/obj/item/weapon/stock_parts/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8,
|
||||||
/obj/item/weapon/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/weapon/stock_parts/scanning_module = 5,/obj/item/weapon/stock_parts/micro_laser = 5,
|
/obj/item/weapon/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/weapon/stock_parts/scanning_module = 5,/obj/item/weapon/stock_parts/micro_laser = 5,
|
||||||
/obj/item/weapon/stock_parts/matter_bin = 5,/obj/item/weapon/stock_parts/manipulator = 5,/obj/item/weapon/stock_parts/console_screen = 5)
|
/obj/item/weapon/stock_parts/matter_bin = 5,/obj/item/weapon/stock_parts/manipulator = 5,/obj/item/weapon/stock_parts/console_screen = 5)
|
||||||
// There was an incorrect entry (cablecoil/power). I improvised to cablecoil/heavyduty.
|
|
||||||
// Another invalid entry, /obj/item/weapon/circuitry. I don't even know what that would translate to, removed it.
|
|
||||||
// The original products list wasn't finished. The ones without given quantities became quantity 5. -Sayu
|
|
||||||
|
|
||||||
//This one's from bay12
|
//This one's from bay12
|
||||||
/obj/machinery/vending/robotics
|
/obj/machinery/vending/robotics
|
||||||
@@ -848,5 +845,3 @@
|
|||||||
/obj/item/weapon/stock_parts/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3,
|
/obj/item/weapon/stock_parts/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3,
|
||||||
/obj/item/weapon/scalpel = 2,/obj/item/weapon/circular_saw = 2,/obj/item/weapon/tank/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5,
|
/obj/item/weapon/scalpel = 2,/obj/item/weapon/circular_saw = 2,/obj/item/weapon/tank/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5,
|
||||||
/obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5)
|
/obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5)
|
||||||
//everything after the power cell had no amounts, I improvised. -Sayu
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user