[MIRROR] refactors most spans (#9139)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -13,7 +13,7 @@
. = ..()
if(new_partner)
pair(new_partner)
/obj/effect/overmap/bluespace_rift/proc/pair(var/obj/effect/overmap/bluespace_rift/new_partner)
if(istype(new_partner))
partner = new_partner
@@ -37,6 +37,6 @@
new type(get_turf(user), src)
else if(partner)
user.forceMove(get_turf(partner))
to_chat(user, "<span class='notice'>Your ghostly form is pulled through the rift!</span>")
to_chat(user, span_notice("Your ghostly form is pulled through the rift!"))
else
return ..()

View File

@@ -23,41 +23,41 @@
return
if(comp.shuttle_tag)
to_chat(user, "<span class='warning'>[comp] is already configured to link with [comp.shuttle_tag]</span>")
to_chat(user, span_warning("[comp] is already configured to link with [comp.shuttle_tag]"))
return
user.visible_message("<span class='notice'>[user] lifts [src] bottle over [comp]!</span>")
user.visible_message(span_notice("[user] lifts [src] bottle over [comp]!"))
var/shuttle_name = tgui_input_text(usr, "Choose a name for the shuttle", "New Shuttle Name")
if(!shuttle_name || QDELETED(src) || QDELETED(comp) || comp.shuttle_tag || user.incapacitated())
return // After input() safety re-checks
// Tons of safety checks here. Make sure they don't destroy everything.
if(length(shuttle_name) < min_name_len || length(shuttle_name) > max_name_len)
to_chat(user, "<span class='warning'>Name length must be between [min_name_len] and [max_name_len].</span>")
to_chat(user, span_warning("Name length must be between [min_name_len] and [max_name_len]."))
return
if(shuttle_name in SSshuttles.shuttles)
to_chat(user, "<span class='warning'>Invalid name: Already in use.</span>")
to_chat(user, span_warning("Invalid name: Already in use."))
return
var/area/my_area = get_area(comp)
if(!my_area || istype(my_area, /area/space))
to_chat(user, "<span class='warning'>[comp] must be in a valid area to become a shuttle.</span>")
to_chat(user, span_warning("[comp] must be in a valid area to become a shuttle."))
return
if(my_area in SSshuttles.shuttle_areas)
to_chat(user, "<span class='warning'>[comp] is already in a shuttle.</span>")
to_chat(user, span_warning("[comp] is already in a shuttle."))
return
// Count turfs in the area
var/list/turfs = get_current_area_turfs(my_area)
if(turfs.len > max_area_turfs)
to_chat(user, "<span class='warning'>The new shuttle area is too large.</span>")
to_chat(user, span_warning("The new shuttle area is too large."))
return
var/turf/comp_turf = get_turf(comp)
var/datum/shuttle/autodock/S = create_landable_shuttle(shuttle_name, comp_turf, my_area)
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 0)
user.visible_message("<span class='notice'>[user] smashes [src] on [comp]</span>",
"<span class='info'>You smash [src] on [comp], christening a new landable ship named [S.name]</span>",
"<span class='notice'>You hear glass shattering</span>")
user.visible_message(span_notice("[user] smashes [src] on [comp]"),
span_info("You smash [src] on [comp], christening a new landable ship named [S.name]"),
span_notice("You hear glass shattering"))
log_and_message_admins("[key_name_admin(user)] Created a new shuttle [S.name]. [ADMIN_JMP(comp_turf)]")
spawn(1 SECOND)
playsound(comp_turf, 'sound/voice/Serithi/Shuttlehere.ogg', 75, 0)

View File

@@ -25,11 +25,11 @@
if(I && I.has_tool_quality(TOOL_WRENCH))
if(panel_open)
user.visible_message("<b>\The [user]</b> rotates \the [src] with \the [I].",
"<span class='notice'>You rotate \the [src] with \the [I].</span>")
span_notice("You rotate \the [src] with \the [I]."))
set_dir(turn(dir, 90))
playsound(src, 'sound/items/jaws_pry.ogg', 50, 1)
else
to_chat(user, "<span class='notice'>The maintenance panel must be screwed open for this!</span>")
to_chat(user, span_notice("The maintenance panel must be screwed open for this!"))
return
if(default_deconstruction_screwdriver(user, I))
return

View File

@@ -73,7 +73,7 @@
/obj/machinery/computer/ship/attack_ai(mob/user)
//VOREStation Addition Start
if(!ai_control && issilicon(user))
to_chat(user, "<span class='warning'>Access Denied.</span>")
to_chat(user, span_warning("Access Denied."))
return
//VOREStation Addition End
if(tgui_status(user, tgui_state()) > STATUS_CLOSE)
@@ -90,11 +90,11 @@
return
//VOREStation Addition Start
if(!ai_control && issilicon(user))
to_chat(user, "<span class='warning'>Access Denied.</span>")
to_chat(user, span_warning("Access Denied."))
return TRUE
//VOREStation Addition End
if(!allowed(user))
to_chat(user, "<span class='warning'>Access Denied.</span>")
to_chat(user, span_warning("Access Denied."))
return TRUE
if(tgui_status(user, tgui_state()) > STATUS_CLOSE)
return interface_interact(user)

View File

