Merge branch 'master' of github.com:tgstation/-tg-station into taperecorder

Conflicts:
	icons/obj/device.dmi
	tgstation.dme
This commit is contained in:
Pete Goodfellow
2013-06-19 17:05:47 +01:00
202 changed files with 4808 additions and 3998 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red APC cannot be placed on this spot."
+2 -2
View File
@@ -74,7 +74,7 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/get_area()
var/turf/T = get_turf_loc(usr)
var/turf/T = get_turf(usr)
var/area/A = T.loc
A = A.master
return A
@@ -101,7 +101,7 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/create_area()
//world << "DEBUG: create_area"
var/res = detect_room(get_turf_loc(usr))
var/res = detect_room(get_turf(usr))
if(!istype(res,/list))
switch(res)
if(ROOM_ERR_SPACE)
+2 -2
View File
@@ -392,7 +392,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (3)
dat += "<h4><img src=pda_atmos.png> Atmospheric Readings</h4>"
var/turf/T = get_turf_or_move(user.loc)
var/turf/T = get_turf(user.loc)
if (isnull(T))
dat += "Unable to obtain a reading.<br>"
else
@@ -655,7 +655,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("1") // Configure pAI device
pai.attack_self(U)
if("2") // Eject pAI device
var/turf/T = get_turf_or_move(src.loc)
var/turf/T = get_turf(src.loc)
if(T)
pai.loc = T
@@ -0,0 +1,353 @@
#define VANILLA_BUG 0
#define UNIVERSAL_BUG 1
#define NETWORK_BUG 2
#define SABOTAGE_BUG 3
#define ADVANCED_BUG 4
#define ADMIN_BUG 5
#define BUGMODE_LIST 0
#define BUGMODE_MONITOR 1
#define BUGMODE_TRACK 2
/obj/item/device/camera_bug
name = "camera bug"
desc = "For illicit snooping through the camera network."
icon = 'icons/obj/device.dmi'
icon_state = "mindflash2"
w_class = 1.0
item_state = "electronic"
throw_speed = 4
throw_range = 20
var/obj/machinery/camera/current = null
var/obj/item/expansion = null
var/bugtype = VANILLA_BUG
var/last_net_update = 0
var/last_bugtype = VANILLA_BUG
var/list/bugged_cameras = list()
var/skip_bugcheck = 0
var/track_mode = BUGMODE_LIST
var/last_tracked = 0
var/refresh_interval = 50
var/tracked_name = null
var/atom/tracking = null
var/last_found = null
var/last_seen = null
/obj/item/device/camera_bug/New()
..()
processing_objects += src
/obj/item/device/camera_bug/interact(var/mob/user = usr)
var/datum/browser/popup = new(user, "camerabug","Camera Bug",nref=src)
popup.set_content(menu(get_cameras()))
popup.open()
/obj/item/device/camera_bug/attack_self(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if (user.stat || loc != user || !user.canmove || user.blinded || !current)
user.reset_view(null)
user.unset_machine()
return null
var/turf/T = get_turf(user.loc)
if(T.z != current.z || (!skip_bugcheck && current.bug != src) || !current.can_use())
user << "\red [src] has lost the signal."
current = null
user.reset_view(null)
user.unset_machine()
return null
return 1
/obj/item/device/camera_bug/proc/get_cameras()
if(bugtype != last_bugtype || ( (bugtype in list(UNIVERSAL_BUG,NETWORK_BUG,ADMIN_BUG)) && world.time > (last_net_update + 100)))
bugged_cameras = list()
last_bugtype = bugtype
for(var/obj/machinery/camera/camera in cameranet.cameras)
if(camera.stat || !camera.can_use())
continue
switch(bugtype)
if(VANILLA_BUG,SABOTAGE_BUG,ADVANCED_BUG)
if(camera.bug == src)
bugged_cameras[camera.c_tag] = camera
if(UNIVERSAL_BUG)
if(camera.bug)
bugged_cameras[camera.c_tag] = camera
if(NETWORK_BUG,ADMIN_BUG)
if(length(list("SS13","MINE")&camera.network))
bugged_cameras[camera.c_tag] = camera
bugged_cameras = sortAssoc(bugged_cameras)
return bugged_cameras
/obj/item/device/camera_bug/proc/menu(var/list/cameras)
if(!cameras || !cameras.len)
return "No bugged cameras found."
var/html
switch(track_mode)
if(BUGMODE_LIST)
html = "<h3>Select a camera:</h3> <a href='?src=\ref[src];view'>\[Cancel camera view\]</a><hr><table>"
for(var/entry in cameras)
var/obj/machinery/camera/C = cameras[entry]
var/functions = ""
switch(bugtype)
if(SABOTAGE_BUG)
functions = " - <a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
if(ADVANCED_BUG)
functions = " - <a href='?src=\ref[src];monitor=\ref[C]'>\[Monitor\]</a>"
if(ADMIN_BUG)
if(C.bug == src)
functions = " - <a href='?src=\ref[src];monitor=\ref[C]'>\[Monitor\]</a> <a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
else
functions = " - <a href='?src=\ref[src];monitor=\ref[C]'>\[Monitor\]</a>"
html += "<tr><td><a href='?src=\ref[src];view=\ref[C]'>[entry]</a></td><td>[functions]</td></tr>"
if(BUGMODE_MONITOR)
if(current)
html = "Analyzing Camera '[current.c_tag]' <a href='?\ref[src];mode=0'>\[Select Camera\]</a><br>"
html += camera_report()
else
track_mode = BUGMODE_LIST
return .(cameras)
if(BUGMODE_TRACK)
if(tracking)
html = "Tracking '[tracked_name]' <a href='?\ref[src];mode=0'>\[Cancel Tracking\]</a> <a href='?src=\ref[src];view'>\[Cancel camera view\]</a><br>"
if(last_found)
var/time_diff = round((world.time - last_seen) / 150)
var/obj/machinery/camera/C = bugged_cameras[last_found]
var/outstring
if(C)
outstring = "<a href='?\ref[src];view=\ref[C]'>[last_found]</a>"
else
outstring = last_found
if(!time_diff)
html += "Last seen near [outstring] (now)<br>"
else
// 15 second intervals ~ 1/4 minute
var/m = round(time_diff/4)
var/s = (time_diff - 4*m) * 15
if(!s) s = "00"
html += "Last seen near [outstring] ([m]:[s] minute\s ago)<br>"
else
html += "Not yet seen."
else
track_mode = BUGMODE_LIST
return .(cameras)
return html
/obj/item/device/camera_bug/proc/camera_report()
// this should only be called if current exists
var/dat = ""
if(current && current.can_use())
var/list/seen = current.can_see()
var/list/names = list()
for(var/obj/machinery/singularity/S in seen) // god help you if you see more than one
if(S.name in names)
names[S.name]++
dat += "[S.name] ([names[S.name]])"
else
names[S.name] = 1
dat += "[S.name]"
var/stage = round(S.current_size / 2)+1
dat += " (Stage [stage])"
dat += " <a href='?\ref[src];track=\ref[S]'>\[Track\]</a><br>"
for(var/obj/mecha/M in seen)
if(M.name in names)
names[M.name]++
dat += "[M.name] ([names[M.name]])"
else
names[M.name] = 1
dat += "[M.name]"
dat += " <a href='?\ref[src];track=\ref[M]'>\[Track\]</a><br>"
for(var/mob/living/M in seen)
if(M.name in names)
names[M.name]++
dat += "[M.name] ([names[M.name]])"
else
names[M.name] = 1
dat += "[M.name]"
if(M.buckled && !M.lying)
dat += " (Sitting)"
if(M.lying)
dat += " (Laying down)"
dat += " <a href='?\ref[src];track=\ref[M]'>\[Track\]</a><br>"
if(length(dat) == 0)
dat += "No motion detected."
return dat
else
return "Camera Offline<br>"
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_view(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
if("mode" in href_list)
track_mode = text2num(href_list["mode"])
if("monitor" in href_list)
var/obj/machinery/camera/C = locate(href_list["monitor"])
if(C)
track_mode = BUGMODE_MONITOR
current = C
usr.reset_view(null)
interact()
if("track" in href_list)
var/atom/A = locate(href_list["track"])
if(A)
tracking = A
tracked_name = A.name
last_found = current.c_tag
last_seen = world.time
track_mode = BUGMODE_TRACK
if("emp" in href_list)
var/obj/machinery/camera/C = locate(href_list["emp"])
if(istype(C) && C.bug == src)
C.emp_act(1)
C.bug = null
bugged_cameras -= C.c_tag
interact()
return
if("close" in href_list)
usr.reset_view(null)
usr.unset_machine()
current = null
return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later
if("view" in href_list)
var/obj/machinery/camera/C = locate(href_list["view"])
if(istype(C))
if(!C.can_use())
usr << "\red Something's wrong with that camera. You can't get a feed."
return
var/turf/T = get_turf(loc)
if(!T || C.z != T.z)
usr << "\red You can't get a signal."
return
current = C
spawn(6)
if(src.check_eye(usr))
usr.reset_view(C)
interact()
else
usr.unset_machine()
usr.reset_view(null)
usr << browse(null, "window=camerabug")
return
else
usr.unset_machine()
usr.reset_view(null)
interact()
/obj/item/device/camera_bug/process()
if(track_mode == BUGMODE_LIST || (world.time < (last_tracked + refresh_interval)))
return
last_tracked = world.time
if(track_mode == BUGMODE_TRACK ) // search for user
// Note that it will be tricked if your name appears to change.
// This is not optimal but it is better than tracking you relentlessly despite everything.
if(!tracking)
src.updateSelfDialog()
return
if(tracking.name != tracked_name) // Hiding their identity, tricksy
var/mob/M = tracking
if(istype(M))
if(!(tracked_name == "Unknown" && findtext(tracking.name,"Unknown"))) // we saw then disguised before
if(!(tracked_name == M.real_name && findtext(tracking.name,M.real_name))) // or they're still ID'd
src.updateSelfDialog()//But if it's neither of those cases
return // you won't find em on the cameras
else
src.updateSelfDialog()
return
var/list/tracking_cams = list()
var/list/b_cams = get_cameras()
for(var/entry in b_cams)
tracking_cams += b_cams[entry]
var/list/target_region = view(tracking)
for(var/obj/machinery/camera/C in (target_region & tracking_cams))
if(!can_see(C,tracking)) // target may have xray, that doesn't make them visible to cameras
continue
if(C.can_use())
last_found = C.c_tag
last_seen = world.time
break
src.updateSelfDialog()
/obj/item/device/camera_bug/attackby(var/obj/item/W as obj,var/mob/living/user as mob)
if(istype(W,/obj/item/weapon/screwdriver) && expansion)
expansion.loc = get_turf(loc)
user << "You unscrew [expansion]."
user.put_in_inactive_hand(expansion)
expansion = null
bugtype = VANILLA_BUG
skip_bugcheck = 0
track_mode = BUGMODE_LIST
tracking = null
return
if(expansion || !W)
return ..(W,user)
// I am not sure that this list is or should be final
// really I do not know what to do here.
var/static/list/expandables = list(
/obj/item/weapon/research = ADMIN_BUG, // could have been anything spawn-only
// these are all so hackish I am sorry
/obj/item/device/analyzer = UNIVERSAL_BUG,
/obj/item/weapon/stock_parts/subspace/analyzer = UNIVERSAL_BUG,
/obj/item/device/assembly/igniter = SABOTAGE_BUG,
/obj/item/device/assembly/infra = SABOTAGE_BUG, // ir blaster to disable camera
/obj/item/weapon/stock_parts/subspace/amplifier = SABOTAGE_BUG,
/obj/item/device/radio = NETWORK_BUG,
/obj/item/device/assembly/signaler = NETWORK_BUG,
/obj/item/weapon/stock_parts/subspace/transmitter = NETWORK_BUG,
/obj/item/device/detective_scanner = ADVANCED_BUG,
/obj/item/device/paicard = ADVANCED_BUG,
/obj/item/weapon/stock_parts/scanning_module = ADVANCED_BUG
)
for(var/entry in expandables)
if(istype(W,entry))
bugtype = expandables[entry]
user.drop_item()
W.loc = src
expansion = W
user << "You add [W] to [src]."
get_cameras() // the tracking code will want to know the new camera list
if(bugtype in list(UNIVERSAL_BUG,NETWORK_BUG,ADMIN_BUG))
skip_bugcheck = 1
return
#undef VANILLA_BUG
#undef UNIVERSAL_BUG
#undef NETWORK_BUG
#undef SABOTAGE_BUG
#undef ADVANCED_BUG
#undef ADMIN_BUG
#undef BUGMODE_LIST
#undef BUGMODE_MONITOR
#undef BUGMODE_TRACK
+1 -1
View File
@@ -126,7 +126,7 @@
if(9) src.overlays += "pai-what"
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
var/turf/T = get_turf(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
@@ -28,102 +28,90 @@
/obj/item/device/encryptionkey/headset_sec
name = "Security Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the security channel, use :s."
icon_state = "sec_cypherkey"
channels = list("Security" = 1)
/obj/item/device/encryptionkey/headset_eng
name = "Engineering Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the engineering channel, use :e."
icon_state = "eng_cypherkey"
channels = list("Engineering" = 1)
/obj/item/device/encryptionkey/headset_rob
name = "Robotics Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the engineering channel, use :e. For research, use :n."
icon_state = "rob_cypherkey"
channels = list("Engineering" = 1, "Science" = 1)
channels = list("Science" = 1, "Engineering" = 1)
/obj/item/device/encryptionkey/headset_med
name = "Medical Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the medical channel, use :m."
icon_state = "med_cypherkey"
channels = list("Medical" = 1)
/obj/item/device/encryptionkey/headset_sci
name = "Science Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the science channel, use :n."
icon_state = "sci_cypherkey"
channels = list("Science" = 1)
/obj/item/device/encryptionkey/headset_medsci
name = "Medical Research Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the medical channel, use :m. For science, use :n."
icon_state = "medsci_cypherkey"
channels = list("Medical" = 1, "Science" = 1)
channels = list("Science" = 1, "Medical" = 1)
/obj/item/device/encryptionkey/headset_com
name = "Command Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the command channel, use :c."
icon_state = "com_cypherkey"
channels = list("Command" = 1)
/obj/item/device/encryptionkey/heads/captain
name = "Captain's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the science channel, use :n. For command, use :c."
icon_state = "rd_cypherkey"
channels = list("Science" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hos
name = "Head of Security's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the security channel, use :s. For command, use :c."
icon_state = "hos_cypherkey"
channels = list("Security" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/ce
name = "Chief Engineer's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the engineering channel, use :e. For command, use :c."
icon_state = "ce_cypherkey"
channels = list("Engineering" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/cmo
name = "Chief Medical Officer's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the medical channel, use :m. For command, use :c."
icon_state = "cmo_cypherkey"
channels = list("Medical" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/hop
name = "Head of Personnel's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. Channels are as follows: :u - supply, :v - service, :c - command."
icon_state = "hop_cypherkey"
channels = list("Supply" = 1, "Command" = 1, "Service" = 1, "Security" = 0)
/*
/obj/item/device/encryptionkey/headset_mine
name = "Mining Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
icon_state = "mine_cypherkey"
channels = list("Mining" = 1)
channels = list("Supply" = 1, "Service" = 1, "Command" = 1)
/obj/item/device/encryptionkey/heads/qm
name = "Quartermaster's Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
icon_state = "qm_cypherkey"
channels = list("Cargo" = 1, "Mining" = 1)
*/
/obj/item/device/encryptionkey/headset_cargo
name = "Supply Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the supply channel, use :u."
icon_state = "cargo_cypherkey"
channels = list("Supply" = 1)
/obj/item/device/encryptionkey/headset_service
name = "Service Radio Encryption Key"
desc = "An encryption key for a radio headset. Contains cypherkeys."
desc = "An encryption key for a radio headset. To access the service channel, use :v."
icon_state = "srv_cypherkey"
channels = list("Service" = 1)
@@ -20,6 +20,11 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/talk_into(mob/living/M as mob, message, channel)
if (!listening)
return
..()
/obj/item/device/radio/headset/receive_range(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
@@ -130,25 +135,11 @@
/obj/item/device/radio/headset/heads/hop
name = "head of personnel's headset"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :v - service, :c - command, :s - security"
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :v - service, :c - command."
icon_state = "com_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
/*
/obj/item/device/radio/headset/headset_mine
name = "mining radio headset"
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
icon_state = "mine_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_mine
/obj/item/device/radio/headset/heads/qm
name = "quartermaster's headset"
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
icon_state = "cargo_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/qm
*/
/obj/item/device/radio/headset/headset_cargo
name = "supply radio headset"
desc = "A headset used by the QM and his slaves. To access the supply channel, use :u."
@@ -163,6 +154,13 @@
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_service
/obj/item/device/radio/headset/headset_cent
name = "centcom headset"
desc = "A headset used by the upper echelons of Nanotrasen. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :v - service, :m - medical, :n - science."
icon_state = "cent_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
@@ -60,7 +60,7 @@
on = 0
else
var/area/A = src.loc.loc
if(!A || !isarea(A) || !A.master)
if(!A || !isarea(A) || !A.master || emped)
on = 0
else
on = A.master.powered(EQUIP) // set "on" to the power status
+37 -17
View File
@@ -24,6 +24,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/maxf = 1499
var/emped = 0 // since radios don't use machinery stat binary flags they get a seperate variable
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
@@ -83,11 +84,14 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/dat = ""
if(!istype(src, /obj/item/device/radio/headset)) //Headsets dont get a mic button
dat += "<b>Microphone:</b> [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>"
dat += {"
if(!istype(src, /obj/item/device/radio/headset))
dat += {"
<b>Microphone:</b> [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>
<b>Speaker:</b> [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
"}
else //Headsets dont get a mic button, speaker controls both
dat += "<b>Power:</b> [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>"
dat += {"
<b>Frequency:</b>
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A>
@@ -116,8 +120,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
var/list = !!(chan_stat&FREQ_LISTENING)!=0
return {"
<B>[chan_name]</B><br>
Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
<B>[chan_name]</B>: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[list ? "Engaged" : "Disengaged"]</A><BR>
"}
/obj/item/device/radio/Topic(href, href_list)
@@ -223,6 +226,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
channel = channels[1]
connection = secure_radio_connections[channel]
if (!channels[channel]) // if the channel is turned off, don't broadcast
return
else
connection = radio_connection
channel = null
@@ -246,9 +251,23 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/jobname // the mob's "job"
// --- Human: use their actual job ---
// --- Human: use their job as seen on the crew manifest - makes it unneeded to carry an ID for an AI to see their job
if (ishuman(M))
jobname = M:get_assignment()
var/voice = M.GetVoice() // Why reinvent the wheel when there is a proc that does nice things already
var/datum/data/record/findjob
for (var/datum/data/record/t in data_core.general)
if(t.fields["name"] == voice)
findjob = t
break
if(voice != real_name)
displayname = voice
voicemask = 1
if(findjob)
jobname = findjob.fields["rank"]
else
jobname = "Unknown"
// --- Carbon Nonhuman ---
else if (iscarbon(M)) // Nonhuman carbon mob
@@ -271,15 +290,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
jobname = "Unknown"
// --- Modifications to the mob's identity ---
// The mob is disguising their identity:
if (ishuman(M) && M.GetVoice() != real_name)
displayname = M.GetVoice()
jobname = "Unknown"
voicemask = 1
/* ###### Radio headsets can only broadcast through subspace ###### */
@@ -657,10 +667,20 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
else return
/obj/item/device/radio/emp_act(severity)
if (emped == 1) //
return
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
loc << "<span class='warning'>\The [src] overloads.</span>"
broadcasting = 0
listening = 0
for (var/ch_name in channels)
channels[ch_name] = 0
on = 0
spawn(200)
emped = 0
if (!istype(src, /obj/item/device/radio/intercom)) // intercoms will turn back on on their own
on = 1
emped = 1
..()
///////////////////////////////
+1 -1
View File
@@ -61,7 +61,7 @@
user.put_in_hands(src)
user << "You take the target out of the stake."
else
src.loc = get_turf_loc(user)
src.loc = get_turf(user)
user << "You take the target out of the stake."
stake.pinned_target = null
+64 -52
View File
@@ -228,78 +228,90 @@
return 0
/*
* Glass shards - TODO: Move this into code/game/object/item/weapons
*/
/obj/item/weapon/shard/Bump()
spawn( 0 )
if (prob(20))
src.force = 15
else
src.force = 4
..()
return
return
/obj/item/weapon/shard
name = "shard"
desc = "A nasty looking shard of glass."
icon = 'icons/obj/shards.dmi'
icon_state = "large"
w_class = 1.0
force = 5.0
throwforce = 15.0
item_state = "shard-glass"
g_amt = 3750
attack_verb = list("stabbed", "slashed", "sliced", "cut")
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the shard of glass! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the shard of glass! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/obj/item/weapon/shard/New()
src.icon_state = pick("large", "medium", "small")
switch(src.icon_state)
icon_state = pick("large", "medium", "small")
switch(icon_state)
if("small")
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
if("medium")
src.pixel_x = rand(-8, 8)
src.pixel_y = rand(-8, 8)
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
if("large")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
else
return
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/shard/attack(mob/M, mob/user)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
..()
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
/obj/item/weapon/shard/afterattack(atom/A as mob|obj, mob/user)
if(isturf(A))
return
if(istype(A, /obj/item/weapon/storage))
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.gloves)
H << "<span class='warning'>[src] cuts into your hand!</span>"
var/organ = (H.hand ? "l_" : "r_") + "arm"
var/datum/limb/affecting = H.get_organ(organ)
if(affecting.take_damage(force / 2))
H.update_damage_overlays(0)
else if(isliving(user))
var/mob/living/L = user
L << "<span class='warning'>[src] cuts into your hand!</span>"
L.adjustBruteLoss(force / 2)
/obj/item/weapon/shard/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/G in user.loc)
if(G==NG)
for(var/obj/item/stack/sheet/glass/G in user.loc)
if(G == NG)
continue
if(G.amount>=G.max_amount)
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
user << "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>"
del(src)
return
return ..()
..()
/obj/item/weapon/shard/HasEntered(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step in the broken glass!</B>"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1)
if(ishuman(M))
var/mob/living/carbon/human/H = M
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(!H.shoes)
H << "<span class='userdanger'>You step in the broken glass!</span>"
var/datum/limb/affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if(affecting.take_damage(5, 0))
H.update_damage_overlays(0)
H.updatehealth()
..()
/obj/item/weapon/shard/afterattack(atom/A as mob|obj, mob/living/carbon/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.gloves)
H << "<span class='warning'>\The [src] cuts into your hand!</span>"
var/organ = ((H.hand ? "l_":"r_") + "arm")
var/datum/limb/affecting = H.get_organ(organ)
if(affecting.take_damage(force/2))
H.update_damage_overlays(0)
else
user << "<span class='warning'>\The [src] cuts into your hand!</span>"
user.take_organ_damage(force/2)
..()
+1 -1
View File
@@ -160,7 +160,7 @@
..()
/obj/item/weapon/card/id/centcom
name = "\improper CentCom. ID"
name = "\improper Centcom ID"
desc = "An ID straight from Cent. Com."
icon_state = "centcom"
registered_name = "Central Command"
+119 -3
View File
@@ -1,3 +1,5 @@
//In this file: Plastic explosives (C4) and Syndicate Bombs
/obj/item/weapon/plastique
name = "plastic explosives"
desc = "Used to put holes in specific areas without too much extra hole."
@@ -36,10 +38,10 @@
return .
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
if(isscrewdriver(I))
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
else if(iswirecutter(I) || ismultitool(I) || istype(I, /obj/item/device/assembly/signaler ))
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
wires.Interact(user)
else
..()
@@ -97,4 +99,118 @@
del(src)
/obj/item/weapon/plastique/attack(mob/M as mob, mob/user as mob, def_zone)
return
return
/obj/item/weapon/syndicatebomb
icon = 'icons/obj/assemblies.dmi'
name = "Syndicate Bomb"
icon_state = "syndicate-bomb-inactive"
item_state = "bomb"
desc = "A large and menacing device capable of terrible destruction"
origin_tech = "materials=3;magnets=4;syndicate=4"
w_class = 4.0
unacidable = 1
var/datum/wires/syndicatebomb/wires = null
var/timer = 60
var/open_panel = 0 //are the wires exposed?
var/active = 0 //is the bomb counting down?
var/defused = 0 //is the bomb capable of exploding?
/obj/item/weapon/syndicatebomb/process()
if(active && !defused && (timer > 0)) //Tick Tock
timer--
if(active && !defused && (timer <= 0)) //Boom
active = 0
timer = 60
processing_objects.Remove(src)
explosion(src.loc,2,5,11)
del(src)
return
if(!active || defused) //Counter terrorists win
processing_objects.Remove(src)
return
/obj/item/weapon/syndicatebomb/New()
wires = new(src)
..()
/obj/item/weapon/syndicatebomb/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/wrench))
if(!anchored)
if(!isturf(src.loc) || istype(src.loc, /turf/space))
user << "<span class='notice'>The bomb must be placed on solid ground to attach it</span>"
else
user << "<span class='notice'>You firmly wrench the bomb to the floor</span>"
playsound(loc, 'sound/items/ratchet.ogg', 50, 1)
anchored = 1
if(active)
user << "<span class='notice'>The bolts lock in place</span>"
else
if(!active)
user << "<span class='notice'>You wrench the bomb from the floor</span>"
playsound(loc, 'sound/items/ratchet.ogg', 50, 1)
anchored = 0
else
user << "<span class='warning'>The bolts are locked down!</span>"
else if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
if(!active)
icon_state = "syndicate-bomb-inactive[open_panel ? "-wires" : ""]"
else
icon_state = "syndicate-bomb-active[open_panel ? "-wires" : ""]"
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
if(open_panel)
wires.Interact(user)
else
..()
/obj/item/weapon/syndicatebomb/attack_hand(var/mob/user)
if(anchored)
if(open_panel)
wires.Interact(user)
else if(!active)
settings()
else
user << "<span class='notice'>The bomb is bolted to the floor, you'll have to unbolt it first!</span>"
else
..()
/obj/item/weapon/syndicatebomb/attack_self(mob/user as mob)
if(open_panel)
wires.Interact(user)
else if(!active)
settings()
else
user << "<span class='notice'>The bomb is counting down, the settings can't be changed now!</span>"
/obj/item/weapon/syndicatebomb/proc/settings(var/mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", "[timer]") as num
newtime = Clamp(newtime, 30, 60000)
if(in_range(src, usr) && isliving(usr)) //No running off and setting bombs from across the station
timer = newtime
src.loc.visible_message("\blue \icon[src] timer set for [timer] seconds.")
if(alert(usr,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, usr) && isliving(usr))
if(defused || active)
if(defused)
src.loc.visible_message("\blue \icon[src] Device error: User intervention required")
return
else
src.loc.visible_message("\red \icon[src] [timer] seconds until detonation, please clear the area.")
playsound(loc, 'sound/machines/click.ogg', 30, 1)
icon_state = "syndicate-bomb-active"
active = 1
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
bombers += log_str
message_admins(log_str)
log_game(log_str)
processing_objects.Add(src) //Ticking down
@@ -70,7 +70,7 @@
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
if(iswrench(W) && !status)//Taking this apart
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
@@ -85,7 +85,7 @@
del(src)
return
if(isscrewdriver(W) && igniter && !lit)
if(istype(W, /obj/item/weapon/screwdriver) && igniter && !lit)
status = !status
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
update_icon()
@@ -1,301 +1,258 @@
#define EMPTY 0
#define WIRED 1
#define READY 2
/obj/item/weapon/grenade/chem_grenade
name = "Grenade Casing"
name = "grenade casing"
desc = "A do it yourself grenade casing!"
icon_state = "chemg"
item_state = "flashbang"
w_class = 2.0
force = 2.0
var/stage = 0
var/state = 0
var/path = 0
var/obj/item/weapon/circuitboard/circuit = null
var/list/beakers = new/list()
w_class = 2
force = 2
var/stage = EMPTY
var/list/beakers = list()
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
var/affected_area = 3
var/obj/item/device/assembly/trigger = null // Grenade assemblies by Sayu
var/obj/item/device/assembly_holder/nadeassembly = null
New()
create_reagents(1000)
verbs -= /obj/item/weapon/grenade/chem_grenade/verb/rotate // only used for infrared beam grenades
// When constructing a grenade in code rather than by hand
// Pass in the path to an assembly -Sayu
proc/CreateDefaultTrigger(var/type)
if(!ispath(type,/obj/item/device/assembly) || (type in list(/obj/item/device/assembly,/obj/item/device/assembly/igniter)))
return
if(trigger) del trigger
if(type == /obj/item/device/assembly/signaler) type = /obj/item/device/assembly/signaler/reciever
if(type == /obj/item/device/assembly/infra)
verbs += /obj/item/weapon/grenade/chem_grenade/verb/rotate
/obj/item/weapon/grenade/chem_grenade/New()
create_reagents(1000)
trigger = new type(src)
if(!trigger.secured) // some assemblies require this
trigger.toggle_secure() // so they can add themselves to processing_objects()
attack_self(mob/user as mob)
if(stage > 1 && !active && trigger)
if(clown_check(user))
trigger.activate()
user << "<span class='warning'>You prime the [name]! [trigger.describe()]</span>"
/obj/item/weapon/grenade/chem_grenade/examine()
set src in usr
..()
if(stage == READY && !nadeassembly)
usr << "The timer is set to [det_time/10] second\s."
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
HasEntered(AM as mob|obj)
if(trigger && trigger.secured)
trigger.HasEntered(AM)
/obj/item/weapon/grenade/chem_grenade/attack_self(mob/user)
if(stage == READY && !active)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
message_admins(log_str)
log_game(log_str)
if(nadeassembly)
nadeassembly.attack_self(user)
else if(clown_check(user))
user << "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>"
active = 1
icon_state = initial(icon_state) + "_active"
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
HasProximity(atom/movable/AM as mob|obj)
if(trigger && trigger.secured)
trigger.HasProximity(AM)
spawn(det_time)
prime()
examine()
set src in usr
usr << desc
if(trigger)
if(trigger.secured)
usr << trigger.describe()
else
usr << "The [trigger] is not properly secured."
if(/obj/item/weapon/grenade/chem_grenade/verb/rotate in verbs)
usr << "The sensor is rigged to face [dir2text(dir)]"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/assembly_holder) && !stage && path != 2)
var/obj/item/device/assembly/igniter/I = locate() in W
if(!I)
user << "You need an igniter if you're going to make any sort of bomb!"
return
I.loc = src // make the igniter no longer [in W]
trigger = locate() in W // should be one other assembly
if(!trigger)
warning("Could not find trigger assembly in assembly holder: [W]")
user << "You attempt to fit the [W] to the [src], but fail. It seems something is wrong with the [W]."
I.loc = W
trigger = null
return
//If you add a new assembly, create a new effective grenade type here
//If you don't, grenade construction will fail.
switch(trigger.type)
if(/obj/item/device/assembly/infra)
name = "unsecured tripwire mine"
desc = "A grenade casing with an infrared tripwire assembly."
verbs += /obj/item/weapon/grenade/chem_grenade/verb/rotate
if(/obj/item/device/assembly/mousetrap,/obj/item/device/assembly/mousetrap/armed)
name = "unsecured contact mine"
desc = "A grenade casing with a pressure switch assembly."
var/obj/item/device/assembly/mousetrap/M = trigger
M.armed = 0 // Make it safe
if(/obj/item/device/assembly/prox_sensor)
name = "unsecured proximity mine"
desc = "A grenade casing with a short-range sensor assembly."
if(/obj/item/device/assembly/signaler)
name = "unsecured remote mine"
desc = "A grenade casing with a radio tranciever assembly."
var/obj/item/device/assembly/signaler/reciever/R = new (src)
var/obj/item/device/assembly/signaler/S = trigger
R.frequency = S.frequency
R.code = S.code
trigger = R
del S
if(/obj/item/device/assembly/timer)
name = "unsecured grenade"
desc = "A grenade casing with a timer assembly."
else
user << "You need some sort of trigger mechanism!"
I.loc = W
trigger = null
return // Cancel construction
trigger.loc = src // Take the trigger mechanism for safe keeping
del I // The igniter assembly doesn't *actually* do anything
del W // The assembly holder is no longer needed
icon_state = initial(icon_state) +"_ass"
stage = 1
path = 1
user << "\blue You add [W] to the metal casing."
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
else if(istype(W,/obj/item/device/multitool) && trigger && trigger.secured)
trigger.interact(user) // Set trigger options
else if(istype(W,/obj/item/weapon/screwdriver) && stage == 1 && path != 2)
path = 1
/obj/item/weapon/grenade/chem_grenade/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/screwdriver))
if(stage == WIRED)
if(beakers.len)
switch(trigger.type)
if(/obj/item/device/assembly/infra)
name = "tripwire mine"
if(/obj/item/device/assembly/mousetrap,/obj/item/device/assembly/mousetrap/armed)
name = "contact mine"
if(/obj/item/device/assembly/prox_sensor)
name = "proximity mine"
if(/obj/item/device/assembly/signaler/reciever)
name = "remote mine"
if(/obj/item/device/assembly/timer)
name = "grenade"
else
warning("Bad trigger in grenade during final construction: [trigger]")
if(!trigger.secured)
trigger.toggle_secure() // Necessary for some assemblies
user << "\blue You lock the assembly."
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
user << "<span class='notice'>You lock the assembly.</span>"
playsound(loc, 'sound/items/Screwdriver.ogg', 25, -3)
icon_state = initial(icon_state) +"_locked"
stage = 2
stage = READY
else
user << "\red You need to add at least one beaker before locking the assembly."
user << "<span class='notice'>You need to add at least one beaker before locking the assembly.</span>"
else if(stage == READY && !nadeassembly)
det_time = det_time == 50 ? 30 : 50 //toggle between 30 and 50
user << "<span class='notice'>You modify the time delay. It's set for [det_time / 10] second\s.</span>"
else if(stage == EMPTY)
user << "<span class='notice'>You need to add an activation mechanism.</span>"
else if(is_type_in_list(W, allowed_containers) && stage == 1 && path != 2)
path = 1
if(beakers.len == 2)
user << "\red The grenade can not hold more containers."
return
else if(stage == WIRED && is_type_in_list(I, allowed_containers))
if(beakers.len == 2)
user << "<span class='notice'>[src] can not hold more containers.</span>"
return
else
if(I.reagents.total_volume)
user << "<span class='notice'>You add [I] to the assembly.</span>"
user.drop_item()
I.loc = src
beakers += I
else
if(W.reagents.total_volume)
user << "\blue You add \the [W] to the assembly."
user.drop_item()
W.loc = src
beakers += W
else
user << "\red \the [W] is empty."
user << "<span class='notice'>[I] is empty.</span>"
prime()
//if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume) has_reagents = 1
if(!has_reagents)
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
state = 0
else if(stage == EMPTY && istype(I, /obj/item/device/assembly_holder))
var/obj/item/device/assembly_holder/A = I
if(!A.secured)
return
if(isigniter(A.a_left) == isigniter(A.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
user.drop_item()
nadeassembly = A
A.master = src
A.loc = src
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
stage = WIRED
icon_state = initial(icon_state) + "_ass"
user << "<span class='notice'>You add [A] to [src]!</span>"
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
else if(stage == EMPTY && istype(I, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = I
C.use(1)
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
stage = WIRED
icon_state = initial(icon_state) + "_ass"
user << "<span class='notice'>You rig [src].</span>"
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters))
user << "<span class='notice'>You unlock the assembly.</span>"
icon_state = initial(icon_state) + "_ass"
stage = WIRED
else if(stage == WIRED && istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You open the grenade and remove the contents.</span>"
icon_state = initial(icon_state)
stage = EMPTY
if(nadeassembly)
nadeassembly.loc = get_turf(src)
nadeassembly.master = null
nadeassembly = null
if(beakers.len)
for(var/obj/O in beakers)
O.loc = get_turf(src)
beakers = list()
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
/*else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)*/
//assembly stuff
/obj/item/weapon/grenade/chem_grenade/receive_signal()
prime()
//This hack is necessary for infrared beam grenades.
//That said, you don't come across infrared sensors much...
verb/rotate()
set name = "Rotate Grenade"
set category = "Object"
set src in usr
/obj/item/weapon/grenade/chem_grenade/HasProximity(atom/movable/AM)
if(nadeassembly)
nadeassembly.HasProximity(AM)
dir = turn(dir, 90)
usr << "The grenade is now facing [dir2text(dir)]"
trigger.dir = dir
/obj/item/weapon/grenade/chem_grenade/HasEntered(atom/movable/AM)
if(nadeassembly)
nadeassembly.HasEntered(AM)
/obj/item/weapon/grenade/chem_grenade/on_found(mob/finder)
if(nadeassembly)
nadeassembly.on_found(finder)
/obj/item/weapon/grenade/chem_grenade/hear_talk(mob/living/M, msg)
if(nadeassembly)
nadeassembly.hear_talk(M, msg)
/obj/item/weapon/grenade/chem_grenade/prime()
if(stage != READY)
return
// Large chem grenades accept slime cores and use the appropriately.
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume)
has_reagents = 1
if(!has_reagents)
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
return
playsound(loc, 'sound/effects/bamf.ogg', 50, 1)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
if(reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, loc))
if(A == src)
continue
reagents.reaction(A, 1, 10)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
//Large chem grenades accept slime cores and use the appropriately.
/obj/item/weapon/grenade/chem_grenade/large
name = "Large Chem Grenade"
name = "large chem grenade"
desc = "An oversized grenade that affects a larger area."
icon_state = "large_grenade"
allowed_containers = list(/obj/item/weapon/reagent_containers/glass,/obj/item/weapon/reagent_containers/food/condiment,
/obj/item/weapon/reagent_containers/food/drinks)
origin_tech = "combat=3;materials=3"
affected_area = 4
prime()
if(stage < 2)
return // Signaller on an incomplete grenade, probably
var/has_reagents = 0
var/obj/item/slime_extract/valid_core = null
/obj/item/weapon/grenade/chem_grenade/large/prime()
if(stage != READY)
return
var/has_reagents = 0
var/obj/item/slime_extract/valid_core = null
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(!istype(G)) continue
if(G.reagents.total_volume) has_reagents = 1
for(var/obj/item/slime_extract/E in beakers)
if(!istype(E)) continue
if(E.Uses) valid_core = E
if(E.reagents.total_volume) has_reagents = 1
if(!has_reagents)
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
return
playsound(loc, 'sound/effects/bamf.ogg', 50, 1)
if(valid_core)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(!istype(G)) continue
if(G.reagents.total_volume) has_reagents = 1
for(var/obj/item/slime_extract/E in beakers)
if(!istype(E)) continue
if(E.Uses) valid_core = E
if(E.reagents.total_volume) has_reagents = 1
G.reagents.trans_to(valid_core, G.reagents.total_volume)
if(!has_reagents)
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
state = 0
if(trigger)
trigger.toggle_secure()
return
//If there is still a core (sometimes it's used up)
//and there are reagents left, behave normally
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
if(valid_core && valid_core.reagents && valid_core.reagents.total_volume)
valid_core.reagents.trans_to(src,valid_core.reagents.total_volume)
else
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
if(valid_core)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(valid_core, G.reagents.total_volume)
if(reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
// If there is still a core (sometimes it's used up)
// and there are reagents left, behave normally
for(var/atom/A in view(affected_area, loc))
if( A == src ) continue
reagents.reaction(A, 1, 10)
if(valid_core && valid_core.reagents && valid_core.reagents.total_volume)
valid_core.reagents.trans_to(src,valid_core.reagents.total_volume)
else
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
//I tried to just put it in the allowed_containers list but
//if you do that it must have reagents. If you're going to
//make a special case you might as well do it explicitly. -Sayu
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/slime_extract) && stage == 1 && path != 2)
user << "\blue You add \the [W] to the assembly."
user.drop_item()
W.loc = src
beakers += W
else
return ..(W,user)
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
user << "<span class='notice'>You add [I] to the assembly.</span>"
user.drop_item()
I.loc = src
beakers += I
else
return ..()
/obj/item/weapon/grenade/chem_grenade/metalfoam
name = "Metal-Foam Grenade"
name = "metal foam grenade"
desc = "Used for emergency sealing of air breaches."
path = 1
stage = 2
stage = READY
New()
..()
@@ -310,13 +267,11 @@
beakers += B2
icon_state = "grenade"
CreateDefaultTrigger(/obj/item/device/assembly/timer)
/obj/item/weapon/grenade/chem_grenade/incendiary
name = "Incendiary Grenade"
name = "incendiary grenade"
desc = "Used for clearing rooms of living things."
path = 1
stage = 2
stage = READY
New()
..()
@@ -331,13 +286,11 @@
beakers += B2
icon_state = "grenade"
CreateDefaultTrigger(/obj/item/device/assembly/timer)
/obj/item/weapon/grenade/chem_grenade/antiweed
name = "weedkiller grenade"
desc = "Used for purging large areas of invasive plant species. Contents under pressure. Do not directly inhale contents."
path = 1
stage = 2
stage = READY
New()
..()
@@ -353,13 +306,11 @@
beakers += B2
icon_state = "grenade"
CreateDefaultTrigger(/obj/item/device/assembly/timer)
/obj/item/weapon/grenade/chem_grenade/cleaner
name = "cleaner grenade"
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = 2
path = 1
stage = READY
New()
..()
@@ -374,13 +325,11 @@
beakers += B2
icon_state = "grenade"
CreateDefaultTrigger(/obj/item/device/assembly/timer)
/obj/item/weapon/grenade/chem_grenade/teargas
name = "teargas grenade"
desc = "Used for nonlethal riot control. Contents under pressure. Do not directly inhale contents."
path = 1
stage = 2
stage = READY
New()
..()
@@ -396,4 +345,6 @@
beakers += B2
icon_state = "grenade"
CreateDefaultTrigger(/obj/item/device/assembly/timer)
#undef EMPTY
#undef WIRED
#undef READY
@@ -60,6 +60,11 @@
active = 1
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
message_admins(log_str)
log_game(log_str)
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
@@ -79,7 +84,7 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
if(istype(W, /obj/item/weapon/screwdriver))
switch(det_time)
if ("1")
det_time = 10
@@ -0,0 +1,13 @@
/obj/item/weapon/grenade/syndieminibomb
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
name = "syndicate minibomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4;syndicate=4"
prime()
explosion(src.loc,1,2,4)
del(src)
return
@@ -24,6 +24,10 @@
/obj/item/weapon/implant/proc/get_data()
return "No information available"
/obj/item/weapon/implant/dropped(mob/user as mob)
. = 1
del src
return .
/obj/item/weapon/implant/tracking
name = "tracking"
@@ -109,6 +109,5 @@
icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi'
icon_state = "yellow slime extract" //"potato_battery"
maxcharge = 10000
maxcharge = 10000
m_amt = 0
g_amt = 0
@@ -16,8 +16,8 @@
return
if("screwed")
new /obj/effect/spawner/newbomb/timer/syndicate(src)
new /obj/effect/spawner/newbomb/timer/syndicate(src)
new /obj/item/weapon/syndicatebomb(src)
new /obj/item/weapon/grenade/syndieminibomb(src)
new /obj/item/device/powersink(src)
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
+3 -3
View File
@@ -32,9 +32,9 @@
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
if(bcell)
bcell.use(chrgdeductamt)
if(bcell.charge < chrgdeductamt)
if(bcell.use(chrgdeductamt))
return 1
else
status = 0
update_icon()
return 0
@@ -1,32 +1,20 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/tank/jetpack
name = "Jetpack (Empty)"
name = "jetpack (empty)"
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
w_class = 4.0
item_state = "jetpack"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
action_button_name = "Toggle Jetpack"
var/datum/effect/effect/system/ion_trail_follow/ion_trail
var/on = 0.0
var/stabilization_on = 0
var/volume_rate = 500 //Needed for borg jetpack transfer
action_button_name = "Toggle Jetpack"
New()
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
ion_trail.set_up(src)
verb/toggle_rockets()
@@ -73,29 +61,29 @@
/obj/item/weapon/tank/jetpack/void
name = "Void Jetpack (Oxygen)"
name = "void jetpack (oxygen)"
desc = "It works well in a void."
icon_state = "jetpack-void"
item_state = "jetpack-void"
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/oxygen
name = "Jetpack (Oxygen)"
name = "jetpack (oxygen)"
desc = "A tank of compressed oxygen for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
item_state = "jetpack"
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/carbondioxide
name = "Jetpack (Carbon Dioxide)"
name = "jetpack (carbon dioxide)"
desc = "A tank of compressed carbon dioxide for use as propulsion in zero-gravity areas. Painted black to indicate that it should not be used as a source for internals."
distribute_pressure = 0
icon_state = "jetpack-black"
@@ -103,15 +91,6 @@
New()
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.carbon_dioxide < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
return
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
ion_trail.set_up(src)
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+2
View File
@@ -171,9 +171,11 @@
var/obj/item/stack/rods/R = I
R.use(1)
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
user.drop_from_inventory(src)
loc = F
F.weldtool = src
add_fingerprint(user)
user.put_in_hands(F)
return
..()