Merge remote-tracking branch 'upstream/dev' into paintmixing

This commit is contained in:
RKF45
2014-01-13 22:15:33 +01:00
24 changed files with 1525 additions and 876 deletions
+4 -22
View File
@@ -242,29 +242,11 @@
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()
// preload_vox() //Causes long delays with initial start window and subsequent windows when first logged in.
// Send NanoUI resources to this client
nanomanager.send_resources(src)
getFiles(
'nano/js/libraries.min.js',
'nano/js/nano_update.js',
'nano/js/nano_config.js',
'nano/js/nano_base_helpers.js',
'nano/css/shared.css',
'nano/css/icons.css',
'nano/templates/chem_dispenser.tmpl',
'nano/templates/cryo.tmpl',
'nano/templates/geoscanner.tmpl',
'nano/templates/dna_modifier.tmpl',
'nano/templates/telescience_console.tmpl',
'nano/templates/pda.tmpl',
'nano/templates/uplink.tmpl',
'nano/images/uiBackground.png',
'nano/images/uiIcons16.png',
'nano/images/uiIcons24.png',
'nano/images/uiBackground-Syndicate.png',
'nano/images/uiLinkPendingIcon.gif',
'nano/images/uiMaskBackground.png',
'nano/images/uiNoticeBackground.jpg',
'nano/images/uiTitleFluff.png',
'nano/images/uiTitleFluff-Syndicate.png',
'html/search.js',
'html/panels.css',
'icons/pda_icons/pda_atmos.png',
+8 -8
View File
@@ -273,14 +273,6 @@
ore_uranium+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass))
ore_glass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/rglass))
ore_rglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass/plasmaglass))
ore_plasmaglass+= O:amount
del(O)
@@ -289,6 +281,14 @@
ore_plasmarglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass))
ore_glass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/rglass))
ore_rglass+= O:amount
del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasteel))
ore_plasteel+= O:amount
del(O)
+5 -4
View File
@@ -348,10 +348,11 @@ var/list/slot_equipment_priority = list( \
return
else
var/deathtime = world.time - src.timeofdeath
var/mob/dead/observer/G = src
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
usr << "\blue <B>Upon using the antagHUD you forfeighted the ability to join the round.</B>"
return
if(istype(src,/mob/dead/observer))
var/mob/dead/observer/G = src
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
usr << "\blue <B>Upon using the antagHUD you forfeighted the ability to join the round.</B>"
return
var/deathtimeminutes = round(deathtime / 600)
var/pluralcheck = "minute"
if(deathtimeminutes == 0)
+24
View File
@@ -197,4 +197,28 @@
oldMob.open_uis.Cut()
return 1 // success
/**
* Sends all nano assets to the client
* This is called on user login
*
* @param client /client The user's client
*
* @return nothing
*/
/datum/nanomanager/proc/send_resources(client)
var/list/nano_asset_dirs = list(\
"nano/css/",\
"nano/images/",\
"nano/js/",\
"nano/templates/"\
)
var/list/files = null
for (var/path in nano_asset_dirs)
files = flist(path)
for(var/file in files)
if(copytext(file, length(file)) != "/") // files which end in "/" are actually directories, which we want to ignore
client << browse_rsc(file(path + file)) // send the file to the client
+90 -133
View File
@@ -520,129 +520,87 @@
user << browse(t1, "window=apcwires")
onclose(user, "apcwires")
user.set_machine(src)
var/t = "<html><head><title>[area.name] APC</title></head><body><TT><B>Area Power Controller</B> ([area.name])<HR>"
//This goes after the wire stuff. They should be able to fix a physical problem when a wire is cut
if ( (get_dist(src, user) > 1 ))
if (!istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=apc")
return
else if (istype(user, /mob/living/silicon) && src.aidisabled && !src.malfhack)
user << "AI control for this APC interface has been disabled."
user.unset_machine()
user << browse(null, "window=apc")
return
else if (src.malfai)
if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai))
user << "AI control for this APC interface has been disabled."
user.unset_machine()
user << browse(null, "window=apc")
return
if(locked && (!istype(user, /mob/living/silicon)))
t += "<I>(Swipe ID card to unlock inteface.)</I><BR>"
t += "Main breaker : <B>[operating ? "On" : "Off"]</B><BR>"
t += "External power : <B>[ main_status ? (main_status ==2 ? "<FONT COLOR=#004000>Good</FONT>" : "<FONT COLOR=#D09000>Low</FONT>") : "<FONT COLOR=#F00000>None</FONT>"]</B><BR>"
t += "Power cell: <B>[cell ? "[round(cell.percent())]%" : "<FONT COLOR=red>Not connected.</FONT>"]</B>"
if(cell)
t += " ([charging ? ( charging == 1 ? "Charging" : "Fully charged" ) : "Not charging"])"
t += " ([chargemode ? "Auto" : "Off"])"
t += "<BR><HR>Power channels<BR><PRE>"
var/list/L = list ("Off","Off (Auto)", "On", "On (Auto)")
t += "Equipment: [add_lspace(lastused_equip, 6)] W : <B>[L[equipment+1]]</B><BR>"
t += "Lighting: [add_lspace(lastused_light, 6)] W : <B>[L[lighting+1]]</B><BR>"
t += "Environmental:[add_lspace(lastused_environ, 6)] W : <B>[L[environ+1]]</B><BR>"
t += "<BR>Total load: [lastused_light + lastused_equip + lastused_environ] W</PRE>"
t += "<HR>Cover lock: <B>[coverlocked ? "Engaged" : "Disengaged"]</B>"
else
if (!istype(user, /mob/living/silicon))
t += "<I>(Swipe ID card to lock interface.)</I><BR>"
t += "Main breaker: [operating ? "<B>On</B> <A href='?src=\ref[src];breaker=1'>Off</A>" : "<A href='?src=\ref[src];breaker=1'>On</A> <B>Off</B>" ]<BR>"
t += "External power : <B>[ main_status ? (main_status ==2 ? "<FONT COLOR=#004000>Good</FONT>" : "<FONT COLOR=#D09000>Low</FONT>") : "<FONT COLOR=#F00000>None</FONT>"]</B><BR>"
if(cell)
t += "Power cell: <B>[round(cell.percent())]%</B>"
t += " ([charging ? ( charging == 1 ? "Charging" : "Fully charged" ) : "Not charging"])"
t += " ([chargemode ? "<A href='?src=\ref[src];cmode=1'>Off</A> <B>Auto</B>" : "<B>Off</B> <A href='?src=\ref[src];cmode=1'>Auto</A>"])"
else
t += "Power cell: <B><FONT COLOR=red>Not connected.</FONT></B>"
t += "<BR><HR>Power channels<BR><PRE>"
t += "Equipment: [add_lspace(lastused_equip, 6)] W : "
switch(equipment)
if(0)
t += "<B>Off</B> <A href='?src=\ref[src];eqp=2'>On</A> <A href='?src=\ref[src];eqp=3'>Auto</A>"
if(1)
t += "<A href='?src=\ref[src];eqp=1'>Off</A> <A href='?src=\ref[src];eqp=2'>On</A> <B>Auto (Off)</B>"
if(2)
t += "<A href='?src=\ref[src];eqp=1'>Off</A> <B>On</B> <A href='?src=\ref[src];eqp=3'>Auto</A>"
if(3)
t += "<A href='?src=\ref[src];eqp=1'>Off</A> <A href='?src=\ref[src];eqp=2'>On</A> <B>Auto (On)</B>"
t +="<BR>"
t += "Lighting: [add_lspace(lastused_light, 6)] W : "
switch(lighting)
if(0)
t += "<B>Off</B> <A href='?src=\ref[src];lgt=2'>On</A> <A href='?src=\ref[src];lgt=3'>Auto</A>"
if(1)
t += "<A href='?src=\ref[src];lgt=1'>Off</A> <A href='?src=\ref[src];lgt=2'>On</A> <B>Auto (Off)</B>"
if(2)
t += "<A href='?src=\ref[src];lgt=1'>Off</A> <B>On</B> <A href='?src=\ref[src];lgt=3'>Auto</A>"
if(3)
t += "<A href='?src=\ref[src];lgt=1'>Off</A> <A href='?src=\ref[src];lgt=2'>On</A> <B>Auto (On)</B>"
t +="<BR>"
t += "Environmental:[add_lspace(lastused_environ, 6)] W : "
switch(environ)
if(0)
t += "<B>Off</B> <A href='?src=\ref[src];env=2'>On</A> <A href='?src=\ref[src];env=3'>Auto</A>"
if(1)
t += "<A href='?src=\ref[src];env=1'>Off</A> <A href='?src=\ref[src];env=2'>On</A> <B>Auto (Off)</B>"
if(2)
t += "<A href='?src=\ref[src];env=1'>Off</A> <B>On</B> <A href='?src=\ref[src];env=3'>Auto</A>"
if(3)
t += "<A href='?src=\ref[src];env=1'>Off</A> <A href='?src=\ref[src];env=2'>On</A> <B>Auto (On)</B>"
t += "<BR>Total load: [lastused_light + lastused_equip + lastused_environ] W</PRE>"
t += "<HR>Cover lock: [coverlocked ? "<B><A href='?src=\ref[src];lock=1'>Engaged</A></B>" : "<B><A href='?src=\ref[src];lock=1'>Disengaged</A></B>"]"
if (istype(user, /mob/living/silicon))
t += "<BR><HR><A href='?src=\ref[src];overload=1'><I>Overload lighting circuit</I></A><BR>"
if (ticker && ticker.mode)
// world << "there's a ticker"
if(user.mind in ticker.mode.malf_ai)
// world << "ticker says its malf"
if (!src.malfai)
t += "<BR><HR><A href='?src=\ref[src];malfhack=1'><I>Override Programming</I></A><BR>"
else
t += "<BR><HR><I>APC Hacked</I><BR>"
/*if(!src.occupant)
t += "<A href='?src=\ref[src];occupyapc=1'><I>Shunt Core Processes</I></A><BR>"
else
t += "<I>Core Processes Uploaded</I><BR>"*/
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</TT></body></html>"
user << browse(t, "window=apc")
onclose(user, "apc")
// Open the APC NanoUI
ui_interact(user)
return
/obj/machinery/power/apc/proc/get_malf_status(mob/user)
if (ticker && ticker.mode && (user.mind in ticker.mode.malf_ai) && istype(user, /mob/living/silicon/ai))
if (src.malfai == (user:parent ? user:parent : user))
if (src.occupant == user)
return 3 // 3 = User is shunted in this APC
else if (istype(user.loc, /obj/machinery/power/apc))
return 4 // 4 = User is shunted in another APC
else
return 2 // 2 = APC hacked by user, and user is in its core.
else
return 1 // 1 = APC not hacked.
else
return 0 // 0 = User is not a Malf AI
/obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
if(!user)
return
var/list/data = list(
"locked" = locked,
"isOperating" = operating,
"externalPower" = main_status,
"powerCellStatus" = cell ? cell.percent() : null,
"chargeMode" = chargemode,
"chargingStatus" = charging,
"totalLoad" = lastused_equip + lastused_light + lastused_environ,
"coverLocked" = coverlocked,
"siliconUser" = istype(user, /mob/living/silicon),
"malfStatus" = get_malf_status(user),
"powerChannels" = list(
list(
"title" = "Equipment",
"powerLoad" = lastused_equip,
"status" = equipment,
"topicParams" = list(
"auto" = list("eqp" = 3),
"on" = list("eqp" = 2),
"off" = list("eqp" = 1)
)
),
list(
"title" = "Lighting",
"powerLoad" = lastused_light,
"status" = lighting,
"topicParams" = list(
"auto" = list("lgt" = 3),
"on" = list("lgt" = 2),
"off" = list("lgt" = 1)
)
),
list(
"title" = "Environment",
"powerLoad" = lastused_environ,
"status" = environ,
"topicParams" = list(
"auto" = list("env" = 3),
"on" = list("env" = 2),
"off" = list("env" = 1)
)
)
)
)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 520, data["siliconUser"] ? 465 : 440)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/power/apc/proc/report()
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
@@ -754,8 +712,8 @@
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
user << "\red You don't have the dexterity to use this [src]!"
user << browse(null, "window=apc")
user.unset_machine()
nanomanager.close_user_uis(user, src)
return 0
if(user.restrained())
user << "\red You must have free hands to use this [src]"
@@ -776,13 +734,13 @@
)
if(!loud)
user << "\red \The [src] have AI control disabled!"
user << browse(null, "window=apc")
user.unset_machine()
nanomanager.close_user_uis(user, src)
return 0
else
if ((!in_range(src, user) || !istype(src.loc, /turf)))
user << browse(null, "window=apc")
user.unset_machine()
nanomanager.close_user_uis(user, src)
return 0
var/mob/living/carbon/human/H = user
@@ -800,9 +758,8 @@
if(!(isrobot(usr) && (href_list["apcwires"] || href_list["pulse"])))
if(!can_use(usr, 1))
return
src.add_fingerprint(usr)
if(usingUI) // If we set their machine and they're not using the UI, it'll cause the UI to pop up.
usr.set_machine(src)
src.add_fingerprint(usr)
if (href_list["apcwires"])
var/t1 = text2num(href_list["apcwires"])
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
@@ -864,12 +821,12 @@
update_icon()
update()
else if( href_list["close"] )
usr << browse(null, "window=apc")
usr.unset_machine()
nanomanager.close_user_uis(usr, src)
return
else if (href_list["close2"])
usr << browse(null, "window=apcwires")
usr.unset_machine()
return
else if (href_list["overload"])
+64 -111
View File
@@ -21,7 +21,7 @@
var/chargecount = 0
var/chargelevel = 50000
var/online = 1
var/n_tag = null
var/name_tag = null
var/obj/machinery/power/terminal/terminal = null
//Holders for powerout event.
var/last_output = 0
@@ -122,7 +122,6 @@
if(last_disp != chargedisplay() || last_chrg != charging || last_onln != online)
updateicon()
updateDialog()
return
// called after all power processes are finished
@@ -164,48 +163,45 @@
/obj/machinery/power/smes/attack_ai(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
interact(user)
ui_interact(user)
/obj/machinery/power/smes/attack_hand(mob/user)
add_fingerprint(user)
if(stat & BROKEN) return
interact(user)
ui_interact(user)
/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/machinery/power/smes/interact(mob/user)
if(get_dist(src, user) > 1 && !istype(user, /mob/living/silicon))
user.unset_machine()
user << browse(null, "window=smes")
if(stat & BROKEN)
return
user.set_machine(src)
var/t = "<TT><B>SMES Power Storage Unit</B> [n_tag? "([n_tag])" : null]<HR><PRE>"
t += "Stored capacity : [round(100.0*charge/capacity, 0.1)]%<BR><BR>"
t += "Input: [charging ? "Charging" : "Not Charging"] [chargemode ? "<B>Auto</B> <A href = '?src=\ref[src];cmode=1'>Off</A>" : "<A href = '?src=\ref[src];cmode=1'>Auto</A> <B>Off</B> "]<BR>"
t += "Input level: <A href = '?src=\ref[src];input=-4'>M</A> <A href = '?src=\ref[src];input=-3'>-</A> <A href = '?src=\ref[src];input=-2'>-</A> <A href = '?src=\ref[src];input=-1'>-</A> [add_lspace(chargelevel,5)] <A href = '?src=\ref[src];input=1'>+</A> <A href = '?src=\ref[src];input=2'>+</A> <A href = '?src=\ref[src];input=3'>+</A> <A href = '?src=\ref[src];input=4'>M</A><BR>"
t += "<BR><BR>"
t += "Output: [online ? "<B>Online</B> <A href = '?src=\ref[src];online=1'>Offline</A>" : "<A href = '?src=\ref[src];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "Output level: <A href = '?src=\ref[src];output=-4'>M</A> <A href = '?src=\ref[src];output=-3'>-</A> <A href = '?src=\ref[src];output=-2'>-</A> <A href = '?src=\ref[src];output=-1'>-</A> [add_lspace(output,5)] <A href = '?src=\ref[src];output=1'>+</A> <A href = '?src=\ref[src];output=2'>+</A> <A href = '?src=\ref[src];output=3'>+</A> <A href = '?src=\ref[src];output=4'>M</A><BR>"
t += "Output load: [round(loaddemand)] W<BR>"
t += "<BR></PRE><HR><A href='?src=\ref[src];close=1'>Close</A>"
t += "</TT>"
user << browse(t, "window=smes;size=460x300")
onclose(user, "smes")
return
// this is the data which will be sent to the ui
var/data[0]
data["nameTag"] = name_tag
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
data["charging"] = charging
data["chargeMode"] = chargemode
data["chargeLevel"] = chargelevel
data["chargeMax"] = SMESMAXCHARGELEVEL
data["outputOnline"] = online
data["outputLevel"] = output
data["outputMax"] = SMESMAXOUTPUT
data["outputLoad"] = round(loaddemand)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/power/smes/Topic(href, href_list)
..()
@@ -219,85 +215,42 @@
//world << "[href] ; [href_list[href]]"
if (( usr.machine==src && ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
if (!istype(src.loc, /turf) || istype(usr, /mob/living/silicon/ai))
return 0 // Do not update ui
if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
charging = 0
updateicon()
if( href_list["close"] )
usr << browse(null, "window=smes")
usr.unset_machine()
return
else if( href_list["online"] )
online = !online
updateicon()
else if( href_list["input"] )
switch( href_list["input"] )
if("min")
chargelevel = 0
if("max")
chargelevel = SMESMAXCHARGELEVEL //30000
if("set")
chargelevel = input(usr, "Enter new input level (0-[SMESMAXCHARGELEVEL])", "SMES Input Power Control", chargelevel) as num
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
else if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
charging = 0
updateicon()
else if( href_list["online"] )
online = !online
updateicon()
else if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = 0
switch(i)
if(-4)
chargelevel = 0
if(4)
chargelevel = SMESMAXCHARGELEVEL //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
chargelevel += d
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
else if( href_list["output"] )
var/i = text2num(href_list["output"])
var/d = 0
switch(i)
if(-4)
output = 0
if(4)
output = SMESMAXOUTPUT //30000
if(1)
d = 100
if(-1)
d = -100
if(2)
d = 1000
if(-2)
d = -1000
if(3)
d = 10000
if(-3)
d = -10000
output += d
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
src.updateUsrDialog()
else
usr << browse(null, "window=smes")
usr.unset_machine()
return
else if( href_list["output"] )
switch( href_list["output"] )
if("min")
output = 0
if("max")
output = SMESMAXOUTPUT //30000
if("set")
output = input(usr, "Enter new output level (0-[SMESMAXOUTPUT])", "SMES Output Power Control", output) as num
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
return 1
/obj/machinery/power/smes/proc/ion_act()
if(src.z == 1)
+1 -1
View File
@@ -146,7 +146,7 @@
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 370, 605)
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 380, 650)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
@@ -4,6 +4,7 @@
/obj/item/weapon/reagent_containers/food
possible_transfer_amounts = null
volume = 50 //Sets the default container amount for all food items.
var/filling_color = "#FFFFFF" //Used by sandwiches.
/obj/item/weapon/reagent_containers/food/New()
..()
@@ -0,0 +1,101 @@
/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/shard) || istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/csandwich/S = new(get_turf(src))
S.attackby(W,user)
del(src)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich
name = "sandwich"
desc = "The best thing since sliced bread."
icon_state = "breadslice"
trash = /obj/item/trash/plate
bitesize = 2
var/list/ingredients = list()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/attackby(obj/item/W as obj, mob/user as mob)
var/sandwich_limit = 4
for(var/obj/item/O in ingredients)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/breadslice))
sandwich_limit += 4
if(src.contents.len > sandwich_limit)
user << "\red If you put anything else on \the [src] it's going to collapse."
return
else if(istype(W,/obj/item/weapon/shard))
user << "\blue You hide [W] in \the [src]."
user.drop_item()
W.loc = src
update()
return
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
user << "\blue You layer [W] over \the [src]."
var/obj/item/weapon/reagent_containers/F = W
F.reagents.trans_to(src, F.reagents.total_volume)
user.drop_item()
W.loc = src
ingredients += W
update()
return
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/proc/update()
var/fullname = "" //We need to build this from the contents of the var.
var/i = 0
overlays.Cut()
for(var/obj/item/weapon/reagent_containers/food/snacks/O in ingredients)
i++
if(i == 1)
fullname += "[O.name]"
else if(i == ingredients.len)
fullname += " and [O.name]"
else
fullname += ", [O.name]"
var/image/I = new(src.icon, "sandwich_filling")
I.color = O.filling_color
I.pixel_x = pick(list(-1,0,1))
I.pixel_y = (i*2)+1
overlays += I
var/image/T = new(src.icon, "sandwich_top")
T.pixel_x = pick(list(-1,0,1))
T.pixel_y = (ingredients.len * 2)+1
overlays += T
name = lowertext("[fullname] sandwich")
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich"
w_class = n_ceil(Clamp((ingredients.len/2),1,3))
/obj/item/weapon/reagent_containers/food/snacks/csandwich/Del()
for(var/obj/item/O in ingredients)
del(O)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine()
..()
var/obj/item/O = pick(contents)
usr << "\blue You think you can see [O.name] in there."
/obj/item/weapon/reagent_containers/food/snacks/csandwich/attack(mob/M as mob, mob/user as mob, def_zone)
var/obj/item/shard
for(var/obj/item/O in contents)
if(istype(O,/obj/item/weapon/shard))
shard = O
break
var/mob/living/H
if(istype(M,/mob/living))
H = M
if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable.
H << "\red You lacerate your mouth on a [shard.name] in the sandwich!"
H.adjustBruteLoss(5) //TODO: Target head if human.
..()
File diff suppressed because it is too large Load Diff
@@ -113,6 +113,7 @@
desc = "Needs some butter!"
icon_state = "corn"
potency = 40
filling_color = "#FFEE00"
trash = /obj/item/weapon/corncob
New()
@@ -126,6 +127,7 @@
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
filling_color = "#FF0000"
gender = PLURAL
New()
..()
@@ -140,6 +142,7 @@
desc = "Long-used as a symbol of rest, peace, and death."
icon_state = "poppy"
potency = 30
filling_color = "#CC6464"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -153,6 +156,7 @@
desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweetend not thy breath.\""
icon_state = "harebell"
potency = 1
filling_color = "#D4B2C9"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -165,6 +169,7 @@
desc = "Boil 'em! Mash 'em! Stick 'em in a stew!"
icon_state = "potato"
potency = 25
filling_color = "#E6E8DA"
New()
..()
reagents.add_reagent("nutriment", 1+round((potency / 10), 1))
@@ -189,6 +194,7 @@
name = "bunch of grapes"
desc = "Nutritious!"
icon_state = "grapes"
filling_color = "#A332AD"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -202,6 +208,7 @@
desc = "Nutritious!"
icon_state = "greengrapes"
potency = 25
filling_color = "#A6FFA3"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -215,6 +222,7 @@
desc = "Ewwwwwwwwww. Cabbage."
icon_state = "cabbage"
potency = 25
filling_color = "#A2B5A1"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -226,6 +234,7 @@
name = "bunch of berries"
desc = "Nutritious!"
icon_state = "berrypile"
filling_color = "#C2C9FF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -237,6 +246,7 @@
name = "clump of plastellium"
desc = "Hmm, needs some processing"
icon_state = "plastellium"
filling_color = "#C4C4C4"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -247,8 +257,9 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/shand
seed = "/obj/item/seeds/shandseed"
name = "S'rendarr's Hand leaf"
desc = "A leaf sample from a lowland thicket shrub, often hid in by prey and predator to staunch their wounds and conceal their scent, allowing the plant to spread far on it's native Ahdomai. Smells strongly like wax."
desc = "A leaf sample from a lowland thicket shrub, often hid in by prey and predator to staunch their wounds and conceal their scent, allowing the plant to spread far on its native Ahdomai. Smells strongly like wax."
icon_state = "shand"
filling_color = "#70C470"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -260,6 +271,7 @@
name = "sprig of Messa's Tear"
desc = "A mountain climate herb with a soft, cold blue flower, known to contain an abundance of chemicals in it's flower useful to treating burns- Bad for the allergic to pollen."
icon_state = "mtear"
filling_color = "#70C470"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -293,6 +305,7 @@
desc = "Nutritious!"
var/light_on = 1
var/brightness_on = 2 //luminosity when on
filling_color = "#D3FF9E"
icon_state = "glowberrypile"
New()
..()
@@ -320,6 +333,7 @@
desc = "Fattening... Mmmmm... chucklate."
icon_state = "cocoapod"
potency = 50
filling_color = "#9C8E54"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -333,6 +347,7 @@
desc = "Sickly sweet."
icon_state = "sugarcane"
potency = 50
filling_color = "#C0C9AD"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -345,6 +360,7 @@
icon_state = "poisonberrypile"
gender = PLURAL
potency = 15
filling_color = "#B422C7"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -359,6 +375,7 @@
icon_state = "deathberrypile"
gender = PLURAL
potency = 50
filling_color = "#4E0957"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -373,6 +390,7 @@
desc = "This is a plant containing various healing chemicals."
icon_state = "ambrosiavulgaris"
potency = 10
filling_color = "#125709"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -389,6 +407,7 @@
desc = "Eating this makes you feel immortal!"
icon_state = "ambrosiadeus"
potency = 10
filling_color = "#229E11"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -405,6 +424,7 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#DFE88B"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -418,6 +438,7 @@
desc = "It's a little piece of Eden."
icon_state = "apple"
potency = 15
filling_color = "#B3BD5E"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -431,6 +452,7 @@
desc = "Emblazoned upon the apple is the word 'Kallisti'."
icon_state = "goldapple"
potency = 15
filling_color = "#F5CB42"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -450,6 +472,7 @@
desc = "It's full of watery goodness."
icon_state = "watermelon"
potency = 10
filling_color = "#FA2863"
slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice
slices_num = 5
New()
@@ -464,6 +487,7 @@
desc = "It's large and scary."
icon_state = "pumpkin"
potency = 10
filling_color = "#FAB728"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -485,6 +509,7 @@
desc = "It's so sour, your face will twist."
icon_state = "lime"
potency = 20
filling_color = "#28FA59"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -497,6 +522,7 @@
desc = "When life gives you lemons, be grateful they aren't limes."
icon_state = "lemon"
potency = 20
filling_color = "#FAF328"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -509,6 +535,7 @@
desc = "It's an tangy fruit."
icon_state = "orange"
potency = 20
filling_color = "#FAAD28"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -521,6 +548,7 @@
desc = "You can't beat white-beet."
icon_state = "whitebeet"
potency = 15
filling_color = "#FFFCCC"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -535,6 +563,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "banana"
item_state = "banana"
filling_color = "#FCF695"
trash = /obj/item/weapon/bananapeel
New()
@@ -550,6 +579,7 @@
name = "chili"
desc = "It's spicy! Wait... IT'S BURNING ME!!"
icon_state = "chilipepper"
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -567,6 +597,7 @@
name = "eggplant"
desc = "Maybe there's a chicken inside?"
icon_state = "eggplant"
filling_color = "#550F5C"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -578,6 +609,7 @@
name = "soybeans"
desc = "It's pretty bland, but oh the possibilities..."
gender = PLURAL
filling_color = "#E6E8B7"
icon_state = "soybeans"
New()
..()
@@ -590,6 +622,7 @@
name = "tomato"
desc = "I say to-mah-to, you say tom-mae-to."
icon_state = "tomato"
filling_color = "#FF0000"
potency = 10
New()
..()
@@ -610,6 +643,7 @@
desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!"
icon_state = "killertomato"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -639,6 +673,7 @@
desc = "So bloody...so...very...bloody....AHHHH!!!!"
icon_state = "bloodtomato"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -662,6 +697,7 @@
desc = "I say blue-mah-to, you say blue-mae-to."
icon_state = "bluetomato"
potency = 10
filling_color = "#586CFC"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -697,6 +733,7 @@
desc = "Sigh... wheat... a-grain?"
gender = PLURAL
icon_state = "wheat"
filling_color = "#F7E186"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -709,6 +746,7 @@
desc = "Rice to see you."
gender = PLURAL
icon_state = "rice"
filling_color = "#FFF8DB"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -720,6 +758,7 @@
name = "kudzu pod"
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#59691B"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -733,6 +772,7 @@
desc = "It's a mutant strain of chili"
icon_state = "icepepper"
potency = 20
filling_color = "#66CEED"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -751,6 +791,7 @@
desc = "It's good for the eyes!"
icon_state = "carrot"
potency = 10
filling_color = "#FFC400"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -764,6 +805,7 @@
desc = "<I>Ganoderma lucidum</I>: A special fungus believed to help relieve stress."
icon_state = "reishi"
potency = 10
filling_color = "#FF4800"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -784,6 +826,7 @@
desc = "<I>Amanita Muscaria</I>: Learn poisonous mushrooms by heart. Only pick mushrooms you know."
icon_state = "amanita"
potency = 10
filling_color = "#FF0000"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -804,6 +847,7 @@
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
icon_state = "angel"
potency = 35
filling_color = "#FFDEDE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -824,6 +868,7 @@
desc = "<I>Psilocybe Semilanceata</I>: Liberate yourself!"
icon_state = "libertycap"
potency = 15
filling_color = "#F714BE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -841,6 +886,7 @@
name = "plump-helmet"
desc = "<I>Plumus Hellmus</I>: Plump, soft and s-so inviting~"
icon_state = "plumphelmet"
filling_color = "#F714BE"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -852,6 +898,7 @@
name = "walking mushroom"
desc = "<I>Plumus Locomotus</I>: The beginning of the great walk."
icon_state = "walkingmushroom"
filling_color = "#FFBFEF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -880,6 +927,7 @@
name = "chanterelle cluster"
desc = "<I>Cantharellus Cibarius</I>: These jolly yellow little shrooms sure look tasty!"
icon_state = "chanterelle"
filling_color = "#FFE991"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -891,6 +939,7 @@
name = "glowshroom cluster"
desc = "<I>Mycena Bregprox</I>: This species of mushroom glows in the dark. Or does it?"
icon_state = "glowshroom"
filling_color = "#DAFF91"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -988,6 +1037,7 @@
icon_state = "bluespacetomato"
potency = 20
origin_tech = "bluespace=3"
filling_color = "#91F8FF"
New()
..()
spawn(5) //So potency can be set in the proc that creates these crops
@@ -3,6 +3,7 @@
desc = "A slab of meat"
icon_state = "meat"
health = 180
filling_color = "#FF1C1C"
New()
..()
reagents.add_reagent("nutriment", 3)
+1 -1
View File
@@ -1451,7 +1451,7 @@ datum/design/chemsprayer
build_type = PROTOLATHE
materials = list("$metal" = 5000, "$glass" = 1000)
reliability_base = 100
build_path = "/obj/item/weapon/chemsprayer"
build_path = "/obj/item/weapon/reagent_containers/spray/chemsprayer"
datum/design/rapidsyringe
name = "Rapid Syringe Gun"