mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Merge remote-tracking branch 'upstream/master' into third_times_the_charm_questionmark
Conflicts: code/game/objects/items.dm
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
add_logs(AI,user, "carded", object="[name]")
|
||||
else //No AI on the card, therefore the user wants to download one.
|
||||
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
|
||||
update_state() //Whatever happened, update the card's state (icon, name) to match.
|
||||
update_state() //Whatever happened, update the card's state (icon, name) to match.
|
||||
|
||||
/obj/item/device/aicard/proc/update_state()
|
||||
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src //AI is inside.
|
||||
@@ -34,90 +34,74 @@
|
||||
else
|
||||
icon_state = "aicard"
|
||||
name = "intelliCard"
|
||||
overlays.Cut()
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
/obj/item/device/aicard/attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Intelicard</B><BR>"
|
||||
var/laws
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
dat += "Stored AI: [A.name]<br>System integrity: [(A.health+100)/2]%<br>"
|
||||
ui_interact(user)
|
||||
|
||||
for (var/datum/ai_law/law in A.laws.all_laws())
|
||||
laws += "[law.get_index()]: [law.law]<BR>"
|
||||
|
||||
dat += "Laws:<br>[laws]<br>"
|
||||
/obj/item/device/aicard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
|
||||
var/data[0]
|
||||
|
||||
if (A.stat == 2)
|
||||
dat += "<b>AI nonfunctional</b>"
|
||||
else
|
||||
if (!src.flush)
|
||||
dat += {"<A href='byond://?src=\ref[src];choice=Wipe'>Wipe AI</A>"}
|
||||
else
|
||||
dat += "<b>Wipe in progress</b>"
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||
dat += "<br>"
|
||||
dat += "Subspace Transceiver is: [A.aiRadio.disabledAi ? "Disabled" : "Enabled"]"
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||
user << browse(dat, "window=aicard")
|
||||
onclose(user, "aicard")
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = locate() in src
|
||||
if(istype(AI))
|
||||
data["has_ai"] = 1
|
||||
data["name"] = AI.name
|
||||
data["hardware_integrity"] = ((AI.health + 100) / 2)
|
||||
data["radio"] = !AI.aiRadio.disabledAi
|
||||
data["wireless"] = !AI.control_disabled
|
||||
data["operational"] = AI.stat != DEAD
|
||||
data["flushing"] = flush
|
||||
|
||||
/obj/item/device/aicard/Topic(href, href_list)
|
||||
var/mob/U = usr
|
||||
if (!in_range(src, U)||U.machine!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
var/laws[0]
|
||||
for(var/datum/ai_law/AL in AI.laws.all_laws())
|
||||
laws[++laws.len] = list("index" = AL.get_index(), "law" = sanitize(AL.law))
|
||||
data["laws"] = laws
|
||||
data["has_laws"] = laws.len
|
||||
|
||||
add_fingerprint(U)
|
||||
U.set_machine(src)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
switch(href_list["choice"])//Now we switch based on choice.
|
||||
if ("Close")
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
|
||||
if ("Wipe")
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(isnull(src)||!in_range(src, U)||U.machine!=src)
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
else
|
||||
flush = 1
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.suiciding = 1
|
||||
A << "Your core files are being wiped!"
|
||||
while (A.stat != 2)
|
||||
A.adjustOxyLoss(2)
|
||||
A.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
/obj/item/device/aicard/Topic(href, href_list, nowindow, state)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if ("Radio")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.aiRadio.disabledAi = !A.aiRadio.disabledAi
|
||||
A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
|
||||
U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
|
||||
var/mob/living/silicon/ai/AI = locate() in src
|
||||
if(!istype(AI))
|
||||
return 1
|
||||
|
||||
if ("Wireless")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.control_disabled = !A.control_disabled
|
||||
A << "The intelicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
|
||||
if (A.control_disabled)
|
||||
overlays -= image('icons/obj/aicards.dmi', "aicard-on")
|
||||
else
|
||||
overlays += image('icons/obj/aicards.dmi', "aicard-on")
|
||||
attack_self(U)
|
||||
var/user = usr
|
||||
|
||||
if (href_list["wipe"])
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
|
||||
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
|
||||
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
|
||||
flush = 1
|
||||
AI.suiciding = 1
|
||||
AI << "Your core files are being wiped!"
|
||||
while (AI && AI.stat != DEAD)
|
||||
AI.adjustOxyLoss(2)
|
||||
AI.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
|
||||
if (href_list["radio"])
|
||||
AI.aiRadio.disabledAi = text2num(href_list["radio"])
|
||||
AI << "<span class='warning'>Your Subspace Transceiver has been [AI.aiRadio.disabledAi ? "disabled" : "enabled"]!</span>"
|
||||
user << "<span class='notice'>You [AI.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.</span>"
|
||||
|
||||
if (href_list["wireless"])
|
||||
AI.control_disabled = text2num(href_list["wireless"])
|
||||
AI << "<span class='warning'>Your wireless interface has been [AI.control_disabled ? "disabled" : "enabled"]!</span>"
|
||||
user << "<span class='notice'>You [AI.control_disabled ? "disable" : "enable"] the AI's wireless interface.</span>"
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/device/aicard/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/code = 2
|
||||
|
||||
is_special = 1
|
||||
|
||||
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
|
||||
if(src == user.back)
|
||||
user << "<span class='notice'>You need help taking this off!</span>"
|
||||
return
|
||||
..()
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/radio/electropack/Destroy()
|
||||
if(istype(src.loc, /obj/item/assembly/shock_kit))
|
||||
@@ -53,42 +55,22 @@
|
||||
A.flags |= NODROP
|
||||
|
||||
/obj/item/device/radio/electropack/Topic(href, href_list)
|
||||
//..()
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
set_frequency(new_frequency)
|
||||
else
|
||||
if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = min(100, code)
|
||||
code = max(1, code)
|
||||
else
|
||||
if(href_list["power"])
|
||||
on = !( on )
|
||||
icon_state = "electropack[on]"
|
||||
if(!( master ))
|
||||
if(istype(loc, /mob))
|
||||
attack_self(loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
if(istype(master.loc, /mob))
|
||||
attack_self(master.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, master))
|
||||
if(M.client)
|
||||
attack_self(M)
|
||||
else
|
||||
usr << browse(null, "window=radio")
|
||||
return
|
||||
return
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
set_frequency(new_frequency)
|
||||
|
||||
else if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = Clamp(code, 1, 100)
|
||||
|
||||
else if(href_list["power"])
|
||||
on = !on
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/device/radio/electropack/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption != code)
|
||||
@@ -115,26 +97,17 @@
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
/obj/item/device/radio/electropack/attack_self(mob/user as mob, flag1)
|
||||
|
||||
if(!istype(user, /mob/living/carbon/human))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = {"<TT>
|
||||
<A href='?src=\ref[src];power=1'>Turn [on ? "Off" : "On"]</A><BR>
|
||||
<B>Frequency/Code</B> for electropack:<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>
|
||||
/obj/item/device/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
|
||||
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>
|
||||
</TT>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
data["power"] = on
|
||||
data["freq"] = format_frequency(frequency)
|
||||
data["code"] = code
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
@@ -38,6 +38,9 @@ var/global/list/default_medbay_channels = list(
|
||||
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
|
||||
var/subspace_transmission = 0
|
||||
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
|
||||
|
||||
var/is_special = 0 //For electropacks mostly, skips Topic() checks
|
||||
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throw_speed = 2
|
||||
@@ -89,59 +92,68 @@ var/global/list/default_medbay_channels = list(
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
/obj/item/device/radio/attack_ghost(mob/user)
|
||||
interact(user)
|
||||
return ui_interact(user)
|
||||
|
||||
/obj/item/device/radio/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/radio/interact(mob/user as mob)
|
||||
if(!on)
|
||||
return
|
||||
/obj/item/device/radio/interact(mob/user)
|
||||
if(!user)
|
||||
return 0
|
||||
|
||||
if(active_uplink_check(user))
|
||||
return
|
||||
if(b_stat)
|
||||
wires.Interact(user)
|
||||
|
||||
var/dat = "<html><head><title>[src]</title></head><body><TT>"
|
||||
return ui_interact(user)
|
||||
|
||||
if(!istype(src, /obj/item/device/radio/headset)) //Headsets dont get a mic button
|
||||
dat += "Microphone: [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>"
|
||||
/obj/item/device/radio/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
|
||||
dat += {"
|
||||
Speaker: [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<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>
|
||||
"}
|
||||
data["mic_status"] = broadcasting
|
||||
data["speaker"] = listening
|
||||
data["freq"] = format_frequency(frequency)
|
||||
data["rawfreq"] = num2text(frequency)
|
||||
|
||||
dat+=list_channels(user)
|
||||
data["mic_cut"] = (wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
|
||||
data["spk_cut"] = (wires.IsIndexCut(WIRE_RECEIVE) || wires.IsIndexCut(WIRE_SIGNAL))
|
||||
|
||||
dat+={"[text_wires()]</TT></body></html>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
var/list/chanlist = list_channels(user)
|
||||
if(islist(chanlist) && chanlist.len)
|
||||
data["chan_list"] = chanlist
|
||||
data["chan_list_len"] = chanlist.len
|
||||
|
||||
if(syndie)
|
||||
data["useSyndMode"] = 1
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 550)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
|
||||
/obj/item/device/radio/proc/list_channels(var/mob/user)
|
||||
return list_internal_channels(user)
|
||||
|
||||
/obj/item/device/radio/proc/list_secure_channels(var/mob/user)
|
||||
var/dat = ""
|
||||
for (var/ch_name in channels)
|
||||
dat+=text_sec_channel(ch_name, channels[ch_name])
|
||||
var/dat[0]
|
||||
|
||||
for(var/ch_name in channels)
|
||||
var/chan_stat = channels[ch_name]
|
||||
var/listening = !!(chan_stat & FREQ_LISTENING) != 0
|
||||
|
||||
dat.Add(list(list("chan" = ch_name, "display_name" = ch_name, "secure_channel" = 1, "sec_channel_listen" = !listening)))
|
||||
|
||||
return dat
|
||||
|
||||
/obj/item/device/radio/proc/list_internal_channels(var/mob/user)
|
||||
var/dat = ""
|
||||
for (var/internal_chan in internal_channels)
|
||||
var/dat[0]
|
||||
for(var/internal_chan in internal_channels)
|
||||
if(has_channel_access(user, internal_chan))
|
||||
dat+="<A href='byond://?src=\ref[src];spec_freq=[internal_chan]'>[get_frequency_name(text2num(internal_chan))]</A><br>"
|
||||
dat.Add(list(list("chan" = internal_chan, "display_name" = get_frequency_name(text2num(internal_chan)))))
|
||||
|
||||
if(dat)
|
||||
dat = "<br><b>Internal Channels</b><br>" + dat
|
||||
return dat
|
||||
|
||||
/obj/item/device/radio/proc/has_channel_access(var/mob/user, var/freq)
|
||||
@@ -169,13 +181,6 @@ var/global/list/default_medbay_channels = list(
|
||||
return wires.GetInteractWindow()
|
||||
return
|
||||
|
||||
/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>
|
||||
"}
|
||||
|
||||
/obj/item/device/radio/proc/ToggleBroadcast()
|
||||
broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
|
||||
|
||||
@@ -186,6 +191,9 @@ var/global/list/default_medbay_channels = list(
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(is_special)
|
||||
return 0
|
||||
|
||||
if (href_list["track"])
|
||||
var/mob/target = locate(href_list["track"])
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"])
|
||||
@@ -205,7 +213,7 @@ var/global/list/default_medbay_channels = list(
|
||||
else if (href_list["talk"])
|
||||
ToggleBroadcast()
|
||||
. = 1
|
||||
else if (href_list["listen"])
|
||||
else if(href_list["listen"])
|
||||
var/chan_name = href_list["ch_name"]
|
||||
if (!chan_name)
|
||||
ToggleReception()
|
||||
@@ -220,11 +228,10 @@ var/global/list/default_medbay_channels = list(
|
||||
if(has_channel_access(usr, freq))
|
||||
set_frequency(text2num(freq))
|
||||
. = 1
|
||||
|
||||
if(href_list["nowindow"]) // here for pAIs, maybe others will want it, idk
|
||||
return 1
|
||||
|
||||
if(.)
|
||||
interact(usr)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels) //BS12 EDIT
|
||||
@@ -576,6 +583,11 @@ var/global/list/default_medbay_channels = list(
|
||||
syndie = 1
|
||||
keyslot = new /obj/item/device/encryptionkey/syndicate
|
||||
|
||||
/obj/item/device/radio/borg/syndicate/CanUseTopic(mob/user, datum/topic_state/state)
|
||||
. = ..()
|
||||
if(. == STATUS_UPDATE && istype(user, /mob/living/silicon/robot/syndicate))
|
||||
. = STATUS_INTERACTIVE
|
||||
|
||||
/obj/item/device/radio/borg/Destroy()
|
||||
myborg = null
|
||||
return ..()
|
||||
@@ -703,32 +715,40 @@ var/global/list/default_medbay_channels = list(
|
||||
usr << "<span class='notice'>Loudspeaker enabled.</span>"
|
||||
. = 1
|
||||
|
||||
if(.)
|
||||
interact(usr)
|
||||
|
||||
/obj/item/device/radio/borg/interact(mob/user as mob)
|
||||
if(!on)
|
||||
return
|
||||
|
||||
var/dat = "<html><head><title>[src]</title></head><body><TT>"
|
||||
dat += {"
|
||||
Speaker: [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<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>
|
||||
Broadcasting: [subspace_transmission ? "<A href='byond://?src=\ref[src];mode=0'>Disable</A>" : "<A href='byond://?src=\ref[src];mode=1'>Enable</A>"]<BR>
|
||||
Loudspeaker: [shut_up ? "<A href='byond://?src=\ref[src];shutup=0'>Enable</A>" : "<A href='byond://?src=\ref[src];shutup=1'>Disable</A>"]<BR>
|
||||
"}
|
||||
. = ..()
|
||||
|
||||
if(subspace_transmission)//Don't even bother if subspace isn't turned on
|
||||
dat+=list_channels(user)
|
||||
dat+={"[text_wires()]</TT></body></html>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
/obj/item/device/radio/borg/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
|
||||
data["mic_status"] = broadcasting
|
||||
data["speaker"] = listening
|
||||
data["freq"] = format_frequency(frequency)
|
||||
data["rawfreq"] = num2text(frequency)
|
||||
|
||||
var/list/chanlist = list_channels(user)
|
||||
if(islist(chanlist) && chanlist.len)
|
||||
data["chan_list"] = chanlist
|
||||
data["chan_list_len"] = chanlist.len
|
||||
|
||||
if(syndie)
|
||||
data["useSyndMode"] = 1
|
||||
|
||||
data["has_loudspeaker"] = 1
|
||||
data["loudspeaker"] = !shut_up
|
||||
data["has_subspace"] = 1
|
||||
data["subspace"] = subspace_transmission
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 430, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/item/device/radio/proc/config(op)
|
||||
if(radio_controller)
|
||||
|
||||
@@ -47,8 +47,7 @@
|
||||
New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(chemical_reagents_list)
|
||||
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
|
||||
if(rare_chems.Find(R))
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R,10)
|
||||
else
|
||||
reagents.add_reagent(R,rand(2,3)*10)
|
||||
@@ -61,11 +60,9 @@
|
||||
// identify_probability = 0
|
||||
New()
|
||||
..()
|
||||
var/global/list/chems_only = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","oxygen","copper","nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine","fluorine","sodium","phosphorus","lithium","sugar","sacid","facid","glycerol","radium","mutadone","thermite","mutagen","virusfood","iron","gold","silver","uranium","aluminum","silicon","fuel","cleaner","atrazine","plasma","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant","fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
|
||||
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
|
||||
|
||||
var/datum/reagent/R = pick(chems_only + rare_chems)
|
||||
if(rare_chems.Find(R))
|
||||
var/datum/reagent/R = pick(standard_chemicals + rare_chemicals)
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R,10)
|
||||
else
|
||||
reagents.add_reagent(R,rand(2,3)*10)
|
||||
@@ -78,35 +75,35 @@
|
||||
// identify_probability = 0
|
||||
New()
|
||||
..()
|
||||
var/global/list/base_chems = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon","chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium","iron","aluminum","silicon","sugar","ethanol")
|
||||
var/datum/reagent/R = pick(base_chems)
|
||||
var/datum/reagent/R = pick(base_chemicals)
|
||||
reagents.add_reagent(R,rand(2,6)*5)
|
||||
name = "unlabelled bottle"
|
||||
pixel_x = rand(-10,10)
|
||||
pixel_y = rand(-10,10)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink
|
||||
name = "unlabelled drink"
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
New()
|
||||
..()
|
||||
var/list/drinks_only = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice","berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana","nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee","icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb","space_up","lemon_lime","beer","whiskey","gin","rum","vodka","holywater","tequilla","vermouth","wine","tonic","kahlua","cognac","ale","sodawater","ice","bilk","atomicbomb","threemileisland","goldschlager","patron","gintonic","cubalibre","whiskeycola","martini","vodkamartini","whiterussian","screwdrivercocktail","booger","bloodymary","gargleblaster","bravebull","tequillasunrise","toxinsspecial","beepskysmash","salglu_solution","irishcream","manlydorf","longislandicedtea","moonshine","b52","irishcoffee","margarita","blackrussian","manhattan","manhattan_proj","whiskeysoda","antifreeze","barefoot","snowwhite","demonsblood","vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead","mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte","cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk","silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini")
|
||||
var/list/additional_drinks = list()
|
||||
if(prob(50))
|
||||
drinks_only += list("pancuronium","adminordrazine","lsd","omnizine","blood")
|
||||
additional_drinks += list("pancuronium","adminordrazine","lsd","omnizine","blood")
|
||||
|
||||
var/datum/reagent/R = pick(drinks_only)
|
||||
var/datum/reagent/R = pick(drinks + additional_drinks)
|
||||
reagents.add_reagent(R,volume)
|
||||
name = "unlabelled bottle"
|
||||
icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red")
|
||||
pixel_x = rand(-5,5)
|
||||
pixel_y = rand(-5,5)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent // Same as the chembottle code except the container
|
||||
name = "unlabelled drink?"
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(chemical_reagents_list)
|
||||
var/global/list/rare_chems = list("minttoxin","nanites","xenomicrobes","adminordrazine")
|
||||
if(rare_chems.Find(R))
|
||||
if(rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R,10)
|
||||
else
|
||||
reagents.add_reagent(R,rand(3,10)*10)
|
||||
@@ -123,20 +120,17 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
var/global/list/meds_only = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs","serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine","salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol","potass_iodide","pen_acid","mannitol","oculine","styptic_powder","methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia","diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")
|
||||
var/global/list/rare_meds = list("nanites","xenomicrobes","minttoxin","adminordrazine","blood")
|
||||
|
||||
var/i = 1
|
||||
while(i < storage_slots)
|
||||
|
||||
var/datum/reagent/R
|
||||
if(prob(50))
|
||||
R = pick(meds_only + rare_meds)
|
||||
R = pick(standard_medicines + rare_medicines)
|
||||
else
|
||||
R = pick(meds_only)
|
||||
R = pick(standard_medicines)
|
||||
var/obj/item/weapon/reagent_containers/pill/P = new(src)
|
||||
|
||||
if(rare_meds.Find(R))
|
||||
if(rare_medicines.Find(R))
|
||||
P.reagents.add_reagent(R,10)
|
||||
else
|
||||
P.reagents.add_reagent(R,rand(2,5)*10)
|
||||
@@ -185,8 +179,7 @@
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
var/global/list/base_chems = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon","chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium","iron","aluminum","silicon","sugar","ethanol")
|
||||
for(var/chem in base_chems)
|
||||
for(var/chem in standard_chemicals)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src)
|
||||
B.reagents.add_reagent(chem,B.volume)
|
||||
if(prob(85))
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
@@ -238,6 +238,9 @@
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
user << "\red [M]'s [limb] is already splinted!"
|
||||
if(alert(user, "Would you like to remove the splint from [M]'s [limb]?", "Removing.", "Yes", "No") == "Yes")
|
||||
affecting.status &= ~ORGAN_SPLINTED
|
||||
user << "<span class='notice'>You remove the splint from [M]'s [limb]."
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
|
||||
@@ -96,10 +96,13 @@
|
||||
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & NO_DNA_RAD)
|
||||
return
|
||||
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
return
|
||||
return 0
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
if(inuse)
|
||||
return 0
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
|
||||
@@ -110,91 +113,37 @@
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
if (user)
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if(!inuse)
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = M
|
||||
O.item = src
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = M.loc
|
||||
O.place = "dnainjector"
|
||||
src.inuse = 1
|
||||
spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail
|
||||
inuse = 0
|
||||
M.requests += O
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if(block)// Isolated injector
|
||||
//testing("Isolated block [block] injector with contents: [GetValue()]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
// testing("DNA injector with contents: [english_list(buf.dna.SE)]")
|
||||
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
if(buf.types & DNA2_BUF_SE)
|
||||
|
||||
if(block)
|
||||
if(GetState() && block == MONKEYBLOCK && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
else
|
||||
if(!inuse)
|
||||
if(GetState(MONKEYBLOCK) && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
|
||||
//Foreach goto(192)
|
||||
if (!(istype(M, /mob/living/carbon/human)))
|
||||
user << "\red Apparently it didn't work."
|
||||
return
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if(block)// Isolated injector
|
||||
// testing("Isolated block [block] injector with contents: [english_list(GetValue())]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
// testing("DNA injector with contents: [english_list(buf.dna.SE)]")
|
||||
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
inuse = 1
|
||||
inject(M, user)//Now we actually do the heavy lifting.
|
||||
spawn(50)
|
||||
inuse = 0
|
||||
/*
|
||||
A user injecting themselves could mean their own transformation and deletion of mob.
|
||||
I don't have the time to figure out how this code works so this will do for now.
|
||||
I did rearrange things a bit.
|
||||
*/
|
||||
if(user)//If the user still exists. Their mob may not.
|
||||
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
|
||||
user.show_message(text("\red You inject [M.name]"))
|
||||
else
|
||||
user.show_message(text("\red You finish the injection."))
|
||||
return
|
||||
user.visible_message("<span class='danger'>\The [user] starts injecting \the [M] with \the [src]!</span>", "<span class='notice'>You start injecting \the [M] with \the [src].</span>")
|
||||
if(do_after(user, 50, target = M))
|
||||
inject(M, user)//Now we actually do the heavy lifting
|
||||
user.visible_message("<span class='danger'>\The [user] injects \the [M] with \the [src]!</span>", "<span class='danger'>You inject \the [M] with \the [src].</span>")
|
||||
|
||||
if(user)//If the user still exists. Their mob may not.
|
||||
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
|
||||
user.show_message("<span class='alert'>You inject [M.name]</span>")
|
||||
else
|
||||
user.show_message("<span class='alert'>You finish the injection.</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/hulkmut
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/implanted = null
|
||||
var/mob/living/imp_in = null
|
||||
var/obj/item/organ/external/part = null
|
||||
_color = "b"
|
||||
item_color = "b"
|
||||
var/allow_reagents = 0
|
||||
var/malfunction = 0
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
update()
|
||||
if (src.imp)
|
||||
src.icon_state = text("implantcase-[]", src.imp._color)
|
||||
src.icon_state = text("implantcase-[]", src.imp.item_color)
|
||||
src.origin_tech = src.imp.origin_tech
|
||||
else
|
||||
src.icon_state = "implantcase-0"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/item/weapon/implant/freedom
|
||||
name = "freedom"
|
||||
desc = "Use this to escape from those evil Red Shirts."
|
||||
_color = "r"
|
||||
item_color = "r"
|
||||
var/activation_emote = "chuckle"
|
||||
origin_tech = "materials=2;magnets=3;biotech=3;syndicate=4"
|
||||
var/uses = 4
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!_color)
|
||||
if(!item_color)
|
||||
icon_state = icon_state_on
|
||||
else
|
||||
icon_state = "sword[_color]"
|
||||
icon_state = "sword[item_color]"
|
||||
w_class = w_class_on
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness
|
||||
user << "<span class='notice'>[src] is now active.</span>"
|
||||
@@ -86,8 +86,8 @@
|
||||
var/blade_color
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/New()
|
||||
if(_color == null)
|
||||
_color = pick("red", "blue", "green", "purple")
|
||||
if(item_color == null)
|
||||
item_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/IsShield()
|
||||
if(active)
|
||||
@@ -120,12 +120,12 @@
|
||||
icon_state = "esaw_0"
|
||||
icon_state_on = "esaw_1"
|
||||
hitcost = 75 //Costs more than a standard cyborg esword
|
||||
_color = null
|
||||
item_color = null
|
||||
w_class = 3
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/New()
|
||||
..()
|
||||
_color = null
|
||||
item_color = null
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/cyborg/saw/IsShield()
|
||||
return 0
|
||||
@@ -133,16 +133,16 @@
|
||||
/obj/item/weapon/melee/energy/sword/saber
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/blue
|
||||
_color = "blue"
|
||||
item_color = "blue"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/purple
|
||||
_color = "purple"
|
||||
item_color = "purple"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/green
|
||||
_color = "green"
|
||||
item_color = "green"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/red
|
||||
_color = "red"
|
||||
item_color = "red"
|
||||
|
||||
/obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params)
|
||||
..()
|
||||
@@ -156,7 +156,7 @@
|
||||
var/obj/item/weapon/twohanded/dualsaber/newSaber = new /obj/item/weapon/twohanded/dualsaber(user.loc)
|
||||
if(src.hacked) // That's right, we'll only check the "original" esword.
|
||||
newSaber.hacked = 1
|
||||
newSaber._color = "rainbow"
|
||||
newSaber.item_color = "rainbow"
|
||||
user.unEquip(W)
|
||||
user.unEquip(src)
|
||||
qdel(W)
|
||||
@@ -165,7 +165,7 @@
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
if(hacked == 0)
|
||||
hacked = 1
|
||||
_color = "rainbow"
|
||||
item_color = "rainbow"
|
||||
user << "<span class='warning'>RNBW_ENGAGE</span>"
|
||||
|
||||
if(active)
|
||||
|
||||
Reference in New Issue
Block a user