Skip to content

Commit

Permalink
eeh
Browse files Browse the repository at this point in the history
  • Loading branch information
Helg2 committed Aug 1, 2024
1 parent bbe812b commit 36e4560
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 42 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define span_adminhelp(str) ("<span class='adminhelp'>" + str + "</span>")
#define span_adminnotice(str) ("<span class='adminnotice'>" + str + "</span>")
#define span_adminooc(str) ("<span class='adminooc'>" + str + "</span>")
#define span_adminprefix(str) ("<span class='admin prefix'>" + str + "</span>")
#define span_alert(str) ("<span class='alert'>" + str + "</span>")
#define span_alertalien(str) ("<span class='alertalien'>" + str + "</span>")
#define span_alien(str) ("<span class='alien'>" + str + "</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
log_combat(user, target, "spiked", src, "Reagents: [rgt_list_text]")

reagents.trans_to(target, reagents.total_volume)
visible_message(span_warning("[user] puts something in \the [target].", null, null, 2))
visible_message(span_warning("[user] puts something in \the [target]."), null, null, 2)

QDEL_IN(src, 5)

Expand Down
20 changes: 10 additions & 10 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@
if(amount > cell.charge)
playsound(src, 'sound/machines/buzz-two.ogg', 25, 1)
if(cell.charge)
warning = "<span class='warning'>[src]'s defibrillator recharge unit buzzes a warning, its battery only having enough power to partially recharge the defibrillator for [cell.charge] amount. "
warning = span_warning("[src]'s defibrillator recharge unit buzzes a warning, its battery only having enough power to partially recharge the defibrillator for [cell.charge] amount. ")
else
warning = "<span class='warning'>[src]'s defibrillator recharge unit buzzes a warning, as its battery is completely depleted of charge. "
warning = span_warning("[src]'s defibrillator recharge unit buzzes a warning, as its battery is completely depleted of charge. ")
else
playsound(src, 'sound/machines/ping.ogg', 25, 1)
warning = "<span class='notice'>[src]'s defibrillator recharge unit cheerfully pings as it successfully recharges the defibrillator. "
warning = span_notice("[src]'s defibrillator recharge unit cheerfully pings as it successfully recharges the defibrillator. ")
cell.charge -= min(cell.charge, amount)
if(mention_charge)
to_chat(user, span_notice("[warning]<b>Charge Remaining: [cell.charge]/[cell.maxcharge]</b>"))
Expand Down Expand Up @@ -529,18 +529,18 @@
camouflage()

/obj/item/storage/backpack/marine/satchel/scout_cloak/proc/camouflage()
if (usr.incapacitated(TRUE))
if(usr.incapacitated(TRUE))
return

var/mob/living/carbon/human/M = usr
if (!istype(M))
if(!istype(M))
return

if (M.back != src)
to_chat(M, "<span class='warning'>You must be wearing the cloak to activate it!")
if(M.back != src)
to_chat(M, span_warning("You must be wearing the cloak to activate it!"))
return

if (camo_active)
if(camo_active)
camo_off(usr)
return

Expand All @@ -549,7 +549,7 @@
return FALSE

if (camo_cooldown_timer)
to_chat(M, "<span class='warning'>Your thermal cloak is still recalibrating! It will be ready in [(camo_cooldown_timer - world.time) * 0.1] seconds.")
to_chat(M, span_warning("Your thermal cloak is still recalibrating! It will be ready in [(camo_cooldown_timer - world.time) * 0.1] seconds."))
return

camo_active = TRUE
Expand Down Expand Up @@ -630,7 +630,7 @@
var/cooldown = round( (initial(camo_energy) - camo_energy) / SCOUT_CLOAK_INACTIVE_RECOVERY * 10) //Should be 20 seconds after a full depletion with inactive recovery at 5
if(cooldown)
camo_cooldown_timer = world.time + cooldown //recalibration and recharge time scales inversely with charge remaining
to_chat(user, "<span class='warning'>Your thermal cloak is recalibrating! It will be ready in [(camo_cooldown_timer - world.time) * 0.1] seconds.")
to_chat(user, span_warning("Your thermal cloak is recalibrating! It will be ready in [(camo_cooldown_timer - world.time) * 0.1] seconds."))
process_camo_cooldown(user, cooldown)