@@ -167,7 +167,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
sec_name = "Sector #[known_sectors.len]"
R.fields["name"] = sec_name
if(sec_name in known_sectors)
to_chat(usr, "<span class='warning'>Sector with that name already exists, please input a different name.</span>")
to_chat(usr, span_warning("Sector with that name already exists, please input a different name."))
return TRUE
switch(params["add"])
if("current")

View File

@@ -153,13 +153,13 @@
return
if(WT.remove_fuel(0,user))
to_chat(user, "<span class='notice'>You start repairing the damage to [src].</span>")
to_chat(user, span_notice("You start repairing the damage to [src]."))
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5), src) && WT && WT.isOn())
to_chat(user, "<span class='notice'>You finish repairing the damage to [src].</span>")
to_chat(user, span_notice("You finish repairing the damage to [src]."))
take_damage(-damage)
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
to_chat(user, span_notice("You need more welding fuel to complete this task."))
return
return
..()
@@ -182,11 +182,11 @@
/obj/machinery/shipsensors/examine(mob/user)
. = ..()
if(health <= 0)
. += "<span class='danger'>It is wrecked.</span>"
. += span_danger("It is wrecked.")
else if(health < max_health * 0.25)
. += "<span class='danger'>It looks like it's about to break!</span>"
. += span_danger("It looks like it's about to break!")
else if(health < max_health * 0.5)
. += "<span class='danger'>It looks seriously damaged!</span>"
. += span_danger("It looks seriously damaged!")
else if(health < max_health * 0.75)
. += "It shows signs of damage!"
@@ -207,7 +207,7 @@
if(!in_vacuum())
toggle()
if(heat > critical_heat)
src.visible_message("<span class='danger'>\The [src] violently spews out sparks!</span>")
src.visible_message(span_danger("\The [src] violently spews out sparks!"))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()

View File

@@ -22,7 +22,7 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
return
. = attempt_hook_up_recursive(sector)
if(. && linked && user)
to_chat(user, "<span class='notice'>[src] reconnected to [linked]</span>")
to_chat(user, span_notice("[src] reconnected to [linked]"))
user << browse(null, "window=[src]") // close reconnect dialog
/obj/machinery/computer/ship/proc/attempt_hook_up_recursive(obj/effect/overmap/visitable/ship/sector)

View File

@@ -31,7 +31,7 @@
var/datum/shuttle/autodock/overmap/shuttle = SSshuttles.shuttles[shuttle_tag]
if(!istype(shuttle))
to_chat(usr, "<span class='warning'>Unable to establish link with the shuttle.</span>")
to_chat(usr, span_warning("Unable to establish link with the shuttle."))
return TRUE
if(ismob(usr))
@@ -45,7 +45,7 @@
if(possible_d.len)
D = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", possible_d)
else
to_chat(usr,"<span class='warning'>No valid landing sites in range.</span>")
to_chat(usr,span_warning("No valid landing sites in range."))
possible_d = shuttle.get_possible_destinations()
if(CanInteract(usr, GLOB.tgui_default_state) && (D in possible_d))
shuttle.set_destination(possible_d[D])

View File

@@ -149,7 +149,7 @@
if(!is_on())
return 0
if(!check_fuel() || (use_power_oneoff(charge_per_burn) < charge_per_burn) || check_blockage())
audible_message(src,"<span class='warning'>[src] coughs once and goes silent!</span>", runemessage = "sputtercough")
audible_message(src,span_warning("[src] coughs once and goes silent!"), runemessage = "sputtercough")
update_use_power(USE_POWER_OFF)
return 0

View File

@@ -32,7 +32,7 @@
// Already launched
if(launched)
to_chat(user, "<span class='warning'>The button is already depressed; the beacon has been launched already.</span>")
to_chat(user, span_warning("The button is already depressed; the beacon has been launched already."))
// Glass present
else if(glass)
if(user.a_intent == I_HURT)
@@ -42,7 +42,7 @@
update_icon()
else
user.custom_emote(VISIBLE_MESSAGE, "pats [src] in a friendly manner.")
to_chat(user, "<span class='warning'>If you're trying to break the glass, you'll have to hit it harder than that...</span>")
to_chat(user, span_warning("If you're trying to break the glass, you'll have to hit it harder than that..."))
// Must be !glass and !launched
else
user.custom_emote(VISIBLE_MESSAGE, "pushes the button on [src]!")

View File

@@ -18,11 +18,11 @@
if(confirm == "Eat it!")
var/obj/belly/bellychoice = tgui_input_list(usr, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
L.visible_message("<span class='warning'>[L] is trying to stuff \the [src] into [L.gender == MALE ? "his" : L.gender == FEMALE ? "her" : "their"] [bellychoice]!</span>","<span class='notice'>You begin putting \the [src] into your [bellychoice]!</span>")
L.visible_message(span_warning("[L] is trying to stuff \the [src] into [L.gender == MALE ? "his" : L.gender == FEMALE ? "her" : "their"] [bellychoice]!"),span_notice("You begin putting \the [src] into your [bellychoice]!"))
if(do_after(L, 5 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE))
forceMove(bellychoice)
SSskybox.rebuild_skyboxes(map_z)
L.visible_message("<span class='warning'>[L] eats a spaceship! This is totally normal.</span>","You eat the the spaceship! Yum, metal.")
L.visible_message(span_warning("[L] eats a spaceship! This is totally normal."),"You eat the the spaceship! Yum, metal.")
/obj/effect/overmap/visitable/ship/proc/get_people_in_ship()
. = list()