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

Conflicts:
	icons/mob/items_lefthand.dmi
	icons/mob/items_righthand.dmi
This commit is contained in:
Hubblenaut
2015-02-16 16:16:30 +01:00
878 changed files with 17541 additions and 51430 deletions
+4 -5
View File
@@ -10,7 +10,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon_state = "pda"
item_state = "electronic"
w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_ID | SLOT_BELT
//Main variables
@@ -537,7 +536,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
// update the ui if it exists, returns null if no ui is passed/found
if(ui)
ui.load_cached_data(ManifestJSON)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -727,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
t = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 20))
ttone = t
else
ui.close()
@@ -736,7 +735,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter new news tone", name, newstone) as text
if (in_range(src, U) && loc == U)
if (t)
t = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 20))
newstone = t
else
ui.close()
@@ -972,7 +971,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
U.last_target_click = world.time
var/t = input(U, "Please enter message", P.name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
if (!t || !istype(P))
return
+2 -2
View File
@@ -562,10 +562,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", message1) as text|null), 1, 40)), 40)
message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", message2) as text|null), 1, 40)), 40)
message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 40))), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
@@ -4,7 +4,6 @@
icon_state = "aicard" // aicard-full
item_state = "electronic"
w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/flush = null
origin_tech = "programming=4;materials=4"
@@ -4,7 +4,7 @@
desc = "A pair of binoculars."
icon_state = "binoculars"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
@@ -1,7 +1,7 @@
/obj/item/device/chameleon
name = "chameleon projector"
icon_state = "shield0"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
item_state = "electronic"
throwforce = 5.0
+1 -1
View File
@@ -9,7 +9,7 @@
desc = "Used to debug electronic equipment."
icon = 'icons/obj/hacktool.dmi'
icon_state = "hacktool-g"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
+1 -1
View File
@@ -7,7 +7,7 @@
w_class = 2.0
throw_speed = 4
throw_range = 10
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
origin_tech = "magnets=2;combat=1"
var/times_used = 0 //Number of times it's been used.
@@ -5,7 +5,7 @@
icon_state = "flashlight"
item_state = "flashlight"
w_class = 2
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
matter = list("metal" = 50,"glass" = 20)
@@ -106,7 +106,7 @@
desc = "A pen-sized light, used by medical staff."
icon_state = "penlight"
item_state = ""
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
brightness_on = 2
w_class = 1
@@ -115,7 +115,7 @@
desc = "A miniature lamp, that might be used by small robots."
icon_state = "penlight"
item_state = ""
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
brightness_on = 2
w_class = 1
@@ -128,7 +128,7 @@
item_state = "lamp"
brightness_on = 5
w_class = 4
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
on = 1
@@ -47,7 +47,7 @@
icon_state = "lightreplacer0"
item_state = "electronic"
flags = FPRINT | CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
origin_tech = "magnets=3;materials=2"
+2 -2
View File
@@ -4,7 +4,7 @@
icon_state = "megaphone"
item_state = "radio"
w_class = 2.0
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
var/spamcheck = 0
var/emagged = 0
@@ -25,7 +25,7 @@
user << "\red \The [src] needs to recharge!"
return
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
if(!message)
return
message = capitalize(message)
+1 -1
View File
@@ -8,7 +8,7 @@
name = "multitool"
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
icon_state = "multitool"
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
+4 -2
View File
@@ -4,7 +4,6 @@
icon_state = "pai"
item_state = "electronic"
w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
origin_tech = "programming=2"
var/obj/item/device/radio/radio
@@ -261,7 +260,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = copytext(sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message),1,MAX_MESSAGE_LEN)
var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"
@@ -282,6 +281,8 @@
src.overlays.Cut()
src.overlays += "pai-off"
/obj/item/device/paicard
var/current_emotion = 1
/obj/item/device/paicard/proc/setEmotion(var/emotion)
if(pai)
src.overlays.Cut()
@@ -295,6 +296,7 @@
if(7) src.overlays += "pai-sad"
if(8) src.overlays += "pai-angry"
if(9) src.overlays += "pai-what"
current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
+1 -1
View File
@@ -6,7 +6,7 @@
icon_state = "powersink0"
item_state = "electronic"
w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
throwforce = 5
throw_speed = 1
throw_range = 2
@@ -4,7 +4,7 @@
icon_state = "electropack0"
item_state = "electropack"
frequency = 1449
flags = FPRINT | CONDUCT | TABLEPASS
flags = CONDUCT
slot_flags = SLOT_BACK
w_class = 5.0
@@ -5,7 +5,7 @@
anchored = 1
w_class = 4.0
canhear_range = 2
flags = FPRINT | CONDUCT | TABLEPASS | NOBLOODY
flags = CONDUCT | NOBLOODY
var/number = 0
var/anyai = 1
var/mob/living/silicon/ai/ai = list()
+11 -23
View File
@@ -20,7 +20,7 @@
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = FPRINT | CONDUCT | TABLEPASS
flags = CONDUCT
slot_flags = SLOT_BELT
throw_speed = 2
throw_range = 9
@@ -115,13 +115,10 @@
listening = !listening && !(wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
/obj/item/device/radio/Topic(href, href_list)
//..()
if (usr.stat || !on)
return
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
if(..() || !on)
usr << browse(null, "window=radio")
return
usr.set_machine(src)
if (href_list["track"])
var/mob/target = locate(href_list["track"])
@@ -152,17 +149,7 @@
else
channels[chan_name] |= FREQ_LISTENING
if (!( master ))
if (istype(loc, /mob))
interact(loc)
else
updateDialog()
else
if (istype(master.loc, /mob))
interact(master.loc)
else
updateDialog()
add_fingerprint(usr)
interact(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT
var/datum/radio_frequency/connection = null
@@ -194,7 +181,7 @@
return radio_connection
// Otherwise, if a channel is specified, look for it.
if(channels)
if(channels && channels.len > 0)
if (message_mode == "department") // Department radio shortcut
message_mode = channels[1]
@@ -506,6 +493,7 @@
icon = 'icons/obj/robot_component.dmi' // Cyborgs radio icons should look like the component.
icon_state = "radio"
canhear_range = 3
subspace_transmission = 1
/obj/item/device/radio/borg/talk_into()
. = ..()
@@ -594,11 +582,11 @@
if (href_list["mode"])
if(subspace_transmission != 1)
subspace_transmission = 1
usr << "Subspace Transmission is disabled"
usr << "Subspace Transmission is enabled"
else
subspace_transmission = 0
usr << "Subspace Transmission is enabled"
if(subspace_transmission == 1)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
usr << "Subspace Transmission is disabled"
if(subspace_transmission == 0)//Simple as fuck, clears the channel list to prevent talking/listening over them if subspace transmission is disabled
channels = list()
else
recalculateChannels()
@@ -625,10 +613,10 @@
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<A href='byond://?src=\ref[src];mode=1'>Toggle Broadcast Mode</A><BR>
<A href='byond://?src=\ref[src];shutup=1'>Toggle Loudspeaker</A><BR>
Loudspeaker: [shut_up ? "<A href='byond://?src=\ref[src];shutup=0'>Disengaged</A>" : "<A href='byond://?src=\ref[src];shutup=1'>Engaged</A>"]<BR>
"}
if(!subspace_transmission)//Don't even bother if subspace isn't turned on
if(subspace_transmission)//Don't even bother if subspace isn't turned on
for (var/ch_name in channels)
dat+=text_sec_channel(ch_name, channels[ch_name])
dat+={"[text_wires()]</TT></body></html>"}
+4 -5
View File
@@ -13,7 +13,6 @@ REAGENT SCANNER
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
icon_state = "t-ray0"
var/on = 0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2
item_state = "electronic"
@@ -69,7 +68,7 @@ REAGENT SCANNER
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
icon_state = "health"
item_state = "analyzer"
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0
@@ -232,7 +231,7 @@ REAGENT SCANNER
icon_state = "atmos"
item_state = "analyzer"
w_class = 2.0
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
@@ -279,7 +278,7 @@ REAGENT SCANNER
icon_state = "spectrometer"
item_state = "analyzer"
w_class = 2.0
flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER
flags = CONDUCT | OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
@@ -353,7 +352,7 @@ REAGENT SCANNER
icon_state = "spectrometer"
item_state = "analyzer"
w_class = 2.0
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
+154
View File
@@ -0,0 +1,154 @@
/obj/item/device/spy_bug
name = "bug"
desc = "" // Nothing to see here
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
item_state = "nothing"
layer = TURF_LAYER+0.2
flags = CONDUCT
force = 5.0
w_class = 1.0
throwforce = 5.0
throw_range = 15
throw_speed = 3
origin_tech = "programming=1;engineering=1;syndicate=3"
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/camera
/obj/item/device/spy_bug/New()
..()
radio = new(src)
camera = new(src)
/obj/item/device/spy_bug/examine(mob/user)
. = ..(user, 0)
if(.)
user << "It's a tiny camera, microphone, and transmission device in a happy union."
user << "Needs to be both configured and brought in contact with monitor device to be fully functional."
/obj/item/device/spy_bug/attack_self(mob/user)
radio.attack_self(user)
/obj/item/device/spy_bug/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_monitor))
var/obj/item/device/spy_monitor/SM = W
SM.pair(src, user)
else
..()
/obj/item/device/spy_bug/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
radio.hear_talk(M, msg, speaking)
/obj/item/device/spy_monitor
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
w_class = 2.0
origin_tech = "programming=1;engineering=1;syndicate=3"
var/operating = 0
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/selected_camera
var/list/obj/machinery/camera/spy/cameras = new()
/obj/item/device/spy_monitor/New()
radio = new(src)
/obj/item/device/spy_monitor/examine(mob/user)
. = ..(user, 1)
if(.)
user << "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
/obj/item/device/spy_monitor/attack_self(mob/user)
if(operating)
return
radio.attack_self(user)
view_cameras(user)
/obj/item/device/spy_monitor/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_bug))
pair(W, user)
else
return ..()
/obj/item/device/spy_monitor/proc/pair(var/obj/item/device/spy_bug/SB, var/mob/living/user)
if(SB.camera in cameras)
user << "<span class='notice'>\The [SB] has been unpaired from \the [src].</span>"
cameras -= SB.camera
else
user << "<span class='notice'>\The [SB] has been paired with \the [src].</span>"
cameras += SB.camera
/obj/item/device/spy_monitor/proc/view_cameras(mob/user)
if(!can_use_cam(user))
return
selected_camera = cameras[1]
view_camera(user)
operating = 1
while(selected_camera && Adjacent(user))
selected_camera = input("Select camera bug to view.") as null|anything in cameras
selected_camera = null
operating = 0
/obj/item/device/spy_monitor/proc/view_camera(mob/user)
spawn(0)
while(selected_camera && Adjacent(user))
var/turf/T = get_turf(selected_camera)
if(!T || !is_on_same_plane_or_station(T.z, user.z) || !selected_camera.can_use())
user.unset_machine()
user.reset_view(null)
user << "<span class='notice'>[selected_camera] unavailable.</span>"
sleep(90)
else
user.set_machine(selected_camera)
user.reset_view(selected_camera)
sleep(10)
user.unset_machine()
user.reset_view(null)
/obj/item/device/spy_monitor/proc/can_use_cam(mob/user)
if(operating)
return
if(!cameras.len)
user << "<span class='warning'>No paired cameras detected!</span>"
user << "<span class='warning'>Bring a bug in contact with this device to pair the camera.</span>"
return
return 1
/obj/item/device/spy_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
return radio.hear_talk(M, msg, speaking)
/obj/machinery/camera/spy
// These cheap toys are accessible from the mercenary camera console as well
network = list("NUKE")
/obj/machinery/camera/spy/New()
..()
name = "DV-136ZB #[rand(1000,9999)]"
c_tag = name
cameranet.removeCamera(src) // Sorry, no AI spying.
/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
return 1
/obj/item/device/radio/spy
listening = 0
frequency = 1473
broadcasting = 0
canhear_range = 1
name = "spy device"
icon_state = "syn_cypherkey"
@@ -7,7 +7,7 @@
slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage
//copied from tank.dm
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
force = 5.0
throwforce = 10.0
throw_speed = 1
@@ -15,7 +15,7 @@
var/list/storedinfo = new/list()
var/list/timestamp = new/list()
var/canprint = 1
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
throwforce = 2
throw_speed = 4
throw_range = 20
@@ -22,7 +22,7 @@ effective or pretty fucking useless.
w_class = 1.0
throw_speed = 4
throw_range = 10
flags = FPRINT | TABLEPASS| CONDUCT
flags = CONDUCT
item_state = "electronic"
origin_tech = "magnets=3;combat=3;syndicate=3"
+5 -2
View File
@@ -108,6 +108,9 @@ datum/nano_item_lists
return pick(random_items)
/obj/item/device/uplink/Topic(href, href_list)
if(..())
return 1
if(href_list["buy_item"] == "random")
var/datum/uplink_item/UI = chooseRandomItem()
href_list["buy_item"] = UI.reference
@@ -208,10 +211,10 @@ datum/nano_item_lists
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
return
return 1
if (!( istype(usr, /mob/living/carbon/human)))
return 0
return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "voice0"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
w_class = 1.0
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
var/spamcheck = 0
var/emagged = 0