UnregisterSignal(user, list(
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/tools/flame_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(iswelder(W))
var/obj/item/tool/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a blowtorch
light("<span class ='notice'>[user] casually lights [src] with [W].</span>")
light(span_notice("[user] casually lights [src] with [W].</span>"))
else if(W.heat > 400)
light()
else
Expand All @@ -61,7 +61,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!heat)
heat = 1000
if(!flavor_text)
flavor_text = "<span class ='notice'>[usr] lights [src].</span>"
flavor_text = span_notice("[usr] lights [src].")
visible_message(flavor_text)
set_light_on(TRUE)
update_icon()
Expand Down Expand Up @@ -613,10 +613,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = icon_off
if(!silent)
if(istype(src, /obj/item/tool/lighter/zippo) )
bearer.visible_message("<span class='rose'>You hear a quiet click, as [bearer] shuts off [src] without even looking at what they're doing.")
bearer.visible_message(span_rose(">You hear a quiet click, as [bearer] shuts off [src] without even looking at what they're doing."))
playsound(loc, 'sound/items/zippo_off.ogg', 15, 1)
else
bearer.visible_message("<span class='notice'>[bearer] quietly shuts off the [src].")
bearer.visible_message(span_notice("[bearer] quietly shuts off the [src]."))
playsound(loc, 'sound/items/lighter_off.ogg', 15, 1)
set_light_on(FALSE)
return TRUE
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/structures/fence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@
amount_needed = 4

if(R.amount < amount_needed)
to_chat(user, "<span class='warning'>You need more metal rods to repair [src].")
to_chat(user, span_warning("You need more metal rods to repair [src]."))
return

user.visible_message(span_notice("[user] starts repairing [src] with [R]."),
"<span class='notice'>You start repairing [src] with [R]")
span_notice("You start repairing [src] with [R]"))
playsound(loc, 'sound/items/wirecutter.ogg', 25, 1)

if(!do_after(user, 30, NONE, src, BUSY_ICON_FRIENDLY))
return

if(R.amount < amount_needed)
to_chat(user, "<span class='warning'>You need more metal rods to repair [src].")
to_chat(user, span_warning("You need more metal rods to repair [src]."))
return

R.use(amount_needed)
Expand All @@ -58,7 +58,7 @@
icon = 'icons/obj/smooth_objects/fence.dmi'
playsound(loc, 'sound/items/wirecutter.ogg', 25, 1)
user.visible_message(span_notice("[user] repairs [src] with [R]."),
"<span class='notice'>You repair [src] with [R]")
span_notice("You repair [src] with [R]"))

else if(cut) //Cut/brokn grilles can't be messed with further than this
return
Expand Down Expand Up @@ -93,14 +93,14 @@

else if(iswirecutter(I))
user.visible_message(span_notice("[user] starts cutting through [src] with [I]."),
"<span class='notice'>You start cutting through [src] with [I]")
span_notice("You start cutting through [src] with [I]"))
playsound(loc, 'sound/items/wirecutter.ogg', 25, 1)
if(!do_after(user, 20, NONE, src, BUSY_ICON_BUILD))
return

playsound(loc, 'sound/items/wirecutter.ogg', 25, 1)
user.visible_message(span_notice("[user] cuts through [src] with [I]."),
"<span class='notice'>You cut through [src] with [I]")
span_notice("You cut through [src] with [I]"))
deconstruct(TRUE)


Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/panels/antag_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ GLOBAL_VAR(antag_prototypes)
continue
else //Show removal and current one
priority_sections |= antag_category
antag_header_parts += "<span class='bad'>[current_antag.name]</span>"
antag_header_parts += span_bad("[current_antag.name]")
antag_header_parts += "<a href='?src=[REF(src)];remove_antag=[REF(current_antag)]'>Remove</a>"


