initial commit - game folder + maps + dme
This commit is contained in:
@@ -173,7 +173,7 @@ AI MODULES
|
||||
/******************** OneHuman ********************/
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman
|
||||
name = "'OneCrew' AI Module"
|
||||
name = "'OneCrew' AI Module"//CIT CHANGE - changes onehuman to onecrew
|
||||
var/targetName = ""
|
||||
laws = list("Only SUBJECT is crew.")
|
||||
|
||||
@@ -554,3 +554,16 @@ AI MODULES
|
||||
/obj/item/aiModule/core/full/peacekeeper
|
||||
name = "'Peacekeeper' Core AI Module"
|
||||
law_id = "peacekeeper"
|
||||
|
||||
// Bad times ahead
|
||||
|
||||
/obj/item/aiModule/core/full/damaged
|
||||
name = "damaged Core AI Module"
|
||||
desc = "An AI Module for programming laws to an AI. It looks slightly damaged."
|
||||
|
||||
/obj/item/aiModule/core/full/damaged/install(datum/ai_laws/law_datum, mob/user)
|
||||
laws += generate_ion_law()
|
||||
while (prob(75))
|
||||
laws += generate_ion_law()
|
||||
..()
|
||||
laws = list()
|
||||
|
||||
@@ -291,25 +291,25 @@ ARCD
|
||||
if("Public")
|
||||
airlock_type = /obj/machinery/door/airlock/public/glass
|
||||
if("Engineering")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_engineering
|
||||
airlock_type = /obj/machinery/door/airlock/engineering/glass
|
||||
if("Atmospherics")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_atmos
|
||||
airlock_type = /obj/machinery/door/airlock/atmos/glass
|
||||
if("Security")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_security
|
||||
airlock_type = /obj/machinery/door/airlock/security/glass
|
||||
if("Command")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_command
|
||||
airlock_type = /obj/machinery/door/airlock/command/glass
|
||||
if("Medical")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_medical
|
||||
airlock_type = /obj/machinery/door/airlock/medical/glass
|
||||
if("Research")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_research
|
||||
airlock_type = /obj/machinery/door/airlock/research/glass
|
||||
if("Science")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_science
|
||||
airlock_type = /obj/machinery/door/airlock/science/glass
|
||||
if("Virology")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_virology
|
||||
airlock_type = /obj/machinery/door/airlock/virology/glass
|
||||
if("Mining")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_mining
|
||||
airlock_type = /obj/machinery/door/airlock/mining/glass
|
||||
if("Maintenance")
|
||||
airlock_type = /obj/machinery/door/airlock/glass_maintenance
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance/glass
|
||||
if("External")
|
||||
airlock_type = /obj/machinery/door/airlock/external/glass
|
||||
if("External Maintenance")
|
||||
|
||||
@@ -169,15 +169,20 @@
|
||||
loaded.item_color = colors[current_color_index]
|
||||
last = loaded.place_turf(get_turf(src), user, turn(user.dir, 180))
|
||||
is_empty(user) //If we've run out, display message
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/pre_loaded/Initialize () //Comes preloaded with cable, for testing stuff
|
||||
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
|
||||
. = ..()
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/rcl))
|
||||
current_color_index++;
|
||||
@@ -203,4 +208,4 @@
|
||||
item_state = "rcl"
|
||||
else
|
||||
icon_state = "rclg-1"
|
||||
item_state = "rclg-1"
|
||||
item_state = "rclg-1"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
/obj/item/bodybag
|
||||
name = "body bag"
|
||||
desc = "A folded bag designed for the storage and transportation of cadavers."
|
||||
@@ -79,4 +80,3 @@
|
||||
return
|
||||
loc.visible_message("<span class='warning'>[user] suddenly appears in front of [loc]!</span>", "<span class='userdanger'>[user] breaks free of [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -155,11 +155,6 @@ update_label("John Doe", "Clowny")
|
||||
name = "agent card"
|
||||
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE)
|
||||
var/anyone = FALSE //Can anyone forge the ID or just syndicate?
|
||||
|
||||
/obj/item/card/id/syndicate/nuke_leader
|
||||
name = "lead agent card"
|
||||
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
|
||||
|
||||
|
||||
/obj/item/card/id/syndicate/Initialize()
|
||||
. = ..()
|
||||
@@ -202,6 +197,10 @@ update_label("John Doe", "Clowny")
|
||||
/obj/item/card/id/syndicate/anyone
|
||||
anyone = TRUE
|
||||
|
||||
/obj/item/card/id/syndicate/nuke_leader
|
||||
name = "lead agent card"
|
||||
access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
|
||||
|
||||
/obj/item/card/id/syndicate_command
|
||||
name = "syndicate ID card"
|
||||
desc = "An ID straight from the Syndicate."
|
||||
@@ -355,4 +354,4 @@ update_label("John Doe", "Clowny")
|
||||
name = "APC Access ID"
|
||||
desc = "Special ID card to allow access to APCs."
|
||||
icon_state = "centcom"
|
||||
access = list(ACCESS_ENGINE_EQUIP)
|
||||
access = list(ACCESS_ENGINE_EQUIP)
|
||||
@@ -261,28 +261,29 @@
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
#define PATH_FREEZER /obj/machinery/atmospherics/components/unary/thermomachine/freezer
|
||||
#define PATH_HEATER /obj/machinery/atmospherics/components/unary/thermomachine/heater
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/Initialize()
|
||||
. = ..()
|
||||
if(prob(50))
|
||||
name = "Freezer (Machine Board)"
|
||||
build_path = /obj/machinery/atmospherics/components/unary/thermomachine/freezer
|
||||
else
|
||||
name = "Heater (Machine Board)"
|
||||
build_path = /obj/machinery/atmospherics/components/unary/thermomachine/heater
|
||||
|
||||
#define FREEZER /obj/item/circuitboard/machine/thermomachine/freezer
|
||||
#define HEATER /obj/item/circuitboard/machine/thermomachine/heater
|
||||
if(!build_path)
|
||||
if(prob(50))
|
||||
name = "Freezer (Machine Board)"
|
||||
build_path = PATH_FREEZER
|
||||
else
|
||||
name = "Heater (Machine Board)"
|
||||
build_path = PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/obj/item/circuitboard/new_type
|
||||
var/new_setting
|
||||
switch(build_path)
|
||||
if(FREEZER)
|
||||
new_type = HEATER
|
||||
if(PATH_FREEZER)
|
||||
new_type = /obj/item/circuitboard/machine/thermomachine/heater
|
||||
new_setting = "Heater"
|
||||
if(HEATER)
|
||||
new_type = FREEZER
|
||||
if(PATH_HEATER)
|
||||
new_type = /obj/item/circuitboard/machine/thermomachine/freezer
|
||||
new_setting = "Freezer"
|
||||
name = initial(new_type.name)
|
||||
build_path = initial(new_type.build_path)
|
||||
@@ -291,16 +292,16 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
#undef FREEZER
|
||||
#undef HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/heater
|
||||
name = "Heater (Machine Board)"
|
||||
build_path = /obj/machinery/atmospherics/components/unary/thermomachine/heater
|
||||
build_path = PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/thermomachine/freezer
|
||||
name = "Freezer (Machine Board)"
|
||||
build_path = /obj/machinery/atmospherics/components/unary/thermomachine/freezer
|
||||
build_path = PATH_FREEZER
|
||||
|
||||
#undef PATH_FREEZER
|
||||
#undef PATH_HEATER
|
||||
|
||||
/obj/item/circuitboard/machine/deep_fryer
|
||||
name = "circuit board (Deep Fryer)"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
var/colour = "red"
|
||||
var/open = FALSE
|
||||
|
||||
|
||||
/obj/item/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
colour = "purple"
|
||||
@@ -22,7 +21,6 @@
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/lipstick/random
|
||||
name = "lipstick"
|
||||
icon_state = "random_lipstick"
|
||||
@@ -33,8 +31,6 @@
|
||||
colour = pick("red","purple","lime","black","green","blue","white")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
|
||||
|
||||
/obj/item/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
@@ -103,7 +99,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
@@ -112,7 +107,6 @@
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
H.facial_hair_style = "Shaved"
|
||||
@@ -188,4 +182,4 @@
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
..()
|
||||
@@ -39,7 +39,7 @@
|
||||
var/list/runes = list("rune1","rune2","rune3","rune4","rune5","rune6")
|
||||
var/list/randoms = list(RANDOM_ANY, RANDOM_RUNE, RANDOM_ORIENTED,
|
||||
RANDOM_NUMBER, RANDOM_GRAFFITI, RANDOM_LETTER)
|
||||
var/list/graffiti_large_h = list("secborg", "paint")
|
||||
var/list/graffiti_large_h = list("secborg", "paint") // CIT CHANGE - removes yiff in hell graffiti
|
||||
|
||||
var/list/all_drawables
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
else if(drawing in numerals)
|
||||
temp = "number"
|
||||
|
||||
|
||||
var/graf_rot
|
||||
if(drawing in oriented)
|
||||
switch(user.dir)
|
||||
@@ -617,9 +618,6 @@
|
||||
spray_overlay.color = paint_color
|
||||
add_overlay(spray_overlay)
|
||||
|
||||
pre_noise = FALSE
|
||||
post_noise = TRUE
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg
|
||||
name = "cyborg spraycan"
|
||||
desc = "A metallic container containing shiny synthesised paint."
|
||||
|
||||
@@ -245,7 +245,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=54'><img src=pda_medbot.png>Bots Access</a></li>"
|
||||
if (cartridge.access & CART_JANITOR)
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=49'><img src=pda_bucket.png>Custodial Locator</a></li>"
|
||||
if (istype(cartridge.radio, /obj/item/radio/integrated/signal))
|
||||
if (istype(cartridge.radio))
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=40'><img src=pda_signaler.png>Signaler System</a></li>"
|
||||
if (cartridge.access & CART_NEWSCASTER)
|
||||
dat += "<li><a href='byond://?src=[REF(src)];choice=53'><img src=pda_notes.png>Newscaster Access </a></li>"
|
||||
@@ -511,8 +511,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if("Message")
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
src.create_message(U, P)
|
||||
src.create_message(U, locate(href_list["target"]))
|
||||
|
||||
if("MessageAll")
|
||||
src.send_to_all(U)
|
||||
@@ -594,49 +593,57 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
t = Gibberish(t, 100)
|
||||
return t
|
||||
|
||||
/obj/item/device/pda/proc/send_message(mob/living/user = usr,list/obj/item/device/pda/targets)
|
||||
/obj/item/device/pda/proc/send_message(mob/living/user, list/obj/item/device/pda/targets)
|
||||
var/message = msg_input(user)
|
||||
|
||||
if(!message || !targets.len)
|
||||
return
|
||||
|
||||
if(last_text && world.time < last_text + 5)
|
||||
return
|
||||
|
||||
var/multiple = targets.len > 1
|
||||
// Send the signal
|
||||
var/list/string_targets = list()
|
||||
for (var/obj/item/device/pda/P in targets)
|
||||
if (P.owner && P.ownjob) // != src is checked by the UI
|
||||
string_targets += "[P.owner] ([P.ownjob])"
|
||||
for (var/obj/machinery/computer/message_monitor/M in targets)
|
||||
// In case of "Reply" to a message from a console, this will make the
|
||||
// message be logged successfully. If the console is impersonating
|
||||
// someone by matching their name and job, the reply will reach the
|
||||
// impersonated PDA.
|
||||
string_targets += "[M.customsender] ([M.customjob])"
|
||||
if (!string_targets.len)
|
||||
return
|
||||
|
||||
var/datum/data_pda_msg/last_sucessful_msg
|
||||
for(var/obj/item/device/pda/P in targets)
|
||||
if(P == src)
|
||||
continue
|
||||
var/obj/machinery/message_server/MS = null
|
||||
MS = can_send(P)
|
||||
if(MS)
|
||||
var/datum/data_pda_msg/msg = MS.send_pda_message("[P.owner]","[owner]","[message]",photo)
|
||||
if(msg)
|
||||
last_sucessful_msg = msg
|
||||
if(!multiple)
|
||||
show_to_sender(msg)
|
||||
P.show_recieved_message(msg,src)
|
||||
if(!multiple)
|
||||
show_to_ghosts(user,msg)
|
||||
log_talk(user,"[key_name(user)] (PDA: [initial(name)]) sent \"[message]\" to [P.name]",LOGPDA)
|
||||
else
|
||||
if(!multiple)
|
||||
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
|
||||
return
|
||||
var/datum/signal/subspace/pda/signal = new(src, list(
|
||||
"name" = "[owner]",
|
||||
"job" = "[ownjob]",
|
||||
"message" = message,
|
||||
"targets" = string_targets
|
||||
))
|
||||
if (photo)
|
||||
signal.data["photo"] = photo
|
||||
signal.send_to_receivers()
|
||||
|
||||
// If it didn't reach, note that fact
|
||||
if (!signal.data["done"])
|
||||
to_chat(user, "<span class='notice'>ERROR: Server isn't responding.</span>")
|
||||
return
|
||||
|
||||
var/target_text = signal.format_target()
|
||||
// Log it in our logs
|
||||
tnote += "<i><b>→ To [target_text]:</b></i><br>[signal.format_message()]<br>"
|
||||
// Show it to ghosts
|
||||
var/ghost_message = "<span class='name'>[owner] </span><span class='game say'>PDA Message</span> --> <span class='name'>[target_text]</span>: <span class='message'>[signal.format_message()]</span>"
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
|
||||
to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]")
|
||||
// Log in the talk log
|
||||
log_talk(user, "[key_name(user)] (PDA: [initial(name)]) sent \"[message]\" to [target_text]", LOGPDA)
|
||||
// Reset the photo
|
||||
photo = null
|
||||
|
||||
if(multiple)
|
||||
show_to_sender(last_sucessful_msg,1)
|
||||
show_to_ghosts(user,last_sucessful_msg,1)
|
||||
log_talk(user,"[user] (PDA: [initial(name)]) sent \"[message]\" to Everyone",LOGPDA)
|
||||
|
||||
/obj/item/device/pda/proc/show_to_sender(datum/data_pda_msg/msg,multiple = 0)
|
||||
tnote += "<i><b>→ To [multiple ? "Everyone" : msg.recipient]:</b></i><br>[msg.message][msg.get_photo_ref()]<br>"
|
||||
|
||||
/obj/item/device/pda/proc/show_recieved_message(datum/data_pda_msg/msg,obj/item/device/pda/source)
|
||||
tnote += "<i><b>← From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(source)]'>[source.owner]</a> ([source.ownjob]):</b></i><br>[msg.message][msg.get_photo_ref()]<br>"
|
||||
/obj/item/device/pda/proc/receive_message(datum/signal/subspace/pda/signal)
|
||||
tnote += "<i><b>← From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
|
||||
|
||||
if (!silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
@@ -650,59 +657,21 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
L = get(src, /mob/living/silicon)
|
||||
|
||||
if(L && L.stat != UNCONSCIOUS)
|
||||
|
||||
var/hrefstart
|
||||
var/hrefend
|
||||
if (isAI(L))
|
||||
hrefstart = "<a href='?src=[REF(L)];track=[html_encode(source.owner)]'>"
|
||||
hrefstart = "<a href='?src=[REF(L)];track=[html_encode(signal.data["name"])]'>"
|
||||
hrefend = "</a>"
|
||||
|
||||
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][source.owner] ([source.ownjob])[hrefend], </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(source)]'>Reply</a>)")
|
||||
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[signal.format_message()] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>)")
|
||||
|
||||
update_icon()
|
||||
add_overlay(icon_alert)
|
||||
|
||||
/obj/item/device/pda/proc/show_to_ghosts(mob/living/user, datum/data_pda_msg/msg,multiple = 0)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] <span class='name'>[msg.sender] </span><span class='game say'>PDA Message</span> --> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>")
|
||||
|
||||
/obj/item/device/pda/proc/can_send(obj/item/device/pda/P)
|
||||
if(!P || QDELETED(P) || P.toff)
|
||||
return null
|
||||
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(GLOB.message_servers)
|
||||
for (var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
|
||||
var/datum/signal/signal = src.telecomms_process()
|
||||
|
||||
if(!P || QDELETED(P) || P.toff) //in case the PDA or mob gets destroyed during telecomms_process()
|
||||
return null
|
||||
|
||||
var/useTC = 0
|
||||
if(signal)
|
||||
if(signal.data["done"])
|
||||
useTC = 1
|
||||
var/turf/pos = get_turf(P)
|
||||
if(pos.z in signal.data["level"])
|
||||
useTC = 2
|
||||
|
||||
if(useTC == 2)
|
||||
return useMS
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/device/pda/proc/send_to_all(mob/living/U = usr)
|
||||
/obj/item/device/pda/proc/send_to_all(mob/living/U)
|
||||
send_message(U,get_viewable_pdas())
|
||||
|
||||
/obj/item/device/pda/proc/create_message(mob/living/U = usr, obj/item/device/pda/P)
|
||||
/obj/item/device/pda/proc/create_message(mob/living/U, obj/item/device/pda/P)
|
||||
send_message(U,list(P))
|
||||
|
||||
/obj/item/device/pda/AltClick()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "pda-clown"
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. The surface is coated with polytetrafluoroethylene and banana drippings."
|
||||
ttone = "honk"
|
||||
var/slipvictims = list()
|
||||
var/slipvictims = list() //CIT CHANGE - makes clown PDAs track unique people slipped
|
||||
|
||||
/obj/item/device/pda/clown/Initialize()
|
||||
. = ..()
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/obj/item/device/pda/clown/proc/AfterSlip(mob/living/carbon/human/M)
|
||||
if (istype(M) && (M.real_name != owner))
|
||||
slipvictims |=M
|
||||
slipvictims |= M //CIT CHANGE - makes clown PDAs track unique people slipped
|
||||
var/obj/item/cartridge/virus/clown/cart = cartridge
|
||||
if(istype(cart) && cart.charges < 5)
|
||||
cart.charges++
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/obj/item/radio/integrated/radio = null
|
||||
var/obj/item/integrated_signaler/radio = null
|
||||
|
||||
var/access = 0 //Bit flags_1 for cartridge access
|
||||
var/access = 0 //Bit flags for cartridge access
|
||||
|
||||
var/remote_door_id = ""
|
||||
|
||||
var/bot_access_flags = 0 //Bit flags_1. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT
|
||||
var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT | MULE_BOT | FLOOR_BOT | CLEAN_BOT | MED_BOT
|
||||
var/spam_enabled = 0 //Enables "Send to All" Option
|
||||
|
||||
var/obj/item/device/pda/host_pda = null
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
/obj/item/cartridge/signal/Initialize()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
radio = new(src)
|
||||
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
/obj/item/cartridge/rd/Initialize()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
radio = new(src)
|
||||
|
||||
/obj/item/cartridge/captain
|
||||
name = "\improper Value-PAK cartridge"
|
||||
@@ -188,20 +188,16 @@
|
||||
|
||||
/obj/item/cartridge/captain/New()
|
||||
..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
radio = new(src)
|
||||
|
||||
/obj/item/cartridge/proc/post_status(command, data1, data2)
|
||||
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS)
|
||||
|
||||
if(!frequency)
|
||||
return
|
||||
|
||||
var/datum/signal/status_signal = new
|
||||
status_signal.source = src
|
||||
status_signal.transmission_method = 1
|
||||
status_signal.data["command"] = command
|
||||
|
||||
var/datum/signal/status_signal = new(list("command" = command))
|
||||
switch(command)
|
||||
if("message")
|
||||
status_signal.data["msg1"] = data1
|
||||
@@ -217,7 +213,6 @@
|
||||
return
|
||||
switch(host_pda.mode)
|
||||
if(40) //signaller
|
||||
var/obj/item/radio/integrated/signal/S = radio
|
||||
menu = "<h4><img src=pda_signaler.png> Remote Signaling System</h4>"
|
||||
|
||||
menu += {"
|
||||
@@ -225,14 +220,14 @@
|
||||
Frequency:
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=-10'>-</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=-2'>-</a>
|
||||
[format_frequency(S.frequency)]
|
||||
[format_frequency(radio.frequency)]
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=2'>+</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Frequency;sfreq=10'>+</a><br>
|
||||
<br>
|
||||
Code:
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=-5'>-</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=-1'>-</a>
|
||||
[S.code]
|
||||
[radio.code]
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=1'>+</a>
|
||||
<a href='byond://?src=[REF(src)];choice=Signal Code;scode=5'>+</a><br>"}
|
||||
if (41) //crew manifest
|
||||
@@ -571,22 +566,17 @@ Code:
|
||||
active1 = null
|
||||
|
||||
if("Send Signal")
|
||||
spawn( 0 )
|
||||
var/obj/item/radio/integrated/signal/S = radio
|
||||
S.send_signal("ACTIVATE")
|
||||
return
|
||||
INVOKE_ASYNC(radio, /obj/item/integrated_signaler.proc/send_activation)
|
||||
|
||||
if("Signal Frequency")
|
||||
var/obj/item/radio/integrated/signal/S = radio
|
||||
var/new_frequency = sanitize_frequency(S.frequency + text2num(href_list["sfreq"]))
|
||||
S.set_frequency(new_frequency)
|
||||
var/new_frequency = sanitize_frequency(radio.frequency + text2num(href_list["sfreq"]))
|
||||
radio.set_frequency(new_frequency)
|
||||
|
||||
if("Signal Code")
|
||||
var/obj/item/radio/integrated/signal/S = radio
|
||||
S.code += text2num(href_list["scode"])
|
||||
S.code = round(S.code)
|
||||
S.code = min(100, S.code)
|
||||
S.code = max(1, S.code)
|
||||
radio.code += text2num(href_list["scode"])
|
||||
radio.code = round(radio.code)
|
||||
radio.code = min(100, radio.code)
|
||||
radio.code = max(1, radio.code)
|
||||
|
||||
if("Status")
|
||||
switch(href_list["statdisp"])
|
||||
|
||||
@@ -1,48 +1,31 @@
|
||||
/obj/item/radio/integrated
|
||||
// Radio Cartridge, essentially a remote signaler with limited spectrum.
|
||||
/obj/item/integrated_signaler
|
||||
name = "\improper PDA radio module"
|
||||
desc = "An electronic radio system of nanotrasen origin."
|
||||
desc = "An electronic radio system of Nanotrasen origin."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "power_mod"
|
||||
|
||||
var/on = FALSE //Are we currently active??
|
||||
var/menu_message = ""
|
||||
|
||||
/obj/item/radio/integrated/Initialize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/radio/integrated/Destroy()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Radio Cartridge, essentially a signaler.
|
||||
*/
|
||||
|
||||
|
||||
/obj/item/radio/integrated/signal
|
||||
var/frequency = 1457
|
||||
var/code = 30
|
||||
/obj/item/integrated_signaler
|
||||
var/frequency = FREQ_SIGNALER
|
||||
var/code = DEFAULT_SIGNALER_CODE
|
||||
var/last_transmission
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
/obj/item/integrated_signaler/Destroy()
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
/obj/item/integrated_signaler/Initialize()
|
||||
. = ..()
|
||||
if (src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
if (frequency < MIN_FREE_FREQ || frequency > MAX_FREE_FREQ)
|
||||
frequency = sanitize_frequency(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
/obj/item/integrated_signaler/proc/set_frequency(new_frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency)
|
||||
|
||||
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
|
||||
radio_connection = SSradio.return_frequency(frequency)
|
||||
|
||||
/obj/item/integrated_signaler/proc/send_activation()
|
||||
if(last_transmission && world.time < (last_transmission + 5))
|
||||
return
|
||||
last_transmission = world.time
|
||||
@@ -51,11 +34,5 @@
|
||||
var/turf/T = get_turf(src)
|
||||
GLOB.lastsignalers.Add("[time] <B>:</B> [usr.key] used [src] @ location ([T.x],[T.y],[T.z]) <B>:</B> [format_frequency(frequency)]/[code]")
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.source = src
|
||||
signal.encryption = code
|
||||
signal.data["message"] = message
|
||||
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
return
|
||||
var/datum/signal/signal = new(list("code" = code))
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_SIGNALER)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#define BUGMODE_LIST 0
|
||||
#define BUGMODE_MONITOR 1
|
||||
#define BUGMODE_TRACK 2
|
||||
|
||||
@@ -158,4 +158,4 @@
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
toolspeed = 0.1
|
||||
@@ -11,7 +11,7 @@
|
||||
var/sound/trigger_sound = 'sound/effects/pressureplate.ogg'
|
||||
var/obj/item/device/assembly/signaler/sigdev = null
|
||||
var/roundstart_signaller = FALSE
|
||||
var/roundstart_signaller_freq = 1447
|
||||
var/roundstart_signaller_freq = FREQ_PRESSURE_PLATE
|
||||
var/roundstart_signaller_code = 30
|
||||
var/roundstart_hide = FALSE
|
||||
var/removable_signaller = TRUE
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
/obj/item/device/radio/beacon/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/beacon/send_hear()
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/device/radio/beacon/verb/alter_signal(t as text)
|
||||
set name = "Alter Beacon's Signal"
|
||||
set category = "Object"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/on = TRUE
|
||||
var/code = 2
|
||||
var/frequency = 1449
|
||||
var/frequency = FREQ_ELECTROPACK
|
||||
var/shock_cooldown = 0
|
||||
|
||||
/obj/item/device/electropack/suicide_act(mob/user)
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/obj/item/device/electropack/Initialize()
|
||||
. = ..()
|
||||
SSradio.add_object(src, frequency, GLOB.RADIO_CHAT)
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
|
||||
/obj/item/device/electropack/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
@@ -67,7 +67,7 @@
|
||||
if(href_list["freq"])
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
SSradio.add_object(src, frequency, GLOB.RADIO_CHAT)
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
else
|
||||
if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
@@ -98,7 +98,7 @@
|
||||
return
|
||||
|
||||
/obj/item/device/electropack/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption != code)
|
||||
if(!signal || signal.data["code"] != code)
|
||||
return
|
||||
|
||||
if(isliving(loc) && on)
|
||||
@@ -144,80 +144,3 @@ Code:
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/device/electropack/shockcollar
|
||||
name = "shock collar"
|
||||
desc = "A reinforced metal collar. It seems to have some form of wiring near the front. Strange.."
|
||||
icon = 'icons/obj/clothing/neck.dmi'
|
||||
icon_state = "shockcollar"
|
||||
item_state = "shockcollar"
|
||||
body_parts_covered = NECK
|
||||
slot_flags = SLOT_NECK
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
strip_delay = 60
|
||||
equip_delay_other = 60
|
||||
materials = list(MAT_METAL=5000, MAT_GLASS=2000)
|
||||
var/tagname = null
|
||||
|
||||
/obj/item/device/electropack/shockcollar/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(slot_flags == SLOT_NECK)
|
||||
if(user.get_item_by_slot(slot_neck))
|
||||
to_chat(user, "<span class='warning'>The collar is fastened tight! You'll need help taking this off!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/electropack/shockcollar/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption != code)
|
||||
return
|
||||
|
||||
if(isliving(loc) && on)
|
||||
if(shock_cooldown != 0)
|
||||
return
|
||||
shock_cooldown = 1
|
||||
spawn(100)
|
||||
shock_cooldown = 0
|
||||
var/mob/living/L = loc
|
||||
step(L, pick(GLOB.cardinals))
|
||||
|
||||
to_chat(L, "<span class='danger'>You feel a sharp shock from the collar!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, L)
|
||||
s.start()
|
||||
|
||||
L.Knockdown(100)
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
/obj/item/device/electropack/shockcollar/attack_self(mob/user) //Turns out can't fully source this from the parent item, spritepath gets confused if power toggled. Will come back to this when I know how to code better and readd powertoggle..
|
||||
var/option = "Change Name"
|
||||
option = input(user, "What do you want to do?", "[src]", option) as null|anything in list("Change Name", "Change Frequency")
|
||||
switch(option)
|
||||
if("Change Name")
|
||||
var/t = input(user, "Would you like to change the name on the tag?", "Name your new pet", tagname ? tagname : "Spot") as null|text
|
||||
if(t)
|
||||
tagname = copytext(sanitize(t), 1, MAX_NAME_LEN)
|
||||
name = "[initial(name)] - [tagname]"
|
||||
if("Change Frequency")
|
||||
if(!ishuman(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = {"<SK><BR>
|
||||
<B>Frequency/Code</B> for shock collar:<BR>
|
||||
Frequency:
|
||||
<A href='byond://?src=\ref[src];freq=-10'>-</A>
|
||||
<A href='byond://?src=\ref[src];freq=-2'>-</A> [format_frequency(frequency)]
|
||||
<A href='byond://?src=\ref[src];freq=2'>+</A>
|
||||
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
|
||||
Code:
|
||||
<A href='byond://?src=\ref[src];code=-5'>-</A>
|
||||
<A href='byond://?src=\ref[src];code=-1'>-</A> [code]
|
||||
<A href='byond://?src=\ref[src];code=1'>+</A>
|
||||
<A href='byond://?src=\ref[src];code=5'>+</A><BR>
|
||||
</SK>"}
|
||||
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "cypherkey"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/translate_binary = 0
|
||||
var/syndie = 0
|
||||
var/translate_binary = FALSE
|
||||
var/syndie = FALSE
|
||||
var/independent = FALSE
|
||||
var/list/channels = list()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
name = "binary translator key"
|
||||
desc = "An encryption key for a radio headset. To access the binary channel, use :b."
|
||||
icon_state = "bin_cypherkey"
|
||||
translate_binary = 1
|
||||
translate_binary = TRUE
|
||||
|
||||
/obj/item/device/encryptionkey/headset_sec
|
||||
name = "security radio encryption key"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "headset"
|
||||
item_state = "headset"
|
||||
materials = list(MAT_METAL=75)
|
||||
subspace_transmission = 1
|
||||
subspace_transmission = TRUE
|
||||
canhear_range = 0 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_EARS
|
||||
@@ -22,10 +22,7 @@
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/headset/Destroy()
|
||||
qdel(keyslot)
|
||||
qdel(keyslot2)
|
||||
keyslot = null
|
||||
keyslot2 = null
|
||||
QDEL_NULL(keyslot2)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/talk_into(mob/living/M, message, channel, list/spans,datum/language/language)
|
||||
@@ -33,14 +30,14 @@
|
||||
return ITALICS | REDUCE_RANGE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, AIuser)
|
||||
/obj/item/device/radio/headset/can_receive(freq, level, AIuser)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.ears == src)
|
||||
return ..(freq, level)
|
||||
else if(AIuser)
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/radio/headset/syndicate //disguised to look like a normal headset for stealth ops
|
||||
|
||||
@@ -209,32 +206,24 @@
|
||||
keyslot2 = new /obj/item/device/encryptionkey/ai
|
||||
command = TRUE
|
||||
|
||||
/obj/item/device/radio/headset/ai/receive_range(freq, level)
|
||||
return ..(freq, level, 1)
|
||||
/obj/item/device/radio/headset/ai/can_receive(freq, level)
|
||||
return ..(freq, level, TRUE)
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/W, mob/user, params)
|
||||
user.set_machine(src)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(keyslot || keyslot2)
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
if(keyslot)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
var/turf/T = user.drop_location()
|
||||
if(T)
|
||||
if(keyslot)
|
||||
keyslot.forceMove(T)
|
||||
keyslot = null
|
||||
|
||||
|
||||
|
||||
if(keyslot2)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
if(keyslot2)
|
||||
keyslot2.forceMove(T)
|
||||
keyslot2 = null
|
||||
|
||||
@@ -244,7 +233,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This headset doesn't have any unique encryption keys! How useless...</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/encryptionkey/))
|
||||
else if(istype(W, /obj/item/device/encryptionkey))
|
||||
if(keyslot && keyslot2)
|
||||
to_chat(user, "<span class='warning'>The headset can't hold another key!</span>")
|
||||
return
|
||||
@@ -269,26 +258,19 @@
|
||||
..()
|
||||
if(keyslot2)
|
||||
for(var/ch_name in keyslot2.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] = keyslot2.channels[ch_name]
|
||||
if(!(ch_name in src.channels))
|
||||
channels[ch_name] = keyslot2.channels[ch_name]
|
||||
|
||||
if(keyslot2.translate_binary)
|
||||
src.translate_binary = 1
|
||||
|
||||
translate_binary = TRUE
|
||||
if(keyslot2.syndie)
|
||||
src.syndie = 1
|
||||
|
||||
syndie = TRUE
|
||||
if (keyslot2.independent)
|
||||
independent = TRUE
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/radio/headset/AltClick(mob/living/user)
|
||||
if(!istype(user) || !Adjacent(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
@@ -101,25 +101,27 @@
|
||||
..()
|
||||
ui_interact(user, state = GLOB.default_state)
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
/obj/item/device/radio/intercom/can_receive(freq, level)
|
||||
if(!on)
|
||||
return -1
|
||||
return FALSE
|
||||
if(wires.is_cut(WIRE_RX))
|
||||
return -1
|
||||
return FALSE
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
return FALSE
|
||||
if(!src.listening)
|
||||
return -1
|
||||
if(freq == GLOB.SYND_FREQ)
|
||||
return FALSE
|
||||
if(freq == FREQ_SYNDICATE)
|
||||
if(!(src.syndie))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
return FALSE//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, list/spans, message_mode)
|
||||
if (message_mode == MODE_INTERCOM)
|
||||
return // Avoid hearing the same thing twice
|
||||
if(!anyai && !(speaker in ai))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -1,32 +1,11 @@
|
||||
/obj/item/device/radio
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
name = "station bounced radio"
|
||||
suffix = "\[3\]"
|
||||
icon_state = "walkietalkie"
|
||||
item_state = "walkietalkie"
|
||||
desc = "A basic handheld radio that communicates with local telecommunication networks."
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
var/on = TRUE // 0 for off
|
||||
var/last_transmission
|
||||
var/frequency = 1459 //common chat
|
||||
var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
var/canhear_range = 3 // the range which mobs can hear this radio from
|
||||
var/list/secure_radio_connections
|
||||
var/prison_radio = 0
|
||||
var/b_stat = 0
|
||||
var/broadcasting = 0
|
||||
var/listening = 1
|
||||
var/translate_binary = 0
|
||||
var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
|
||||
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
|
||||
var/obj/item/device/encryptionkey/keyslot //To allow the radio to accept encryption keys.
|
||||
var/subspace_switchable = 0
|
||||
var/subspace_transmission = 0
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
|
||||
var/independent = FALSE // If true, bypasses any tcomms machinery.
|
||||
var/freqlock = 0 //Frequency lock to stop the user from untuning specialist radios.
|
||||
var/emped = 0 //Highjacked to track the number of consecutive EMPs on the radio, allowing consecutive EMP's to stack properly.
|
||||
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
|
||||
|
||||
flags_1 = CONDUCT_1 | HEAR_1
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
slot_flags = SLOT_BELT
|
||||
@@ -35,12 +14,33 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=75, MAT_GLASS=25)
|
||||
|
||||
var/const/TRANSMISSION_DELAY = 5 // only 2/second/radio
|
||||
var/const/FREQ_LISTENING = 1
|
||||
//FREQ_BROADCASTING = 2
|
||||
var/on = TRUE
|
||||
var/frequency = FREQ_COMMON
|
||||
var/traitor_frequency = 0 // If tuned to this frequency, uplink will be unlocked.
|
||||
var/canhear_range = 3 // The range around the radio in which mobs can hear what it receives.
|
||||
var/emped = 0 // Tracks the number of EMPs currently stacked.
|
||||
|
||||
var/command = FALSE //If we are speaking into a command headset, our text can be BOLD
|
||||
var/use_command = FALSE
|
||||
var/broadcasting = FALSE // Whether the radio will transmit dialogue it hears nearby.
|
||||
var/listening = TRUE // Whether the radio is currently receiving.
|
||||
var/prison_radio = FALSE // If true, the transmit wire starts cut.
|
||||
var/unscrewed = FALSE // Whether wires are accessible. Toggleable by screwdrivering.
|
||||
var/freerange = FALSE // If true, the radio has access to the full spectrum.
|
||||
var/subspace_transmission = FALSE // If true, the radio transmits and receives on subspace exclusively.
|
||||
var/subspace_switchable = FALSE // If true, subspace_transmission can be toggled at will.
|
||||
var/freqlock = FALSE // Frequency lock to stop the user from untuning specialist radios.
|
||||
var/use_command = FALSE // If true, broadcasts will be large and BOLD.
|
||||
var/command = FALSE // If true, use_command can be toggled at will.
|
||||
|
||||
// Encryption key handling
|
||||
var/obj/item/device/encryptionkey/keyslot
|
||||
var/translate_binary = FALSE // If true, can hear the special binary channel.
|
||||
var/independent = FALSE // If true, can say/hear on the special CentCom channel.
|
||||
var/syndie = FALSE // If true, hears all well-known channels automatically, and can say/hear on the Syndicate channel.
|
||||
var/list/channels = list() // Map from name (see communications.dm) to on/off. First entry is current department (:h).
|
||||
var/list/secure_radio_connections
|
||||
|
||||
var/const/FREQ_LISTENING = 1
|
||||
//FREQ_BROADCASTING = 2
|
||||
|
||||
/obj/item/device/radio/proc/set_frequency(new_frequency)
|
||||
remove_radio(src, frequency)
|
||||
@@ -48,23 +48,19 @@
|
||||
|
||||
/obj/item/device/radio/proc/recalculateChannels()
|
||||
channels = list()
|
||||
translate_binary = 0
|
||||
syndie = 0
|
||||
translate_binary = FALSE
|
||||
syndie = FALSE
|
||||
independent = FALSE
|
||||
|
||||
if(keyslot)
|
||||
for(var/ch_name in keyslot.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
channels += ch_name
|
||||
channels[ch_name] = keyslot.channels[ch_name]
|
||||
if(!(ch_name in channels))
|
||||
channels[ch_name] = keyslot.channels[ch_name]
|
||||
|
||||
if(keyslot.translate_binary)
|
||||
translate_binary = 1
|
||||
|
||||
translate_binary = TRUE
|
||||
if(keyslot.syndie)
|
||||
syndie = 1
|
||||
|
||||
syndie = TRUE
|
||||
if(keyslot.independent)
|
||||
independent = TRUE
|
||||
|
||||
@@ -78,10 +74,9 @@
|
||||
recalculateChannels()
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
remove_radio_all(src) //Just to be sure
|
||||
keyslot = null
|
||||
QDEL_NULL(wires)
|
||||
QDEL_NULL(keyslot)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/Initialize()
|
||||
@@ -99,7 +94,7 @@
|
||||
/obj/item/device/radio/interact(mob/user)
|
||||
if (..())
|
||||
return
|
||||
if(b_stat && !isAI(user))
|
||||
if(unscrewed && !isAI(user))
|
||||
wires.interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
@@ -192,41 +187,33 @@
|
||||
spans = M.get_spans()
|
||||
if(!language)
|
||||
language = M.get_default_language()
|
||||
INVOKE_ASYNC(src, .proc/talk_into_impl, M, message, channel, spans, language)
|
||||
INVOKE_ASYNC(src, .proc/talk_into_impl, M, message, channel, spans.Copy(), language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
/obj/item/device/radio/proc/talk_into_impl(atom/movable/M, message, channel, list/spans, datum/language/language)
|
||||
if(!on)
|
||||
return // the device has to be on
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
if(!M || !message)
|
||||
return
|
||||
|
||||
if(wires.is_cut(WIRE_TX))
|
||||
if(wires.is_cut(WIRE_TX)) // Permacell and otherwise tampered-with radios
|
||||
return
|
||||
|
||||
if(!M.IsVocal())
|
||||
return
|
||||
|
||||
if(use_command)
|
||||
spans |= SPAN_COMMAND
|
||||
|
||||
/* Quick introduction:
|
||||
This new radio system uses a very robust FTL signaling technology unoriginally
|
||||
dubbed "subspace" which is somewhat similar to 'blue-space' but can't
|
||||
actually transmit large mass. Headsets are the only radio devices capable
|
||||
of sending subspace transmissions to the Communications Satellite.
|
||||
|
||||
A headset sends a signal to a subspace listener/reciever elsewhere in space,
|
||||
the signal gets processed and logged, and an audible transmission gets sent
|
||||
to each individual headset.
|
||||
*/
|
||||
|
||||
/*
|
||||
be prepared to disregard any comments in all of tcomms code. i tried my best to keep them somewhat up-to-date, but eh
|
||||
Roughly speaking, radios attempt to make a subspace transmittion (which
|
||||
is received, processed, and rebroadcast by the telecomms satellite) and
|
||||
if that fails, they send a mundane radio transmission.
|
||||
|
||||
Headsets cannot send/receive mundane transmissions, only subspace.
|
||||
Syndicate radios can hear transmissions on all well-known frequencies.
|
||||
CentCom radios can hear the CentCom frequency no matter what.
|
||||
*/
|
||||
|
||||
//get the frequency you buttface. radios no longer use the SSradio. confusing for future generations, convenient for me.
|
||||
// From the channel, determine the frequency and get a reference to it.
|
||||
var/freq
|
||||
if(channel && channels && channels.len > 0)
|
||||
if(channel == "department")
|
||||
@@ -238,271 +225,95 @@
|
||||
freq = frequency
|
||||
channel = null
|
||||
|
||||
var/freqnum = text2num(freq) //Why should we call text2num three times when we can just do it here?
|
||||
// Nearby active jammers severely gibberish the message
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
var/jammed = FALSE
|
||||
for(var/obj/item/device/jammer/jammer in GLOB.active_jammers)
|
||||
if(get_dist(position,get_turf(jammer)) < jammer.range)
|
||||
jammed = TRUE
|
||||
message = Gibberish(message,100)
|
||||
break
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
// Determine the identity information which will be attached to the signal.
|
||||
var/atom/movable/virtualspeaker/speaker = new(null, M, src)
|
||||
|
||||
// ||-- The mob's name identity --||
|
||||
var/real_name = M.name // mob's real name
|
||||
var/mobkey = "none" // player key associated with mob
|
||||
var/voicemask = 0 // the speaker is wearing a voice mask
|
||||
var/voice = M.GetVoice() // Why reinvent the wheel when there is a proc that does nice things already
|
||||
if(ismob(M))
|
||||
var/mob/speaker = M
|
||||
real_name = speaker.real_name
|
||||
if(speaker.client)
|
||||
mobkey = speaker.key // assign the mob's key
|
||||
// Construct the signal
|
||||
var/datum/signal/subspace/vocal/signal = new(src, freq, speaker, language, message, spans)
|
||||
|
||||
|
||||
var/jobname // the mob's "job"
|
||||
|
||||
if(jammed)
|
||||
message = Gibberish(message,100)
|
||||
|
||||
// --- 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))
|
||||
var/datum/data/record/findjob = find_record("name", voice, GLOB.data_core.general)
|
||||
|
||||
if(voice != real_name)
|
||||
voicemask = 1
|
||||
if(findjob)
|
||||
jobname = findjob.fields["rank"]
|
||||
else
|
||||
jobname = "Unknown"
|
||||
|
||||
// --- Carbon Nonhuman ---
|
||||
else if(iscarbon(M)) // Nonhuman carbon mob
|
||||
jobname = "No id"
|
||||
|
||||
// --- AI ---
|
||||
else if(isAI(M))
|
||||
jobname = "AI"
|
||||
|
||||
// --- Cyborg ---
|
||||
else if(iscyborg(M))
|
||||
var/mob/living/silicon/robot/B = M
|
||||
jobname = "[B.designation] Cyborg"
|
||||
|
||||
// --- Personal AI (pAI) ---
|
||||
else if(istype(M, /mob/living/silicon/pai))
|
||||
jobname = "Personal AI"
|
||||
|
||||
// --- Cold, emotionless machines. ---
|
||||
else if(isobj(M))
|
||||
jobname = "Machine"
|
||||
|
||||
// --- Unidentifiable mob ---
|
||||
else
|
||||
jobname = "Unknown"
|
||||
|
||||
/* ###### `independent` radios bypass all comms relays. ###### */
|
||||
|
||||
if(independent)
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2
|
||||
signal.data = list(
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = voice, // the mob's voice name
|
||||
"job" = jobname, // the mob's job
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mas
|
||||
|
||||
"compression" = 0, // uncompressed radio signal
|
||||
"message" = message, // the actual sent message
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0,
|
||||
"traffic" = 0,
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = 0,
|
||||
"language" = language,
|
||||
"spans" = spans,
|
||||
"verb_say" = M.verb_say,
|
||||
"verb_ask" = M.verb_ask,
|
||||
"verb_exclaim" = M.verb_exclaim,
|
||||
"verb_yell" = M.verb_yell,
|
||||
)
|
||||
signal.frequency = freqnum // Quick frequency set
|
||||
Broadcast_Message(M, voicemask,
|
||||
src, message, voice, jobname, real_name,
|
||||
5, signal.data["compression"], list(position.z, 0), freq, spans,
|
||||
verb_say, verb_ask, verb_exclaim, verb_yell, language)
|
||||
// Independent radios, on the CentCom frequency, reach all independent radios
|
||||
if (independent && (freq == FREQ_CENTCOM || freq == FREQ_CTF_RED || freq == FREQ_CTF_BLUE))
|
||||
signal.data["compression"] = 0
|
||||
signal.transmission_method = TRANSMISSION_SUPERSPACE
|
||||
signal.levels = list(0) // reaches all Z-levels
|
||||
signal.broadcast()
|
||||
return
|
||||
|
||||
/* ###### Radio headsets can only broadcast through subspace ###### */
|
||||
// All radios make an attempt to use the subspace system first
|
||||
signal.send_to_receivers()
|
||||
|
||||
if(subspace_transmission)
|
||||
// First, we want to generate a new radio signal
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2 // 2 would be a subspace transmission.
|
||||
// transmission_method could probably be enumerated through #define. Would be neater.
|
||||
// --- Finally, tag the actual signal with the appropriate values ---
|
||||
signal.data = list(
|
||||
// Identity-associated tags:
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = voice, // the mob's voice name
|
||||
"job" = jobname, // the mob's job
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mask
|
||||
|
||||
// We store things that would otherwise be kept in the actual mob
|
||||
// so that they can be logged even AFTER the mob is deleted or something
|
||||
|
||||
// Other tags:
|
||||
"compression" = rand(35,65), // compressed radio signal
|
||||
"message" = message, // the actual sent message
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
|
||||
"traffic" = 0, // dictates the total traffic sum that the signal went through
|
||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = position.z, // The source's z level
|
||||
"language" = language,
|
||||
"spans" = spans, //the span classes of this message.
|
||||
"verb_say" = M.verb_say, //the verb used when talking normally
|
||||
"verb_ask" = M.verb_ask, //the verb used when asking
|
||||
"verb_exclaim" = M.verb_exclaim, //the verb used when exclaiming
|
||||
"verb_yell" = M.verb_yell //the verb used when yelling
|
||||
)
|
||||
signal.frequency = freq
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
// If the radio is subspace-only, that's all it can do
|
||||
if (subspace_transmission)
|
||||
return
|
||||
|
||||
// Non-subspace radios will check in a couple of seconds, and if the signal
|
||||
// was never received, send a mundane broadcast (no headsets).
|
||||
addtimer(CALLBACK(src, .proc/backup_transmission, signal), 20)
|
||||
|
||||
/* ###### Intercoms and station-bounced radios ###### */
|
||||
/obj/item/device/radio/proc/backup_transmission(datum/signal/subspace/vocal/signal)
|
||||
var/turf/T = get_turf(src)
|
||||
if (signal.data["done"] && (T.z in signal.levels))
|
||||
return
|
||||
|
||||
var/filter_type = 2
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2
|
||||
|
||||
|
||||
/* --- Try to send a normal subspace broadcast first */
|
||||
|
||||
signal.data = list(
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = voice, // the mob's voice name
|
||||
"job" = jobname, // the mob's job
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mas
|
||||
|
||||
"compression" = 0, // uncompressed radio signal
|
||||
"message" = message, // the actual sent message
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0,
|
||||
"traffic" = 0,
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = position.z,
|
||||
"language" = language,
|
||||
"spans" = spans,
|
||||
"verb_say" = M.verb_say,
|
||||
"verb_ask" = M.verb_ask,
|
||||
"verb_exclaim" = M.verb_exclaim,
|
||||
"verb_yell" = M.verb_yell
|
||||
)
|
||||
signal.frequency = freqnum // Quick frequency set
|
||||
for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers. (Unless of course whoever coded this last time forgot to put it in somewhere!)
|
||||
for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
spawn(20) // wait a little...
|
||||
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
// we're done here.
|
||||
return
|
||||
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level.
|
||||
// Send a mundane broadcast with limited targets:
|
||||
Broadcast_Message(M, voicemask,
|
||||
src, message, voice, jobname, real_name,
|
||||
filter_type, signal.data["compression"], list(position.z), freq, spans,
|
||||
verb_say, verb_ask, verb_exclaim, verb_yell, language)
|
||||
// Okay, the signal was never processed, send a mundane broadcast.
|
||||
signal.data["compression"] = 0
|
||||
signal.transmission_method = TRANSMISSION_RADIO
|
||||
signal.levels = list(T.z)
|
||||
signal.broadcast()
|
||||
|
||||
/obj/item/device/radio/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(radio_freq)
|
||||
if(radio_freq || !broadcasting || get_dist(src, speaker) > canhear_range)
|
||||
return
|
||||
if(broadcasting)
|
||||
if(get_dist(src, speaker) <= canhear_range)
|
||||
if(message_mode == MODE_WHISPER || message_mode == MODE_WHISPER_CRIT)
|
||||
raw_message = stars(raw_message)
|
||||
talk_into(speaker, raw_message, , spans, language=message_language)
|
||||
|
||||
/obj/item/device/radio/proc/receive_range(freq, level)
|
||||
// check if this radio can receive on the given frequency, and if so,
|
||||
// what the range is in which mobs will hear the radio
|
||||
// returns: -1 if can't receive, range otherwise
|
||||
if(message_mode == MODE_WHISPER || message_mode == MODE_WHISPER_CRIT)
|
||||
// radios don't pick up whispers very well
|
||||
raw_message = stars(raw_message)
|
||||
else if(message_mode == MODE_L_HAND || message_mode == MODE_R_HAND)
|
||||
// try to avoid being heard double
|
||||
if (loc == speaker && ismob(speaker))
|
||||
var/mob/M = speaker
|
||||
var/idx = M.get_held_index_of_item(src)
|
||||
// left hands are odd slots
|
||||
if (idx && (idx % 2) == (message_mode == MODE_L_HAND))
|
||||
return
|
||||
|
||||
if (wires.is_cut(WIRE_RX))
|
||||
return -1
|
||||
if(!listening)
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
talk_into(speaker, raw_message, , spans, language=message_language)
|
||||
|
||||
// Checks if this radio can receive on the given frequency.
|
||||
/obj/item/device/radio/proc/can_receive(freq, level)
|
||||
// deny checks
|
||||
if (!on || !listening || wires.is_cut(WIRE_RX))
|
||||
return FALSE
|
||||
if (freq == FREQ_SYNDICATE && !syndie)
|
||||
return FALSE
|
||||
if (freq == FREQ_CENTCOM)
|
||||
return independent // hard-ignores the z-level check
|
||||
if (!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(!position || !(position.z in level))
|
||||
return -1
|
||||
if(freq == GLOB.SYND_FREQ)
|
||||
if(!(src.syndie)) //Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return -1
|
||||
if(freq == GLOB.CENTCOM_FREQ)
|
||||
if(!independent)
|
||||
return -1
|
||||
if (!on)
|
||||
return -1
|
||||
if (!freq) //received on main frequency
|
||||
if (!listening)
|
||||
return -1
|
||||
else
|
||||
var/accept = (freq==frequency && listening)
|
||||
if (!accept)
|
||||
for(var/ch_name in channels)
|
||||
if(channels[ch_name] & FREQ_LISTENING)
|
||||
if(GLOB.radiochannels[ch_name] == text2num(freq) || syndie) //the GLOB.radiochannels list is located in communications.dm
|
||||
accept = 1
|
||||
break
|
||||
if (!accept)
|
||||
return -1
|
||||
return canhear_range
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/radio/proc/send_hear(freq, level)
|
||||
|
||||
var/range = receive_range(freq, level)
|
||||
if(range > -1)
|
||||
return get_hearers_in_view(canhear_range, src)
|
||||
// allow checks: are we listening on that frequency?
|
||||
if (freq == frequency)
|
||||
return TRUE
|
||||
for(var/ch_name in channels)
|
||||
if(channels[ch_name] & FREQ_LISTENING)
|
||||
//the GLOB.radiochannels list is located in communications.dm
|
||||
if(GLOB.radiochannels[ch_name] == text2num(freq) || syndie)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/device/radio/examine(mob/user)
|
||||
..()
|
||||
if (b_stat)
|
||||
if (unscrewed)
|
||||
to_chat(user, "<span class='notice'>It can be attached and modified.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It cannot be modified or attached.</span>")
|
||||
@@ -510,8 +321,8 @@
|
||||
/obj/item/device/radio/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
b_stat = !b_stat
|
||||
if(b_stat)
|
||||
unscrewed = !unscrewed
|
||||
if(unscrewed)
|
||||
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The radio can no longer be modified or attached!</span>")
|
||||
@@ -523,8 +334,8 @@
|
||||
var/curremp = emped //Remember which EMP this was
|
||||
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
|
||||
to_chat(loc, "<span class='warning'>\The [src] overloads.</span>")
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
broadcasting = FALSE
|
||||
listening = FALSE
|
||||
for (var/ch_name in channels)
|
||||
channels[ch_name] = 0
|
||||
on = FALSE
|
||||
@@ -542,7 +353,7 @@
|
||||
|
||||
/obj/item/device/radio/borg
|
||||
name = "cyborg radio"
|
||||
subspace_switchable = 1
|
||||
subspace_switchable = TRUE
|
||||
dog_fashion = null
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
|
||||
@@ -555,7 +366,7 @@
|
||||
|
||||
/obj/item/device/radio/borg/syndicate/Initialize()
|
||||
. = ..()
|
||||
set_frequency(GLOB.SYND_FREQ)
|
||||
set_frequency(FREQ_SYNDICATE)
|
||||
|
||||
/obj/item/device/radio/borg/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
|
||||
@@ -126,11 +126,6 @@ GAS ANALYZER
|
||||
if(H.undergoing_liver_failure() && H.stat != DEAD)
|
||||
to_chat(user, "<span class='danger'>Subject suffering from liver failure: apply corazone and begin a liver transplant immediately!</span>")
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.has_brain_worms())
|
||||
to_chat(user, "<span class='danger'>Foreign organism detected in subject's cranium. Recommended treatment: Dosage of sucrose solution and removal of object via surgery.</span>")
|
||||
|
||||
to_chat(user, "<span class='info'>Analyzing results for [M]:\n\tOverall status: [mob_status]</span>")
|
||||
|
||||
// Damage descriptions
|
||||
@@ -399,6 +394,7 @@ GAS ANALYZER
|
||||
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C)] °C</span>")
|
||||
|
||||
|
||||
/obj/item/device/slime_scanner
|
||||
name = "slime scanner"
|
||||
desc = "A device that analyzes a slime's internal composition and measures its stats."
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/extinguisher
|
||||
name = "fire extinguisher"
|
||||
desc = "A traditional red fire extinguisher."
|
||||
|
||||
@@ -13,10 +13,13 @@
|
||||
for(var/mob/living/M in get_hearers_in_view(7, flashbang_turf))
|
||||
bang(get_turf(M), M)
|
||||
|
||||
//START OF CIT CHANGES - makes flashbangs damage blobs
|
||||
for(var/obj/structure/blob/B in get_hear(8,flashbang_turf)) //Blob damage here
|
||||
var/distance = get_dist(B, get_turf(src))
|
||||
var/damage = round(100/(distance*distance)+1)
|
||||
B.take_damage(damage, BURN, "energy")
|
||||
//END OF CIT CHANGES
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/flashbang/proc/bang(turf/T , mob/living/M)
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
//improvised explosives//
|
||||
|
||||
/obj/item/grenade/iedcasing
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
active = 0
|
||||
det_time = 50
|
||||
display_timer = 0
|
||||
var/range = 3
|
||||
var/list/times
|
||||
|
||||
/obj/item/grenade/iedcasing/Initialize()
|
||||
. = ..()
|
||||
add_overlay("improvised_grenade_filled")
|
||||
add_overlay("improvised_grenade_wired")
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
can.pixel_x = 0 //Reset the sprite's position to make it consistent with the rest of the IED
|
||||
can.pixel_y = 0
|
||||
var/mutable_appearance/can_underlay = new(can)
|
||||
can_underlay.layer = FLOAT_LAYER
|
||||
can_underlay.plane = FLOAT_PLANE
|
||||
underlays += can_underlay
|
||||
|
||||
|
||||
/obj/item/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
//improvised explosives//
|
||||
|
||||
/obj/item/grenade/iedcasing
|
||||
name = "improvised firebomb"
|
||||
desc = "A weak, improvised incendiary device."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
active = 0
|
||||
det_time = 50
|
||||
display_timer = 0
|
||||
var/range = 3
|
||||
var/list/times
|
||||
|
||||
/obj/item/grenade/iedcasing/Initialize()
|
||||
. = ..()
|
||||
add_overlay("improvised_grenade_filled")
|
||||
add_overlay("improvised_grenade_wired")
|
||||
times = list("5" = 10, "-1" = 20, "[rand(30,80)]" = 50, "[rand(65,180)]" = 20)// "Premature, Dud, Short Fuse, Long Fuse"=[weighting value]
|
||||
det_time = text2num(pickweight(times))
|
||||
if(det_time < 0) //checking for 'duds'
|
||||
range = 1
|
||||
det_time = rand(30,80)
|
||||
else
|
||||
range = pick(2,2,2,3,3,3,4)
|
||||
|
||||
/obj/item/grenade/iedcasing/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/reagent_containers/food/drinks/soda_cans/can = locate() in contents
|
||||
if(can)
|
||||
can.pixel_x = 0 //Reset the sprite's position to make it consistent with the rest of the IED
|
||||
can.pixel_y = 0
|
||||
var/mutable_appearance/can_underlay = new(can)
|
||||
can_underlay.layer = FLOAT_LAYER
|
||||
can_underlay.plane = FLOAT_PLANE
|
||||
underlays += can_underlay
|
||||
|
||||
|
||||
/obj/item/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
preprime(user, null, FALSE)
|
||||
|
||||
/obj/item/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
|
||||
/obj/item/grenade/iedcasing/prime() //Blowing that can up
|
||||
update_mob()
|
||||
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.bodytemperature -= 230
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
/obj/item/restraints
|
||||
breakouttime = 600
|
||||
|
||||
/obj/item/restraints/Destroy()
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/M = loc
|
||||
if(M.handcuffed == src)
|
||||
M.handcuffed = null
|
||||
M.update_handcuffed()
|
||||
if(M.buckled && M.buckled.buckle_requires_restraints)
|
||||
M.buckled.unbuckle_mob(M)
|
||||
if(M.legcuffed == src)
|
||||
M.legcuffed = null
|
||||
M.update_inv_legcuffed()
|
||||
return ..()
|
||||
|
||||
//Handcuffs
|
||||
|
||||
/obj/item/restraints/handcuffs
|
||||
@@ -167,11 +180,6 @@
|
||||
desc = "Fake handcuffs meant for gag purposes."
|
||||
breakouttime = 10 //Deciseconds = 1s
|
||||
|
||||
/obj/item/restraints/handcuffs/fake/kinky
|
||||
name = "kinky handcuffs"
|
||||
desc = "Fake handcuffs meant for erotic roleplay."
|
||||
icon_state = "handcuffGag"
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
@@ -379,4 +387,3 @@
|
||||
B.Crossed(hit_atom)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
throw_speed = 3
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
unique_rename = TRUE
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
unique_rename = TRUE
|
||||
var/reskinned = FALSE
|
||||
|
||||
/obj/item/nullrod/suicide_act(mob/user)
|
||||
@@ -354,6 +354,11 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
sharpness = IS_SHARP
|
||||
|
||||
/obj/item/nullrod/armblade/tentacle
|
||||
name = "unholy blessing"
|
||||
icon_state = "tentacle"
|
||||
item_state = "tentacle"
|
||||
|
||||
/obj/item/nullrod/carp
|
||||
name = "carp-sie plushie"
|
||||
desc = "An adorable stuffed toy that resembles the god of all carp. The teeth look pretty sharp. Activate it to receive the blessing of Carp-Sie."
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
name = "mop"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mop"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
if(!user.transferItemToLoc(src, M))
|
||||
return
|
||||
user.visible_message("[user] inserts [src] into a data port on [M].", "<span class='notice'>You insert [src] into a data port on [M].</span>", "<span class='italics'>You hear the satisfying click of a wire jack fastening into place.</span>")
|
||||
machine = M
|
||||
machine = M
|
||||
@@ -54,6 +54,7 @@
|
||||
return
|
||||
if(!target)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
return
|
||||
var/turf/here = get_turf(src)
|
||||
var/turf/there = get_turf(target)
|
||||
if(here.z != there.z)
|
||||
@@ -110,7 +111,8 @@
|
||||
var/crewmember_name = "Unknown"
|
||||
if(H.wear_id)
|
||||
var/obj/item/card/id/I = H.wear_id.GetID()
|
||||
crewmember_name = I.registered_name
|
||||
if(I && I.registered_name)
|
||||
crewmember_name = I.registered_name
|
||||
|
||||
while(crewmember_name in name_counts)
|
||||
name_counts[crewmember_name]++
|
||||
|
||||
@@ -504,4 +504,4 @@
|
||||
item_state = "plushie_slime"
|
||||
attack_verb = list("blorbled", "slimed", "absorbed")
|
||||
squeak_override = list('sound/effects/blobattack.ogg' = 1)
|
||||
gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy
|
||||
gender = FEMALE //given all the jokes and drawings, I'm not sure the xenobiologists would make a slimeboy
|
||||
@@ -125,14 +125,14 @@
|
||||
loadedWeightClass += I.w_class
|
||||
return TRUE
|
||||
|
||||
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params)
|
||||
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(flag && user.a_intent == INTENT_HARM) //melee attack
|
||||
return
|
||||
if(!istype(user))
|
||||
return
|
||||
Fire(user, target)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/Fire(mob/living/carbon/human/user, var/atom/target)
|
||||
/obj/item/pneumatic_cannon/proc/Fire(mob/living/user, var/atom/target)
|
||||
if(!istype(user) && !target)
|
||||
return
|
||||
var/discharge = 0
|
||||
@@ -164,9 +164,10 @@
|
||||
var/turf/T = get_target(target, get_turf(src))
|
||||
playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
|
||||
fire_items(T, user)
|
||||
if(pressureSetting >= 3 && user)
|
||||
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
user.Knockdown(60)
|
||||
if(pressureSetting >= 3 && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
C.Knockdown(60)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
||||
if(fire_mode == PCANNON_FIREALL)
|
||||
@@ -272,3 +273,10 @@
|
||||
selfcharge = TRUE
|
||||
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream
|
||||
maxWeightClass = 60 //20 pies.
|
||||
|
||||
/obj/item/pneumatic_cannon/pie/selfcharge/cyborg
|
||||
name = "low velocity pie cannon"
|
||||
automatic = FALSE
|
||||
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream/nostun
|
||||
maxWeightClass = 6 //2 pies
|
||||
charge_ticks = 2 //4 second/pie
|
||||
|
||||
@@ -355,6 +355,9 @@
|
||||
var/hitdamage = 0
|
||||
var/emaggedhitdamage = 3
|
||||
|
||||
/obj/item/borg/lollipop/clown
|
||||
emaggedhitdamage = 0
|
||||
|
||||
/obj/item/borg/lollipop/equipped()
|
||||
check_amount()
|
||||
|
||||
@@ -724,4 +727,4 @@
|
||||
/obj/item/borg/sight/hud/sec/New()
|
||||
..()
|
||||
hud = new /obj/item/clothing/glasses/hud/security(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/target/Move()
|
||||
..()
|
||||
. = ..()
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.forceMove(loc)
|
||||
|
||||
|
||||
@@ -10,13 +10,23 @@
|
||||
var/label = ""
|
||||
var/last_wave = 0
|
||||
|
||||
/obj/item/picket_sign/cyborg
|
||||
name = "metallic nano-sign"
|
||||
desc = "A high tech picket sign used by silicons that can reprogram its surface at will. Probably hurts to get hit by, too."
|
||||
force = 13
|
||||
resistance_flags = NONE
|
||||
actions_types = list(/datum/action/item_action/nano_picket_sign)
|
||||
|
||||
/obj/item/picket_sign/proc/retext(mob/user)
|
||||
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
|
||||
if(txt && Adjacent(user))
|
||||
label = txt
|
||||
name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
|
||||
/obj/item/picket_sign/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen) || istype(W, /obj/item/toy/crayon))
|
||||
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
|
||||
if(txt)
|
||||
label = txt
|
||||
src.name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
retext(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -19,10 +19,15 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("chair", /obj/structure/chair, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
|
||||
//CIT CHANGE - adds sofas to metal recipe list
|
||||
new/datum/stack_recipe_list("sofas", list( \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
//END OF CIT CHANGES
|
||||
null, \
|
||||
new/datum/stack_recipe_list("office chairs", list( \
|
||||
new/datum/stack_recipe("dark office chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
|
||||
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
|
||||
recipe_list = srl.recipes
|
||||
var/t1 = "Amount Left: [amount]<br>"
|
||||
var/t1 = "Amount Left: [get_amount()]<br>"
|
||||
for(var/i in 1 to length(recipe_list))
|
||||
var/E = recipe_list[i]
|
||||
if (isnull(E))
|
||||
@@ -161,8 +161,8 @@
|
||||
if (href_list["sublist"] && !href_list["make"])
|
||||
interact(usr, text2num(href_list["sublist"]))
|
||||
if (href_list["make"])
|
||||
if (get_amount() < 1)
|
||||
qdel(src) //Never should happen
|
||||
if (get_amount() < 1 && !is_cyborg)
|
||||
qdel(src)
|
||||
|
||||
var/list/recipes_list = recipes
|
||||
if (href_list["sublist"])
|
||||
|
||||
@@ -93,6 +93,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
if (user.has_disability(DISABILITY_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='danger'>[src] slips out of your hand and hits your head.</span>")
|
||||
user.take_bodypart_damage(10)
|
||||
|
||||
@@ -54,3 +54,4 @@
|
||||
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
|
||||
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
|
||||
new /obj/item/suppressor/specialoffer(src)
|
||||
|
||||
|
||||
@@ -182,6 +182,8 @@
|
||||
var/cy = ty
|
||||
boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
|
||||
for(var/obj/O in contents)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
@@ -211,6 +213,8 @@
|
||||
cy--
|
||||
else
|
||||
for(var/obj/O in contents)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
|
||||
O.screen_loc = "[cx]:16,[cy]:16"
|
||||
O.maptext = ""
|
||||
@@ -244,6 +248,8 @@
|
||||
numbered_contents = list()
|
||||
adjusted_contents = 0
|
||||
for(var/obj/item/I in contents)
|
||||
if(QDELETED(I))
|
||||
continue
|
||||
var/found = 0
|
||||
for(var/datum/numbered_display/ND in numbered_contents)
|
||||
if(ND.sample_object.type == I.type)
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
|
||||
/obj/effect/resin_container/proc/Smoke()
|
||||
var/obj/effect/particle_effect/foam/metal/resin/S = new /obj/effect/particle_effect/foam/metal/resin(get_turf(loc))
|
||||
S.amount = 3
|
||||
S.amount = 4
|
||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#define SOURCE_PORTAL 1
|
||||
#define DESTINATION_PORTAL 2
|
||||
|
||||
@@ -16,7 +17,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "locator"
|
||||
var/temp = null
|
||||
var/frequency = 1451
|
||||
var/frequency = FREQ_LOCATOR_IMPLANT
|
||||
var/broadcasting = null
|
||||
var/listening = 1
|
||||
flags_1 = CONDUCT_1
|
||||
@@ -207,7 +208,7 @@ Frequency:
|
||||
current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
return
|
||||
user.show_message("<span class='notice'>Locked In.</span>", 2)
|
||||
var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1)
|
||||
if(!(LAZYLEN(created) == 2))
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return FALSE
|
||||
forceMove(tongs)
|
||||
tongs.sliver = src
|
||||
tongs.icon_state = "supermatter_tongs_loaded"
|
||||
tongs.update_icon()
|
||||
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
|
||||
else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter/)) // we don't want it to dust
|
||||
return
|
||||
@@ -217,6 +217,12 @@
|
||||
QDEL_NULL(sliver)
|
||||
return ..()
|
||||
|
||||
/obj/item/hemostat/supermatter/update_icon()
|
||||
if(sliver)
|
||||
icon_state = "supermatter_tongs_loaded"
|
||||
else
|
||||
icon_state = "supermatter_tongs"
|
||||
|
||||
/obj/item/hemostat/supermatter/afterattack(atom/O, mob/user, proximity)
|
||||
if(!sliver)
|
||||
return
|
||||
@@ -224,12 +230,14 @@
|
||||
Consume(O)
|
||||
to_chat(usr, "<span class='notice'>\The [sliver] is dusted along with \the [O]!</span>")
|
||||
QDEL_NULL(sliver)
|
||||
update_icon()
|
||||
|
||||
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom) // no instakill supermatter javelins
|
||||
if(sliver)
|
||||
sliver.forceMove(loc)
|
||||
to_chat(usr, "<span class='notice'>\The [sliver] falls out of \the [src] as you throw them.</span>")
|
||||
sliver = null
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/user)
|
||||
@@ -247,6 +255,5 @@
|
||||
radiation_pulse(user, 500, 2)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
|
||||
user.dust()
|
||||
icon_state = "supermatter_tongs"
|
||||
QDEL_NULL(sliver)
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -342,4 +342,4 @@
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
@@ -14,7 +14,8 @@
|
||||
materials = list(MAT_METAL=80)
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
toolspeed = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
@@ -32,10 +33,6 @@
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
qdel(C.handcuffed)
|
||||
C.handcuffed = null
|
||||
if(C.buckled && C.buckled.buckle_requires_restraints)
|
||||
C.buckled.unbuckle_mob(C)
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -58,7 +55,8 @@
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
@@ -70,7 +68,8 @@
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
|
||||
item_state = "jawsoflife"
|
||||
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
@@ -92,4 +91,12 @@
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
/obj/item/wirecutters/power/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed)
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -81,4 +81,4 @@
|
||||
/obj/item/trash/coal/burn()
|
||||
visible_message("[src] fuses into a diamond! Someone wasn't so naughty after all...")
|
||||
new /obj/item/ore/diamond(loc)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
@@ -122,6 +122,10 @@
|
||||
flags_1 = ABSTRACT_1 | NODROP_1
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/item/twohanded/offhand/Destroy()
|
||||
wielded = FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/offhand/unwield()
|
||||
if(wielded)//Only delete if we're wielded
|
||||
wielded = FALSE
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
flags_1 = NODROP_1 | ABSTRACT_1 | DROPDEL_1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 21
|
||||
force = 24
|
||||
throwforce = 0
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
|
||||
Reference in New Issue
Block a user