Merge branch 'dev' into power-net

Conflicts:
	code/game/machinery/Freezer.dm
	code/ATMOSPHERICS/components/unary/heat_source.dm
	code/modules/organs/organ_external.dm

Also updated:
	code/ATMOSPHERICS/components/binary_devices/pump.dm
	nano/templates/gas_pump.tmpl
This commit is contained in:
mwerezak
2014-07-16 16:14:52 -04:00
235 changed files with 5007 additions and 5366 deletions
+1 -1
View File
@@ -539,7 +539,7 @@
"\red You stab yourself in the eyes with [src]!" \
)
if(istype(M, /mob/living/carbon/human))
var/datum/organ/internal/eyes/eyes = H.internal_organs["eyes"]
var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"]
eyes.damage += rand(3,4)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
+50 -4
View File
@@ -328,7 +328,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui_tick++
var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main")
var/auto_update = 1
@@ -462,7 +462,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["aircontents"] = list("reading" = 0)
// 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)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
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
@@ -1214,8 +1214,54 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "\blue Tank is empty!"
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
note = A:info
user << "\blue Paper scanned." //concept of scanning paper copyright brainoblivion 2009
// JMO 20140705: Makes scanned document show up properly in the notes. Not pretty for formatted documents,
// as this will clobber the HTML, but at least it lets you scan a document. You can restore the original
// notes by editing the note again. (Was going to allow you to edit, but scanned documents are too long.)
var/raw_scan = (A:info)
var/formatted_scan = ""
// Scrub out the tags (replacing a few formatting ones along the way)
// Find the beginning and end of the first tag.
var/tag_start = findtext(raw_scan,"<")
var/tag_stop = findtext(raw_scan,">")
// Until we run out of complete tags...
while(tag_start&&tag_stop)
var/pre = copytext(raw_scan,1,tag_start) // Get the stuff that comes before the tag
var/tag = lowertext(copytext(raw_scan,tag_start+1,tag_stop)) // Get the tag so we can do intellegent replacement
var/tagend = findtext(tag," ") // Find the first space in the tag if there is one.
// Anything that's before the tag can just be added as is.
formatted_scan = formatted_scan+pre
// If we have a space after the tag (and presumably attributes) just crop that off.
if (tagend)
tag=copytext(tag,1,tagend)
if (tag=="p"||tag=="/p"||tag=="br") // Check if it's I vertical space tag.
formatted_scan=formatted_scan+"<br>" // If so, add some padding in.
raw_scan = copytext(raw_scan,tag_stop+1) // continue on with the stuff after the tag
// Look for the next tag in what's left
tag_start = findtext(raw_scan,"<")
tag_stop = findtext(raw_scan,">")
// Anything that is left in the page. just tack it on to the end as is
formatted_scan=formatted_scan+raw_scan
// If there is something in there already, pad it out.
if (length(note)>0)
note = note + "<br><br>"
// Store the scanned document to the notes
note = "Scanned Document. Edit to restore previous notes/delete scan.<br>----------<br>" + formatted_scan + "<br>"
// notehtml ISN'T set to allow user to get their old notes back. A better implementation would add a "scanned documents"
// feature to the PDA, which would better convey the availability of the feature, but this will work for now.
// Inform the user
user << "\blue Paper scanned and OCRed to notekeeper." //concept of scanning paper copyright brainoblivion 2009
/obj/item/device/pda/proc/explode() //This needs tuning. //Sure did.
+10
View File
@@ -71,6 +71,10 @@
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
dat += "<br>"
dat += "Subspace Transceiver is: [A.aiRadio.disabledAi ? "Disabled" : "Enabled"]"
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
@@ -92,6 +96,12 @@
U.unset_machine()
return
if ("Radio")
for(var/mob/living/silicon/ai/A in src)
A.aiRadio.disabledAi = !A.aiRadio.disabledAi
A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
if ("Wipe")
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes")
@@ -74,6 +74,12 @@
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
/obj/item/device/encryptionkey/heads/ai_integrated
name = "AI Integrated Encryption Key"
desc = "Integrated encryption key"
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1)
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
@@ -19,7 +19,9 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/receive_range(freq, level)
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
if (aiOverride)
return ..(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.l_ear == src || H.r_ear == src)
@@ -99,6 +101,20 @@
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
name = "AI Subspace Transceiver"
desc = "Integrated AI radio transceiver."
icon_state = "ai_radio"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/ai_integrated
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
if (disabledAi)
return -1 //Transciever Disabled.
return ..(freq, level, 1)
/obj/item/device/radio/headset/heads/rd
name = "Research Director's headset"
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
+44 -1
View File
@@ -427,4 +427,47 @@ REAGENT SCANNER
name = "advanced reagent scanner"
icon_state = "adv_spectrometer"
details = 1
origin_tech = "magnets=4;biotech=2"
origin_tech = "magnets=4;biotech=2"
/obj/item/device/slime_scanner
name = "slime scanner"
icon_state = "adv_spectrometer"
item_state = "analyzer"
origin_tech = "biotech=1"
w_class = 2.0
flags = CONDUCT
throwforce = 0
throw_speed = 3
throw_range = 7
matter = list("metal" = 30,"glass" = 20)
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
if (!isslime(M))
user << "<B>This device can only scan slimes!</B>"
return
var/mob/living/carbon/slime/T = M
user.show_message("Slime scan results:")
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"))
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()))
if (T.nutrition < T.get_starve_nutrition())
user.show_message("<span class='alert'>Warning: slime is starving!</span>")
else if (T.nutrition < T.get_hunger_nutrition())
user.show_message("<span class='warning'>Warning: slime is hungry</span>")
user.show_message("Electric change strength: [T.powerlevel]")
user.show_message("Health: [T.health]")
if (T.slime_mutation[4] == T.colour)
user.show_message("This slime does not evolve any further")
else
if (T.slime_mutation[3] == T.slime_mutation[4])
if (T.slime_mutation[2] == T.slime_mutation[1])
user.show_message(text("Possible mutation: []", T.slime_mutation[3]))
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting")
else
user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3]))
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
else
user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4]))
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
if (T.cores > 1)
user.show_message("Anomalious slime core amount detected")
user.show_message("Growth progress: [T.amount_grown]/10")
@@ -67,7 +67,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
var/data[0]
@@ -77,7 +77,7 @@
data["valveOpen"] = valve_open ? 1 : 0
// 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)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
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
+2 -2
View File
@@ -340,7 +340,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/*
NANO UI FOR UPLINK WOOP WOOP
*/
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/title = "Syndicate Uplink"
var/data[0]
@@ -349,7 +349,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
data["welcome"] = welcome
// 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)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
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
@@ -82,16 +82,19 @@
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
if(C) C.propelled = 1
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
if(C) C.propelled = 4
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
if(C) C.propelled = 3
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
if(C) C.propelled = 2
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
if(C) C.propelled = 1
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
if(C) C.propelled = 0
@@ -83,7 +83,7 @@
//This really should be in mob not every check
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
if (E.damage >= E.min_bruised_damage)
M << "\red Your eyes start to burn badly!"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
@@ -1,5 +1,7 @@
#define MALFUNCTION_TEMPORARY 1
#define MALFUNCTION_PERMANENT 2
/obj/item/weapon/implant
name = "implant"
icon = 'icons/obj/device.dmi'
@@ -65,8 +65,6 @@
update()
return
/obj/item/weapon/implanter/explosive
name = "implanter (E)"
+1 -2
View File
@@ -66,7 +66,6 @@
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
sharp = 1
/obj/item/weapon/kitchen/utensil/pfork
name = "plastic fork"
@@ -456,4 +455,4 @@
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
sleep(rand(2,4))
+3 -3
View File
@@ -737,11 +737,11 @@
/obj/item/weapon/book/manual/security_space_law
name = "Space Law"
name = "Corporate Regulations"
desc = "A set of NanoTrasen guidelines for keeping law and order on their space stations."
icon_state = "bookSpaceLaw"
author = "NanoTrasen"
title = "Space Law"
title = "Corporate Regulations"
dat = {"
@@ -749,7 +749,7 @@
</head>
<body>
<iframe width='100%' height='97%' src="http://baystation12.net/wiki/index.php?title=Space_law&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
<iframe width='100%' height='97%' src="http://baystation12.net/wiki/index.php?title=Corporate_Regulations&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
</body>
</html>
@@ -127,7 +127,7 @@
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/using_internal
if(istype(loc,/mob/living/carbon))
@@ -150,7 +150,7 @@
data["maskConnected"] = 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)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
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
+1 -1
View File
@@ -356,7 +356,7 @@
var/safety = user:eyecheck()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
if(H.species.flags & IS_SYNTHETIC)
return
switch(safety)
+3 -1
View File
@@ -58,7 +58,9 @@
return
/obj/structure/grille/attack_slime(mob/user as mob)
if(!istype(user, /mob/living/carbon/slime/adult)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
+3 -1
View File
@@ -103,7 +103,9 @@
attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15))
+3 -1
View File
@@ -105,7 +105,9 @@
/obj/structure/mirror/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -138,7 +138,7 @@
if(propelled)
var/mob/living/occupant = buckled_mob
unbuckle()
occupant.throw_at(A, 3, 2)
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
@@ -136,7 +136,12 @@
if(propelled || (pulling && (pulling.a_intent == "hurt")))
var/mob/living/occupant = buckled_mob
unbuckle()
occupant.throw_at(A, 3, 2)
if (pulling && (pulling.a_intent == "hurt"))
occupant.throw_at(A, 3, 3, pulling)
else if (propelled)
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
+3 -1
View File
@@ -155,7 +155,9 @@
/obj/structure/window/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15))