mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-21 20:27:42 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
This commit is contained in:
@@ -83,8 +83,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon_state = "pda-j"
|
||||
ttone = "slip"
|
||||
|
||||
/obj/item/device/pda/toxins
|
||||
default_cartridge = /obj/item/weapon/cartridge/signal/toxins
|
||||
/obj/item/device/pda/science
|
||||
default_cartridge = /obj/item/weapon/cartridge/signal/science
|
||||
icon_state = "pda-tox"
|
||||
ttone = "boom"
|
||||
|
||||
@@ -446,14 +446,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/o2_level = environment.oxygen/total_moles
|
||||
var/n2_level = environment.nitrogen/total_moles
|
||||
var/co2_level = environment.carbon_dioxide/total_moles
|
||||
var/plasma_level = environment.toxins/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
|
||||
var/phoron_level = environment.phoron/total_moles
|
||||
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
|
||||
data["aircontents"] = list(\
|
||||
"pressure" = "[round(pressure,0.1)]",\
|
||||
"nitrogen" = "[round(n2_level*100,0.1)]",\
|
||||
"oxygen" = "[round(o2_level*100,0.1)]",\
|
||||
"carbon_dioxide" = "[round(co2_level*100,0.1)]",\
|
||||
"plasma" = "[round(plasma_level*100,0.01)]",\
|
||||
"phoron" = "[round(phoron_level*100,0.01)]",\
|
||||
"other" = "[round(unknown_level, 0.01)]",\
|
||||
"temp" = "[round(environment.temperature-T0C,0.1)]",\
|
||||
"reading" = 1\
|
||||
@@ -556,7 +556,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
mode = 1
|
||||
if("2")//Messenger
|
||||
mode = 2
|
||||
if("21")//Read messeges
|
||||
if("21")//Read messages
|
||||
mode = 21
|
||||
if("3")//Atmos scan
|
||||
mode = 3
|
||||
@@ -818,7 +818,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
message += "You feel a searing heat! Your [P] is burning!"
|
||||
if(i>=20 && i<=25) //EMP
|
||||
empulse(P.loc, 3, 6, 1)
|
||||
message += "Your [P] emits a wave of electomagnetic energy!"
|
||||
message += "Your [P] emits a wave of electromagnetic energy!"
|
||||
if(i>=25 && i<=40) //Smoke
|
||||
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
|
||||
S.attach(P.loc)
|
||||
@@ -895,7 +895,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
//PDAs are now dependent on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
@@ -914,7 +914,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
t = Gibberish(t, signal.data["compression"] + 50)
|
||||
|
||||
if(useMS && useTC) // only send the message if it's stable
|
||||
if(useTC != 2) // Does our recepient have a broadcaster on their level?
|
||||
if(useTC != 2) // Does our recipient have a broadcaster on their level?
|
||||
U << "ERROR: Cannot reach recipient."
|
||||
return
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
@@ -957,7 +957,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if(L)
|
||||
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
nanomanager.update_user_uis(L, P) // Update the recieving user's PDA UI so that they can see the new message
|
||||
nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message
|
||||
|
||||
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
|
||||
|
||||
@@ -1165,15 +1165,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/o2_concentration = A:air_contents.oxygen/total_moles
|
||||
var/n2_concentration = A:air_contents.nitrogen/total_moles
|
||||
var/co2_concentration = A:air_contents.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = A:air_contents.toxins/total_moles
|
||||
var/phoron_concentration = A:air_contents.phoron/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
|
||||
|
||||
user << "\blue Pressure: [round(pressure,0.1)] kPa"
|
||||
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
|
||||
user << "\blue Oxygen: [round(o2_concentration*100)]%"
|
||||
user << "\blue CO2: [round(co2_concentration*100)]%"
|
||||
user << "\blue Plasma: [round(plasma_concentration*100)]%"
|
||||
user << "\blue Phoron: [round(phoron_concentration*100)]%"
|
||||
if(unknown_concentration>0.01)
|
||||
user << "\red Unknown: [round(unknown_concentration*100)]%"
|
||||
user << "\blue Temperature: [round(A:air_contents.temperature-T0C)]°C"
|
||||
@@ -1194,15 +1194,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/o2_concentration = T.parent.air.oxygen/total_moles
|
||||
var/n2_concentration = T.parent.air.nitrogen/total_moles
|
||||
var/co2_concentration = T.parent.air.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = T.parent.air.toxins/total_moles
|
||||
var/phoron_concentration = T.parent.air.phoron/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
|
||||
|
||||
user << "\blue Pressure: [round(pressure,0.1)] kPa"
|
||||
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
|
||||
user << "\blue Oxygen: [round(o2_concentration*100)]%"
|
||||
user << "\blue CO2: [round(co2_concentration*100)]%"
|
||||
user << "\blue Plasma: [round(plasma_concentration*100)]%"
|
||||
user << "\blue Phoron: [round(phoron_concentration*100)]%"
|
||||
if(unknown_concentration>0.01)
|
||||
user << "\red Unknown: [round(unknown_concentration*100)]%"
|
||||
user << "\blue Temperature: [round(T.parent.air.temperature-T0C)]°C"
|
||||
@@ -1293,7 +1293,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/newcart = pick( /obj/item/weapon/cartridge/engineering,
|
||||
/obj/item/weapon/cartridge/security,
|
||||
/obj/item/weapon/cartridge/medical,
|
||||
/obj/item/weapon/cartridge/signal/toxins,
|
||||
/obj/item/weapon/cartridge/signal/science,
|
||||
/obj/item/weapon/cartridge/quartermaster)
|
||||
new newcart(src)
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
name = "generic signaler cartridge"
|
||||
desc = "A data cartridge with an integrated radio signaler module."
|
||||
|
||||
/obj/item/weapon/cartridge/signal/toxins
|
||||
/obj/item/weapon/cartridge/signal/science
|
||||
name = "Signal Ace 2"
|
||||
desc = "Complete with integrated radio signaler!"
|
||||
icon_state = "cart-tox"
|
||||
|
||||
@@ -25,33 +25,200 @@
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Personal AI Device</B><BR>"
|
||||
if(pai && (!pai.master_dna || !pai.master))
|
||||
dat += "<a href='byond://?src=\ref[src];setdna=1'>Imprint Master DNA</a><br>"
|
||||
var/dat = {"
|
||||
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
margin-top:5px;
|
||||
font-family:Verdana;
|
||||
color:white;
|
||||
font-size:13px;
|
||||
background-image:url('uiBackground.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color:#272727;
|
||||
background-position:center top;
|
||||
}
|
||||
table {
|
||||
font-size:13px;
|
||||
margin-left:-2px;
|
||||
}
|
||||
table.request {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
table.desc {
|
||||
border-collapse:collapse;
|
||||
font-size:13px;
|
||||
border: 1px solid #161616;
|
||||
width:100%;
|
||||
}
|
||||
table.download {
|
||||
border-collapse:collapse;
|
||||
font-size:13px;
|
||||
border: 1px solid #161616;
|
||||
width:100%;
|
||||
}
|
||||
tr.d0 td, tr.d0 th {
|
||||
background-color: #506070;
|
||||
color: white;
|
||||
}
|
||||
tr.d1 td, tr.d1 th {
|
||||
background-color: #708090;
|
||||
color: white;
|
||||
}
|
||||
tr.d2 td {
|
||||
background-color: #00FF00;
|
||||
color: white;
|
||||
text-align:center;
|
||||
}
|
||||
td.button {
|
||||
border: 1px solid #161616;
|
||||
background-color: #40628a;
|
||||
}
|
||||
td.button {
|
||||
border: 1px solid #161616;
|
||||
background-color: #40628a;
|
||||
text-align: center;
|
||||
}
|
||||
td.button_red {
|
||||
border: 1px solid #161616;
|
||||
background-color: #B04040;
|
||||
text-align: center;
|
||||
}
|
||||
td.download {
|
||||
border: 1px solid #161616;
|
||||
background-color: #40628a;
|
||||
text-align: center;
|
||||
}
|
||||
th {
|
||||
text-align:left;
|
||||
width:125px;
|
||||
}
|
||||
td.request {
|
||||
width:140px;
|
||||
vertical-align:top;
|
||||
}
|
||||
td.radio {
|
||||
width:90px;
|
||||
vertical-align:top;
|
||||
}
|
||||
td.request {
|
||||
vertical-align:top;
|
||||
}
|
||||
a {
|
||||
color:#4477E0;
|
||||
}
|
||||
a.button {
|
||||
color:white;
|
||||
text-decoration: none;
|
||||
}
|
||||
h2 {
|
||||
font-size:15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
"}
|
||||
|
||||
if(pai)
|
||||
dat += "Installed Personality: [pai.name]<br>"
|
||||
dat += "Prime directive: <br>[pai.pai_law0]<br>"
|
||||
dat += "Additional directives: <br>[pai.pai_laws]<br>"
|
||||
dat += "<a href='byond://?src=\ref[src];setlaws=1'>Configure Directives</a><br>"
|
||||
dat += {"
|
||||
<b><font size='3px'>Personal AI Device</font></b><br><br>
|
||||
<table class="request">
|
||||
<tr>
|
||||
<td class="request">Installed Personality:</td>
|
||||
<td>[pai.name]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="request">Prime directive:</td>
|
||||
<td>[pai.pai_law0]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="request">Additional directives:</td>
|
||||
<td>[pai.pai_laws]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
"}
|
||||
dat += {"
|
||||
<table>
|
||||
<td class="button">
|
||||
<a href='byond://?src=\ref[src];setlaws=1' class='button'>Configure Directives</a>
|
||||
</td>
|
||||
</table>
|
||||
"}
|
||||
if(pai && (!pai.master_dna || !pai.master))
|
||||
dat += {"
|
||||
<table>
|
||||
<td class="button">
|
||||
<a href='byond://?src=\ref[src];setdna=1' class='button'>Imprint Master DNA</a>
|
||||
</td>
|
||||
</table>
|
||||
"}
|
||||
dat += "<br>"
|
||||
dat += "<h3>Device Settings</h3><br>"
|
||||
if(radio)
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "Transmit: <A href='byond://?src=\ref[src];wires=4'>[(radio.wires & 4) ? "Enabled" : "Disabled"]</A><br>"
|
||||
dat += "Receive: <A href='byond://?src=\ref[src];wires=2'>[(radio.wires & 2) ? "Enabled" : "Disabled"]</A><br>"
|
||||
dat += "Signal Pulser: <A href='byond://?src=\ref[src];wires=1'>[(radio.wires & 1) ? "Enabled" : "Disabled"]</A><br>"
|
||||
dat += "<b>Radio Uplink</b>"
|
||||
dat += {"
|
||||
<table class="request">
|
||||
<tr>
|
||||
<td class="radio">Transmit:</td>
|
||||
<td><a href='byond://?src=\ref[src];wires=4'>[(radio.wires & 4) ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="radio">Receive:</td>
|
||||
<td><a href='byond://?src=\ref[src];wires=2'>[(radio.wires & 2) ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="radio">Signal Pulser:</td>
|
||||
<td><a href='byond://?src=\ref[src];wires=1'>[(radio.wires & 1) ? "<font color=#55FF55>En" : "<font color=#FF5555>Dis" ]abled</font></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
"}
|
||||
else
|
||||
dat += "<b>Radio Uplink</b><br>"
|
||||
dat += "<font color=red><i>Radio firmware not loaded. Please install a pAI personality to load firmware.</i></font><br>"
|
||||
dat += "<A href='byond://?src=\ref[src];wipe=1'>\[Wipe current pAI personality\]</a><br>"
|
||||
dat += {"
|
||||
<table>
|
||||
<td class="button_red"><a href='byond://?src=\ref[src];wipe=1' class='button'>Wipe current pAI personality</a>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
"}
|
||||
else
|
||||
if(looking_for_personality)
|
||||
dat += "Searching for a personality..."
|
||||
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
|
||||
dat += {"
|
||||
<b><font size='3px'>pAI Request Module</font></b><br><br>
|
||||
<p>Requesting AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.</p>
|
||||
<img src='loading.gif' /> Searching for personalities<br><br>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="button">
|
||||
<a href='byond://?src=\ref[src];request=1' class="button">Refresh available personalities</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
"}
|
||||
else
|
||||
dat += "No personality is installed.<br>"
|
||||
dat += "<A href='byond://?src=\ref[src];request=1'>\[Request personal AI personality\]</a><br>"
|
||||
dat += "Each time this button is pressed, a request will be sent out to any available personalities. Check back often and alot time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness."
|
||||
dat += {"
|
||||
<b><font size='3px'>pAI Request Module</font></b><br><br>
|
||||
<p>No personality is installed.</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="button"><a href='byond://?src=\ref[src];request=1' class="button">Request personality</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<p>Each time this button is pressed, a request will be sent out to any available personalities. Check back often give plenty of time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness.</p>
|
||||
"}
|
||||
user << browse(dat, "window=paicard")
|
||||
onclose(user, "paicard")
|
||||
return
|
||||
@@ -96,7 +263,7 @@
|
||||
if(newlaws)
|
||||
pai.pai_laws = newlaws
|
||||
pai << "Your supplemental directives have been updated. Your new directives are:"
|
||||
pai << "Prime Directive : <br>[pai.pai_law0]"
|
||||
pai << "Prime Directive: <br>[pai.pai_law0]"
|
||||
pai << "Supplemental Directives: <br>[pai.pai_laws]"
|
||||
attack_self(usr)
|
||||
|
||||
|
||||
@@ -7,9 +7,15 @@
|
||||
var/mode = "grey"
|
||||
|
||||
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
|
||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated))
|
||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
|
||||
return
|
||||
var/obj/machinery/atmospherics/pipe/P = A
|
||||
|
||||
var/turf/T = P.loc
|
||||
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
|
||||
user << "\red You must remove the plating first."
|
||||
return
|
||||
|
||||
P.pipe_color = mode
|
||||
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
||||
P.update_icon()
|
||||
|
||||
@@ -238,9 +238,9 @@ REAGENT SCANNER
|
||||
var/o2_concentration = environment.oxygen/total_moles
|
||||
var/n2_concentration = environment.nitrogen/total_moles
|
||||
var/co2_concentration = environment.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = environment.toxins/total_moles
|
||||
var/phoron_concentration = environment.phoron/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
user.show_message("\blue Nitrogen: [round(n2_concentration*100)]%", 1)
|
||||
else
|
||||
@@ -256,8 +256,8 @@ REAGENT SCANNER
|
||||
else
|
||||
user.show_message("\blue CO2: [round(co2_concentration*100)]%", 1)
|
||||
|
||||
if(plasma_concentration > 0.01)
|
||||
user.show_message("\red Plasma: [round(plasma_concentration*100)]%", 1)
|
||||
if(phoron_concentration > 0.01)
|
||||
user.show_message("\red Phoron: [round(phoron_concentration*100)]%", 1)
|
||||
|
||||
if(unknown_concentration > 0.01)
|
||||
user.show_message("\red Unknown: [round(unknown_concentration*100)]%", 1)
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
for(var/i=1,storedinfo.len >= i,i++)
|
||||
t1 += "[storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
P.name = "Transcript"
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
/obj/item/borg/upgrade/jetpack
|
||||
name = "mining robot jetpack"
|
||||
desc = "A carbon dioxide jetpack suitable for low-gravity mining operations."
|
||||
construction_cost = list("metal"=10000,"plasma"=15000,"uranium" = 20000)
|
||||
construction_cost = list("metal"=10000,"phoron"=15000,"uranium" = 20000)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Contains:
|
||||
* Glass sheets
|
||||
* Reinforced glass sheets
|
||||
* Plasma Glass Sheets
|
||||
* Reinforced Plasma Glass Sheets (AKA Holy fuck strong windows)
|
||||
* Phoron Glass Sheets
|
||||
* Reinforced Phoron Glass Sheets (AKA Holy fuck strong windows)
|
||||
* Glass shards - TODO: Move this into code/game/object/item/weapons
|
||||
*/
|
||||
|
||||
@@ -310,25 +310,25 @@
|
||||
|
||||
|
||||
/*
|
||||
* Plasma Glass sheets
|
||||
* Phoron Glass sheets
|
||||
*/
|
||||
/obj/item/stack/sheet/glass/plasmaglass
|
||||
name = "plasma glass"
|
||||
desc = "A very strong and very resistant sheet of a plasma-glass alloy."
|
||||
singular_name = "plasma glass sheet"
|
||||
icon_state = "sheet-plasmaglass"
|
||||
/obj/item/stack/sheet/glass/phoronglass
|
||||
name = "phoron glass"
|
||||
desc = "A very strong and very resistant sheet of a phoron-glass alloy."
|
||||
singular_name = "phoron glass sheet"
|
||||
icon_state = "sheet-phoronglass"
|
||||
g_amt = 7500
|
||||
origin_tech = "materials=3;plasma=2"
|
||||
created_window = /obj/structure/window/plasmabasic
|
||||
origin_tech = "materials=3;phoron=2"
|
||||
created_window = /obj/structure/window/phoronbasic
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmaglass/attack_self(mob/user as mob)
|
||||
/obj/item/stack/sheet/glass/phoronglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmaglass/attackby(obj/item/W, mob/user)
|
||||
/obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if( istype(W, /obj/item/stack/rods) )
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/glass/plasmarglass/RG = new (user.loc)
|
||||
var/obj/item/stack/sheet/glass/phoronrglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
V.use(1)
|
||||
@@ -342,17 +342,17 @@
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Reinforced plasma glass sheets
|
||||
* Reinforced phoron glass sheets
|
||||
*/
|
||||
/obj/item/stack/sheet/glass/plasmarglass
|
||||
name = "reinforced plasma glass"
|
||||
desc = "Plasma glass which seems to have rods or something stuck in them."
|
||||
singular_name = "reinforced plasma glass sheet"
|
||||
icon_state = "sheet-plasmarglass"
|
||||
/obj/item/stack/sheet/glass/phoronrglass
|
||||
name = "reinforced phoron glass"
|
||||
desc = "Phoron glass which seems to have rods or something stuck in them."
|
||||
singular_name = "reinforced phoron glass sheet"
|
||||
icon_state = "sheet-phoronrglass"
|
||||
g_amt = 7500
|
||||
m_amt = 1875
|
||||
origin_tech = "materials=4;plasma=2"
|
||||
created_window = /obj/structure/window/plasmareinforced
|
||||
origin_tech = "materials=4;phoron=2"
|
||||
created_window = /obj/structure/window/phoronreinforced
|
||||
|
||||
/obj/item/stack/sheet/glass/plasmarglass/attack_self(mob/user as mob)
|
||||
/obj/item/stack/sheet/glass/phoronrglass/attack_self(mob/user as mob)
|
||||
construct_window(user)
|
||||
@@ -4,7 +4,7 @@ Mineral Sheets
|
||||
- Sandstone
|
||||
- Diamond
|
||||
- Uranium
|
||||
- Plasma
|
||||
- Phoron
|
||||
- Gold
|
||||
- Silver
|
||||
- Clown
|
||||
@@ -90,26 +90,26 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \
|
||||
..()
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
* Phoron
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/plasma
|
||||
name = "solid plasma"
|
||||
icon_state = "sheet-plasma"
|
||||
/obj/item/stack/sheet/mineral/phoron
|
||||
name = "solid phoron"
|
||||
icon_state = "sheet-phoron"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
origin_tech = "phorontech=2;materials=2"
|
||||
perunit = 2000
|
||||
sheettype = "plasma"
|
||||
sheettype = "phoron"
|
||||
|
||||
var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \
|
||||
var/global/list/datum/stack_recipe/phoron_recipes = list ( \
|
||||
new/datum/stack_recipe("phoron door", /obj/structure/mineral_door/transparent/phoron, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/New(var/loc, var/amount=null)
|
||||
recipes = plasma_recipes
|
||||
/obj/item/stack/sheet/mineral/phoron/New(var/loc, var/amount=null)
|
||||
recipes = phoron_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
@@ -108,7 +108,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
/obj/item/stack/sheet/plasteel
|
||||
name = "plasteel"
|
||||
singular_name = "plasteel sheet"
|
||||
desc = "This sheet is an alloy of iron and plasma."
|
||||
desc = "This sheet is an alloy of iron and phoron."
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
m_amt = 7500
|
||||
|
||||
@@ -136,9 +136,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
damtype = "fire"
|
||||
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
|
||||
if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
|
||||
e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throw_range = 5
|
||||
w_class = 3.0
|
||||
m_amt = 500
|
||||
origin_tech = "combat=1;plasmatech=1"
|
||||
origin_tech = "combat=1;phorontech=1"
|
||||
var/status = 0
|
||||
var/throw_amount = 100
|
||||
var/lit = 0 //on or off
|
||||
@@ -19,7 +19,7 @@
|
||||
var/turf/previousturf = null
|
||||
var/obj/item/weapon/weldingtool/weldtool = null
|
||||
var/obj/item/device/assembly/igniter/igniter = null
|
||||
var/obj/item/weapon/tank/plasma/ptank = null
|
||||
var/obj/item/weapon/tank/phoron/ptank = null
|
||||
|
||||
|
||||
/obj/item/weapon/flamethrower/Del()
|
||||
@@ -102,9 +102,9 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/tank/plasma))
|
||||
if(istype(W,/obj/item/weapon/tank/phoron))
|
||||
if(ptank)
|
||||
user << "<span class='notice'>There appears to already be a plasma tank loaded in [src]!</span>"
|
||||
user << "<span class='notice'>There appears to already be a phoron tank loaded in [src]!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
ptank = W
|
||||
@@ -123,15 +123,15 @@
|
||||
var/o2_concentration = ptank.air_contents.oxygen/total_moles
|
||||
var/n2_concentration = ptank.air_contents.nitrogen/total_moles
|
||||
var/co2_concentration = ptank.air_contents.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = ptank.air_contents.toxins/total_moles
|
||||
var/phoron_concentration = ptank.air_contents.phoron/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
|
||||
|
||||
user << "\blue Pressure: [round(pressure,0.1)] kPa"
|
||||
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
|
||||
user << "\blue Oxygen: [round(o2_concentration*100)]%"
|
||||
user << "\blue CO2: [round(co2_concentration*100)]%"
|
||||
user << "\blue Plasma: [round(plasma_concentration*100)]%"
|
||||
user << "\blue Phoron: [round(phoron_concentration*100)]%"
|
||||
if(unknown_concentration>0.01)
|
||||
user << "\red Unknown: [round(unknown_concentration*100)]%"
|
||||
user << "\blue Temperature: [round(ptank.air_contents.temperature-T0C)]°C"
|
||||
@@ -146,9 +146,9 @@
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
user.set_machine(src)
|
||||
if(!ptank)
|
||||
user << "<span class='notice'>Attach a plasma tank first!</span>"
|
||||
user << "<span class='notice'>Attach a phoron tank first!</span>"
|
||||
return
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=\ref[src];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=\ref[src];amount=-100'>-</A> <A HREF='?src=\ref[src];amount=-10'>-</A> <A HREF='?src=\ref[src];amount=-1'>-</A> [throw_amount] <A HREF='?src=\ref[src];amount=1'>+</A> <A HREF='?src=\ref[src];amount=10'>+</A> <A HREF='?src=\ref[src];amount=100'>+</A><BR>\n<A HREF='?src=\ref[src];remove=1'>Remove plasmatank</A> - <A HREF='?src=\ref[src];close=1'>Close</A></TT>")
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=\ref[src];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=\ref[src];amount=-100'>-</A> <A HREF='?src=\ref[src];amount=-10'>-</A> <A HREF='?src=\ref[src];amount=-1'>-</A> [throw_amount] <A HREF='?src=\ref[src];amount=1'>+</A> <A HREF='?src=\ref[src];amount=10'>+</A> <A HREF='?src=\ref[src];amount=100'>+</A><BR>\n<A HREF='?src=\ref[src];remove=1'>Remove phorontank</A> - <A HREF='?src=\ref[src];close=1'>Close</A></TT>")
|
||||
user << browse(dat, "window=flamethrower;size=600x300")
|
||||
onclose(user, "flamethrower")
|
||||
return
|
||||
@@ -163,7 +163,7 @@
|
||||
usr.set_machine(src)
|
||||
if(href_list["light"])
|
||||
if(!ptank) return
|
||||
if(ptank.air_contents.toxins < 1) return
|
||||
if(ptank.air_contents.phoron < 1) return
|
||||
if(!status) return
|
||||
lit = !lit
|
||||
if(lit)
|
||||
@@ -212,8 +212,8 @@
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
|
||||
//air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
|
||||
air_transfer.toxins = 0
|
||||
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.phoron,get_dir(loc,target))
|
||||
air_transfer.phoron = 0
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
//target.hotspot_expose(part4.air_contents.temperature*2,300)
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
B1.reagents.add_reagent("aluminum", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
B2.reagents.add_reagent("plasma", 15)
|
||||
B2.reagents.add_reagent("phoron", 15)
|
||||
B2.reagents.add_reagent("sacid", 15)
|
||||
B1.reagents.add_reagent("fuel",20)
|
||||
|
||||
|
||||
@@ -512,7 +512,7 @@
|
||||
This machine, along with the Protolathe, is used to actually produce new devices. The Circuit Imprinter takes glass and various chemicals (depends on the design) to produce new circuit boards to build new machines or computers. It can even be used to print AI modules.
|
||||
|
||||
<h2>Protolathe</h2>
|
||||
This machine is an advanced form of the Autolathe that produce non-circuit designs. Unlike the Autolathe, it can use processed metal, glass, solid plasma, silver, gold, and diamonds along with a variety of chemicals to produce devices.
|
||||
This machine is an advanced form of the Autolathe that produce non-circuit designs. Unlike the Autolathe, it can use processed metal, glass, solid phoron, silver, gold, and diamonds along with a variety of chemicals to produce devices.
|
||||
The downside is that, again, not all devices you make are 100% reliable when you first discover them.
|
||||
|
||||
<h2>Reliability and You</h2>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
/obj/item/weapon/cell/slime
|
||||
name = "charged slime core"
|
||||
desc = "A yellow slime core infused with plasma, it crackles with power."
|
||||
desc = "A yellow slime core infused with phoron, it crackles with power."
|
||||
origin_tech = "powerstorage=2;biotech=4"
|
||||
icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi'
|
||||
icon_state = "yellow slime extract" //"potato_battery"
|
||||
|
||||
@@ -15,9 +15,22 @@
|
||||
max_combined_w_class = 21
|
||||
|
||||
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/backpack/equipped(var/mob/user, var/slot)
|
||||
if (slot == slot_back && src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
..(user, slot)
|
||||
|
||||
/*
|
||||
/obj/item/weapon/storage/backpack/dropped(mob/user as mob)
|
||||
if (loc == user && src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
..(user)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Backpack Types
|
||||
*/
|
||||
|
||||
@@ -8,29 +8,6 @@
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/proc/can_use()
|
||||
return is_equipped()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility
|
||||
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||
desc = "Can hold various tools."
|
||||
|
||||
@@ -102,5 +102,6 @@
|
||||
A.reagents.add_reagent("holywater",water2holy)
|
||||
|
||||
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
..()
|
||||
|
||||
@@ -132,7 +132,19 @@
|
||||
new /obj/item/ammo_casing/shotgun/blank(src)
|
||||
new /obj/item/ammo_casing/shotgun/blank(src)
|
||||
|
||||
/obj/item/weapon/storage/box/beanbags
|
||||
name = "box of beanbag shells"
|
||||
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
|
||||
/obj/item/weapon/storage/box/flashbangs
|
||||
name = "box of flashbangs (WARNING)"
|
||||
@@ -410,7 +422,7 @@
|
||||
|
||||
/obj/item/weapon/storage/box/matches
|
||||
name = "matchbox"
|
||||
desc = "A small box of Almost But Not Quite Plasma Premium Matches."
|
||||
desc = "A small box of 'Space-Proof' premium matches."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "matchbox"
|
||||
item_state = "zippo"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* Contains:
|
||||
* First Aid Kits
|
||||
* Pill Bottles
|
||||
* Dice Pack (in a pill bottle)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -124,29 +123,7 @@
|
||||
allow_quick_gather = 1
|
||||
use_to_pickup = 1
|
||||
storage_slots = 14
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if (ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
return
|
||||
use_sound = null
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/kelotane
|
||||
name = "bottle of kelotane pills"
|
||||
@@ -204,12 +181,3 @@
|
||||
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
|
||||
new /obj/item/weapon/reagent_containers/pill/tramadol( src )
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/dice
|
||||
name = "pack of dice"
|
||||
desc = "It's a small container with dice inside."
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/dice( src )
|
||||
new /obj/item/weapon/dice/d20( src )
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//A storage item intended to be used by other items to provide storage functionality.
|
||||
//Types that use this should consider overriding emp_act() and hear_talk(), unless they shield their contents somehow.
|
||||
/obj/item/weapon/storage/internal
|
||||
var/obj/item/master_item
|
||||
|
||||
/obj/item/weapon/storage/internal/New(obj/item/MI)
|
||||
master_item = MI
|
||||
loc = master_item
|
||||
name = master_item.name
|
||||
verbs -= /obj/item/verb/verb_pickup //make sure this is never picked up.
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/internal/attack_hand()
|
||||
return //make sure this is never picked up
|
||||
|
||||
/obj/item/weapon/storage/internal/mob_can_equip()
|
||||
return 0 //make sure this is never picked up
|
||||
|
||||
//Helper procs to cleanly implement internal storages - storage items that provide inventory slots for other items.
|
||||
//These procs are completely optional, it is up to the master item to decide when it's storage get's opened by calling open()
|
||||
//However they are helpful for allowing the master item to pretend it is a storage item itself.
|
||||
//If you are using these you will probably want to override attackby() as well.
|
||||
//See /obj/item/clothing/suit/storage for an example.
|
||||
|
||||
//items that use internal storage have the option of calling this to emulate default storage MouseDrop behaviour.
|
||||
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
|
||||
//doing it without the ability to call another proc's parent, really.
|
||||
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
|
||||
if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 0
|
||||
|
||||
if(over_object == user && Adjacent(user)) // this must come before the screen objects only block
|
||||
src.open(user)
|
||||
return 0
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return 1
|
||||
|
||||
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this...
|
||||
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
|
||||
return 0
|
||||
|
||||
if (!( user.restrained() ) && !( user.stat ))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
user.u_equip(master_item)
|
||||
user.put_in_r_hand(master_item)
|
||||
if("l_hand")
|
||||
user.u_equip(master_item)
|
||||
user.put_in_l_hand(master_item)
|
||||
master_item.add_fingerprint(user)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
//items that use internal storage have the option of calling this to emulate default storage attack_hand behaviour.
|
||||
//returns 1 if the master item's parent's attack_hand() should be called, 0 otherwise.
|
||||
//It's strange, but no other way of doing it without the ability to call another proc's parent, really.
|
||||
/obj/item/weapon/storage/internal/proc/handle_attack_hand(mob/user as mob)
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_store == master_item && !H.get_active_hand()) //Prevents opening if it's in a pocket.
|
||||
H.put_in_hands(master_item)
|
||||
H.l_store = null
|
||||
return 0
|
||||
if(H.r_store == master_item && !H.get_active_hand())
|
||||
H.put_in_hands(master_item)
|
||||
H.r_store = null
|
||||
return 0
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if (master_item.loc == user)
|
||||
src.open(user)
|
||||
return 0
|
||||
|
||||
for(var/mob/M in range(1, master_item.loc))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/dice
|
||||
name = "pack of dice"
|
||||
desc = "It's a small container with dice inside."
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/dice( src )
|
||||
new /obj/item/weapon/dice/d20( src )
|
||||
@@ -167,16 +167,12 @@
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
usr << "\red [src] is locked and cannot be opened!"
|
||||
else if ((src.loc == user) && (!src.locked))
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user) //Close and re-open
|
||||
src.show_to(user)
|
||||
src.open(usr)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -245,4 +241,4 @@
|
||||
|
||||
/obj/item/weapon/storage/secure/safe/HoS/New()
|
||||
..()
|
||||
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
|
||||
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
|
||||
|
||||
@@ -22,41 +22,36 @@
|
||||
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
|
||||
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile
|
||||
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
|
||||
var/use_sound = "rustle" //sound played when used. null for no sound.
|
||||
|
||||
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
|
||||
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
var/mob/M = usr
|
||||
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return
|
||||
|
||||
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
|
||||
orient2hud(M) // dunno why it wasn't before
|
||||
if(M.s_active)
|
||||
M.s_active.close(M)
|
||||
show_to(M)
|
||||
if(over_object == usr && Adjacent(usr)) // this must come before the screen objects only block
|
||||
src.open(usr)
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the storage is equipped, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this.
|
||||
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
return
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!( M.restrained() ) && !( M.stat ))
|
||||
|
||||
if (!( usr.restrained() ) && !( usr.stat ))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_r_hand(src)
|
||||
usr.u_equip(src)
|
||||
usr.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
usr.u_equip(src)
|
||||
usr.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -101,6 +96,15 @@
|
||||
user.s_active = null
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/open(mob/user as mob)
|
||||
if (src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
|
||||
orient2hud(user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
show_to(user)
|
||||
|
||||
/obj/item/weapon/storage/proc/close(mob/user as mob)
|
||||
|
||||
src.hide_from(user)
|
||||
@@ -313,17 +317,17 @@
|
||||
|
||||
if(isrobot(user))
|
||||
user << "\blue You're a robot. No."
|
||||
return 1 //Robots can't interact with storage items.
|
||||
return //Robots can't interact with storage items.
|
||||
|
||||
if(!can_be_inserted(W))
|
||||
return 0
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/tray))
|
||||
var/obj/item/weapon/tray/T = W
|
||||
if(T.calc_carry() > 0)
|
||||
if(prob(85))
|
||||
user << "\red The tray won't fit in [src]."
|
||||
return 1
|
||||
return
|
||||
else
|
||||
W.loc = user.loc
|
||||
if ((user.client && user.s_active != src))
|
||||
@@ -331,15 +335,14 @@
|
||||
W.dropped(user)
|
||||
user << "\red God damnit!"
|
||||
|
||||
W.add_fingerprint(user)
|
||||
handle_item_insertion(W)
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/dropped(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_store == src && !H.get_active_hand()) //Prevents opening if it's in a pocket.
|
||||
@@ -350,12 +353,9 @@
|
||||
H.put_in_hands(src)
|
||||
H.r_store = null
|
||||
return
|
||||
|
||||
src.orient2hud(user)
|
||||
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
src.open(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
@@ -455,4 +455,20 @@
|
||||
var/obj/O = A
|
||||
O.hear_talk(M, text)
|
||||
|
||||
|
||||
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
|
||||
//Returns -1 if the atom was not found on user.
|
||||
/atom/proc/storage_depth(mob/user)
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while (cur_atom && !(cur_atom in user.contents))
|
||||
if (isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
if (!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
var/datum/gas_mixture/G = src.air_contents.remove(num)
|
||||
|
||||
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete
|
||||
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.phoron //fuck trace gases -Pete
|
||||
if(allgases >= 0.005)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Oxygen
|
||||
* Anesthetic
|
||||
* Air
|
||||
* Plasma
|
||||
* Phoron
|
||||
* Emergency Oxygen
|
||||
*/
|
||||
|
||||
@@ -92,25 +92,25 @@
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
* Phoron
|
||||
*/
|
||||
/obj/item/weapon/tank/plasma
|
||||
name = "plasma tank"
|
||||
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
|
||||
icon_state = "plasma"
|
||||
/obj/item/weapon/tank/phoron
|
||||
name = "phoron tank"
|
||||
desc = "Contains dangerous phoron. Do not inhale. Warning: extremely flammable."
|
||||
icon_state = "phoron"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = null //they have no straps!
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasma/New()
|
||||
/obj/item/weapon/tank/phoron/New()
|
||||
..()
|
||||
|
||||
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
src.air_contents.phoron = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
//
|
||||
src.air_contents.update_values()
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/weapon/tank/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (istype(W, /obj/item/weapon/flamethrower))
|
||||
|
||||
@@ -97,15 +97,15 @@
|
||||
var/o2_concentration = air_contents.oxygen/total_moles
|
||||
var/n2_concentration = air_contents.nitrogen/total_moles
|
||||
var/co2_concentration = air_contents.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = air_contents.toxins/total_moles
|
||||
var/phoron_concentration = air_contents.phoron/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+phoron_concentration)
|
||||
|
||||
user << "\blue Pressure: [round(pressure,0.1)] kPa"
|
||||
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
|
||||
user << "\blue Oxygen: [round(o2_concentration*100)]%"
|
||||
user << "\blue CO2: [round(co2_concentration*100)]%"
|
||||
user << "\blue Plasma: [round(plasma_concentration*100)]%"
|
||||
user << "\blue Phoron: [round(phoron_concentration*100)]%"
|
||||
if(unknown_concentration>0.01)
|
||||
user << "\red Unknown: [round(unknown_concentration*100)]%"
|
||||
user << "\blue Temperature: [round(air_contents.temperature-T0C)]°C"
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
w_class = 3.0
|
||||
m_amt = 70
|
||||
g_amt = 120
|
||||
origin_tech = "engineering=4;plasma=3"
|
||||
origin_tech = "engineering=4;phoron=3"
|
||||
var/last_gen = 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user