mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 17:41:56 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -129,6 +129,7 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/Debug2,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/ZASSettings,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/debug_controller,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
if(check_rights(R_ADMIN,0))
|
||||
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
msg = "<span class='adminsay'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
/obj/item/clothing/suit/bluetag
|
||||
name = "blue laser tag armour"
|
||||
desc = "Blue Pride, Station Wide"
|
||||
desc = "Blue Pride, Station Wide."
|
||||
icon_state = "bluetag"
|
||||
item_state = "bluetag"
|
||||
blood_overlay_type = "armor"
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/item/clothing/suit/redtag
|
||||
name = "red laser tag armour"
|
||||
desc = "Pew pew pew"
|
||||
desc = "Reputed to go faster."
|
||||
icon_state = "redtag"
|
||||
item_state = "redtag"
|
||||
blood_overlay_type = "armor"
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
/obj/item/clothing/suit/justice
|
||||
name = "justice suit"
|
||||
desc = "this pretty much looks ridiculous"
|
||||
desc = "This pretty much looks ridiculous."
|
||||
icon_state = "justice"
|
||||
item_state = "justice"
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return
|
||||
|
||||
if(IsMultiple(activeFor, 5))
|
||||
if(prob(25))
|
||||
if(prob(15))
|
||||
var/obj/machinery/vending/infectedMachine = pick(vendingMachines)
|
||||
vendingMachines.Remove(infectedMachine)
|
||||
infectedVendingMachines.Add(infectedMachine)
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if(IsMultiple(activeFor, 12))
|
||||
originMachine.speak(pick("Try our aggressive new marketing strategies!", \
|
||||
"You should buy products to feed your lifestyle obession!", \
|
||||
"You should buy products to feed your lifestyle obsession!", \
|
||||
"Consume!", \
|
||||
"Your money can buy happiness!", \
|
||||
"Engage direct marketing!", \
|
||||
@@ -52,6 +52,5 @@
|
||||
|
||||
/datum/event/brand_intelligence/end()
|
||||
for(var/obj/machinery/vending/infectedMachine in infectedVendingMachines)
|
||||
if(prob(90))
|
||||
infectedMachine.shut_up = 1
|
||||
infectedMachine.shoot_inventory = 0
|
||||
infectedMachine.shut_up = 1
|
||||
infectedMachine.shoot_inventory = 0
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -753,6 +754,10 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
else if( stunned )
|
||||
// lying = 0
|
||||
canmove = 0
|
||||
else if(captured)
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
lying = 0
|
||||
else
|
||||
lying = !can_stand
|
||||
canmove = has_limbs
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
var/voice_name = "unidentifiable voice"
|
||||
|
||||
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
|
||||
|
||||
var/captured = 0 //Functionally, should give the same effect as being buckled into a chair when true.
|
||||
|
||||
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
|
||||
var/proc_holder_list[] = list()//Right now unused.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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,4 +1,4 @@
|
||||
/proc/GetColors(hex)
|
||||
/proc/GetColors(hex) //Actually converts hex to rgb
|
||||
hex = uppertext(hex)
|
||||
var/hi1 = text2ascii(hex, 2)
|
||||
var/lo1 = text2ascii(hex, 3)
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
var/list/rgbcolor = list(0,0,0)
|
||||
var/finalcolor = 0
|
||||
for(var/datum/reagent/re in reagent_list) // natural color mixing bullshit/algorithm
|
||||
for(var/datum/reagent/re in reagent_list) //TODO: weigh final colour by amount of reagents; make this algorithm use hex
|
||||
if(!finalcolor)
|
||||
rgbcolor = GetColors(re.color)
|
||||
finalcolor = re.color
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -134,7 +134,7 @@ About Reagents:
|
||||
object melting in here ... or something. i dunno.
|
||||
|
||||
reaction_turf(var/turf/T)
|
||||
This is called by the holder's reation proc.
|
||||
This is called by the holder's reaction proc.
|
||||
This version is called when the reagents reacts
|
||||
with a turf. You'll want to put stuff like extra
|
||||
slippery floors for lube or something in here.
|
||||
@@ -144,7 +144,7 @@ About Reagents:
|
||||
This is the place where you put damage for toxins ,
|
||||
drowsyness for sleep toxins etc etc.
|
||||
You'll want to call the parents proc by using ..() .
|
||||
If you dont, the chemical will stay in the mob forever -
|
||||
If you don't, the chemical will stay in the mob forever -
|
||||
unless you write your own piece of code to slowly remove it.
|
||||
(Should be pretty easy, 1 line of code)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ datum
|
||||
var/list/data = null
|
||||
var/volume = 0
|
||||
var/nutriment_factor = 0
|
||||
var/custom_metabolism = REAGENTS_METABOLISM //Default 0.2
|
||||
var/custom_metabolism = REAGENTS_METABOLISM
|
||||
var/overdose = 0
|
||||
var/overdose_dam = 1
|
||||
//var/list/viruses = list()
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
101
code/modules/reagents/reagent_containers/food/sandwich.dm
Normal file
101
code/modules/reagents/reagent_containers/food/sandwich.dm
Normal file
@@ -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-sweeten<65>d 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)
|
||||
|
||||
@@ -47,11 +47,11 @@
|
||||
set src in view()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
usr << "\blue It contains:"
|
||||
usr << "\blue It contains "
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
usr << "\blue [src.reagents.total_volume] units of liquid."
|
||||
else
|
||||
usr << "\blue Nothing."
|
||||
usr << "\blue nothing."
|
||||
if (!is_open_container())
|
||||
usr << "\blue Airtight lid seals it completely."
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units."
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology. Can hold up to 300 units."
|
||||
icon_state = "beakerbluespace"
|
||||
g_amt = 5000
|
||||
volume = 300
|
||||
|
||||
@@ -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"
|
||||
|
||||
273
code/modules/supermatter/supermatter.dm
Normal file
273
code/modules/supermatter/supermatter.dm
Normal file
@@ -0,0 +1,273 @@
|
||||
|
||||
#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
|
||||
#define THERMAL_RELEASE_MODIFIER 10 //Higher == less heat released during reaction
|
||||
#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
|
||||
#define OXYGEN_RELEASE_MODIFIER 750 //Higher == less oxygen released at high temperature/power
|
||||
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
|
||||
|
||||
|
||||
//These would be what you would get at point blank, decreases with distance
|
||||
#define DETONATION_RADS 200
|
||||
#define DETONATION_HALLUCINATION 600
|
||||
|
||||
|
||||
#define WARNING_DELAY 30 //seconds between warnings.
|
||||
|
||||
/obj/machinery/power/supermatter
|
||||
name = "Supermatter"
|
||||
desc = "A strangely translucent and iridescent crystal. \red You get headaches just from looking at it."
|
||||
icon = 'icons/obj/engine.dmi'
|
||||
icon_state = "darkmatter"
|
||||
density = 1
|
||||
anchored = 0
|
||||
luminosity = 4
|
||||
|
||||
var/gasefficency = 0.25
|
||||
|
||||
var/base_icon_state = "darkmatter"
|
||||
|
||||
var/damage = 0
|
||||
var/damage_archived = 0
|
||||
var/safe_alert = "Crystaline hyperstructure returning to safe operating levels."
|
||||
var/warning_point = 100
|
||||
var/warning_alert = "Danger! Crystal hyperstructure instability!"
|
||||
var/emergency_point = 700
|
||||
var/emergency_alert = "CRYSTAL DELAMINATION IMMINENT."
|
||||
var/explosion_point = 1000
|
||||
|
||||
var/emergency_issued = 0
|
||||
|
||||
var/explosion_power = 8
|
||||
|
||||
var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
|
||||
var/power = 0
|
||||
|
||||
var/oxygen = 0 // Moving this up here for easier debugging.
|
||||
|
||||
//Temporary values so that we can optimize this
|
||||
//How much the bullets damage should be multiplied by when it is added to the internal variables
|
||||
var/config_bullet_energy = 2
|
||||
//How much of the power is left after processing is finished?
|
||||
// var/config_power_reduction_per_tick = 0.5
|
||||
//How much hallucination should it produce per unit of power?
|
||||
var/config_hallucination_power = 0.1
|
||||
|
||||
var/obj/item/device/radio/radio
|
||||
|
||||
shard //Small subtype, less efficient and more sensitive, but less boom.
|
||||
name = "Supermatter Shard"
|
||||
desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
|
||||
icon_state = "darkmatter_shard"
|
||||
base_icon_state = "darkmatter_shard"
|
||||
|
||||
warning_point = 50
|
||||
emergency_point = 500
|
||||
explosion_point = 900
|
||||
|
||||
gasefficency = 0.125
|
||||
|
||||
explosion_power = 3 //3,6,9,12? Or is that too small?
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/New()
|
||||
. = ..()
|
||||
radio = new (src)
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/Del()
|
||||
del radio
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/supermatter/proc/explode()
|
||||
explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1)
|
||||
del src
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter/process()
|
||||
|
||||
var/turf/L = loc
|
||||
|
||||
if(isnull(L)) // We have a null turf...something is wrong, stop processing this entity.
|
||||
return PROCESS_KILL
|
||||
|
||||
if(!istype(L)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
|
||||
return //Yeah just stop.
|
||||
|
||||
//Ok, get the air from the turf
|
||||
var/datum/gas_mixture/env = L.return_air()
|
||||
|
||||
//Remove gas from surrounding area
|
||||
var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles)
|
||||
|
||||
if(!removed || !removed.total_moles)
|
||||
damage += max((power-1600)/10, 0)
|
||||
power = min(power, 1600)
|
||||
return 1
|
||||
|
||||
damage_archived = damage
|
||||
damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 )
|
||||
|
||||
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
|
||||
if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
|
||||
var/stability = num2text(round((damage / explosion_point) * 100))
|
||||
|
||||
if(damage > emergency_point)
|
||||
|
||||
radio.autosay(addtext(emergency_alert, " Stability: ",stability,"%"), "Supermatter Monitor")
|
||||
lastwarning = world.timeofday
|
||||
|
||||
else if(damage >= damage_archived) // The damage is still going up
|
||||
radio.autosay(addtext(warning_alert," Stability: ",stability,"%"), "Supermatter Monitor")
|
||||
lastwarning = world.timeofday - 150
|
||||
|
||||
else // Phew, we're safe
|
||||
radio.autosay(safe_alert, "Supermatter Monitor")
|
||||
lastwarning = world.timeofday
|
||||
|
||||
if(damage > explosion_point)
|
||||
for(var/mob/living/mob in living_mob_list)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
//Hilariously enough, running into a closet should make you get hit the hardest.
|
||||
mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
|
||||
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
|
||||
mob.apply_effect(rads, IRRADIATE)
|
||||
|
||||
explode()
|
||||
|
||||
//Ok, 100% oxygen atmosphere = best reaction
|
||||
//Maxes out at 100% oxygen pressure
|
||||
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
|
||||
|
||||
var/temp_factor = 100
|
||||
|
||||
if(oxygen > 0.8)
|
||||
// with a perfect gas mix, make the power less based on heat
|
||||
icon_state = "[base_icon_state]_glow"
|
||||
else
|
||||
// in normal mode, base the produced energy around the heat
|
||||
temp_factor = 60
|
||||
icon_state = base_icon_state
|
||||
|
||||
power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
|
||||
|
||||
//We've generated power, now let's transfer it to the collectors for storing/usage
|
||||
transfer_energy()
|
||||
|
||||
var/device_energy = power * REACTION_POWER_MODIFIER
|
||||
|
||||
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
|
||||
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
|
||||
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
|
||||
//Since the core is effectively "cold"
|
||||
|
||||
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
|
||||
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
|
||||
removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER)
|
||||
|
||||
removed.temperature = max(0, min(removed.temperature, 2500))
|
||||
|
||||
//Calculate how much gas to release
|
||||
removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
|
||||
|
||||
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
|
||||
|
||||
removed.update_values()
|
||||
|
||||
env.merge(removed)
|
||||
|
||||
for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
|
||||
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
|
||||
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / get_dist(l, src) ) ) )
|
||||
|
||||
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
|
||||
var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) )
|
||||
l.apply_effect(rads, IRRADIATE)
|
||||
|
||||
power -= (power/500)**3
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/bullet_act(var/obj/item/projectile/Proj)
|
||||
var/turf/L = loc
|
||||
if(!istype(L)) // We don't run process() when we are in space
|
||||
return 0 // This stops people from being able to really power up the supermatter
|
||||
// Then bring it inside to explode instantly upon landing on a valid turf.
|
||||
|
||||
|
||||
if(Proj.flag != "bullet")
|
||||
power += Proj.damage * config_bullet_energy
|
||||
else
|
||||
damage += Proj.damage * config_bullet_energy
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/attack_robot(mob/user as mob)
|
||||
if(Adjacent(user))
|
||||
return attack_hand(user)
|
||||
else
|
||||
user << "<span class = \"warning\">You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter/attack_ai(mob/user as mob)
|
||||
user << "<span class = \"warning\">You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update.</span>"
|
||||
|
||||
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
|
||||
user.visible_message("<span class=\"warning\">\The [user] reaches out and touches \the [src], inducing a resonance... \his body starts to glow and bursts into flames before flashing into ash.</span>",\
|
||||
"<span class=\"danger\">You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>",\
|
||||
"<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>")
|
||||
|
||||
Consume(user)
|
||||
|
||||
/obj/machinery/power/supermatter/proc/transfer_energy()
|
||||
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
|
||||
if(get_dist(R, src) <= 15) // Better than using orange() every process
|
||||
R.receive_pulse(power)
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
user.visible_message("<span class=\"warning\">\The [user] touches \a [W] to \the [src] as a silence fills the room...</span>",\
|
||||
"<span class=\"danger\">You touch \the [W] to \the [src] when everything suddenly goes silent.\"</span>\n<span class=\"notice\">\The [W] flashes into dust as you flinch away from \the [src].</span>",\
|
||||
"<span class=\"warning\">Everything suddenly goes silent.</span>")
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
Consume(W)
|
||||
|
||||
user.apply_effect(150, IRRADIATE)
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj)
|
||||
if(istype(AM, /mob/living))
|
||||
AM.visible_message("<span class=\"warning\">\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.</span>",\
|
||||
"<span class=\"danger\">You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
|
||||
"<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>")
|
||||
else
|
||||
AM.visible_message("<span class=\"warning\">\The [AM] smacks into \the [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class=\"warning\">You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
|
||||
Consume(AM)
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/proc/Consume(var/mob/living/user)
|
||||
if(istype(user))
|
||||
user.dust()
|
||||
power += 200
|
||||
else
|
||||
del user
|
||||
|
||||
power += 200
|
||||
|
||||
//Some poor sod got eaten, go ahead and irradiate people nearby.
|
||||
for(var/mob/living/l in range(10))
|
||||
if(l in view())
|
||||
l.show_message("<span class=\"warning\">As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.</span>", 1,\
|
||||
"<span class=\"warning\">The unearthly ringing subsides and you notice you have new radiation burns.</span>", 2)
|
||||
else
|
||||
l.show_message("<span class=\"warning\">You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.</span>", 2)
|
||||
var/rads = 500 * sqrt( 1 / (get_dist(l, src) + 1) )
|
||||
l.apply_effect(rads, IRRADIATE)
|
||||
|
||||
Reference in New Issue
Block a user