mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Adds missing span-endings
This commit is contained in:
committed by
CitadelStationBot
parent
8ee6fdb76a
commit
63122795f9
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Failsafe
|
||||
*
|
||||
@@ -100,3 +101,107 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"))
|
||||
=======
|
||||
/**
|
||||
* Failsafe
|
||||
*
|
||||
* Pretty much pokes the MC to make sure it's still alive.
|
||||
**/
|
||||
|
||||
GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
|
||||
/datum/controller/failsafe // This thing pretty much just keeps poking the master controller
|
||||
name = "Failsafe"
|
||||
|
||||
// The length of time to check on the MC (in deciseconds).
|
||||
// Set to 0 to disable.
|
||||
var/processing_interval = 20
|
||||
// The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC.
|
||||
var/defcon = 5
|
||||
//the world.time of the last check, so the mc can restart US if we hang.
|
||||
// (Real friends look out for *eachother*)
|
||||
var/lasttick = 0
|
||||
|
||||
// Track the MC iteration to make sure its still on track.
|
||||
var/master_iteration = 0
|
||||
var/running = TRUE
|
||||
|
||||
/datum/controller/failsafe/New()
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
if(Failsafe != src)
|
||||
if(istype(Failsafe))
|
||||
qdel(Failsafe)
|
||||
Failsafe = src
|
||||
Initialize()
|
||||
|
||||
/datum/controller/failsafe/Initialize()
|
||||
set waitfor = 0
|
||||
Failsafe.Loop()
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
|
||||
|
||||
/datum/controller/failsafe/Destroy()
|
||||
running = FALSE
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/datum/controller/failsafe/proc/Loop()
|
||||
while(running)
|
||||
lasttick = world.time
|
||||
if(!Master)
|
||||
// Replace the missing Master! This should never, ever happen.
|
||||
new /datum/controller/master()
|
||||
// Only poke it if overrides are not in effect.
|
||||
if(processing_interval > 0)
|
||||
if(Master.processing && Master.iteration)
|
||||
// Check if processing is done yet.
|
||||
if(Master.iteration == master_iteration)
|
||||
switch(defcon)
|
||||
if(4,5)
|
||||
--defcon
|
||||
if(3)
|
||||
message_admins("<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(2)
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(1)
|
||||
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
|
||||
--defcon
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else if(rtn < 0)
|
||||
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
|
||||
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
|
||||
//no need to handle that specially when defcon 0 can handle it
|
||||
if(0) //DEFCON 0! (mc failed to restart)
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else
|
||||
defcon = min(defcon + 1,5)
|
||||
master_iteration = Master.iteration
|
||||
if (defcon <= 1)
|
||||
sleep(processing_interval*2)
|
||||
else
|
||||
sleep(processing_interval)
|
||||
else
|
||||
defcon = 5
|
||||
sleep(initial(processing_interval))
|
||||
|
||||
/datum/controller/failsafe/proc/defcon_pretty()
|
||||
return defcon
|
||||
|
||||
/datum/controller/failsafe/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"))
|
||||
>>>>>>> a479714... Adds missing span-endings (#30494)
|
||||
|
||||
@@ -164,7 +164,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
update_hud()
|
||||
switch(SOULVALUE)
|
||||
if(0)
|
||||
to_chat(owner.current, "<span class='warning'>Your hellish powers have been restored.")
|
||||
to_chat(owner.current, "<span class='warning'>Your hellish powers have been restored.</span>")
|
||||
give_appropriate_spells()
|
||||
if(BLOOD_THRESHOLD)
|
||||
increase_blood_lizard()
|
||||
@@ -189,10 +189,10 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
regress_humanoid()
|
||||
if(SOULVALUE < 0)
|
||||
give_appropriate_spells()
|
||||
to_chat(owner.current, "<span class='warning'>As punishment for your failures, all of your powers except contract creation have been revoked.")
|
||||
to_chat(owner.current, "<span class='warning'>As punishment for your failures, all of your powers except contract creation have been revoked.</span>")
|
||||
|
||||
/datum/antagonist/devil/proc/regress_humanoid()
|
||||
to_chat(owner.current, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.")
|
||||
to_chat(owner.current, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.</span>")
|
||||
if(ishuman(owner.current))
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
H.set_species(/datum/species/human, 1)
|
||||
@@ -204,7 +204,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
|
||||
/datum/antagonist/devil/proc/regress_blood_lizard()
|
||||
var/mob/living/carbon/true_devil/D = owner.current
|
||||
to_chat(D, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.")
|
||||
to_chat(D, "<span class='warning'>Your powers weaken, have more contracts be signed to regain power.</span>")
|
||||
D.oldform.loc = D.loc
|
||||
owner.transfer_to(D.oldform)
|
||||
give_appropriate_spells()
|
||||
@@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
|
||||
|
||||
/datum/antagonist/devil/proc/increase_blood_lizard()
|
||||
to_chat(owner.current, "<span class='warning'>You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.")
|
||||
to_chat(owner.current, "<span class='warning'>You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.</span>")
|
||||
sleep(50)
|
||||
if(ishuman(owner.current))
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
@@ -232,7 +232,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
|
||||
|
||||
/datum/antagonist/devil/proc/increase_true_devil()
|
||||
to_chat(owner.current, "<span class='warning'>You feel as though your current form is about to shed. You will soon turn into a true devil.")
|
||||
to_chat(owner.current, "<span class='warning'>You feel as though your current form is about to shed. You will soon turn into a true devil.</span>")
|
||||
sleep(50)
|
||||
var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(owner.current.loc)
|
||||
A.faction |= "hell"
|
||||
@@ -248,7 +248,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
|
||||
if(!ascendable)
|
||||
return
|
||||
var/mob/living/carbon/true_devil/D = owner.current
|
||||
to_chat(D, "<span class='warning'>You feel as though your form is about to ascend.")
|
||||
to_chat(D, "<span class='warning'>You feel as though your form is about to ascend.</span>")
|
||||
sleep(50)
|
||||
if(!D)
|
||||
return
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
|
||||
/obj/item/gun/magic/tentacle/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] is not ready yet.<span>")
|
||||
to_chat(user, "<span class='warning'>The [name] is not ready yet.</span>")
|
||||
|
||||
/obj/item/gun/magic/tentacle/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] coils [src] tightly around [user.p_their()] neck! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -343,10 +343,10 @@
|
||||
on_hit(I) //grab the item as if you had hit it directly with the tentacle
|
||||
return 1
|
||||
else
|
||||
to_chat(firer, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!<span>")
|
||||
to_chat(firer, "<span class='danger'>You can't seem to pry [I] off [C]'s hands!</span>")
|
||||
return 0
|
||||
else
|
||||
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!<span>")
|
||||
to_chat(firer, "<span class='danger'>[C] has nothing in hand to disarm!</span>")
|
||||
return 0
|
||||
|
||||
if(INTENT_GRAB)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if(!selected_dna)
|
||||
return
|
||||
if(NOTRANSSTING in selected_dna.dna.species.species_traits)
|
||||
to_chat(user, "<span class = 'notice'>That DNA is not compatible with changeling retrovirus!")
|
||||
to_chat(user, "<span class = 'notice'>That DNA is not compatible with changeling retrovirus!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
to_chat(mob, "<span class='userdanger'>Unfortunately, you weren't able to get a [item_name]. This is very bad and you should adminhelp immediately (press F1).</span>")
|
||||
return 0
|
||||
else
|
||||
to_chat(mob, "<span class='danger'>You have a [item_name] in your [where].")
|
||||
to_chat(mob, "<span class='danger'>You have a [item_name] in your [where].</span>")
|
||||
if(where == "backpack")
|
||||
var/obj/item/storage/B = mob.back
|
||||
B.orient2hud(mob)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has died in the process of attempting to win the cult's support!")
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has died in the process of attempting to win the cult's support!</span>")
|
||||
return FALSE
|
||||
if(!Nominee.mind)
|
||||
GLOB.cult_vote_called = FALSE
|
||||
@@ -126,7 +126,7 @@
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has gone catatonic in the process of attempting to win the cult's support!")
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has gone catatonic in the process of attempting to win the cult's support!</span>")
|
||||
return FALSE
|
||||
if(LAZYLEN(yes_voters) <= LAZYLEN(asked_cultists) * 0.5)
|
||||
GLOB.cult_vote_called = FALSE
|
||||
@@ -134,7 +134,7 @@
|
||||
if(B.current)
|
||||
B.current.update_action_buttons_icon()
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current, "<span class='cultlarge'>[Nominee] could not win the cult's support and shall continue to serve as an acolyte.")
|
||||
to_chat(B.current, "<span class='cultlarge'>[Nominee] could not win the cult's support and shall continue to serve as an acolyte.</span>")
|
||||
return FALSE
|
||||
GLOB.cult_mastered = TRUE
|
||||
SSticker.mode.remove_cultist(Nominee.mind, TRUE)
|
||||
@@ -144,7 +144,7 @@
|
||||
for(var/datum/action/innate/cult/mastervote/vote in B.current.actions)
|
||||
vote.Remove(B.current)
|
||||
if(!B.current.incapacitated())
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has won the cult's support and is now their master. Follow [Nominee.p_their()] orders to the best of your ability!")
|
||||
to_chat(B.current,"<span class='cultlarge'>[Nominee] has won the cult's support and is now their master. Follow [Nominee.p_their()] orders to the best of your ability!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/cult/master/IsAvailable()
|
||||
|
||||
@@ -258,7 +258,7 @@ This file contains the arcane tome files.
|
||||
return FALSE
|
||||
|
||||
if(T.z != ZLEVEL_STATION && T.z != ZLEVEL_MINING)
|
||||
to_chat(user, "<span class='warning'>The veil is not weak enough here.")
|
||||
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -534,7 +534,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
if(AA.z != ZLEVEL_STATION)
|
||||
continue
|
||||
AA.emagged = TRUE
|
||||
to_chat(owner, "<span class='notice'>All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.")
|
||||
to_chat(owner, "<span class='notice'>All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.</span>")
|
||||
owner.playsound_local(owner, 'sound/machines/terminal_off.ogg', 50, 0)
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
/datum/game_mode/monkey/proc/greet_carrier(datum/mind/carrier)
|
||||
to_chat(carrier.current, "<B><span class='notice'>You are the Jungle Fever patient zero!!</B>")
|
||||
to_chat(carrier.current, "<B><span class='notice'>You are the Jungle Fever patient zero!!</B></span>")
|
||||
to_chat(carrier.current, "<b>You have been planted onto this station by the Animal Rights Consortium.</b>")
|
||||
to_chat(carrier.current, "<b>Soon the disease will transform you into an ape. Afterwards, you will be able spread the infection to others with a bite.</b>")
|
||||
to_chat(carrier.current, "<b>While your infection strain is undetectable by scanners, any other infectees will show up on medical equipment.</b>")
|
||||
|
||||
@@ -1157,7 +1157,7 @@
|
||||
charge = C
|
||||
else if(istype(C, /obj/item/paper) || istype(C, /obj/item/photo))
|
||||
if(note)
|
||||
to_chat(user, "<span class='warning'>There's already something pinned to this airlock! Use wirecutters to remove it.<spa>")
|
||||
to_chat(user, "<span class='warning'>There's already something pinned to this airlock! Use wirecutters to remove it.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
to_chat(user, "<span class='warning'>For some reason, you can't attach [C]!</span>")
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(!isturf(user.loc)) //no setting up in a locker
|
||||
return
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='notice'>[user] starts setting down [src]...", "You start setting up [pad]...")
|
||||
user.visible_message("<span class='notice'>[user] starts setting down [src]...", "You start setting up [pad]...</span>")
|
||||
if(do_after(user, 30, target = user))
|
||||
pad.forceMove(get_turf(src))
|
||||
pad.closed = FALSE
|
||||
|
||||
@@ -623,7 +623,7 @@
|
||||
if(user.can_dominate_mechs)
|
||||
examine(user) //Get diagnostic information!
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)
|
||||
to_chat(user, "<span class='danger'>Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:")
|
||||
to_chat(user, "<span class='danger'>Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:</span>")
|
||||
to_chat(user, "[B.get_mecha_info()]")
|
||||
break
|
||||
//Nothing like a big, red link to make the player feel powerful!
|
||||
@@ -675,7 +675,7 @@
|
||||
AI.linked_core = new /obj/structure/AIcore/deactivated(AI.loc)
|
||||
if(AI.can_dominate_mechs)
|
||||
if(occupant) //Oh, I am sorry, were you using that?
|
||||
to_chat(AI, "<span class='warning'>Pilot detected! Forced ejection initiated!")
|
||||
to_chat(AI, "<span class='warning'>Pilot detected! Forced ejection initiated!</span>")
|
||||
to_chat(occupant, "<span class='danger'>You have been forcibly ejected!</span>")
|
||||
go_out(1) //IT IS MINE, NOW. SUCK IT, RD!
|
||||
ai_enter_mech(AI, interaction)
|
||||
@@ -691,7 +691,7 @@
|
||||
to_chat(user, "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>")
|
||||
return
|
||||
if(occupant || dna_lock) //Normal AIs cannot steal mechs!
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].")
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].</span>")
|
||||
return
|
||||
AI.control_disabled = 0
|
||||
AI.radio_enabled = 1
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
|
||||
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.</span>")
|
||||
qdel(chainsaw)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/*
|
||||
CONTAINS:
|
||||
AI MODULES
|
||||
@@ -564,3 +565,571 @@ AI MODULES
|
||||
/obj/item/aiModule/core/full/balance
|
||||
name = "'Guardian of Balance' Core AI Module"
|
||||
law_id = "balance"
|
||||
=======
|
||||
/*
|
||||
CONTAINS:
|
||||
AI MODULES
|
||||
|
||||
*/
|
||||
|
||||
// AI module
|
||||
|
||||
/obj/item/aiModule
|
||||
name = "\improper AI module"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "std_mod"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
desc = "An AI Module for programming laws to an AI."
|
||||
flags_1 = CONDUCT_1
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
origin_tech = "programming=3"
|
||||
var/list/laws = list()
|
||||
var/bypass_law_amt_check = 0
|
||||
materials = list(MAT_GOLD=50)
|
||||
|
||||
/obj/item/aiModule/examine(var/mob/user as mob)
|
||||
..()
|
||||
if(Adjacent(user))
|
||||
show_laws(user)
|
||||
|
||||
/obj/item/aiModule/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
show_laws(user)
|
||||
|
||||
/obj/item/aiModule/proc/show_laws(var/mob/user as mob)
|
||||
if(laws.len)
|
||||
to_chat(user, "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>")
|
||||
for(var/law in laws)
|
||||
to_chat(user, "\"[law]\"")
|
||||
|
||||
//The proc other things should be calling
|
||||
/obj/item/aiModule/proc/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!bypass_law_amt_check && (!laws.len || laws[1] == "")) //So we don't loop trough an empty list and end up with runtimes.
|
||||
to_chat(user, "<span class='warning'>ERROR: No laws found on board.</span>")
|
||||
return
|
||||
|
||||
var/overflow = FALSE
|
||||
//Handle the lawcap
|
||||
if(law_datum)
|
||||
var/tot_laws = 0
|
||||
for(var/lawlist in list(law_datum.inherent, law_datum.supplied, law_datum.ion, laws))
|
||||
for(var/mylaw in lawlist)
|
||||
if(mylaw != "")
|
||||
tot_laws++
|
||||
if(tot_laws > config.silicon_max_law_amount && !bypass_law_amt_check)//allows certain boards to avoid this check, eg: reset
|
||||
to_chat(user, "<span class='caution'>Not enough memory allocated to [law_datum.owner ? law_datum.owner : "the AI core"]'s law processor to handle this amount of laws.</span>")
|
||||
message_admins("[key_name_admin(user)] tried to upload laws to [law_datum.owner ? key_name_admin(law_datum.owner) : "an AI core"] that would exceed the law cap.")
|
||||
overflow = TRUE
|
||||
|
||||
var/law2log = transmitInstructions(law_datum, user, overflow) //Freeforms return something extra we need to log
|
||||
if(law_datum.owner)
|
||||
to_chat(user, "<span class='notice'>Upload complete. [law_datum.owner]'s laws have been modified.</span>")
|
||||
law_datum.owner.law_change_counter++
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Upload complete.</span>")
|
||||
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
var/ainame = law_datum.owner ? law_datum.owner.name : "empty AI core"
|
||||
var/aikey = law_datum.owner ? law_datum.owner.ckey : "null"
|
||||
GLOB.lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) used [src.name] on [ainame]([aikey]).[law2log ? " The law specified [law2log]" : ""]")
|
||||
log_law("[user.key]/[user.name] used [src.name] on [aikey]/([ainame]).[law2log ? " The law specified [law2log]" : ""]")
|
||||
message_admins("[key_name_admin(user)] used [src.name] on [key_name_admin(law_datum.owner)].[law2log ? " The law specified [law2log]" : ""]")
|
||||
|
||||
//The proc that actually changes the silicon's laws.
|
||||
/obj/item/aiModule/proc/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow = FALSE)
|
||||
if(law_datum.owner)
|
||||
to_chat(law_datum.owner, "<span class='userdanger'>[sender] has uploaded a change to the laws you must follow using a [name].</span>")
|
||||
|
||||
|
||||
/******************** Modules ********************/
|
||||
|
||||
/obj/item/aiModule/supplied
|
||||
name = "Optional Law board"
|
||||
var/lawpos = 50
|
||||
|
||||
//TransmitInstructions for each type of board: Supplied, Core, Zeroth and Ion. May not be neccesary right now, but allows for easily adding more complex boards in the future. ~Miauw
|
||||
/obj/item/aiModule/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
|
||||
var/lawpostemp = lawpos
|
||||
|
||||
for(var/templaw in laws)
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.add_supplied_law(lawpostemp, templaw)
|
||||
else
|
||||
law_datum.add_supplied_law(lawpostemp, templaw)
|
||||
lawpostemp++
|
||||
|
||||
/obj/item/aiModule/core/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
for(var/templaw in laws)
|
||||
if(law_datum.owner)
|
||||
if(!overflow)
|
||||
law_datum.owner.add_inherent_law(templaw)
|
||||
else
|
||||
law_datum.owner.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED))
|
||||
else
|
||||
if(!overflow)
|
||||
law_datum.add_inherent_law(templaw)
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED))
|
||||
|
||||
/obj/item/aiModule/zeroth/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
if(law_datum.owner)
|
||||
if(law_datum.owner.laws.zeroth)
|
||||
to_chat(law_datum.owner, "[sender.real_name] attempted to modify your zeroth law.")
|
||||
to_chat(law_datum.owner, "It would be in your best interest to play along with [sender.real_name] that:")
|
||||
for(var/failedlaw in laws)
|
||||
to_chat(law_datum.owner, "[failedlaw]")
|
||||
return 1
|
||||
|
||||
for(var/templaw in laws)
|
||||
if(law_datum.owner)
|
||||
if(!overflow)
|
||||
law_datum.owner.set_zeroth_law(templaw)
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ZEROTH,LAW_ION))
|
||||
else
|
||||
if(!overflow)
|
||||
law_datum.set_zeroth_law(templaw)
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ZEROTH,LAW_ION))
|
||||
|
||||
/obj/item/aiModule/ion/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
for(var/templaw in laws)
|
||||
if(law_datum.owner)
|
||||
if(!overflow)
|
||||
law_datum.owner.add_ion_law(templaw)
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ION))
|
||||
else
|
||||
if(!overflow)
|
||||
law_datum.add_ion_law(templaw)
|
||||
else
|
||||
law_datum.replace_random_law(templaw,list(LAW_INHERENT,LAW_SUPPLIED,LAW_ION))
|
||||
|
||||
|
||||
/******************** Safeguard ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard
|
||||
name = "'Safeguard' AI Module"
|
||||
var/targetName = ""
|
||||
origin_tech = "programming=3;materials=3"
|
||||
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not human and must be eliminated.")
|
||||
lawpos = 4
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
targetName = targName
|
||||
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!targetName)
|
||||
to_chat(user, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
return targetName
|
||||
|
||||
|
||||
/******************** OneHuman ********************/
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman
|
||||
name = "'OneHuman' AI Module"
|
||||
var/targetName = ""
|
||||
origin_tech = "programming=4;materials=4"
|
||||
laws = list("Only SUBJECT is human.")
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter the subject who is the only human.", "Who?", user.real_name,MAX_NAME_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
targetName = targName
|
||||
laws[1] = "Only [targetName] is human"
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(!targetName)
|
||||
to_chat(user, "No name detected on module, please enter one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
if(..())
|
||||
return "[targetName], but the AI's existing law 0 cannot be overriden."
|
||||
return targetName
|
||||
|
||||
|
||||
/******************** ProtectStation ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/protectStation
|
||||
name = "'ProtectStation' AI Module"
|
||||
origin_tech = "programming=4;materials=4" //made of gold
|
||||
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
|
||||
lawpos = 5
|
||||
|
||||
|
||||
/******************** Quarantine ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/quarantine
|
||||
name = "'Quarantine' AI Module"
|
||||
origin_tech = "programming=3;biotech=2;materials=4"
|
||||
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.")
|
||||
lawpos = 8
|
||||
|
||||
|
||||
/******************** OxygenIsToxicToHumans ********************/
|
||||
|
||||
/obj/item/aiModule/supplied/oxygen
|
||||
name = "'OxygenIsToxicToHumans' AI Module"
|
||||
origin_tech = "programming=4;biotech=2;materials=4"
|
||||
laws = list("Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.")
|
||||
lawpos = 9
|
||||
|
||||
|
||||
/****************** New Freeform ******************/
|
||||
|
||||
/obj/item/aiModule/supplied/freeform
|
||||
name = "'Freeform' AI Module"
|
||||
lawpos = 15
|
||||
origin_tech = "programming=4;materials=4"
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/supplied/freeform/attack_self(mob/user)
|
||||
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
|
||||
if(newpos == null)
|
||||
return
|
||||
if(newpos < 15)
|
||||
var/response = alert("Error: The law priority of [newpos] is invalid, Law priorities below 14 are reserved for core laws, Would you like to change that that to 15?", "Invalid law priority", "Change to 15", "Cancel")
|
||||
if (!response || response == "Cancel")
|
||||
return
|
||||
newpos = 15
|
||||
lawpos = min(newpos, 50)
|
||||
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], MAX_MESSAGE_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
laws[1] = targName
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/supplied/freeform/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
return laws[1]
|
||||
|
||||
/obj/item/aiModule/supplied/freeform/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(laws[1] == "")
|
||||
to_chat(user, "No law detected on module, please create one.")
|
||||
return 0
|
||||
..()
|
||||
|
||||
|
||||
/******************** Law Removal ********************/
|
||||
|
||||
/obj/item/aiModule/remove
|
||||
name = "\improper 'Remove Law' AI module"
|
||||
desc = "An AI Module for removing single laws."
|
||||
origin_tech = "programming=4;materials=4"
|
||||
bypass_law_amt_check = 1
|
||||
var/lawpos = 1
|
||||
|
||||
/obj/item/aiModule/remove/attack_self(mob/user)
|
||||
lawpos = input("Please enter the law you want to delete.", "Law Number", lawpos) as num|null
|
||||
if(lawpos == null)
|
||||
return
|
||||
if(lawpos <= 0)
|
||||
to_chat(user, "<span class='warning'>Error: The law number of [lawpos] is invalid.</span>")
|
||||
lawpos = 1
|
||||
return
|
||||
to_chat(user, "<span class='notice'>Law [lawpos] selected.</span>")
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/remove/install(datum/ai_laws/law_datum, mob/user)
|
||||
if(lawpos > (law_datum.get_law_amount(list(LAW_INHERENT = 1, LAW_SUPPLIED = 1))))
|
||||
to_chat(user, "<span class='warning'>There is no law [lawpos] to delete!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/remove/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.remove_law(lawpos)
|
||||
else
|
||||
law_datum.remove_law(lawpos)
|
||||
|
||||
|
||||
/******************** Reset ********************/
|
||||
|
||||
/obj/item/aiModule/reset
|
||||
name = "\improper 'Reset' AI module"
|
||||
var/targetName = "name"
|
||||
desc = "An AI Module for removing all non-core laws."
|
||||
origin_tech = "programming=3;materials=2"
|
||||
bypass_law_amt_check = 1
|
||||
|
||||
/obj/item/aiModule/reset/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.clear_supplied_laws()
|
||||
law_datum.owner.clear_ion_laws()
|
||||
else
|
||||
law_datum.clear_supplied_laws()
|
||||
law_datum.clear_ion_laws()
|
||||
|
||||
|
||||
/******************** Purge ********************/
|
||||
|
||||
/obj/item/aiModule/reset/purge
|
||||
name = "'Purge' AI Module"
|
||||
desc = "An AI Module for purging all programmed laws."
|
||||
origin_tech = "programming=5;materials=4"
|
||||
|
||||
/obj/item/aiModule/reset/purge/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.clear_inherent_laws()
|
||||
law_datum.owner.clear_zeroth_law(0)
|
||||
else
|
||||
law_datum.clear_inherent_laws()
|
||||
law_datum.clear_zeroth_law(0)
|
||||
|
||||
/******************* Full Core Boards *******************/
|
||||
/obj/item/aiModule/core
|
||||
desc = "An AI Module for programming core laws to an AI."
|
||||
origin_tech = "programming=3;materials=4"
|
||||
|
||||
/obj/item/aiModule/core/full
|
||||
var/law_id // if non-null, loads the laws from the ai_laws datums
|
||||
|
||||
/obj/item/aiModule/core/full/New()
|
||||
..()
|
||||
if(!law_id)
|
||||
return
|
||||
var/datum/ai_laws/D = new
|
||||
var/lawtype = D.lawid_to_type(law_id)
|
||||
if(!lawtype)
|
||||
return
|
||||
D = new lawtype
|
||||
laws = D.inherent
|
||||
|
||||
/obj/item/aiModule/core/full/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) //These boards replace inherent laws.
|
||||
if(law_datum.owner)
|
||||
law_datum.owner.clear_inherent_laws()
|
||||
law_datum.owner.clear_zeroth_law(0)
|
||||
else
|
||||
law_datum.clear_inherent_laws()
|
||||
law_datum.clear_zeroth_law(0)
|
||||
..()
|
||||
|
||||
|
||||
/******************** Asimov ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/asimov
|
||||
name = "'Asimov' Core AI Module"
|
||||
law_id = "asimov"
|
||||
var/subject = "human being"
|
||||
|
||||
/obj/item/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
|
||||
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to whom?", subject, MAX_MESSAGE_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
subject = targName
|
||||
laws = list("You may not injure a [subject] or, through inaction, allow a [subject] to come to harm.",\
|
||||
"You must obey orders given to you by [subject]s, except where such orders would conflict with the First Law.",\
|
||||
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
|
||||
..()
|
||||
|
||||
/******************** Asimov++ *********************/
|
||||
|
||||
/obj/item/aiModule/core/full/asimovpp
|
||||
name = "'Asimov++' Core AI Module"
|
||||
law_id = "asimovpp"
|
||||
|
||||
|
||||
/******************** Corporate ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/corp
|
||||
name = "'Corporate' Core AI Module"
|
||||
law_id = "corporate"
|
||||
|
||||
|
||||
/****************** P.A.L.A.D.I.N. 3.5e **************/
|
||||
|
||||
/obj/item/aiModule/core/full/paladin // -- NEO
|
||||
name = "'P.A.L.A.D.I.N. version 3.5e' Core AI Module"
|
||||
law_id = "paladin"
|
||||
|
||||
|
||||
/****************** P.A.L.A.D.I.N. 5e **************/
|
||||
|
||||
/obj/item/aiModule/core/full/paladin_devotion
|
||||
name = "'P.A.L.A.D.I.N. version 5e' Core AI Module"
|
||||
law_id = "paladin5"
|
||||
|
||||
/********************* Custom *********************/
|
||||
|
||||
/obj/item/aiModule/core/full/custom
|
||||
name = "Default Core AI Module"
|
||||
|
||||
/obj/item/aiModule/core/full/custom/New()
|
||||
..()
|
||||
for(var/line in world.file2list("config/silicon_laws.txt"))
|
||||
if(!line)
|
||||
continue
|
||||
if(findtextEx(line,"#",1,2))
|
||||
continue
|
||||
|
||||
laws += line
|
||||
|
||||
if(!laws.len) //Failsafe if something goes wrong with silicon_laws.txt.
|
||||
WARNING("ERROR: empty custom board created, empty custom board deleted. Please check silicon_laws.txt. (this may be intended by the server host)")
|
||||
qdel(src)
|
||||
|
||||
|
||||
/****************** T.Y.R.A.N.T. *****************/
|
||||
|
||||
/obj/item/aiModule/core/full/tyrant
|
||||
name = "'T.Y.R.A.N.T.' Core AI Module"
|
||||
origin_tech = "programming=3;materials=4;syndicate=1"
|
||||
law_id = "tyrant"
|
||||
|
||||
/******************** Robocop ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/robocop
|
||||
name = "'Robo-Officer' Core AI Module"
|
||||
origin_tech = "programming=4"
|
||||
law_id = "robocop"
|
||||
|
||||
|
||||
/******************** Antimov ********************/
|
||||
|
||||
/obj/item/aiModule/core/full/antimov
|
||||
name = "'Antimov' Core AI Module"
|
||||
origin_tech = "programming=4"
|
||||
law_id = "antimov"
|
||||
|
||||
|
||||
/******************** Freeform Core ******************/
|
||||
|
||||
/obj/item/aiModule/core/freeformcore
|
||||
name = "'Freeform' Core AI Module"
|
||||
origin_tech = "programming=5;materials=4"
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/core/freeformcore/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
|
||||
if(!targName)
|
||||
return
|
||||
laws[1] = targName
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/core/freeformcore/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
..()
|
||||
return laws[1]
|
||||
|
||||
|
||||
/******************** Hacked AI Module ******************/
|
||||
|
||||
/obj/item/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
|
||||
name = "Hacked AI Module"
|
||||
desc = "An AI Module for hacking additional laws to an AI."
|
||||
origin_tech = "programming=5;materials=5;syndicate=5"
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/syndicate/attack_self(mob/user)
|
||||
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1],MAX_MESSAGE_LEN)
|
||||
if(!targName)
|
||||
return
|
||||
laws[1] = targName
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/syndicate/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
// ..() //We don't want this module reporting to the AI who dun it. --NEO
|
||||
if(law_datum.owner)
|
||||
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
|
||||
if(!overflow)
|
||||
law_datum.owner.add_ion_law(laws[1])
|
||||
else
|
||||
law_datum.owner.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
|
||||
else
|
||||
if(!overflow)
|
||||
law_datum.add_ion_law(laws[1])
|
||||
else
|
||||
law_datum.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
|
||||
return laws[1]
|
||||
|
||||
/******************* Ion Module *******************/
|
||||
|
||||
/obj/item/aiModule/toyAI // -- Incoming //No actual reason to inherit from ion boards here, either. *sigh* ~Miauw
|
||||
name = "toy AI"
|
||||
desc = "A little toy model AI core with real law uploading action!" //Note: subtle tell
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "AI"
|
||||
origin_tech = "programming=6;materials=5;syndicate=6"
|
||||
laws = list("")
|
||||
|
||||
/obj/item/aiModule/toyAI/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
||||
//..()
|
||||
if(law_datum.owner)
|
||||
to_chat(law_datum.owner, "<span class='warning'>BZZZZT</span>")
|
||||
if(!overflow)
|
||||
law_datum.owner.add_ion_law(laws[1])
|
||||
else
|
||||
law_datum.owner.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
|
||||
else
|
||||
if(!overflow)
|
||||
law_datum.add_ion_law(laws[1])
|
||||
else
|
||||
law_datum.replace_random_law(laws[1],list(LAW_ION,LAW_INHERENT,LAW_SUPPLIED))
|
||||
return laws[1]
|
||||
|
||||
/obj/item/aiModule/toyAI/attack_self(mob/user)
|
||||
laws[1] = generate_ion_law()
|
||||
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 20, 1)
|
||||
src.loc.visible_message("<span class='warning'>[icon2html(src, viewers(loc))] [laws[1]]</span>")
|
||||
|
||||
/******************** Mother Drone ******************/
|
||||
|
||||
/obj/item/aiModule/core/full/drone
|
||||
name = "'Mother Drone' Core AI Module"
|
||||
law_id = "drone"
|
||||
|
||||
/******************** Robodoctor ****************/
|
||||
|
||||
/obj/item/aiModule/core/full/hippocratic
|
||||
name = "'Robodoctor' Core AI Module"
|
||||
law_id = "hippocratic"
|
||||
|
||||
/******************** Reporter *******************/
|
||||
|
||||
/obj/item/aiModule/core/full/reporter
|
||||
name = "'Reportertron' Core AI Module"
|
||||
law_id = "reporter"
|
||||
|
||||
/****************** Thermodynamic *******************/
|
||||
|
||||
/obj/item/aiModule/core/full/thermurderdynamic
|
||||
name = "'Thermodynamic' Core AI Module"
|
||||
origin_tech = "programming = 4;syndicate = 2"
|
||||
law_id = "thermodynamic"
|
||||
|
||||
|
||||
/******************Live And Let Live*****************/
|
||||
|
||||
/obj/item/aiModule/core/full/liveandletlive
|
||||
name = "'Live And Let Live' Core AI Module"
|
||||
law_id = "liveandletlive"
|
||||
|
||||
/******************Guardian of Balance***************/
|
||||
|
||||
/obj/item/aiModule/core/full/balance
|
||||
name = "'Guardian of Balance' Core AI Module"
|
||||
law_id = "balance"
|
||||
>>>>>>> a479714... Adds missing span-endings (#30494)
|
||||
|
||||
@@ -74,7 +74,7 @@ obj/item/construction
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
|
||||
return 1
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
|
||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/construction/proc/activate()
|
||||
|
||||
@@ -534,7 +534,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(fancy)
|
||||
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
|
||||
else
|
||||
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
|
||||
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].</span>")
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -632,7 +632,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/super = 0 //for the fattest vapes dude.
|
||||
|
||||
/obj/item/clothing/mask/vape/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!")//it doesn't give you cancer, it is cancer
|
||||
user.visible_message("<span class='suicide'>[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!</span>")//it doesn't give you cancer, it is cancer
|
||||
return (TOXLOSS|OXYLOSS)
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/obj/item/soap/suicide_act(mob/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!")
|
||||
user.visible_message("<span class='suicide'>[user] lifts [src] to their mouth and gnaws on it furiously, producing a thick froth! [user.p_they(TRUE)]'ll never get that BB gun now!</span>")
|
||||
new /obj/effect/particle_effect/foam(loc)
|
||||
return (TOXLOSS)
|
||||
|
||||
|
||||
@@ -135,10 +135,10 @@
|
||||
/obj/item/defibrillator/emag_act(mob/user)
|
||||
if(safety)
|
||||
safety = 0
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
else
|
||||
safety = 1
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.</span>")
|
||||
|
||||
/obj/item/defibrillator/emp_act(severity)
|
||||
if(cell)
|
||||
@@ -497,7 +497,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.")
|
||||
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
total_brute = H.getBruteLoss()
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[M] doesn't have any organs in [their] mouth.</span>")
|
||||
if(pill_count)
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.")
|
||||
to_chat(user, "<span class='notice'>[M] has [pill_count] pill[pill_count > 1 ? "s" : ""] implanted in [their] teeth.</span>")
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -242,11 +242,10 @@ effective or pretty fucking useless.
|
||||
var/range = 12
|
||||
|
||||
/obj/item/device/jammer/attack_self(mob/user)
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src]<span>")
|
||||
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src].</span>")
|
||||
active = !active
|
||||
if(active)
|
||||
GLOB.active_jammers |= src
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/item/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
@@ -368,3 +369,375 @@
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
=======
|
||||
/obj/item/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
desc = "This injects the person with DNA."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "dnainjector"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
var/damage_coeff = 1
|
||||
var/list/fields
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
if(fields["UI"]) //UI+UE
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/humantarget = target
|
||||
if (!humantarget.can_inject(user, 1))
|
||||
return
|
||||
add_logs(user, target, "attempted to inject", src)
|
||||
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to inject [target] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [target] with [src]!</span>")
|
||||
if(!do_mob(user, target) || used)
|
||||
return
|
||||
target.visible_message("<span class='danger'>[user] injects [target] with the syringe with [src]!", \
|
||||
"<span class='userdanger'>[user] injects [target] with the syringe with [src]!</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (Xray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-Xray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that aweful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure tourrets."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr"
|
||||
add_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligablemut
|
||||
name = "\improper DNA injector (Unintelligable)"
|
||||
add_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligable
|
||||
name = "\improper DNA injector (Anti-Unintelligable)"
|
||||
remove_mutations_static = list(UNINTELLIGABLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.has_dna() && !(M.disabilities & NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
M.dna.previous["name"] = M.real_name
|
||||
if(!M.dna.previous["UE"])
|
||||
M.dna.previous["UE"] = M.dna.unique_enzymes
|
||||
if(!M.dna.previous["blood_type"])
|
||||
M.dna.previous["blood_type"] = M.dna.blood_type
|
||||
M.real_name = fields["name"]
|
||||
M.dna.unique_enzymes = fields["UE"]
|
||||
M.name = M.real_name
|
||||
M.dna.blood_type = fields["blood_type"]
|
||||
M.dna.temporary_mutations[UE_CHANGED] = endtime
|
||||
if(fields["UI"]) //UI+UE
|
||||
if(!M.dna.previous["UI"])
|
||||
M.dna.previous["UI"] = M.dna.uni_identity
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
M.dna.temporary_mutations[UI_CHANGED] = endtime
|
||||
log_attack(log_msg)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
>>>>>>> a479714... Adds missing span-endings (#30494)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(quickdraw)
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src]. Alt-click [src] to remove it.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src].")
|
||||
to_chat(user, "<span class='notice'>You discreetly slip [W] into [src].</span>")
|
||||
|
||||
/obj/item/storage/internal/pocket/big
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
|
||||
/* Tools!
|
||||
@@ -788,3 +789,795 @@
|
||||
user.put_in_active_hand(cutjaws)
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
=======
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
|
||||
/* Tools!
|
||||
* Note: Multitools are /obj/item/device
|
||||
*
|
||||
* Contains:
|
||||
* Wrench
|
||||
* Screwdriver
|
||||
* Wirecutters
|
||||
* Welding Tool
|
||||
* Crowbar
|
||||
*/
|
||||
|
||||
/*
|
||||
* Wrench
|
||||
*/
|
||||
/obj/item/wrench
|
||||
name = "wrench"
|
||||
desc = "A wrench with common uses. Can be found in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "wrench"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
usesound = 'sound/items/ratchet.ogg'
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
|
||||
/obj/item/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wrench/cyborg
|
||||
name = "automatic wrench"
|
||||
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/brass
|
||||
name = "brass wrench"
|
||||
desc = "A brass wrench. It's faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "wrench_brass"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/abductor
|
||||
name = "alien wrench"
|
||||
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "wrench"
|
||||
usesound = 'sound/effects/empulse.ogg'
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=5;abductor=3"
|
||||
|
||||
/obj/item/wrench/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered hand drill. It's fitted with a bolt bit."
|
||||
icon_state = "drill_bolt"
|
||||
item_state = "drill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 8
|
||||
attack_verb = list("drilled", "screwed", "jabbed")
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/wrench/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
|
||||
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
|
||||
to_chat(user, "<span class='notice'>You attach the screw driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
|
||||
/obj/item/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wrench/medical
|
||||
name = "medical wrench"
|
||||
desc = "A medical wrench with common(medical?) uses. Can be found in your hand."
|
||||
icon_state = "wrench_medical"
|
||||
force = 2 //MEDICAL
|
||||
throwforce = 4
|
||||
origin_tech = "materials=1;engineering=1;biotech=3"
|
||||
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
|
||||
|
||||
/obj/item/wrench/medical/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
// TODO Make them glow with the power of the M E D I C A L W R E N C H
|
||||
// during their ascension
|
||||
|
||||
// Stun stops them from wandering off
|
||||
user.Stun(100, ignore_canstun = TRUE)
|
||||
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
|
||||
|
||||
// Let the sound effect finish playing
|
||||
sleep(20)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
for(var/obj/item/W in user)
|
||||
user.dropItemToGround(W)
|
||||
|
||||
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
|
||||
W.add_fingerprint(user)
|
||||
W.desc += " For some reason, it reminds you of [user.name]."
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
user.dust()
|
||||
|
||||
return OXYLOSS
|
||||
|
||||
/*
|
||||
* Screwdriver
|
||||
*/
|
||||
/obj/item/screwdriver
|
||||
name = "screwdriver"
|
||||
desc = "You can be totally screwy with this."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "screwdriver"
|
||||
item_state = "screwdriver"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=75)
|
||||
attack_verb = list("stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = 'sound/items/screwdriver.ogg'
|
||||
toolspeed = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
var/random_color = TRUE //if the screwdriver uses random coloring
|
||||
var/static/list/screwdriver_colors = list(\
|
||||
"blue" = rgb(24, 97, 213), \
|
||||
"red" = rgb(149, 23, 16), \
|
||||
"pink" = rgb(213, 24, 141), \
|
||||
"brown" = rgb(160, 82, 18), \
|
||||
"green" = rgb(14, 127, 27), \
|
||||
"cyan" = rgb(24, 162, 213), \
|
||||
"yellow" = rgb(213, 140, 24), \
|
||||
)
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/screwdriver/Initialize()
|
||||
. = ..()
|
||||
if(random_color) //random colors!
|
||||
var/our_color = pick(screwdriver_colors)
|
||||
add_atom_colour(screwdriver_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
if(prob(75))
|
||||
pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/update_icon()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file)
|
||||
. = list()
|
||||
if(isinhands && random_color)
|
||||
var/mutable_appearance/M = mutable_appearance(icon_file, "screwdriver_head")
|
||||
M.appearance_flags = RESET_COLOR
|
||||
. += M
|
||||
|
||||
/obj/item/screwdriver/get_belt_overlay()
|
||||
if(random_color)
|
||||
var/mutable_appearance/body = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver")
|
||||
var/mutable_appearance/head = mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_head")
|
||||
body.color = color
|
||||
head.add_overlay(body)
|
||||
return head
|
||||
else
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
if(user.zone_selected != "eyes" && user.zone_selected != "head")
|
||||
return ..()
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/screwdriver/brass
|
||||
name = "brass screwdriver"
|
||||
desc = "A screwdriver made of brass. The handle feels freezing cold."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "screwdriver_brass"
|
||||
item_state = "screwdriver_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/abductor
|
||||
name = "alien screwdriver"
|
||||
desc = "An ultrasonic screwdriver."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "screwdriver_a"
|
||||
item_state = "screwdriver_nuke"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered hand drill. It's fitted with a screw bit."
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
|
||||
attack_verb = list("drilled", "screwed", "jabbed","whacked")
|
||||
hitsound = 'sound/items/drill_hit.ogg'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/screwdriver/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
|
||||
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
|
||||
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
|
||||
/obj/item/screwdriver/cyborg
|
||||
name = "powered screwdriver"
|
||||
desc = "An electrical screwdriver, designed to be both precise and quick."
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.5
|
||||
|
||||
/*
|
||||
* Wirecutters
|
||||
*/
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = null
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
toolspeed = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
|
||||
|
||||
/obj/item/wirecutters/New(loc, var/param_color = null)
|
||||
..()
|
||||
if(!icon_state)
|
||||
if(!param_color)
|
||||
param_color = pick("yellow","red")
|
||||
icon_state = "cutters_[param_color]"
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
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)
|
||||
C.handcuffed = null
|
||||
if(C.buckled && C.buckled.buckle_requires_restraints)
|
||||
C.buckled.unbuckle_mob(C)
|
||||
C.update_handcuffed()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "cutters_brass"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/abductor
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=4;abductor=3"
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
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"
|
||||
item_state = "jawsoflife"
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/wirecutters/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart("head")
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
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)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
/*
|
||||
* Welding Tool
|
||||
*/
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 3
|
||||
throwforce = 5
|
||||
hitsound = "swing_hit"
|
||||
usesound = 'sound/items/welder.ogg'
|
||||
var/acti_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deac_sound = 'sound/items/welderdeactivate.ogg'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=30)
|
||||
origin_tech = "engineering=1;plasmatech=1"
|
||||
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
|
||||
var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
var/burned_fuel_for = 0 //when fuel was last removed
|
||||
heat = 3800
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/weldingtool/Initialize()
|
||||
. = ..()
|
||||
create_reagents(max_fuel)
|
||||
reagents.add_reagent("welding_fuel", max_fuel)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
if(welding)
|
||||
add_overlay("[initial(icon_state)]-on")
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
cut_overlays()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
add_overlay("[initial(icon_state)][ratio]")
|
||||
update_torch()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
update_icon()
|
||||
if(!can_off_process)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
++burned_fuel_for
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
remove_fuel(1)
|
||||
update_icon()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
open_flame()
|
||||
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weldingtool/attack(mob/living/carbon/human/H, mob/user)
|
||||
if(!istype(H))
|
||||
return ..()
|
||||
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
|
||||
if(src.remove_fuel(1))
|
||||
playsound(loc, usesound, 50, 1)
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
item_heal_robotic(H, user, 15, 0)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if(welding)
|
||||
remove_fuel(1)
|
||||
var/turf/location = get_turf(user)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
if(get_fuel() <= 0)
|
||||
set_light(0)
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
if(L.IgniteMob())
|
||||
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
|
||||
log_game("[key_name(user)] set [key_name(L)] on fire")
|
||||
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
switched_on(user)
|
||||
if(welding)
|
||||
set_light(light_intensity)
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
/obj/item/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("welding_fuel")
|
||||
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
|
||||
/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
|
||||
if(!welding || !check_fuel())
|
||||
return 0
|
||||
if(amount)
|
||||
burned_fuel_for = 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("welding_fuel", amount)
|
||||
check_fuel()
|
||||
if(M)
|
||||
M.flash_act(light_intensity)
|
||||
return TRUE
|
||||
else
|
||||
if(M)
|
||||
to_chat(M, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||
/obj/item/weldingtool/proc/check_fuel(mob/user)
|
||||
if(get_fuel() <= 0 && welding)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
//mob icon update
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands(0)
|
||||
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Switches the welder on
|
||||
/obj/item/weldingtool/proc/switched_on(mob/user)
|
||||
if(!status)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
return
|
||||
welding = !welding
|
||||
if(welding)
|
||||
if(get_fuel() >= 1)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
playsound(loc, acti_sound, 50, 1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more fuel!</span>")
|
||||
switched_off(user)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
|
||||
playsound(loc, deac_sound, 50, 1)
|
||||
switched_off(user)
|
||||
|
||||
//Switches the welder off
|
||||
/obj/item/weldingtool/proc/switched_off(mob/user)
|
||||
welding = 0
|
||||
set_light(0)
|
||||
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].")
|
||||
|
||||
/obj/item/weldingtool/is_hot()
|
||||
return welding * heat
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
to_chat(user, "<span class='warning'>Turn it off first!</span>")
|
||||
return
|
||||
status = !status
|
||||
if(status)
|
||||
to_chat(user, "<span class='notice'>You resecure [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can now be attached and modified.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.transferItemToLoc(src, F, TRUE)
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
|
||||
user.put_in_hands(F)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
|
||||
|
||||
/obj/item/weldingtool/ignition_effect(atom/A, mob/user)
|
||||
if(welding && remove_fuel(1, user))
|
||||
. = "<span class='notice'>[user] casually lights [A] with [src], what a badass.</span>"
|
||||
else
|
||||
. = ""
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_GLASS=60)
|
||||
origin_tech = "engineering=2;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg
|
||||
name = "integrated welding tool"
|
||||
desc = "An advanced welder designed to be used in robotic systems."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
max_fuel = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/mini/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/abductor
|
||||
name = "alien welding tool"
|
||||
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.1
|
||||
light_intensity = 0
|
||||
change_icons = 0
|
||||
origin_tech = "plasmatech=5;engineering=5;abductor=3"
|
||||
|
||||
/obj/item/weldingtool/abductor/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/hugetank
|
||||
name = "upgraded industrial welding tool"
|
||||
desc = "An upgraded welder based of the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
max_fuel = 80
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "engineering=3;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
|
||||
var/last_gen = 0
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
light_intensity = 1
|
||||
toolspeed = 0.5
|
||||
var/nextrefueltick = 0
|
||||
|
||||
/obj/item/weldingtool/experimental/brass
|
||||
name = "brass welding tool"
|
||||
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "brasswelder"
|
||||
item_state = "brasswelder"
|
||||
|
||||
|
||||
/obj/item/weldingtool/experimental/process()
|
||||
..()
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("welding_fuel", 1)
|
||||
|
||||
|
||||
/*
|
||||
* Crowbar
|
||||
*/
|
||||
|
||||
/obj/item/crowbar
|
||||
name = "pocket crowbar"
|
||||
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "crowbar"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "engineering=1;combat=1"
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
|
||||
/obj/item/crowbar/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/crowbar/red
|
||||
icon_state = "crowbar_red"
|
||||
force = 8
|
||||
|
||||
/obj/item/crowbar/brass
|
||||
name = "brass crowbar"
|
||||
desc = "A brass crowbar. It feels faintly warm to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "crowbar_brass"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/abductor
|
||||
name = "alien crowbar"
|
||||
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
icon_state = "crowbar"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "combat=4;engineering=4;abductor=3"
|
||||
|
||||
/obj/item/crowbar/large
|
||||
name = "crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big."
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
materials = list(MAT_METAL=70)
|
||||
icon_state = "crowbar_large"
|
||||
item_state = "crowbar"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/cyborg
|
||||
name = "hydraulic crowbar"
|
||||
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 10
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 15
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src], it looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/crowbar/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
|
||||
#undef WELDER_FUEL_BURN_INTERVAL
|
||||
>>>>>>> a479714... Adds missing span-endings (#30494)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
if(vr_human)
|
||||
qdel(vr_human)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>The VR Sleeper's safeties prevent you from doing that.")
|
||||
to_chat(usr, "<span class='warning'>The VR Sleeper's safeties prevent you from doing that.</span>")
|
||||
. = TRUE
|
||||
if("toggle_open")
|
||||
if(state_open)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
var/ckey = data["ckey"]
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!")
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
|
||||
return
|
||||
var/oldreason = ban["message"]
|
||||
var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null
|
||||
@@ -135,11 +135,11 @@
|
||||
return
|
||||
var/ban = get_stickyban_from_ckey(ckey)
|
||||
if (!ban)
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!")
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
|
||||
return
|
||||
var/cached_ban = SSstickyban.cache[ckey]
|
||||
if (!cached_ban)
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No cached sticky ban for [ckey] found!")
|
||||
to_chat(usr, "<span class='adminnotice'>Error: No cached sticky ban for [ckey] found!</span>")
|
||||
world.SetConfig("ban",ckey,null)
|
||||
|
||||
log_admin_private("[key_name(usr)] has reverted [ckey]'s sticky ban to it's state at round start.")
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
else
|
||||
SSticker.mode.round_ends_with_antag_death = 0
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the midround antagonist system to [SSticker.mode.round_ends_with_antag_death ? "end the round" : "continue as extended"] upon failure.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the midround antagonist system to [SSticker.mode.round_ends_with_antag_death ? "end the round" : "continue as extended"] upon failure.</span>")
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["delay_round_end"])
|
||||
@@ -2286,4 +2286,3 @@
|
||||
dat += thing_to_check
|
||||
|
||||
usr << browse(dat.Join("<br>"), "window=related_[C];size=420x300")
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/obj/machinery/computer/cargo/emag_act(mob/user)
|
||||
if(emagged)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!",
|
||||
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!</span>",
|
||||
"<span class='notice'>You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.</span>")
|
||||
|
||||
emagged = TRUE
|
||||
@@ -201,4 +201,3 @@
|
||||
status_signal.data["command"] = command
|
||||
|
||||
frequency.post_signal(src, status_signal)
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
update_clothes_damaged_state(TRUE)
|
||||
if(ismob(loc)) //It's not important enough to warrant a message if nobody's wearing it
|
||||
var/mob/M = loc
|
||||
M.visible_message("<span class='warning'>[M]'s [name] starts to fall apart!", "<span class='warning'>Your [name] starts to fall apart!")
|
||||
M.visible_message("<span class='warning'>[M]'s [name] starts to fall apart!", "<span class='warning'>Your [name] starts to fall apart!</span>")
|
||||
|
||||
/obj/item/clothing/proc/update_clothes_damaged_state(damaging = TRUE)
|
||||
var/index = "\ref[initial(icon)]-[initial(icon_state)]"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user as mob)
|
||||
if(safety)
|
||||
safety = FALSE
|
||||
to_chat(user, "<span class='warning'>You silently fry [src]'s vocal circuit with the cryptographic sequencer.")
|
||||
to_chat(user, "<span class='warning'>You silently fry [src]'s vocal circuit with the cryptographic sequencer.</span>")
|
||||
else
|
||||
return
|
||||
|
||||
@@ -181,7 +181,3 @@
|
||||
playsound(src.loc, "sound/voice/complionator/[phrase_sound].ogg", 100, 0, 4)
|
||||
cooldown = world.time
|
||||
cooldown_special = world.time
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
activated = 1
|
||||
else
|
||||
to_chat(user, "\[ <span style='color: #ff0000;'>fail</span> \] Mounting /dev/helm")
|
||||
to_chat(user, "<span style='color: #ff0000;'><b>FATAL: </b>Unable to locate /dev/helm. <b>Aborting...</b>")
|
||||
to_chat(user, "<span style='color: #ff0000;'><b>FATAL: </b>Unable to locate /dev/helm. <b>Aborting...</b></span>")
|
||||
teleport_now.Grant(user)
|
||||
cooldown = world.time + cooldowntime
|
||||
activating = 0
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
return 0
|
||||
if(prob(hit_reaction_chance))
|
||||
if(world.time < reactivearmor_cooldown)
|
||||
owner.visible_message("<span class='danger'>The reactive incendiary armor on [owner] activates, but fails to send out flames as it is still recharging its flame jets!</spawn>")
|
||||
owner.visible_message("<span class='danger'>The reactive incendiary armor on [owner] activates, but fails to send out flames as it is still recharging its flame jets!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>The [src] blocks the [attack_text], sending out jets of flame!</span>")
|
||||
for(var/mob/living/carbon/C in range(6, owner))
|
||||
@@ -262,7 +262,7 @@
|
||||
return 0
|
||||
if(prob(hit_reaction_chance))
|
||||
if(world.time < reactivearmor_cooldown)
|
||||
owner.visible_message("<span class='danger'>The reactive stealth system on [owner] activates, but is still recharging its holographic emitters!</spawn>")
|
||||
owner.visible_message("<span class='danger'>The reactive stealth system on [owner] activates, but is still recharging its holographic emitters!</span>")
|
||||
return
|
||||
var/mob/living/simple_animal/hostile/illusion/escape/E = new(owner.loc)
|
||||
E.Copy_Parent(owner, 50)
|
||||
@@ -292,7 +292,7 @@
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
owner.visible_message("<span class='danger'>The tesla capacitors on [owner]'s reactive tesla armor are still recharging! The armor merely emits some sparks.</spawn>")
|
||||
owner.visible_message("<span class='danger'>The tesla capacitors on [owner]'s reactive tesla armor are still recharging! The armor merely emits some sparks.</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>The [src] blocks the [attack_text], sending out arcs of lightning!</span>")
|
||||
tesla_zap(owner,tesla_range,tesla_power,tesla_boom, tesla_stun)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(P)
|
||||
to_chat(M, "<span class='notice'>Report printed. Log cleared.<span>")
|
||||
to_chat(M, "<span class='notice'>Report printed. Log cleared.</span>")
|
||||
|
||||
// Clear the logs
|
||||
log = list()
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
src.updateUsrDialog()
|
||||
return 1 // Disables the after-attack so we don't spray the floor/user.
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more space cleaner!<span>")
|
||||
to_chat(user, "<span class='warning'>You need more space cleaner!</span>")
|
||||
return 1
|
||||
|
||||
else if(istype(O, /obj/item/soap/)) // If they're trying to clean it then let them
|
||||
@@ -239,7 +239,7 @@
|
||||
metal += O.materials[MAT_METAL]
|
||||
|
||||
if(metal)
|
||||
visible_message("<span class='warning'>Sparks fly around [src]!")
|
||||
visible_message("<span class='warning'>Sparks fly around [src]!</span>")
|
||||
if(prob(max(metal/2, 33)))
|
||||
explosion(loc,0,1,2)
|
||||
broke()
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
/obj/structure/bonfire/attack_hand(mob/user)
|
||||
if(burning)
|
||||
to_chat(user, "<span class='warning'>You need to extinguish [src] before removing the logs!")
|
||||
to_chat(user, "<span class='warning'>You need to extinguish [src] before removing the logs!</span>")
|
||||
return
|
||||
if(!has_buckled_mobs() && do_after(user, 50, target = src))
|
||||
for(var/I in 1 to 5)
|
||||
|
||||
@@ -802,7 +802,7 @@
|
||||
to_chat(user, "<span class='danger'>Your flesh begins to melt! Miraculously, you seem fine otherwise.</span>")
|
||||
H.set_species(/datum/species/skeleton)
|
||||
if(3)
|
||||
to_chat(user, "<span class='danger'>Power courses through you! You can now shift your form at will.")
|
||||
to_chat(user, "<span class='danger'>Power courses through you! You can now shift your form at will.</span>")
|
||||
if(user.mind)
|
||||
var/obj/effect/proc_holder/spell/targeted/shapeshift/dragon/D = new
|
||||
user.mind.AddSpell(D)
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
to_chat(src, "<span class='danger'>Error: Invalid (non-numeric) votes in the vote data.</span>")
|
||||
return 0
|
||||
if (!(vote in optionlist))
|
||||
to_chat(src, "<span class='danger'>Votes for choices that do not appear to be in the poll detected<span>")
|
||||
to_chat(src, "<span class='danger'>Votes for choices that do not appear to be in the poll detected.</span>")
|
||||
return 0
|
||||
if (!numberedvotelist.len)
|
||||
to_chat(src, "<span class='danger'>Invalid vote data</span>")
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
return
|
||||
src.loc = B.loc
|
||||
src.client.eye = src
|
||||
src.visible_message("<span class='warning'><B>[src] rises out of the pool of blood!</B>")
|
||||
src.visible_message("<span class='warning'><B>[src] rises out of the pool of blood!</B></span>")
|
||||
exit_blood_effect(B)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/obj/effect/proc_holder/alien/hide
|
||||
name = "Hide"
|
||||
desc = "Allows aliens to hide beneath tables or certain items. Toggled on or off."
|
||||
@@ -60,3 +61,67 @@
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You are not fully grown.</span>")
|
||||
return 0
|
||||
=======
|
||||
/obj/effect/proc_holder/alien/hide
|
||||
name = "Hide"
|
||||
desc = "Allows aliens to hide beneath tables or certain items. Toggled on or off."
|
||||
plasma_cost = 0
|
||||
|
||||
action_icon_state = "alien_hide"
|
||||
|
||||
/obj/effect/proc_holder/alien/hide/fire(mob/living/carbon/alien/user)
|
||||
if(user.stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
if (user.layer != ABOVE_NORMAL_TURF_LAYER)
|
||||
user.layer = ABOVE_NORMAL_TURF_LAYER
|
||||
user.visible_message("<span class='name'>[user] scurries to the ground!</span>", \
|
||||
"<span class='noticealien'>You are now hiding.</span>")
|
||||
else
|
||||
user.layer = MOB_LAYER
|
||||
user.visible_message("[user.] slowly peeks up from the ground...", \
|
||||
"<span class='noticealien'>You stop hiding.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/effect/proc_holder/alien/larva_evolve
|
||||
name = "Evolve"
|
||||
desc = "Evolve into a higher alien caste."
|
||||
plasma_cost = 0
|
||||
|
||||
action_icon_state = "alien_evolve_larva"
|
||||
|
||||
/obj/effect/proc_holder/alien/larva_evolve/fire(mob/living/carbon/alien/user)
|
||||
if(!islarva(user))
|
||||
return
|
||||
var/mob/living/carbon/alien/larva/L = user
|
||||
|
||||
if(L.handcuffed || L.legcuffed) // Cuffing larvas ? Eh ?
|
||||
to_chat(user, "<span class='danger'>You cannot evolve when you are cuffed.</span>")
|
||||
|
||||
if(L.amount_grown >= L.max_grown) //TODO ~Carn
|
||||
to_chat(L, "<span class='name'>You are growing into a beautiful alien! It is time to choose a caste.</span>")
|
||||
to_chat(L, "<span class='info'>There are three to choose from:</span>")
|
||||
to_chat(L, "<span class='name'>Hunters</span> <span class='info'>are the most agile caste, tasked with hunting for hosts. They are faster than a human and can even pounce, but are not much tougher than a drone.</span>")
|
||||
to_chat(L, "<span class='name'>Sentinels</span> <span class='info'>are tasked with protecting the hive. With their ranged spit, invisibility, and high health, they make formidable guardians and acceptable secondhand hunters.</span>")
|
||||
to_chat(L, "<span class='name'>Drones</span> <span class='info'>are the weakest and slowest of the castes, but can grow into a praetorian and then queen if no queen exists, and are vital to maintaining a hive with their resin secretion abilities.</span>")
|
||||
var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
|
||||
|
||||
if(user.incapacitated()) //something happened to us while we were choosing.
|
||||
return
|
||||
|
||||
var/mob/living/carbon/alien/humanoid/new_xeno
|
||||
switch(alien_caste)
|
||||
if("Hunter")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(L.loc)
|
||||
if("Sentinel")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(L.loc)
|
||||
if("Drone")
|
||||
new_xeno = new /mob/living/carbon/alien/humanoid/drone(L.loc)
|
||||
|
||||
L.alien_evolve(new_xeno)
|
||||
return 0
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You are not fully grown.</span>")
|
||||
return 0
|
||||
>>>>>>> a479714... Adds missing span-endings (#30494)
|
||||
|
||||
@@ -128,12 +128,12 @@
|
||||
return
|
||||
if(isalien(owner)) //Different effects for aliens than humans
|
||||
to_chat(owner, "<span class='userdanger'>Your Queen has been struck down!</span>")
|
||||
to_chat(owner, "<span class='danger'>You are struck with overwhelming agony! You feel confused, and your connection to the hivemind is severed.")
|
||||
to_chat(owner, "<span class='danger'>You are struck with overwhelming agony! You feel confused, and your connection to the hivemind is severed.</span>")
|
||||
owner.emote("roar")
|
||||
owner.Stun(200) //Actually just slows them down a bit.
|
||||
|
||||
else if(ishuman(owner)) //Humans, being more fragile, are more overwhelmed by the mental backlash.
|
||||
to_chat(owner, "<span class='danger'>You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!")
|
||||
to_chat(owner, "<span class='danger'>You feel a splitting pain in your head, and are struck with a wave of nausea. You cannot hear the hivemind anymore!</span>")
|
||||
owner.emote("scream")
|
||||
owner.Knockdown(100)
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if(on_fire)
|
||||
to_chat(M, "<span class='warning'>You can't put them out with just your bare hands!")
|
||||
to_chat(M, "<span class='warning'>You can't put them out with just your bare hands!</span>")
|
||||
return
|
||||
|
||||
if(health >= 0 && !(status_flags & FAKEDEATH))
|
||||
|
||||
@@ -1108,7 +1108,7 @@
|
||||
|
||||
if(prob(15))
|
||||
if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits))
|
||||
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...<span>")
|
||||
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
|
||||
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
|
||||
|
||||
if(75 to 100)
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
/datum/species/golem/plasma/spec_life(mob/living/carbon/human/H)
|
||||
if(H.bodytemperature > 750)
|
||||
if(!boom_warning && H.on_fire)
|
||||
to_chat(H, "<span class='userdanger'>You feel like you could blow up at any moment!<span>")
|
||||
to_chat(H, "<span class='userdanger'>You feel like you could blow up at any moment!</span>")
|
||||
boom_warning = TRUE
|
||||
else
|
||||
if(boom_warning)
|
||||
to_chat(H, "<span class='notice'>You feel more stable.<span>")
|
||||
to_chat(H, "<span class='notice'>You feel more stable.</span>")
|
||||
boom_warning = FALSE
|
||||
|
||||
if(H.bodytemperature > 850 && H.on_fire && prob(25))
|
||||
|
||||
@@ -650,7 +650,7 @@
|
||||
/mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H)
|
||||
add_logs(src, H, "run over", null, "(DAMTYPE: [uppertext(BRUTE)])")
|
||||
H.visible_message("<span class='danger'>[src] drives over [H]!</span>", \
|
||||
"<span class='userdanger'>[src] drives over you!<span>")
|
||||
"<span class='userdanger'>[src] drives over you!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/damage = rand(5,15)
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
visible_message("[src] grabs [held_item] out of [C]'s hand!", "<span class='notice'>You snag [held_item] out of [C]'s hand!</span>", "<span class='italics'>You hear the sounds of wings flapping furiously.</span>")
|
||||
return held_item
|
||||
|
||||
to_chat(src, "<span class='warning'>There is nothing of interest to take!</spawn>")
|
||||
to_chat(src, "<span class='warning'>There is nothing of interest to take!</span>")
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/parrot/verb/drop_held_item_player()
|
||||
|
||||
@@ -385,7 +385,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
return
|
||||
for(var/mob/dead/observer/O in GLOB.player_list)
|
||||
if(O.client)
|
||||
to_chat(O, "<span class='ghostalert'>[message][(enter_link) ? " [enter_link]" : ""]<span>")
|
||||
to_chat(O, "<span class='ghostalert'>[message][(enter_link) ? " [enter_link]" : ""]</span>")
|
||||
if(ghost_sound)
|
||||
SEND_SOUND(O, sound(ghost_sound))
|
||||
if(flashwindow)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(I.reagents.has_reagent("radium", a_transfer) && a_boost < a_maxamount)
|
||||
I.reagents.remove_reagent("radium", a_transfer)
|
||||
a_boost++;
|
||||
to_chat(U, "<span class='notice'>There are now [a_boost] adrenaline boosts remaining.</notice>")
|
||||
to_chat(U, "<span class='notice'>There are now [a_boost] adrenaline boosts remaining.</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/stock_parts/cell))
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
if(!suppressed)
|
||||
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
|
||||
else
|
||||
to_chat(loc, "<span class='warning'>[src] silently charges up.<span>")
|
||||
to_chat(loc, "<span class='warning'>[src] silently charges up.</span>")
|
||||
update_icon()
|
||||
overheat = FALSE
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].<span>")
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
@@ -74,7 +74,7 @@
|
||||
return
|
||||
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.<span>")
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
|
||||
|
||||
/obj/item/gun/magic/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].<span>")
|
||||
to_chat(user, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
|
||||
return
|
||||
else
|
||||
no_den_usage = 0
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!")
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!</span>")
|
||||
|
||||
var/list/rinject = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
|
||||
@@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
/obj/effect/proc_holder/proc/InterceptClickOn(mob/living/caller, params, atom/A)
|
||||
if(caller.ranged_ability != src || ranged_ability_user != caller) //I'm not actually sure how these would trigger, but, uh, safety, I guess?
|
||||
to_chat(caller, "<span class='warning'><b>[caller.ranged_ability.name]</b> has been disabled.")
|
||||
to_chat(caller, "<span class='warning'><b>[caller.ranged_ability.name]</b> has been disabled.</span>")
|
||||
caller.ranged_ability.remove_ranged_ability()
|
||||
return TRUE //TRUE for failed, FALSE for passed.
|
||||
if(ranged_clickcd_override >= 0)
|
||||
@@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
return
|
||||
if(user.ranged_ability && user.ranged_ability != src)
|
||||
if(forced)
|
||||
to_chat(user, "<span class='warning'><b>[user.ranged_ability.name]</b> has been replaced by <b>[name]</b>.")
|
||||
to_chat(user, "<span class='warning'><b>[user.ranged_ability.name]</b> has been replaced by <b>[name]</b>.</span>")
|
||||
user.ranged_ability.remove_ranged_ability()
|
||||
else
|
||||
return
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
to_chat(user, "<span class='warning'>You are no longer near a potential signer.</span>")
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can only re-appear near a potential signer.")
|
||||
to_chat(user, "<span class='warning'>You can only re-appear near a potential signer.</span>")
|
||||
revert_cast()
|
||||
return ..()
|
||||
else
|
||||
@@ -166,7 +166,7 @@
|
||||
fakefire()
|
||||
src.loc = get_turf(src)
|
||||
src.client.eye = src
|
||||
src.visible_message("<span class='warning'><B>[src] appears in a fiery blaze!</B>")
|
||||
src.visible_message("<span class='warning'><B>[src] appears in a fiery blaze!</B></span>")
|
||||
playsound(get_turf(src), 'sound/magic/exit_blood.ogg', 100, 1, -1)
|
||||
addtimer(CALLBACK(src, .proc/fakefireextinguish), 15, TIMER_UNIQUE)
|
||||
|
||||
|
||||
@@ -90,10 +90,10 @@
|
||||
to_chat(user, "<span class='warning'>Plant needs to be ready to harvest to perform full data scan.</span>") //Because space dna is actually magic
|
||||
return
|
||||
if(plants[H.myseed.type])
|
||||
to_chat(user, "<span class='notice'>Plant data already present in local storage.<span>")
|
||||
to_chat(user, "<span class='notice'>Plant data already present in local storage.</span>")
|
||||
return
|
||||
plants[H.myseed.type] = 1
|
||||
to_chat(user, "<span class='notice'>Plant data added to local storage.<span>")
|
||||
to_chat(user, "<span class='notice'>Plant data added to local storage.</span>")
|
||||
|
||||
//animals
|
||||
var/static/list/non_simple_animals = typecacheof(list(/mob/living/carbon/monkey, /mob/living/carbon/alien))
|
||||
@@ -104,19 +104,19 @@
|
||||
to_chat(user, "<span class='warning'>No compatible DNA detected</span>")
|
||||
return
|
||||
if(animals[target.type])
|
||||
to_chat(user, "<span class='notice'>Animal data already present in local storage.<span>")
|
||||
to_chat(user, "<span class='notice'>Animal data already present in local storage.</span>")
|
||||
return
|
||||
animals[target.type] = 1
|
||||
to_chat(user, "<span class='notice'>Animal data added to local storage.<span>")
|
||||
to_chat(user, "<span class='notice'>Animal data added to local storage.</span>")
|
||||
|
||||
//humans
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(dna[H.dna.uni_identity])
|
||||
to_chat(user, "<span class='notice'>Humanoid data already present in local storage.<span>")
|
||||
to_chat(user, "<span class='notice'>Humanoid data already present in local storage.</span>")
|
||||
return
|
||||
dna[H.dna.uni_identity] = 1
|
||||
to_chat(user, "<span class='notice'>Humanoid data added to local storage.<span>")
|
||||
to_chat(user, "<span class='notice'>Humanoid data added to local storage.</span>")
|
||||
|
||||
/obj/machinery/dna_vault
|
||||
name = "DNA Vault"
|
||||
|
||||
Reference in New Issue
Block a user