Expand Down
14 changes: 7 additions & 7 deletions code/modules/admin/panels/permission_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
log_admin("[key_name(usr)] attempted to edit admin permissions without sufficient rights.")
return
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='admin prefix'>Admin Edit blocked: Advanced ProcCall detected.</span>")
to_chat(usr, span_adminprefix("Admin Edit blocked: Advanced ProcCall detected."))
return
var/datum/asset/permissions_assets = get_asset_datum(/datum/asset/simple/namespaced/common)
permissions_assets.send(src)
Expand All @@ -152,14 +152,14 @@
skip = TRUE
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_admins) && task == "rank")
if(admin_ckey in GLOB.protected_admins)
to_chat(usr, "<span class='admin prefix'>Editing the rank of this admin is blocked by server configuration.</span>")
to_chat(usr, span_adminprefix("Editing the rank of this admin is blocked by server configuration."))
return
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && task == "permissions")
if(D.rank in GLOB.protected_ranks)
to_chat(usr, "<span class='admin prefix'>Editing the flags of this rank is blocked by server configuration.</span>")
to_chat(usr, span_adminprefix("Editing the flags of this rank is blocked by server configuration."))
return
if(CONFIG_GET(flag/load_legacy_ranks_only) && (task == "add" || task == "rank" || task == "permissions"))
to_chat(usr, "<span class='admin prefix'>Database rank loading is disabled, only temporary changes can be made to a rank's permissions and permanently creating a new rank is blocked.</span>")
to_chat(usr, span_adminprefix("Database rank loading is disabled, only temporary changes can be made to a rank's permissions and permanently creating a new rank is blocked."))
legacy_only = TRUE
if(check_rights(R_DBRANKS, FALSE))
if(!skip)
Expand Down Expand Up @@ -466,13 +466,13 @@
return
for(var/datum/admin_rank/R in GLOB.admin_ranks)
if(R.name == admin_rank && (!(R.rights & usr.client.holder.rank.can_edit_rights) == R.rights))
to_chat(usr, "<span class='admin prefix'>You don't have edit rights to all the rights this rank has, rank deletion not permitted.</span>")
to_chat(usr, span_adminprefix("You don't have edit rights to all the rights this rank has, rank deletion not permitted."))
return
if(!CONFIG_GET(flag/admin_legacy_system) && CONFIG_GET(flag/protect_legacy_ranks) && (admin_rank in GLOB.protected_ranks))
to_chat(usr, "<span class='admin prefix'>Deletion of protected ranks is not permitted, it must be removed from admin_ranks.txt.</span>")
to_chat(usr, span_adminprefix("Deletion of protected ranks is not permitted, it must be removed from admin_ranks.txt."))
return
if(CONFIG_GET(flag/load_legacy_ranks_only))
to_chat(usr, "<span class='admin prefix'>Rank deletion not permitted while database rank loading is disabled.</span>")
to_chat(usr, span_adminprefix("Rank deletion not permitted while database rank loading is disabled."))
return
var/datum/db_query/query_admins_with_rank = SSdbcore.NewQuery(
"SELECT 1 FROM [format_table_name("admin")] WHERE `rank` = :admin_rank",
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/view_variables/filterrific.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
. = TRUE
if("mass_apply")
if(!check_rights_for(usr.client, R_FUN))
to_chat(usr, "<span class='userdanger>Stay in your lane, jannie.</span>'")
to_chat(usr, span_userdanger("Stay in your lane, jannie."))
return
var/target_path = text2path(params["path"])
if(!target_path)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/buildmode/submodes/advanced.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/datum/buildmode_mode/advanced/show_help(client/c)
to_chat(c, span_notice("***********************************************************"))
to_chat(c, span_notice("Right Mouse Button on buildmode button = Set object type"))
to_chat(c, "<span class='notice'>Left Mouse Button + alt on turf/obj = Copy object type")
to_chat(c, span_notice("Left Mouse Button + alt on turf/obj = Copy object type"))
to_chat(c, span_notice("Left Mouse Button on turf/obj = Place objects"))
to_chat(c, span_notice("Right Mouse Button = Delete objects"))
to_chat(c, "")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/buildmode/submodes/delete.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
key = "delete"

/datum/buildmode_mode/delete/show_help(client/c)
to_chat(c, "<span class='notice'>***********************************************************\n\
to_chat(c, span_notice("***********************************************************\n\
Left Mouse Button on anything to delete it. If you break it, you buy it.\n\
Right Mouse Button on anything to delete everything of the type. Probably don\'t do this unless you know what you are doing.\n\
***********************************************************</span>")
***********************************************************"))

/datum/buildmode_mode/delete/handle_click(client/c, params, object)
var/list/pa = params2list(params)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/buildmode/submodes/loadout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
return ..()

/datum/buildmode_mode/loadout/show_help(client/c)
to_chat(c, "<span class='notice'>***********************************************************\n\
to_chat(c, span_notice("***********************************************************\n\
Right Mouse Button on buildmode button = Select loadout to equip.\n\
Left Mouse Button on mob/living/carbon/human = Equip the selected loadout.\n\
Right Mouse Button on mob/living/carbon/human = Copy thier loadout.\n\
Shift + Left Mouse Button Button on mob/living/carbon/human = Strip and delete current loadout.\n\
***********************************************************</span>")
***********************************************************"))

/datum/buildmode_mode/loadout/Reset()
. = ..()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/condor/cas_chair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@
switch(action)
if("launch")
if(!cas_usable)
to_chat(usr, "<span class='warning'>Combat has not yet initiated, CAS unavailable.")
to_chat(usr, span_warning("Combat has not yet initiated, CAS unavailable."))
return
if(owner.state == PLANE_STATE_FLYING || owner.mode != SHUTTLE_IDLE)
return
if(owner.fuel_left <= LOW_FUEL_THRESHOLD)
to_chat(usr, "<span class='warning'>Unable to launch, low fuel.")
to_chat(usr, span_warning("Unable to launch, low fuel."))
return
SSshuttle.moveShuttleToDock(owner.id, SSshuttle.generate_transit_dock(owner), TRUE)
owner.currently_returning = FALSE
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mining/remote_fob/remote_fob_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@
var/useamount = attacking_stack.amount
metal_remaining += useamount
attacking_stack.use(useamount)
to_chat(user, "<span class='notice'>Inserted [useamount] metal sheets.")
to_chat(user, span_notice("Inserted [useamount] metal sheets."))
flick("fobpc-insert", src)
return
if(istype(attacking_stack, /obj/item/stack/sheet/plasteel))
var/useamount = attacking_stack.amount
plasteel_remaining += useamount
attacking_stack.use(useamount)
to_chat(user, "<span class='notice'>Inserted [useamount] plasteel sheets.")
to_chat(user, span_notice("Inserted [useamount] plasteel sheets."))
flick("fobpc-insert", src)
return
return ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_attackhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ RU TGMC EDIT */
chance = !hand ? 40 : 20

if(prob(chance))
visible_message("<span class='danger'>[src]'s [W] goes off during struggle!", null, null, 5)
visible_message(span_danger("[src]'s [W] goes off during struggle!"), null, null, 5)
log_combat(H, src, "disarmed", "making their [W] go off")
var/list/turfs = list()
for(var/turf/T in view())
Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ Note that amputating the affected organ does in fact remove the infection from t
owner.visible_message(\
span_warning("You hear a loud cracking sound coming from [owner]!"),
span_highdanger("Something feels like it shattered in your [display_name]!"),
"<span class='warning'>You hear a sickening crack!<span>")
span_warning("You hear a sickening crack!"))
playsound(owner, "bone_break", 45, 1)
if(owner.species && !(owner.species.species_flags & NO_PAIN))
owner.emote("scream")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/gun_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@

projectile_to_fire = get_ammo_object()

user.visible_message("<span class = 'warning'>[user] pulls the trigger!</span>")
user.visible_message(span_warning("[user] pulls the trigger!"))
var/actual_sound = (active_attachable?.fire_sound) ? active_attachable.fire_sound : fire_sound
var/sound_volume = (HAS_TRAIT(src, TRAIT_GUN_SILENCED) && !active_attachable) ? 25 : 60
playsound(user, actual_sound, sound_volume, 1)
Expand Down

0 comments on commit 36e4560

Please sign in to comment.