Merge branch 'master' into upstream-merge-29647

This commit is contained in:
LetterJay
2017-08-19 12:25:49 -05:00
committed by GitHub
517 changed files with 6381 additions and 3806 deletions
+4 -2
View File
@@ -169,7 +169,7 @@
/datum/action/item_action/toggle_firemode
name = "Toggle Firemode"
/datum/action/item_action/rcl
name = "Change Cable Color"
button_icon_state = "rcl_rainbow"
@@ -417,6 +417,7 @@
button_icon_state = "smoke"
/datum/action/item_action/ninjaboost
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_CONSCIOUS
name = "Adrenaline Boost"
desc = "Inject a secret chemical that will counteract all movement-impairing effect."
button_icon_state = "repulse"
@@ -489,7 +490,8 @@
var/obj/effect/proc_holder/spell/S = target
S.action = src
name = S.name
icon_icon = S.action_icon
desc = S.desc
button_icon = S.action_icon
button_icon_state = S.action_icon_state
background_icon_state = S.action_background_icon_state
button.name = name
+9 -6
View File
@@ -23,6 +23,7 @@
/datum/antagonist/traitor/human
should_specialise = FALSE
var/should_equip = TRUE
/datum/antagonist/traitor/human/custom
silent = TRUE
should_give_codewords = FALSE
@@ -31,6 +32,7 @@
/datum/antagonist/traitor/AI
should_specialise = FALSE
/datum/antagonist/traitor/AI/custom
silent = TRUE
should_give_codewords = FALSE
@@ -38,9 +40,8 @@
/datum/antagonist/traitor/on_body_transfer(mob/living/old_body, mob/living/new_body)
if(issilicon(new_body) && issilicon(old_body))
..()
else
// human <-> silicon only
if(old_body && issilicon(new_body) ^ issilicon(old_body))
silent = TRUE
owner.add_antag_datum(base_datum_custom)
for(var/datum/antagonist/traitor/new_datum in owner.antag_datums)
@@ -49,13 +50,14 @@
transfer_important_variables(new_datum)
break
on_removal()
else
..()
/datum/antagonist/traitor/human/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
should_give_codewords = FALSE
/datum/antagonist/traitor/AI/custom //used to give custom objectives
silent = TRUE
give_objectives = FALSE
@@ -83,7 +85,8 @@
if(owner.assigned_role == "Clown")
var/mob/living/carbon/human/traitor_mob = owner.current
if(traitor_mob&&istype(traitor_mob))
if(!silent) to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.")
if(!silent)
to_chat(traitor_mob, "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.")
traitor_mob.dna.remove_mutation(CLOWNMUT)
/datum/antagonist/traitor/remove_innate_effects()
+1 -1
View File
@@ -280,7 +280,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
if(!D)
return
to_chat(world, "<font size=5><span class='danger'><b>\"SLOTH, WRATH, GLUTTONY, ACEDIA, ENVY, GREED, PRIDE! FIRES OF HELL AWAKEN!!\"</font></span>")
world << 'sound/hallucinations/veryfar_noise.ogg'
SEND_SOUND(world, sound('sound/hallucinations/veryfar_noise.ogg'))
give_appropriate_spells()
D.convert_to_archdevil()
if(istype(D.loc, /obj/effect/dummy/slaughter/))
+1 -1
View File
@@ -141,7 +141,7 @@
/datum/antagonist/ninja/greet()
owner.current << sound('sound/effects/ninja_greeting.ogg')
SEND_SOUND(owner.current, sound('sound/effects/ninja_greeting.ogg'))
to_chat(owner.current, "I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!")
to_chat(owner.current, "Surprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!")
to_chat(owner.current, "Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.")
+54
View File
@@ -100,3 +100,57 @@
if (object == GLOBAL_PROC)
return call(delegate)(arglist(calling_arguments))
return call(object, delegate)(arglist(calling_arguments))
/datum/callback_select
var/list/finished
var/pendingcount
var/total
/datum/callback_select/New(count, savereturns)
total = count
if (savereturns)
finished = new(count)
/datum/callback_select/proc/invoke_callback(index, datum/callback/callback, list/callback_args, savereturn = TRUE)
set waitfor = FALSE
if (!callback || !istype(callback))
//This check only exists because the alternative is callback_select would block forever if given invalid data
CRASH("invalid callback passed to invoke_callback")
if (!length(callback_args))
callback_args = list()
pendingcount++
var/rtn = callback.Invoke(arglist(callback_args))
pendingcount--
if (savereturn)
finished[index] = rtn
//runs a list of callbacks asynchronously, returning once all of them return.
//callbacks can be repeated.
//callbacks-args is a optional list of argument lists, in the same order as the callbacks,
// the inner lists will be sent to the callbacks when invoked() as additional args.
//can optionly save and return a list of return values, in the same order as the original list of callbacks
//resolution is the number of byond ticks between checks.
/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
if (!callbacks)
return
var/count = length(callbacks)
if (!count)
return
if (!callback_args)
callback_args = list()
callback_args.len = count
var/datum/callback_select/CS = new(count, savereturns)
for (var/i in 1 to count)
CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
while(CS.pendingcount)
sleep(resolution*world.tick_lag)
return CS.finished
+62
View File
@@ -0,0 +1,62 @@
diff a/code/datums/callback.dm b/code/datums/callback.dm (rejected hunks)
@@ -100,60 +100,3 @@
if (object == GLOBAL_PROC)
return call(delegate)(arglist(calling_arguments))
return call(object, delegate)(arglist(calling_arguments))
-
-
-/datum/callback_select
- var/list/finished
- var/pendingcount
- var/total
-
-/datum/callback_select/New(count, savereturns)
- total = count
- if (savereturns)
- finished = new(count)
-
-
-/datum/callback_select/proc/invoke_callback(index, datum/callback/callback, list/callback_args, savereturn = TRUE)
- set waitfor = FALSE
- if (!callback || !istype(callback))
- //This check only exists because the alternative is callback_select would block forever if given invalid data
- CRASH("invalid callback passed to invoke_callback")
- if (!length(callback_args))
- callback_args = list()
- pendingcount++
- debug_usr("calling callback")
- var/rtn = callback.Invoke(arglist(callback_args))
- debug_usr("callback returned")
- pendingcount--
- if (savereturn)
- finished[index] = rtn
-
-
-
-
-//runs a list of callbacks asynchronously, returning once all of them return.
-//callbacks can be repeated.
-//callbacks-args is a optional list of argument lists, in the same order as the callbacks,
-// the inner lists will be sent to the callbacks when invoked() as additional args.
-//can optionly save and return a list of return values, in the same order as the original list of callbacks
-//resolution is the number of byond ticks between checks.
-/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
- if (!callbacks)
- return
- var/count = length(callbacks)
- if (!count)
- return
- if (!callback_args)
- callback_args = list()
-
- callback_args.len = count
-
- var/datum/callback_select/CS = new(count, savereturns)
- for (var/i in 1 to count)
- CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
- debug_usr("starting callbacks: [CS.pendingcount]")
- while(CS.pendingcount)
- debug_usr("callbacks: [CS.pendingcount]")
- sleep(resolution*world.tick_lag)
- return CS.finished
-
+74 -12
View File
@@ -18,7 +18,38 @@
qdel(src)
return
P.SendSignal(COMSIG_COMPONENT_ADDED, src)
LAZYADD(P.datum_components, src)
//lazy init the parent's dc list
var/list/dc = P.datum_components
if(!dc)
P.datum_components = dc = list()
//set up the typecache
var/our_type = type
for(var/I in _GetInverseTypeListExceptRoot(our_type))
var/test = dc[I]
if(test) //already another component of this type here
var/list/components_of_type
if(!islist(test))
components_of_type = list(test)
dc[I] = components_of_type
else
components_of_type = test
if(I == our_type) //exact match, take priority
var/inserted = FALSE
for(var/J in 1 to components_of_type.len)
var/datum/component/C = components_of_type[J]
if(C.type != our_type) //but not over other exact matches
components_of_type.Insert(J, I)
inserted = TRUE
break
if(!inserted)
components_of_type += src
else //indirect match, back of the line with ya
components_of_type += src
else //only component of this type, no list
dc[I] = src
parent = P
/datum/component/Destroy()
@@ -33,7 +64,20 @@
/datum/component/proc/_RemoveNoSignal()
var/datum/P = parent
if(P)
LAZYREMOVE(P.datum_components, src)
var/list/dc = P.datum_components
var/our_type = type
for(var/I in _GetInverseTypeListExceptRoot(our_type))
var/list/components_of_type = dc[I]
if(islist(components_of_type)) //
var/list/subtracted = components_of_type - src
if(subtracted.len == 1) //only 1 guy left
dc[I] = subtracted[1] //make him special
else
dc[I] = subtracted
else //just us
dc -= I
if(!dc.len)
P.datum_components = null
parent = null
/datum/component/proc/RegisterSignal(sig_type, proc_on_self, override = FALSE)
@@ -66,6 +110,13 @@
/datum/component/proc/OnTransfer(datum/new_parent)
return
/datum/component/proc/_GetInverseTypeListExceptRoot(our_type_cached)
var/datum/component/current_type = our_type_cached
. = list()
while (current_type != /datum/component)
. += current_type
current_type = type2parent(current_type)
/datum/proc/SendSignal(sigtype, ...)
var/list/comps = datum_components
. = FALSE
@@ -81,21 +132,32 @@
return
/datum/proc/GetComponent(c_type)
for(var/I in datum_components)
if(istype(I, c_type))
return I
var/list/dc = datum_components
if(!dc)
return null
. = dc[c_type]
if(islist(.))
return .[1]
/datum/proc/GetExactComponent(c_type)
for(var/I in datum_components)
var/datum/component/C = I
var/list/dc = datum_components
if(!dc)
return null
var/datum/component/C = dc[c_type]
if(C)
if(islist(C))
C = C[1]
if(C.type == c_type)
return I
return C
return null
/datum/proc/GetComponents(c_type)
. = list()
for(var/I in datum_components)
if(istype(I, c_type))
. += I
var/list/dc = datum_components
if(!dc)
return null
. = dc[c_type]
if(!islist(.))
return list(.)
/datum/proc/AddComponent(new_type, ...)
var/nt = new_type
+1 -63
View File
@@ -1,63 +1 @@
diff a/code/datums/components/component.dm b/code/datums/components/component.dm (rejected hunks)
@@ -26,7 +26,7 @@
//set up the typecache
var/our_type = type
- for(var/I in _GetInverseTypeListExceptRoot(our_type))
+ for(var/I in _GetInverseTypeList(our_type))
var/test = dc[I]
if(test) //already another component of this type here
var/list/components_of_type
@@ -66,7 +66,7 @@
if(P)
var/list/dc = P.datum_components
var/our_type = type
- for(var/I in _GetInverseTypeListExceptRoot(our_type))
+ for(var/I in _GetInverseTypeList(our_type))
var/list/components_of_type = dc[I]
if(islist(components_of_type)) //
var/list/subtracted = components_of_type - src
@@ -110,25 +110,33 @@
/datum/component/proc/OnTransfer(datum/new_parent)
return
-/datum/component/proc/_GetInverseTypeListExceptRoot(our_type_cached)
- var/datum/component/current_type = our_type_cached
- . = list()
+/datum/component/proc/_GetInverseTypeList(current_type)
+ . = list(current_type)
while (current_type != /datum/component)
- . += current_type
current_type = type2parent(current_type)
+ . += current_type
/datum/var/list/datum_components //special typecache of /datum/component
/datum/proc/SendSignal(sigtype, ...)
var/list/comps = datum_components
. = FALSE
- for(var/I in comps)
- var/datum/component/C = I
- if(!C.enabled)
- continue
- if(C.ReceiveSignal(arglist(args)))
+ if(!comps)
+ return
+ var/target = comps[/datum/component]
+ if(!islist(target))
+ var/datum/component/C = target
+ if(C.enabled && C.ReceiveSignal(arglist(args)))
ComponentActivated(C)
- . = TRUE
+ return TRUE
+ else
+ for(var/I in target)
+ var/datum/component/C = I
+ if(!C.enabled)
+ continue
+ if(C.ReceiveSignal(arglist(args)))
+ ComponentActivated(C)
+ . = TRUE
/datum/proc/ComponentActivated(datum/component/C)
return
-
+20
View File
@@ -929,6 +929,26 @@
manipulate_organs(C)
href_list["datumrefresh"] = href_list["editorgans"]
else if(href_list["hallucinate"])
if(!check_rights(0))
return
var/mob/living/carbon/C = locate(href_list["hallucinate"]) in GLOB.mob_list
if(!istype(C))
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/list/hallucinations = subtypesof(/datum/hallucination)
var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in hallucinations
if(!usr)
return
if(QDELETED(C))
to_chat(usr, "Mob doesn't exist anymore")
return
if(result)
new result(C, TRUE)
else if(href_list["makehuman"])
if(!check_rights(R_SPAWN))
return
@@ -59,4 +59,4 @@ Bonus
else
if(prob(base_message_chance))
to_chat(M, "<span class='userdanger'>[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]</span>")
M.hallucination += (15 * power)
M.hallucination += (45 * power)
+7
View File
@@ -29,6 +29,10 @@
destination.dna.temporary_mutations = temporary_mutations.Copy()
if(transfer_SE)
destination.dna.struc_enzymes = struc_enzymes
if(ishuman(destination))
var/mob/living/carbon/human/H = destination
H.give_genitals(TRUE)//This gives the body the genitals of this DNA. Used for any transformations based on DNA
destination.flavor_text = destination.dna.features["flavor_text"] //Update the flavor_text to use new dna text
/datum/dna/proc/copy_dna(datum/dna/new_dna)
new_dna.unique_enzymes = unique_enzymes
@@ -228,6 +232,7 @@
if(newfeatures)
dna.features = newfeatures
flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text
if(mrace)
set_species(mrace, icon_update=0)
@@ -247,6 +252,8 @@
dna.struc_enzymes = se
domutcheck()
give_genitals(TRUE)//Give all genitalia that DNA says you should have, remove any pre-existing ones as this is a hardset!
if(mrace || newfeatures || ui)
update_body()
update_hair()
+3 -3
View File
@@ -11,7 +11,7 @@
var/minetype = "lavaland"
var/list/transition_config = list(CENTCOMM = SELFLOOPING,
var/list/transition_config = list(CENTCOM = SELFLOOPING,
MAIN_STATION = CROSSLINKED,
EMPTY_AREA_1 = CROSSLINKED,
EMPTY_AREA_2 = CROSSLINKED,
@@ -115,8 +115,8 @@
return UNAFFECTED
if("MAIN_STATION")
return MAIN_STATION
if("CENTCOMM")
return CENTCOMM
if("CENTCOM")
return CENTCOM
if("MINING")
return MINING
if("EMPTY_AREA_1")
+20 -11
View File
@@ -120,6 +120,10 @@
transfer_martial_arts(new_character)
if(active || force_key_move)
new_character.key = key //now transfer the key to link the client to our new body
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
L.update_arousal_hud() //Removes the old icon
/datum/mind/proc/store_memory(new_text)
memory += "[new_text]<BR>"
@@ -396,7 +400,15 @@
if (assigned_role in GLOB.command_positions)
text += "<b>HEAD</b>|loyal|employee|headrev|rev"
else if (src in SSticker.mode.head_revolutionaries)
text += "head|loyal|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
var/last_healthy_headrev = TRUE
for(var/I in SSticker.mode.head_revolutionaries)
if(I == src)
continue
var/mob/M = I
if(M.z == ZLEVEL_STATION && !M.stat)
last_healthy_headrev = FALSE
break
text += "head|loyal|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>[last_healthy_headrev ? "<font color='red'>LAST </font> " : ""]HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
text += "<br>Flash: <a href='?src=\ref[src];revolution=flash'>give</a>"
var/list/L = current.get_contents()
@@ -801,11 +813,11 @@
possible_targets += possible_target.current
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon)
if (objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
if (is_type_in_typecache(objective, objective_list) && objective.target)
def_target = objective.target.current
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
if (!new_target)
return
@@ -813,12 +825,12 @@
if (new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective:target = null
new_objective.target = null
new_objective.explanation_text = "Free objective"
else
new_objective = new objective_path
new_objective.owner = src
new_objective:target = new_target:mind
new_objective.target = new_target.mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.update_explanation_text()
@@ -1690,10 +1702,7 @@
else
mind = new /datum/mind(key)
if(SSticker)
SSticker.minds += mind
else
stack_trace("mind_initialize(): No SSticker ready")
SSticker.minds += mind
if(!mind.name)
mind.name = real_name
mind.current = src
+1 -1
View File
@@ -82,7 +82,7 @@
id = "derelict4"
suffix = "derelict4.dmm"
name = "Derelict 4"
description = "Centcom ferries have never crashed, will never crash, there is no current investigation into a crashed ferry, and we will not let Internal Affairs trample over high security \
description = "CentCom ferries have never crashed, will never crash, there is no current investigation into a crashed ferry, and we will not let Internal Affairs trample over high security \
information in the name of this baseless witchhunt."
/datum/map_template/ruin/space/derelict5
+5 -5
View File
@@ -133,7 +133,7 @@
/datum/map_template/shuttle/emergency/cramped
suffix = "cramped"
name = "Secure Transport Vessel 5 (STV5)"
description = "Well, looks like Centcomm only had this ship in the area, they probably weren't expecting you to need evac for a while. \
description = "Well, looks like CentCom only had this ship in the area, they probably weren't expecting you to need evac for a while. \
Probably best if you don't rifle around in whatever equipment they were transporting. I hope you're friendly with your coworkers, because there is very little space in this thing.\n\
\n\
Contains contraband armory guns, maintenance loot, and abandoned crates!"
@@ -181,7 +181,7 @@
suffix = "supermatter"
name = "Hyperfractal Gigashuttle"
description = "\"I dunno, this seems kinda needlessly complicated.\"\n\
\"This shuttle has very a very high safety record, according to Centcom Officer Cadet Yins.\"\n\
\"This shuttle has very a very high safety record, according to CentCom Officer Cadet Yins.\"\n\
\"Are you sure?\"\n\
\"Yes, it has a safety record of N-A-N, which is apparently larger than 100%.\""
admin_notes = "Supermatter that spawns on shuttle is special anchored 'hugbox' supermatter that cannot take damage and does not take in or emit gas. \
@@ -215,7 +215,7 @@
/datum/map_template/shuttle/ferry/base
suffix = "base"
name = "transport ferry"
description = "Standard issue Box/Metastation Centcom ferry."
description = "Standard issue Box/Metastation CentCom ferry."
/datum/map_template/shuttle/ferry/meat
suffix = "meat"
@@ -267,7 +267,7 @@
/datum/map_template/shuttle/emergency/raven
suffix = "raven"
name = "Centcomm Raven Battlecruiser"
description = "The Centcomm Raven Battlecruiser is currently docked at the Centcomm ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The Centcomm Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range Centcomm Medical Bay."
name = "CentCom Raven Battlecruiser"
description = "The CentCom Raven Battlecruiser is currently docked at the CentCom ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The CentCom Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range CentCom Medical Bay."
admin_notes = "The long way home"
credit_cost = 12500
+2 -2
View File
@@ -37,7 +37,7 @@
icon_state = "shadow_mend"
/datum/status_effect/void_price/tick()
owner << sound('sound/magic/summon_karp.ogg', volume = 25)
SEND_SOUND(owner, sound('sound/magic/summon_karp.ogg', volume = 25))
owner.adjustBruteLoss(3)
@@ -247,7 +247,7 @@
for(var/datum/mind/B in SSticker.mode.cult)
if(isliving(B.current))
var/mob/living/M = B.current
M << 'sound/hallucinations/veryfar_noise.ogg'
SEND_SOUND(M, sound('sound/hallucinations/veryfar_noise.ogg'))
to_chat(M, "<span class='cultlarge'>The Cult's Master, [owner], has fallen in \the [A]!</span>")
/datum/status_effect/cult_master/tick()
+3 -3
View File
@@ -69,7 +69,7 @@
if(telegraph_message)
to_chat(M, telegraph_message)
if(telegraph_sound)
M << sound(telegraph_sound)
SEND_SOUND(M, sound(telegraph_sound))
addtimer(CALLBACK(src, .proc/start), telegraph_duration)
/datum/weather/proc/start()
@@ -83,7 +83,7 @@
if(weather_message)
to_chat(M, weather_message)
if(weather_sound)
M << sound(weather_sound)
SEND_SOUND(M, sound(weather_sound))
START_PROCESSING(SSweather, src)
addtimer(CALLBACK(src, .proc/wind_down), weather_duration)
@@ -98,7 +98,7 @@
if(end_message)
to_chat(M, end_message)
if(end_sound)
M << sound(end_sound)
SEND_SOUND(M, sound(end_sound))
STOP_PROCESSING(SSweather, src)
addtimer(CALLBACK(src, .proc/end), end_duration)
+5 -5
View File
@@ -20,12 +20,12 @@
var/mob/living/simple_animal/bot/mulebot/M = holder
switch(wire)
if(WIRE_POWER1, WIRE_POWER2)
holder.visible_message("<span class='notice'>[bicon(M)] The charge light flickers.</span>")
holder.visible_message("<span class='notice'>[icon2html(M, viewers(holder))] The charge light flickers.</span>")
if(WIRE_AVOIDANCE)
holder.visible_message("<span class='notice'>[bicon(M)] The external warning lights flash briefly.</span>")
holder.visible_message("<span class='notice'>[icon2html(M, viewers(holder))] The external warning lights flash briefly.</span>")
if(WIRE_LOADCHECK)
holder.visible_message("<span class='notice'>[bicon(M)] The load platform clunks.</span>")
holder.visible_message("<span class='notice'>[icon2html(M, viewers(holder))] The load platform clunks.</span>")
if(WIRE_MOTOR1, WIRE_MOTOR2)
holder.visible_message("<span class='notice'>[bicon(M)] The drive motor whines briefly.</span>")
holder.visible_message("<span class='notice'>[icon2html(M, viewers(holder))] The drive motor whines briefly.</span>")
else
holder.visible_message("<span class='notice'>[bicon(M)] You hear a radio crackle.</span>")
holder.visible_message("<span class='notice'>[icon2html(M, viewers(holder))] You hear a radio crackle.</span>")
+1 -1
View File
@@ -25,7 +25,7 @@
if(WIRE_INTERFACE)
C.interface_control = !C.interface_control
if(WIRE_LIMIT)
C.visible_message("[bicon(C)]<b>[C]</b> makes a large whirring noise.")
C.visible_message("[icon2html(C, viewers(holder))]<b>[C]</b> makes a large whirring noise.")
/datum/wires/particle_accelerator/control_box/on_cut(wire, mend)
var/obj/machinery/particle_accelerator/control_box/C = holder
+8 -8
View File
@@ -21,7 +21,7 @@
var/list/status = list()
status += "The law sync module is [R.lawupdate ? "on" : "off"]."
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
status += "The camera light is [!isnull(R.camera) && R.camera.status ? "on" : "off"]."
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
return status
@@ -45,9 +45,9 @@
else
R.notify_ai(TRUE)
if(WIRE_CAMERA) // Pulse to disable the camera.
if(!isnull(R.camera) && !R.scrambledcodes)
R.camera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lense focuses loudly.", "Your camera lense focuses loudly.")
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
if(WIRE_LAWSYNC) // Forces a law update if possible.
if(R.lawupdate)
R.visible_message("[R] gently chimes.", "LawSync protocol engaged.")
@@ -75,10 +75,10 @@
else if(!R.deployed) //AI shells must always have the same laws as the AI
R.lawupdate = FALSE
if (WIRE_CAMERA) // Disable the camera.
if(!isnull(R.camera) && !R.scrambledcodes)
R.camera.status = mend
R.camera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lense focuses loudly.", "Your camera lense focuses loudly.")
if(!QDELETED(R.builtInCamera) && !R.scrambledcodes)
R.builtInCamera.status = mend
R.builtInCamera.toggle_cam(usr, 0)
R.visible_message("[R]'s camera lens focuses loudly.", "Your camera lens focuses loudly.")
if(WIRE_LOCKDOWN) // Simple lockdown.
R.SetLockdown(!mend)
if(WIRE_RESET_MODULE)
+12 -12
View File
@@ -19,21 +19,21 @@
switch(wire)
if(WIRE_BOOM)
if(B.active)
holder.visible_message("<span class='danger'>[bicon(B)] An alarm sounds! It's go-</span>")
holder.visible_message("<span class='danger'>[icon2html(B, viewers(holder))] An alarm sounds! It's go-</span>")
B.explode_now = TRUE
tell_admins(B)
if(WIRE_UNBOLT)
holder.visible_message("<span class='notice'>[bicon(B)] The bolts spin in place for a moment.</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] The bolts spin in place for a moment.</span>")
if(WIRE_DELAY)
if(B.delayedbig)
holder.visible_message("<span class='notice'>[bicon(B)] The bomb has already been delayed.</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] The bomb has already been delayed.</span>")
else
holder.visible_message("<span class='notice'>[bicon(B)] The bomb chirps.</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] The bomb chirps.</span>")
playsound(B, 'sound/machines/chime.ogg', 30, 1)
B.detonation_timer += 300
B.delayedbig = TRUE
if(WIRE_PROCEED)
holder.visible_message("<span class='danger'>[bicon(B)] The bomb buzzes ominously!</span>")
holder.visible_message("<span class='danger'>[icon2html(B, viewers(holder))] The bomb buzzes ominously!</span>")
playsound(B, 'sound/machines/buzz-sigh.ogg', 30, 1)
var/seconds = B.seconds_remaining()
if(seconds >= 61) // Long fuse bombs can suddenly become more dangerous if you tinker with them.
@@ -44,13 +44,13 @@
B.detonation_timer = world.time + 100
if(WIRE_ACTIVATE)
if(!B.active && !B.defused)
holder.visible_message("<span class='danger'>[bicon(B)] You hear the bomb start ticking!</span>")
holder.visible_message("<span class='danger'>[icon2html(B, viewers(holder))] You hear the bomb start ticking!</span>")
B.activate()
B.update_icon()
else if(B.delayedlittle)
holder.visible_message("<span class='notice'>[bicon(B)] Nothing happens.</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] Nothing happens.</span>")
else
holder.visible_message("<span class='notice'>[bicon(B)] The bomb seems to hesitate for a moment.</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] The bomb seems to hesitate for a moment.</span>")
B.detonation_timer += 100
B.delayedlittle = TRUE
@@ -62,24 +62,24 @@
B.defused = FALSE // Cutting and mending all the wires of an inactive bomb will thus cure any sabotage.
else
if(B.active)
holder.visible_message("<span class='danger'>[bicon(B)] An alarm sounds! It's go-</span>")
holder.visible_message("<span class='danger'>[icon2html(B, viewers(holder))] An alarm sounds! It's go-</span>")
B.explode_now = TRUE
tell_admins(B)
else
B.defused = TRUE
if(WIRE_UNBOLT)
if(!mend && B.anchored)
holder.visible_message("<span class='notice'>[bicon(B)] The bolts lift out of the ground!</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] The bolts lift out of the ground!</span>")
playsound(B, 'sound/effects/stealthoff.ogg', 30, 1)
B.anchored = FALSE
if(WIRE_PROCEED)
if(!mend && B.active)
holder.visible_message("<span class='danger'>[bicon(B)] An alarm sounds! It's go-</span>")
holder.visible_message("<span class='danger'>[icon2html(B, viewers(holder))] An alarm sounds! It's go-</span>")
B.explode_now = TRUE
tell_admins(B)
if(WIRE_ACTIVATE)
if(!mend && B.active)
holder.visible_message("<span class='notice'>[bicon(B)] The timer stops! The bomb has been defused!</span>")
holder.visible_message("<span class='notice'>[icon2html(B, viewers(holder))] The timer stops! The bomb has been defused!</span>")
B.active = FALSE
B.defused = TRUE
B.update_icon()