mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
@@ -17,15 +17,15 @@
|
||||
var/mob/living/silicon/ai/AI = A
|
||||
if(AI.malf_picker)
|
||||
AI.malf_picker.processing_time += 50
|
||||
to_chat(AI, "<span class='userdanger'>[user] has attempted to upgrade you with combat software that you already possess. You gain 50 points to spend on Malfunction Modules instead.</span>")
|
||||
to_chat(AI, span_userdanger("[user] has attempted to upgrade you with combat software that you already possess. You gain 50 points to spend on Malfunction Modules instead."))
|
||||
else
|
||||
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with combat software!</span>")
|
||||
to_chat(AI, "<span class='userdanger'>Your current laws and objectives remain unchanged.</span>") //this unlocks malf powers, but does not give the license to plasma flood
|
||||
to_chat(AI, span_userdanger("[user] has upgraded you with combat software!"))
|
||||
to_chat(AI, span_userdanger("Your current laws and objectives remain unchanged.")) //this unlocks malf powers, but does not give the license to plasma flood
|
||||
AI.add_malf_picker()
|
||||
AI.hack_software = TRUE
|
||||
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
|
||||
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
|
||||
to_chat(user, span_notice("You upgrade [AI]. [src] is consumed in the process."))
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
var/mob/living/silicon/ai/AI = A
|
||||
if(AI.eyeobj)
|
||||
AI.eyeobj.relay_speech = TRUE
|
||||
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>")
|
||||
to_chat(AI, span_userdanger("[user] has upgraded you with surveillance software!"))
|
||||
to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
|
||||
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
|
||||
to_chat(user, span_notice("You upgrade [AI]. [src] is consumed in the process."))
|
||||
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
|
||||
qdel(src)
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
M.Paralyze(100)
|
||||
M.apply_effect(EFFECT_STUTTER, 5)
|
||||
|
||||
M.visible_message("<span class='danger'>[user] prods [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] prods you with [src]!</span>")
|
||||
M.visible_message(span_danger("[user] prods [M] with [src]!"), \
|
||||
span_userdanger("[user] prods you with [src]!"))
|
||||
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
|
||||
|
||||
@@ -76,57 +76,57 @@
|
||||
M.attack_hand(user, modifiers) //This enables borgs to get the floating heart icon and mob emote from simple_animal's that have petbonus == true.
|
||||
return
|
||||
if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='notice'>[user] playfully boops [M] on the head!</span>", \
|
||||
"<span class='notice'>You playfully boop [M] on the head!</span>")
|
||||
user.visible_message(span_notice("[user] playfully boops [M] on the head!"), \
|
||||
span_notice("You playfully boop [M] on the head!"))
|
||||
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
|
||||
else if(ishuman(M))
|
||||
if(user.body_position == LYING_DOWN)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
|
||||
user.visible_message(span_notice("[user] shakes [M] trying to get [M.p_them()] up!"), \
|
||||
span_notice("You shake [M] trying to get [M.p_them()] up!"))
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
|
||||
user.visible_message(span_notice("[user] hugs [M] to make [M.p_them()] feel better!"), \
|
||||
span_notice("You hug [M] to make [M.p_them()] feel better!"))
|
||||
if(M.resting)
|
||||
M.set_resting(FALSE, TRUE)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
|
||||
"<span class='notice'>You pet [M]!</span>")
|
||||
user.visible_message(span_notice("[user] pets [M]!"), \
|
||||
span_notice("You pet [M]!"))
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
if(1)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M))
|
||||
if(M.body_position == LYING_DOWN)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
|
||||
user.visible_message(span_notice("[user] shakes [M] trying to get [M.p_them()] up!"), \
|
||||
span_notice("You shake [M] trying to get [M.p_them()] up!"))
|
||||
else if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
user.visible_message(span_warning("[user] bops [M] on the head!"), \
|
||||
span_warning("You bop [M] on the head!"))
|
||||
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
||||
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
|
||||
user.visible_message(span_warning("[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable..."), \
|
||||
span_warning("You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable..."))
|
||||
if(M.resting)
|
||||
M.set_resting(FALSE, TRUE)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
user.visible_message(span_warning("[user] bops [M] on the head!"), \
|
||||
span_warning("You bop [M] on the head!"))
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
|
||||
if(2)
|
||||
if(scooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M))
|
||||
M.electrocute_act(5, "[user]", flags = SHOCK_NOGLOVES)
|
||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
user.visible_message(span_userdanger("[user] electrocutes [M] with [user.p_their()] touch!"), \
|
||||
span_danger("You electrocute [M] with your touch!"))
|
||||
else
|
||||
if(!iscyborg(M))
|
||||
M.adjustFireLoss(10)
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
|
||||
"<span class='danger'>You shock [M]!</span>")
|
||||
user.visible_message(span_userdanger("[user] shocks [M]!"), \
|
||||
span_danger("You shock [M]!"))
|
||||
else
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]. It does not seem to have an effect</span>", \
|
||||
"<span class='danger'>You shock [M] to no effect.</span>")
|
||||
user.visible_message(span_userdanger("[user] shocks [M]. It does not seem to have an effect"), \
|
||||
span_danger("You shock [M] to no effect."))
|
||||
playsound(loc, 'sound/effects/sparks2.ogg', 50, TRUE, -1)
|
||||
user.cell.charge -= 500
|
||||
scooldown = world.time + 20
|
||||
@@ -134,11 +134,11 @@
|
||||
if(ccooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M))
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M] in [user.p_their()] grip!</span>", \
|
||||
"<span class='danger'>You crush [M] in your grip!</span>")
|
||||
user.visible_message(span_userdanger("[user] crushes [M] in [user.p_their()] grip!"), \
|
||||
span_danger("You crush [M] in your grip!"))
|
||||
else
|
||||
user.visible_message("<span class='userdanger'>[user] crushes [M]!</span>", \
|
||||
"<span class='danger'>You crush [M]!</span>")
|
||||
user.visible_message(span_userdanger("[user] crushes [M]!"), \
|
||||
span_danger("You crush [M]!"))
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, TRUE, -1)
|
||||
M.adjustBruteLoss(15)
|
||||
user.cell.charge -= 300
|
||||
@@ -167,7 +167,7 @@
|
||||
mode = "charge"
|
||||
else
|
||||
mode = "draw"
|
||||
to_chat(user, "<span class='notice'>You toggle [src] to \"[mode]\" mode.</span>")
|
||||
to_chat(user, span_notice("You toggle [src] to \"[mode]\" mode."))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag)
|
||||
@@ -178,10 +178,10 @@
|
||||
if(is_type_in_list(target, charge_machines))
|
||||
var/obj/machinery/M = target
|
||||
if((M.machine_stat & (NOPOWER|BROKEN)) || !M.anchored)
|
||||
to_chat(user, "<span class='warning'>[M] is unpowered!</span>")
|
||||
to_chat(user, span_warning("[M] is unpowered!"))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect to [M]'s power line...</span>")
|
||||
to_chat(user, span_notice("You connect to [M]'s power line..."))
|
||||
while(do_after(user, 15, target = M, progress = 0))
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
return
|
||||
@@ -194,27 +194,27 @@
|
||||
|
||||
M.use_power(200)
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging yourself.</span>")
|
||||
to_chat(user, span_notice("You stop charging yourself."))
|
||||
|
||||
else if(is_type_in_list(target, charge_items))
|
||||
var/obj/item/stock_parts/cell/cell = target
|
||||
if(!istype(cell))
|
||||
cell = locate(/obj/item/stock_parts/cell) in target
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>[target] has no power cell!</span>")
|
||||
to_chat(user, span_warning("[target] has no power cell!"))
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = target
|
||||
if(!E.can_charge)
|
||||
to_chat(user, "<span class='warning'>[target] has no power port!</span>")
|
||||
to_chat(user, span_warning("[target] has no power port!"))
|
||||
return
|
||||
|
||||
if(!cell.charge)
|
||||
to_chat(user, "<span class='warning'>[target] has no power!</span>")
|
||||
to_chat(user, span_warning("[target] has no power!"))
|
||||
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect to [target]'s power port...</span>")
|
||||
to_chat(user, span_notice("You connect to [target]'s power port..."))
|
||||
|
||||
while(do_after(user, 15, target = target, progress = 0))
|
||||
if(!user || !user.cell || mode != "draw")
|
||||
@@ -233,26 +233,26 @@
|
||||
break
|
||||
target.update_appearance()
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging yourself.</span>")
|
||||
to_chat(user, span_notice("You stop charging yourself."))
|
||||
|
||||
else if(is_type_in_list(target, charge_items))
|
||||
var/obj/item/stock_parts/cell/cell = target
|
||||
if(!istype(cell))
|
||||
cell = locate(/obj/item/stock_parts/cell) in target
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>[target] has no power cell!</span>")
|
||||
to_chat(user, span_warning("[target] has no power cell!"))
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = target
|
||||
if(!E.can_charge)
|
||||
to_chat(user, "<span class='warning'>[target] has no power port!</span>")
|
||||
to_chat(user, span_warning("[target] has no power port!"))
|
||||
return
|
||||
|
||||
if(cell.charge >= cell.maxcharge)
|
||||
to_chat(user, "<span class='warning'>[target] is already charged!</span>")
|
||||
to_chat(user, span_warning("[target] is already charged!"))
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect to [target]'s power port...</span>")
|
||||
to_chat(user, span_notice("You connect to [target]'s power port..."))
|
||||
|
||||
while(do_after(user, 15, target = target, progress = 0))
|
||||
if(!user || !user.cell || mode != "charge")
|
||||
@@ -271,7 +271,7 @@
|
||||
break
|
||||
target.update_appearance()
|
||||
|
||||
to_chat(user, "<span class='notice'>You stop charging [target].</span>")
|
||||
to_chat(user, span_notice("You stop charging [target]."))
|
||||
|
||||
/obj/item/harmalarm
|
||||
name = "\improper Sonic Harm Prevention Tool"
|
||||
@@ -296,7 +296,7 @@
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 1200)
|
||||
to_chat(user, "<span class='warning'>You don't have enough charge to do this!</span>")
|
||||
to_chat(user, span_warning("You don't have enough charge to do this!"))
|
||||
return
|
||||
R.cell.charge -= 1000
|
||||
if(R.emagged)
|
||||
@@ -304,8 +304,8 @@
|
||||
|
||||
if(safety == TRUE)
|
||||
user.visible_message("<font color='red' size='2'>[user] blares out a near-deafening siren from its speakers!</font>", \
|
||||
"<span class='userdanger'>The siren pierces your hearing and confuses you!</span>", \
|
||||
"<span class='danger'>The siren pierces your hearing!</span>")
|
||||
span_userdanger("The siren pierces your hearing and confuses you!"), \
|
||||
span_danger("The siren pierces your hearing!"))
|
||||
for(var/mob/living/carbon/M in get_hearers_in_view(9, user))
|
||||
if(M.get_ear_protection() == FALSE)
|
||||
M.add_confusion(6)
|
||||
@@ -315,7 +315,7 @@
|
||||
user.log_message("used a Cyborg Harm Alarm in [AREACOORD(user)]", LOG_ATTACK)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
to_chat(R.connected_ai, "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>")
|
||||
to_chat(R.connected_ai, "<br>[span_notice("NOTICE - Peacekeeping 'HARM ALARM' used by: [user]")]<br>")
|
||||
|
||||
return
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
/obj/item/borg/lollipop/proc/dispense(atom/A, mob/user)
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>No treats left in storage!</span>")
|
||||
to_chat(user, span_warning("No treats left in storage!"))
|
||||
return FALSE
|
||||
var/turf/T = get_turf(A)
|
||||
if(!T || !istype(T) || !isopenturf(T))
|
||||
@@ -404,16 +404,16 @@
|
||||
check_amount()
|
||||
|
||||
if(into_hands)
|
||||
user.visible_message("<span class='notice'>[user] dispenses a treat into the hands of [A].</span>", "<span class='notice'>You dispense a treat into the hands of [A].</span>", "<span class='hear'>You hear a click.</span>")
|
||||
user.visible_message(span_notice("[user] dispenses a treat into the hands of [A]."), span_notice("You dispense a treat into the hands of [A]."), span_hear("You hear a click."))
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] dispenses a treat.</span>", "<span class='notice'>You dispense a treat.</span>", "<span class='hear'>You hear a click.</span>")
|
||||
user.visible_message(span_notice("[user] dispenses a treat."), span_notice("You dispense a treat."), span_hear("You hear a click."))
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/lollipop/proc/shootL(atom/target, mob/living/user, params)
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>Not enough lollipops left!</span>")
|
||||
to_chat(user, span_warning("Not enough lollipops left!"))
|
||||
return FALSE
|
||||
candy--
|
||||
|
||||
@@ -426,12 +426,12 @@
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
A.fire_casing(target, user, params, 0, 0, null, 0, src)
|
||||
user.visible_message("<span class='warning'>[user] blasts a flying lollipop at [target]!</span>")
|
||||
user.visible_message(span_warning("[user] blasts a flying lollipop at [target]!"))
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/proc/shootG(atom/target, mob/living/user, params) //Most certainly a good idea.
|
||||
if(candy <= 0)
|
||||
to_chat(user, "<span class='warning'>Not enough gumballs left!</span>")
|
||||
to_chat(user, span_warning("Not enough gumballs left!"))
|
||||
return FALSE
|
||||
candy--
|
||||
var/obj/item/ammo_casing/caseless/gumball/A
|
||||
@@ -444,7 +444,7 @@
|
||||
A.loaded_projectile.color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
|
||||
playsound(src.loc, 'sound/weapons/bulletflyby3.ogg', 50, TRUE)
|
||||
A.fire_casing(target, user, params, 0, 0, null, 0, src)
|
||||
user.visible_message("<span class='warning'>[user] shoots a high-velocity gumball at [target]!</span>")
|
||||
user.visible_message(span_warning("[user] shoots a high-velocity gumball at [target]!"))
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/afterattack(atom/target, mob/living/user, proximity, click_params)
|
||||
@@ -453,7 +453,7 @@
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell.use(12))
|
||||
to_chat(user, "<span class='warning'>Not enough power.</span>")
|
||||
to_chat(user, span_warning("Not enough power."))
|
||||
return FALSE
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE, DISPENSE_ICECREAM_MODE)
|
||||
@@ -469,16 +469,16 @@
|
||||
switch(mode)
|
||||
if(DISPENSE_LOLLIPOP_MODE)
|
||||
mode = THROW_LOLLIPOP_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now throwing lollipops.</span>")
|
||||
to_chat(user, span_notice("Module is now throwing lollipops."))
|
||||
if(THROW_LOLLIPOP_MODE)
|
||||
mode = THROW_GUMBALL_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
|
||||
to_chat(user, span_notice("Module is now blasting gumballs."))
|
||||
if(THROW_GUMBALL_MODE)
|
||||
mode = DISPENSE_ICECREAM_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing ice cream.</span>")
|
||||
to_chat(user, span_notice("Module is now dispensing ice cream."))
|
||||
if(DISPENSE_ICECREAM_MODE)
|
||||
mode = DISPENSE_LOLLIPOP_MODE
|
||||
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
|
||||
to_chat(user, span_notice("Module is now dispensing lollipops."))
|
||||
..()
|
||||
|
||||
#undef DISPENSE_LOLLIPOP_MODE
|
||||
@@ -621,18 +621,18 @@
|
||||
|
||||
/obj/item/borg/projectile_dampen/attack_self(mob/user)
|
||||
if(cycle_delay > world.time)
|
||||
to_chat(user, "<span class='boldwarning'>[src] is still recycling its projectors!</span>")
|
||||
to_chat(user, span_boldwarning("[src] is still recycling its projectors!"))
|
||||
return
|
||||
cycle_delay = world.time + PKBORG_DAMPEN_CYCLE_DELAY
|
||||
if(!active)
|
||||
if(!user.has_buckled_mobs())
|
||||
activate_field()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!</span>")
|
||||
to_chat(user, span_warning("[src]'s safety cutoff prevents you from activating it due to living beings being ontop of you!"))
|
||||
else
|
||||
deactivate_field()
|
||||
update_appearance()
|
||||
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>")
|
||||
to_chat(user, span_boldnotice("You [active? "activate":"deactivate"] [src]."))
|
||||
|
||||
/obj/item/borg/projectile_dampen/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][active]"
|
||||
@@ -649,7 +649,7 @@
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/deactivate_field()
|
||||
QDEL_NULL(dampening_field)
|
||||
visible_message("<span class='warning'>\The [src] shuts off!</span>")
|
||||
visible_message(span_warning("\The [src] shuts off!"))
|
||||
for(var/P in tracked)
|
||||
restore_projectile(P)
|
||||
active = FALSE
|
||||
@@ -698,7 +698,7 @@
|
||||
energy = clamp(energy - usage, 0, maxenergy)
|
||||
if(energy <= 0)
|
||||
deactivate_field()
|
||||
visible_message("<span class='warning'>[src] blinks \"ENERGY DEPLETED\".</span>")
|
||||
visible_message(span_warning("[src] blinks \"ENERGY DEPLETED\"."))
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge(delta_time)
|
||||
if(!istype(host))
|
||||
@@ -907,8 +907,8 @@
|
||||
else
|
||||
. += "Nothing."
|
||||
|
||||
. += "<span class='notice'> <i>Right-clicking</i> will splash the beaker on the ground.</span>"
|
||||
. += "<span class='notice'> <i>Alt-click</i> will drop the currently stored beaker. </span>"
|
||||
. += span_notice(" <i>Right-clicking</i> will splash the beaker on the ground.")
|
||||
. += span_notice(" <i>Alt-click</i> will drop the currently stored beaker. ")
|
||||
|
||||
/obj/item/borg/apparatus/beaker/update_overlays()
|
||||
. = ..()
|
||||
@@ -931,7 +931,7 @@
|
||||
/obj/item/borg/apparatus/beaker/pre_attack_secondary(atom/target, mob/living/silicon/robot/user)
|
||||
var/obj/item/reagent_containers/stored_beaker = stored
|
||||
stored_beaker.SplashReagents(drop_location(user))
|
||||
loc.visible_message("<span class='notice'>[user] spills the contents of [stored_beaker] all over the ground.</span>")
|
||||
loc.visible_message(span_notice("[user] spills the contents of [stored_beaker] all over the ground."))
|
||||
. = ..()
|
||||
|
||||
/obj/item/borg/apparatus/beaker/extra
|
||||
@@ -972,7 +972,7 @@
|
||||
. += organ.name
|
||||
else
|
||||
. += "Nothing."
|
||||
. += "<span class='notice'> <i>Alt-click</i> will drop the currently stored organ. </span>"
|
||||
. += span_notice(" <i>Alt-click</i> will drop the currently stored organ. ")
|
||||
|
||||
/obj/item/borg/apparatus/organ_storage/update_overlays()
|
||||
. = ..()
|
||||
@@ -995,11 +995,11 @@
|
||||
. = ..()
|
||||
if(stored)
|
||||
var/obj/item/organ = stored
|
||||
user.visible_message("<span class='notice'>[user] dumps [organ] from [src].</span>", "<span class='notice'>You dump [organ] from [src].</span>")
|
||||
user.visible_message(span_notice("[user] dumps [organ] from [src]."), span_notice("You dump [organ] from [src]."))
|
||||
cut_overlays()
|
||||
organ.forceMove(get_turf(src))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
to_chat(user, span_notice("[src] is empty."))
|
||||
return
|
||||
|
||||
////////////////////////////
|
||||
@@ -1036,9 +1036,9 @@
|
||||
. = ..()
|
||||
if(stored)
|
||||
. += "The apparatus currently has [stored] secured."
|
||||
. += "<span class='notice'> <i>Alt-click</i> will drop the currently stored circuit. </span>"
|
||||
. += span_notice(" <i>Alt-click</i> will drop the currently stored circuit. ")
|
||||
|
||||
/obj/item/borg/apparatus/circuit/pre_attack(atom/A, mob/living/user, params)
|
||||
. = ..()
|
||||
if(istype(A, /obj/item/ai_module) && !stored) //If an admin wants a borg to upload laws, who am I to stop them? Otherwise, we can hint that it fails
|
||||
to_chat(user, "<span class='warning'>This circuit board doesn't seem to have standard robot apparatus pin holes. You're unable to pick it up.</span>")
|
||||
to_chat(user, span_warning("This circuit board doesn't seem to have standard robot apparatus pin holes. You're unable to pick it up."))
|
||||
|
||||
@@ -103,9 +103,9 @@
|
||||
head.flash2.forceMove(T)
|
||||
head.flash2 = null
|
||||
head = null
|
||||
to_chat(user, "<span class='notice'>You disassemble the cyborg shell.</span>")
|
||||
to_chat(user, span_notice("You disassemble the cyborg shell."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There is nothing to remove from the endoskeleton!</span>")
|
||||
to_chat(user, span_warning("There is nothing to remove from the endoskeleton!"))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/robot_suit/proc/put_in_hand_or_drop(mob/living/user, obj/item/I) //normal put_in_hands() drops the item ontop of the player, this drops it at the suit's loc
|
||||
@@ -120,7 +120,7 @@
|
||||
return TRUE
|
||||
|
||||
if(!chest) //can't remove a cell if there's no chest to remove it from.
|
||||
to_chat(user, "<span class='warning'>[src] has no attached torso!</span>")
|
||||
to_chat(user, span_warning("[src] has no attached torso!"))
|
||||
return
|
||||
|
||||
var/obj/item/stock_parts/cell/temp_cell = user.is_holding_item_of_type(/obj/item/stock_parts/cell)
|
||||
@@ -129,20 +129,20 @@
|
||||
swap_failed = TRUE
|
||||
else if(!user.transferItemToLoc(temp_cell, chest))
|
||||
swap_failed = TRUE
|
||||
to_chat(user, "<span class='warning'>[temp_cell] is stuck to your hand, you can't put it in [src]!</span>")
|
||||
to_chat(user, span_warning("[temp_cell] is stuck to your hand, you can't put it in [src]!"))
|
||||
|
||||
if(chest.cell) //drop the chest's current cell no matter what.
|
||||
put_in_hand_or_drop(user, chest.cell)
|
||||
|
||||
if(swap_failed) //we didn't transfer any new items.
|
||||
if(chest.cell) //old cell ejected, nothing inserted.
|
||||
to_chat(user, "<span class='notice'>You remove [chest.cell] from [src].</span>")
|
||||
to_chat(user, span_notice("You remove [chest.cell] from [src]."))
|
||||
chest.cell = null
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The power cell slot in [src]'s torso is empty!</span>")
|
||||
to_chat(user, span_warning("The power cell slot in [src]'s torso is empty!"))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You [chest.cell ? "replace [src]'s [chest.cell.name] with [temp_cell]" : "insert [temp_cell] into [src]"].</span>")
|
||||
to_chat(user, span_notice("You [chest.cell ? "replace [src]'s [chest.cell.name] with [temp_cell]" : "insert [temp_cell] into [src]"]."))
|
||||
chest.cell = temp_cell
|
||||
return TRUE
|
||||
|
||||
@@ -154,13 +154,13 @@
|
||||
if (M.use(1))
|
||||
var/obj/item/bot_assembly/ed209/B = new
|
||||
B.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>You arm the robot frame.</span>")
|
||||
to_chat(user, span_notice("You arm the robot frame."))
|
||||
var/holding_this = user.get_inactive_held_item()==src
|
||||
qdel(src)
|
||||
if (holding_this)
|
||||
user.put_in_inactive_hand(B)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one sheet of iron to start building ED-209!</span>")
|
||||
to_chat(user, span_warning("You need one sheet of iron to start building ED-209!"))
|
||||
return
|
||||
else if(istype(W, /obj/item/bodypart/l_leg/robot))
|
||||
if(l_leg)
|
||||
@@ -214,15 +214,15 @@
|
||||
chest = CH
|
||||
update_appearance()
|
||||
else if(!CH.wired)
|
||||
to_chat(user, "<span class='warning'>You need to attach wires to it first!</span>")
|
||||
to_chat(user, span_warning("You need to attach wires to it first!"))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a cell to it first!</span>")
|
||||
to_chat(user, span_warning("You need to attach a cell to it first!"))
|
||||
|
||||
else if(istype(W, /obj/item/bodypart/head/robot))
|
||||
var/obj/item/bodypart/head/robot/HD = W
|
||||
for(var/X in HD.contents)
|
||||
if(istype(X, /obj/item/organ))
|
||||
to_chat(user, "<span class='warning'>There are organs inside [HD]!</span>")
|
||||
to_chat(user, span_warning("There are organs inside [HD]!"))
|
||||
return
|
||||
if(head)
|
||||
return
|
||||
@@ -234,22 +234,22 @@
|
||||
head = HD
|
||||
update_appearance()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach a flash to it first!</span>")
|
||||
to_chat(user, span_warning("You need to attach a flash to it first!"))
|
||||
|
||||
else if (W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(check_completion())
|
||||
ui_interact(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>")
|
||||
to_chat(user, span_warning("The endoskeleton must be assembled before debugging can begin!"))
|
||||
|
||||
else if(istype(W, /obj/item/mmi))
|
||||
var/obj/item/mmi/M = W
|
||||
if(check_completion())
|
||||
if(!chest.cell)
|
||||
to_chat(user, "<span class='warning'>The endoskeleton still needs a power cell!</span>")
|
||||
to_chat(user, span_warning("The endoskeleton still needs a power cell!"))
|
||||
return
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
to_chat(user, span_warning("You can't put [M] in, the frame has to be standing on the ground to be perfectly precise!"))
|
||||
return
|
||||
if(!M.brain_check(user))
|
||||
return
|
||||
@@ -257,7 +257,7 @@
|
||||
var/mob/living/brain/B = M.brainmob
|
||||
if(is_banned_from(B.ckey, "Cyborg") || QDELETED(src) || QDELETED(B) || QDELETED(user) || QDELETED(M) || !Adjacent(user))
|
||||
if(!QDELETED(M))
|
||||
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")
|
||||
to_chat(user, span_warning("This [M.name] does not seem to fit!"))
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
@@ -304,8 +304,8 @@
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.")
|
||||
to_chat(O, "<span class='userdanger'>You have been robotized!</span>")
|
||||
to_chat(O, "<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>")
|
||||
to_chat(O, span_userdanger("You have been robotized!"))
|
||||
to_chat(O, span_danger("You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead."))
|
||||
|
||||
SSblackbox.record_feedback("amount", "cyborg_birth", 1)
|
||||
forceMove(O)
|
||||
@@ -315,19 +315,19 @@
|
||||
|
||||
if(!locomotion)
|
||||
O.set_lockcharge(TRUE)
|
||||
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
||||
to_chat(O, span_warning("Error: Servo motors unresponsive."))
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
|
||||
to_chat(user, span_warning("The MMI must go in after everything else!"))
|
||||
|
||||
else if(istype(W, /obj/item/borg/upgrade/ai))
|
||||
var/obj/item/borg/upgrade/ai/M = W
|
||||
if(check_completion())
|
||||
if(!isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You cannot install[M], the frame has to be standing on the ground to be perfectly precise!</span>")
|
||||
to_chat(user, span_warning("You cannot install[M], the frame has to be standing on the ground to be perfectly precise!"))
|
||||
return
|
||||
if(!user.temporarilyRemoveItemFromInventory(M))
|
||||
to_chat(user, "<span class='warning'>[M] is stuck to your hand!</span>")
|
||||
to_chat(user, span_warning("[M] is stuck to your hand!"))
|
||||
return
|
||||
qdel(M)
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot/shell(get_turf(src))
|
||||
@@ -354,7 +354,7 @@
|
||||
O.set_lockcharge(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/pen))
|
||||
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
||||
to_chat(user, span_warning("You need to use a multitool to name [src]!"))
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
var/obj/item/held_item = user.get_active_held_item()
|
||||
if(held_item?.tool_behaviour == TOOL_MULTITOOL)
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>You need a multitool to access debug settings!</span>")
|
||||
to_chat(user, span_warning("You need a multitool to access debug settings!"))
|
||||
return UI_CLOSE
|
||||
|
||||
/obj/item/robot_suit/ui_state(mob/user)
|
||||
@@ -416,7 +416,7 @@
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(!selected_ai)
|
||||
to_chat(user, "<span class='alert'>No active AIs detected.</span>")
|
||||
to_chat(user, span_alert("No active AIs detected."))
|
||||
return
|
||||
forced_ai = selected_ai
|
||||
return TRUE
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>[src] will not function on a deceased cyborg!</span>")
|
||||
to_chat(user, span_warning("[src] will not function on a deceased cyborg!"))
|
||||
return FALSE
|
||||
if(model_type && !is_type_in_list(R.model, model_type))
|
||||
to_chat(R, "<span class='alert'>Upgrade mounting error! No suitable hardpoint detected.</span>")
|
||||
to_chat(user, "<span class='warning'>There's no mounting point for the module!</span>")
|
||||
to_chat(R, span_alert("Upgrade mounting error! No suitable hardpoint detected."))
|
||||
to_chat(user, span_warning("There's no mounting point for the module!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/item/borg/upgrade/restart/action(mob/living/silicon/robot/R, user = usr)
|
||||
if(R.health < 0)
|
||||
to_chat(user, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
|
||||
to_chat(user, span_warning("You have to repair the cyborg before using this module!"))
|
||||
return FALSE
|
||||
|
||||
if(R.mind)
|
||||
@@ -86,11 +86,11 @@
|
||||
if(.)
|
||||
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.model.modules
|
||||
if(!T)
|
||||
to_chat(user, "<span class='warning'>There's no disabler in this unit!</span>")
|
||||
to_chat(user, span_warning("There's no disabler in this unit!"))
|
||||
return FALSE
|
||||
if(T.charge_delay <= 2)
|
||||
to_chat(R, "<span class='warning'>A cooling unit is already installed!</span>")
|
||||
to_chat(user, "<span class='warning'>There's no room for another cooling unit!</span>")
|
||||
to_chat(R, span_warning("A cooling unit is already installed!"))
|
||||
to_chat(user, span_warning("There's no room for another cooling unit!"))
|
||||
return FALSE
|
||||
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
@@ -112,7 +112,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(R.ionpulse)
|
||||
to_chat(user, "<span class='warning'>This unit already has ion thrusters installed!</span>")
|
||||
to_chat(user, span_warning("This unit already has ion thrusters installed!"))
|
||||
return FALSE
|
||||
|
||||
R.ionpulse = TRUE
|
||||
@@ -322,7 +322,7 @@
|
||||
if(.)
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a self-repair module!</span>")
|
||||
to_chat(user, span_warning("This unit is already equipped with a self-repair module!"))
|
||||
return FALSE
|
||||
|
||||
icon_state = "selfrepair_off"
|
||||
@@ -338,10 +338,10 @@
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/ui_action_click()
|
||||
if(on)
|
||||
to_chat(toggle_action.owner, "<span class='notice'>You deactivate the self-repair module.</span>")
|
||||
to_chat(toggle_action.owner, span_notice("You deactivate the self-repair module."))
|
||||
deactivate_sr()
|
||||
else
|
||||
to_chat(toggle_action.owner, "<span class='notice'>You activate the self-repair module.</span>")
|
||||
to_chat(toggle_action.owner, span_notice("You activate the self-repair module."))
|
||||
activate_sr()
|
||||
|
||||
|
||||
@@ -370,12 +370,12 @@
|
||||
|
||||
if(istype(cyborg) && (cyborg.stat != DEAD) && on)
|
||||
if(!cyborg.cell)
|
||||
to_chat(cyborg, "<span class='alert'>Self-repair module deactivated. Please insert power cell.</span>")
|
||||
to_chat(cyborg, span_alert("Self-repair module deactivated. Please insert power cell."))
|
||||
deactivate_sr()
|
||||
return
|
||||
|
||||
if(cyborg.cell.charge < powercost * 2)
|
||||
to_chat(cyborg, "<span class='alert'>Self-repair module deactivated. Please recharge.</span>")
|
||||
to_chat(cyborg, span_alert("Self-repair module deactivated. Please recharge."))
|
||||
deactivate_sr()
|
||||
return
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
msgmode = "critical"
|
||||
else if(cyborg.health < cyborg.maxHealth)
|
||||
msgmode = "normal"
|
||||
to_chat(cyborg, "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>")
|
||||
to_chat(cyborg, span_notice("Self-repair is active in [span_boldnotice("[msgmode]")] mode."))
|
||||
else
|
||||
deactivate_sr()
|
||||
|
||||
@@ -477,7 +477,7 @@
|
||||
var/obj/item/borg/upgrade/defib/backpack/BP = locate() in R //If a full defib unit was used to upgrade prior, we can just pop it out now and replace
|
||||
if(BP)
|
||||
BP.deactivate(R, user)
|
||||
to_chat(user, "<span class='notice'>You remove the defibrillator unit to make room for the compact upgrade.</span>")
|
||||
to_chat(user, span_notice("You remove the defibrillator unit to make room for the compact upgrade."))
|
||||
var/obj/item/shockpaddles/cyborg/S = new(R.model)
|
||||
R.model.basic_modules += S
|
||||
R.model.add_module(S, FALSE, TRUE)
|
||||
@@ -548,10 +548,10 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(R.shell)
|
||||
to_chat(user, "<span class='warning'>This unit is already an AI shell!</span>")
|
||||
to_chat(user, span_warning("This unit is already an AI shell!"))
|
||||
return FALSE
|
||||
if(R.key) //You cannot replace a player unless the key is completely removed.
|
||||
to_chat(user, "<span class='warning'>Intelligence patterns detected in this [R.braintype]. Aborting.</span>")
|
||||
to_chat(user, span_warning("Intelligence patterns detected in this [R.braintype]. Aborting."))
|
||||
return FALSE
|
||||
|
||||
R.make_shell(src)
|
||||
@@ -573,7 +573,7 @@
|
||||
if(.)
|
||||
|
||||
if(R.hasExpanded)
|
||||
to_chat(usr, "<span class='warning'>This unit already has an expand module installed!</span>")
|
||||
to_chat(usr, span_warning("This unit already has an expand module installed!"))
|
||||
return FALSE
|
||||
|
||||
R.notransform = TRUE
|
||||
@@ -618,7 +618,7 @@
|
||||
|
||||
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R
|
||||
if(RPED)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a RPED module!</span>")
|
||||
to_chat(user, span_warning("This unit is already equipped with a RPED module!"))
|
||||
return FALSE
|
||||
|
||||
RPED = new(R.model)
|
||||
@@ -648,7 +648,7 @@
|
||||
|
||||
var/obj/item/pinpointer/crew/PP = locate() in R.model
|
||||
if(PP)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a pinpointer module!</span>")
|
||||
to_chat(user, span_warning("This unit is already equipped with a pinpointer module!"))
|
||||
return FALSE
|
||||
|
||||
PP = new(R.model)
|
||||
@@ -705,7 +705,7 @@
|
||||
if(.)
|
||||
var/obj/item/borg/apparatus/circuit/C = locate() in R.model.modules
|
||||
if(C)
|
||||
to_chat(user, "<span class='warning'>This unit is already equipped with a circuit apparatus!</span>")
|
||||
to_chat(user, span_warning("This unit is already equipped with a circuit apparatus!"))
|
||||
return FALSE
|
||||
|
||||
C = new(R.model)
|
||||
@@ -732,7 +732,7 @@
|
||||
if(.)
|
||||
var/obj/item/borg/apparatus/beaker/extra/E = locate() in R.model.modules
|
||||
if(E)
|
||||
to_chat(user, "<span class='warning'>This unit has no room for additional beaker storage!</span>")
|
||||
to_chat(user, span_warning("This unit has no room for additional beaker storage!"))
|
||||
return FALSE
|
||||
|
||||
E = new(R.model)
|
||||
@@ -760,7 +760,7 @@
|
||||
return
|
||||
var/obj/item/pushbroom/cyborg/BR = locate() in R.model.modules
|
||||
if (BR)
|
||||
to_chat(user, "<span class='warning'>This janiborg is already equipped with an experimental broom!</span>")
|
||||
to_chat(user, span_warning("This janiborg is already equipped with an experimental broom!"))
|
||||
return FALSE
|
||||
BR = new(R.model)
|
||||
R.model.basic_modules += BR
|
||||
|
||||
Reference in New Issue
Block a user