refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+1 -1
View File
@@ -101,7 +101,7 @@
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/emag_act(var/remaining_charges, var/mob/user)
if (!emagged)
to_chat(user, "<span class='notice'>You emag the [src], arming the escape pod!</span>")
to_chat(user, span_notice("You emag the [src], arming the escape pod!"))
emagged = 1
if (istype(program, /datum/embedded_program/docking/simple/escape_pod_berth))
var/datum/embedded_program/docking/simple/escape_pod_berth/P = program
+1 -1
View File
@@ -170,7 +170,7 @@
/obj/item/spaceflare/attack_self(var/mob/user)
if(!active)
visible_message("<span class='notice'>[user] pulls the cord, activating the [src].</span>")
visible_message(span_notice("[user] pulls the cord, activating the [src]."))
activate()
/obj/item/spaceflare/proc/activate()
+1 -1
View File
@@ -338,7 +338,7 @@
to_chat(M, span_red("The floor lurches beneath you!"))
shake_camera(M, 10, 1)
// TODO - tossing?
//M.visible_message("<span class='warning'>[M.name] is tossed around by the sudden acceleration!</span>")
//M.visible_message(span_warning("[M.name] is tossed around by the sudden acceleration!"))
//M.throw_at_random(FALSE, 4, 1)
if(istype(M, /mob/living/carbon))
M.Weaken(3)
+1 -1
View File
@@ -63,7 +63,7 @@
current_dock_target = docking_controller_tag
shuttle_docking_controller = SSshuttles.docking_registry[current_dock_target]
if(current_dock_target && !shuttle_docking_controller)
log_shuttle("<span class='danger'>warning: shuttle [src] can't find its controller with tag [current_dock_target]!</span>") // No toggle because this is an error message that needs to be seen
log_shuttle(span_danger("warning: shuttle [src] can't find its controller with tag [current_dock_target]!")) // No toggle because this is an error message that needs to be seen
/*
Docking stuff
*/
+6 -6
View File
@@ -17,13 +17,13 @@
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
//src.add_fingerprint(user) //shouldn't need fingerprints just for looking at it.
if(!allowed(user))
to_chat(user, "<span class='warning'>Access Denied.</span>")
to_chat(user, span_warning("Access Denied."))
return 1
tgui_interact(user)
@@ -71,12 +71,12 @@
/obj/machinery/computer/shuttle_control/proc/can_move(var/datum/shuttle/autodock/shuttle, var/user)
var/cannot_depart = shuttle.current_location.cannot_depart(shuttle)
if(cannot_depart)
to_chat(user, "<span class='warning'>[cannot_depart]</span>")
to_chat(user, span_warning("[cannot_depart]"))
if(shuttle.debug_logging)
log_shuttle("Shuttle [shuttle] cannot depart [shuttle.current_location] because: [cannot_depart].")
return FALSE
if(!shuttle.next_location.is_valid(shuttle))
to_chat(user, "<span class='warning'>Destination zone is invalid or obstructed.</span>")
to_chat(user, span_warning("Destination zone is invalid or obstructed."))
if(shuttle.debug_logging)
log_shuttle("Shuttle [shuttle] destination [shuttle.next_location] is invalid.")
return FALSE
@@ -92,7 +92,7 @@
var/datum/shuttle/autodock/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
switch(action)
@@ -127,7 +127,7 @@
/obj/machinery/computer/shuttle_control/tgui_data(mob/user)
var/datum/shuttle/autodock/shuttle = SSshuttles.shuttles[shuttle_tag]
if(!istype(shuttle))
to_chat(user, "<span class='warning'>Unable to establish link with the shuttle.</span>")
to_chat(user, span_warning("Unable to establish link with the shuttle."))
return
return shuttlerich_tgui_data(shuttle)
@@ -20,7 +20,7 @@
var/datum/shuttle/autodock/multi/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
switch(action)
@@ -35,7 +35,7 @@
return TRUE
shuttle.cloaked = !shuttle.cloaked
if(shuttle.legit)
to_chat(usr, "<span class='notice'>Ship ATC inhibitor systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be notified of our arrival.</span>")
to_chat(usr, span_notice("Ship ATC inhibitor systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be notified of our arrival."))
else
to_chat(usr, "<span class='warning'>Ship stealth systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival.</span>")
to_chat(usr, span_warning("Ship stealth systems have been [(shuttle.cloaked ? "activated. The station will not" : "deactivated. The station will")] be warned of our arrival."))
return TRUE
+5 -5
View File
@@ -70,7 +70,7 @@
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
to_world("<span class='notice'><b>Alert: The shuttle autopilot has been overridden. Launch sequence initiated!</b></span>")
to_world(span_notice("<b>Alert: The shuttle autopilot has been overridden. Launch sequence initiated!</b>"))
if(usr)
log_admin("[key_name(usr)] has overridden the departure shuttle's autopilot and activated the launch sequence.")
@@ -84,7 +84,7 @@
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
to_world("<span class='notice'><b>Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!</b></span>")
to_world(span_notice("<b>Alert: The shuttle autopilot has been overridden. Bluespace drive engaged!</b>"))
if(usr)
log_admin("[key_name(usr)] has overridden the departure shuttle's autopilot and forced immediate launch.")
@@ -98,7 +98,7 @@
if (istype(user, /obj/machinery/computer/shuttle_control/emergency)) //if we were given a command by an emergency shuttle console
if (emergency_shuttle.autopilot)
emergency_shuttle.autopilot = 0
to_chat(world, "<span class='notice'><b>Alert: The shuttle autopilot has been overridden. Launch sequence aborted!</b></span>")
to_chat(world, span_notice("<b>Alert: The shuttle autopilot has been overridden. Launch sequence aborted!</b>"))
if(usr)
log_admin("[key_name(usr)] has overridden the departure shuttle's autopilot and cancelled the launch sequence.")
@@ -158,7 +158,7 @@
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
authorized[dna_hash] = auth_name
if (req_authorizations - authorized.len)
to_chat(world, "<span class='notice'><b>Alert: [req_authorizations - authorized.len] authorization\s needed to override the shuttle autopilot.</b></span>") //TODO- Belsima, make this an announcement instead of magic.
to_chat(world, span_notice("<b>Alert: [req_authorizations - authorized.len] authorization\s needed to override the shuttle autopilot.</b>")) //TODO- Belsima, make this an announcement instead of magic.
if(usr)
log_admin("[key_name(usr)] has inserted [ID] into the shuttle control computer - [req_authorizations - authorized.len] authorisation\s needed")
@@ -168,7 +168,7 @@
/obj/machinery/computer/shuttle_control/emergency/emag_act(var/remaining_charges, var/mob/user)
if (!emagged)
to_chat(user, "<span class='notice'>You short out \the [src]'s authorization protocols.</span>")
to_chat(user, span_notice("You short out \the [src]'s authorization protocols."))
emagged = 1
return 1
+8 -8
View File
@@ -4,7 +4,7 @@
req_access = list(access_cent_specops)
/obj/machinery/computer/shuttle_control/specops/attack_ai(user as mob)
to_chat(user, "<span class='warning'>Access Denied.</span>")
to_chat(user, span_warning("Access Denied."))
return 1
// Formerly /datum/shuttle/ferry/multidock/specops
@@ -36,14 +36,14 @@
var/obj/machinery/computer/C = user
if(world.time <= reset_time)
C.visible_message("<span class='notice'>[global.using_map.boss_name] will not allow the Special Operations shuttle to launch yet.</span>")
C.visible_message(span_notice("[global.using_map.boss_name] will not allow the Special Operations shuttle to launch yet."))
if (((world.time - reset_time)/10) > 60)
C.visible_message("<span class='notice'>[-((world.time - reset_time)/10)/60] minutes remain!</span>")
C.visible_message(span_notice("[-((world.time - reset_time)/10)/60] minutes remain!"))
else
C.visible_message("<span class='notice'>[-(world.time - reset_time)/10] seconds remain!</span>")
C.visible_message(span_notice("[-(world.time - reset_time)/10] seconds remain!"))
return
C.visible_message("<span class='notice'>The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds.</span>")
C.visible_message(span_notice("The Special Operations shuttle will depart in [(specops_countdown_time/10)] seconds."))
if (location) //returning
radio_announce("THE SPECIAL OPERATIONS SHUTTLE IS PREPARING TO RETURN")
@@ -67,12 +67,12 @@
if (!location) //just arrived home
for(var/turf/T in get_area_turfs(shuttle_area))
var/mob/M = locate(/mob) in T
to_chat(M, "<span class='danger'>You have arrived at [using_map.boss_name]. Operation has ended!</span>")
to_chat(M, span_danger("You have arrived at [using_map.boss_name]. Operation has ended!"))
else //just left for the station
launch_mauraders()
for(var/turf/T in get_area_turfs(shuttle_area))
var/mob/M = locate(/mob) in T
to_chat(M, "<span class='danger'>You have arrived at [station_name()]. Commence operation!</span>")
to_chat(M, span_danger("You have arrived at [station_name()]. Commence operation!"))
var/obj/machinery/light/small/readylight/light = locate() in T
if(light) light.set_state(1)
@@ -85,7 +85,7 @@
radio_announce("ALERT: LAUNCH SEQUENCE ABORTED")
if (istype(in_use, /obj/machinery/computer))
var/obj/machinery/computer/C = in_use
C.visible_message("<span class='warning'>Launch sequence aborted.</span>")
C.visible_message(span_warning("Launch sequence aborted."))
..()
+13 -13
View File
@@ -118,7 +118,7 @@
continue
if(!H.shuttle_comp || !(get_area(H) in shuttle_area))
H.shuttle_comp = null
H.audible_message("<span class='warning'>\The [H] pings as it loses it's connection with the ship.</span>", runemessage = "ping")
H.audible_message(span_warning("\The [H] pings as it loses it's connection with the ship."), runemessage = "ping")
H.update_hud("discon")
helmets -= H
else
@@ -142,22 +142,22 @@
process_state = initial(process_state)
/datum/shuttle/autodock/web_shuttle/proc/autopilot_say(message) // Makes the autopilot 'talk' to the passengers.
var/padded_message = "<span class='game say'><span class='name'>shuttle autopilot</span> states, \"[message]\"</span>"
var/padded_message = span_game(span_say(span_name("shuttle autopilot") + " states, \"[message]\""))
message_passengers(padded_message)
/datum/shuttle/autodock/web_shuttle/proc/rename_shuttle(mob/user)
if(!can_rename)
to_chat(user, "<span class='warning'>You can't rename this vessel.</span>")
to_chat(user, span_warning("You can't rename this vessel."))
return
var/new_name = tgui_input_text(user, "Please enter a new name for this vessel. Note that you can only set its name once, so choose wisely.", "Rename Shuttle", visible_name)
var/sanitized_name = sanitizeName(new_name, MAX_NAME_LEN, TRUE)
if(sanitized_name)
//can_rename = FALSE //VOREStation Removal
to_chat(user, "<span class='notice'>You've renamed the vessel to '[sanitized_name]'.</span>")
to_chat(user, span_notice("You've renamed the vessel to '[sanitized_name]'."))
message_admins("[key_name_admin(user)] renamed shuttle '[visible_name]' to '[sanitized_name]'.")
visible_name = sanitized_name
else
to_chat(user, "<span class='warning'>The name you supplied was invalid. Try another name.</span>")
to_chat(user, span_warning("The name you supplied was invalid. Try another name."))
/obj/machinery/computer/shuttle_control/web
name = "flight computer"
@@ -200,7 +200,7 @@
var/obj/item/clothing/head/pilot/H = I
H.shuttle_comp = src
shuttle.helmets |= I
to_chat(user, "<span class='notice'>You register the helmet with the ship's console.</span>")
to_chat(user, span_notice("You register the helmet with the ship's console."))
shuttle.update_helmets()
return
@@ -212,7 +212,7 @@
var/list/routes[0]
var/datum/shuttle/autodock/web_shuttle/shuttle = SSshuttles.shuttles[shuttle_tag]
if(!istype(shuttle))
to_chat(user, "<span class='warning'>Unable to establish link with the shuttle.</span>")
to_chat(user, span_warning("Unable to establish link with the shuttle."))
return
var/list/R = shuttle.web_master.get_available_routes()
@@ -309,13 +309,13 @@
if("dock_command")
if(WS.autopilot)
to_chat(usr, "<span class='warning'>The autopilot must be disabled before you can control the vessel manually.</span>")
to_chat(usr, span_warning("The autopilot must be disabled before you can control the vessel manually."))
return
WS.dock()
if("undock_command")
if(WS.autopilot)
to_chat(usr, "<span class='warning'>The autopilot must be disabled before you can control the vessel manually.</span>")
to_chat(usr, span_warning("The autopilot must be disabled before you can control the vessel manually."))
return
WS.undock()
@@ -324,16 +324,16 @@
return
WS.cloaked = !WS.cloaked
if(WS.cloaked)
to_chat(usr, "<span class='danger'>Ship stealth systems have been activated. The station will not be warned of our arrival.</span>")
to_chat(usr, span_danger("Ship stealth systems have been activated. The station will not be warned of our arrival."))
else
to_chat(usr, "<span class='danger'>Ship stealth systems have been deactivated. The station will be warned of our arrival.</span>")
to_chat(usr, span_danger("Ship stealth systems have been deactivated. The station will be warned of our arrival."))
if("toggle_autopilot")
WS.adjust_autopilot(!WS.autopilot)
if("traverse")
if(WS.autopilot)
to_chat(usr, "<span class='warning'>The autopilot must be disabled before you can control the vessel manually.</span>")
to_chat(usr, span_warning("The autopilot must be disabled before you can control the vessel manually."))
return
if((WS.last_move + WS.cooldown) > world.time)
@@ -359,7 +359,7 @@
return
WS.web_master.future_destination = target_destination
to_chat(usr, "<span class='notice'>[WS.visible_name] flight computer received command.</span>")
to_chat(usr, span_notice("[WS.visible_name] flight computer received command."))
WS.web_master.reset_autopath() // Deviating from the path will almost certainly confuse the autopilot, so lets just reset its memory.
var/travel_time = new_route.travel_time * WS.flight_time_modifier