mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-30 08:38:13 +01:00
to_chat replacing stream operator
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
to_chat(load, "The drive motor briefly whines, then drones to a stop.")
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
if(is_train_head() && istype(load, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/D = load
|
||||
D << "<font color='red'><B>You ran over [H]!</B></font>"
|
||||
to_chat(D, "<font color='red'><B>You ran over [H]!</B></font>")
|
||||
visible_message("<B><font color='red'>\The [src] ran over [H]!</B></font>")
|
||||
add_attack_logs(D,H,"Ran over with [src.name]")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [H.name] ([H.ckey]), driven by [D.name] ([D.ckey])</font>")
|
||||
@@ -198,8 +198,8 @@
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
return
|
||||
|
||||
user << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition."
|
||||
user << "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%"
|
||||
to_chat(user, "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition.")
|
||||
to_chat(user, "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%")
|
||||
|
||||
/obj/vehicle/train/engine/verb/start_engine()
|
||||
set name = "Start engine"
|
||||
@@ -210,17 +210,17 @@
|
||||
return
|
||||
|
||||
if(on)
|
||||
usr << "The engine is already running."
|
||||
to_chat(usr, "The engine is already running.")
|
||||
return
|
||||
|
||||
turn_on()
|
||||
if (on)
|
||||
usr << "You start [src]'s engine."
|
||||
to_chat(usr, "You start [src]'s engine.")
|
||||
else
|
||||
if(cell.charge < charge_use)
|
||||
usr << "[src] is out of power."
|
||||
to_chat(usr, "[src] is out of power.")
|
||||
else
|
||||
usr << "[src]'s engine won't start."
|
||||
to_chat(usr, "[src]'s engine won't start.")
|
||||
|
||||
/obj/vehicle/train/engine/verb/stop_engine()
|
||||
set name = "Stop engine"
|
||||
@@ -231,12 +231,12 @@
|
||||
return
|
||||
|
||||
if(!on)
|
||||
usr << "The engine is already stopped."
|
||||
to_chat(usr, "The engine is already stopped.")
|
||||
return
|
||||
|
||||
turn_off()
|
||||
if (!on)
|
||||
usr << "You stop [src]'s engine."
|
||||
to_chat(usr, "You stop [src]'s engine.")
|
||||
|
||||
/obj/vehicle/train/engine/verb/remove_key()
|
||||
set name = "Remove key"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
M.apply_damages(22 / move_delay) // and do damage according to how fast the train is going
|
||||
if(istype(load, /mob/living/carbon/human))
|
||||
var/mob/living/D = load
|
||||
D << "<font color='red'>You hit [M]!</font>"
|
||||
to_chat(D, "<font color='red'>You hit [M]!</font>")
|
||||
add_attack_logs(D,M,"Ran over with [src.name]")
|
||||
|
||||
//trains are commonly open topped, so there is a chance the projectile will hit the mob riding the train instead
|
||||
@@ -89,7 +89,7 @@
|
||||
/obj/vehicle/train/relaymove(mob/user, direction)
|
||||
var/turf/T = get_step_to(src, get_step(src, direction))
|
||||
if(!T)
|
||||
user << "You can't find a clear area to step onto."
|
||||
to_chat(user, "You can't find a clear area to step onto.")
|
||||
return 0
|
||||
|
||||
if(user != load)
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
unload(user, direction)
|
||||
|
||||
user << "<font color='blue'>You climb down from [src].</font>"
|
||||
to_chat(user, "<font color='blue'>You climb down from [src].</font>")
|
||||
|
||||
return 1
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
latch(C, user)
|
||||
else
|
||||
if(!load(C, user))
|
||||
user << "<font color='red'>You were unable to load [C] on [src].</font>"
|
||||
to_chat(user, "<font color='red'>You were unable to load [C] on [src].</font>")
|
||||
|
||||
/obj/vehicle/train/attack_hand(mob/user as mob)
|
||||
if(user.stat || user.restrained() || !Adjacent(user))
|
||||
@@ -149,22 +149,22 @@
|
||||
//Note: there is a modified version of this in code\modules\vehicles\cargo_train.dm specifically for cargo train engines
|
||||
/obj/vehicle/train/proc/attach_to(obj/vehicle/train/T, mob/user)
|
||||
if (get_dist(src, T) > 1)
|
||||
user << "<font color='red'>[src] is too far away from [T] to hitch them together.</font>"
|
||||
to_chat(user, "<font color='red'>[src] is too far away from [T] to hitch them together.</font>")
|
||||
return
|
||||
|
||||
if (lead)
|
||||
user << "<font color='red'>[src] is already hitched to something.</font>"
|
||||
to_chat(user, "<font color='red'>[src] is already hitched to something.</font>")
|
||||
return
|
||||
|
||||
if (T.tow)
|
||||
user << "<font color='red'>[T] is already towing something.</font>"
|
||||
to_chat(user, "<font color='red'>[T] is already towing something.</font>")
|
||||
return
|
||||
|
||||
//check for cycles.
|
||||
var/obj/vehicle/train/next_car = T
|
||||
while (next_car)
|
||||
if (next_car == src)
|
||||
user << "<font color='red'>That seems very silly.</font>"
|
||||
to_chat(user, "<font color='red'>That seems very silly.</font>")
|
||||
return
|
||||
next_car = next_car.lead
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
set_dir(lead.dir)
|
||||
|
||||
if(user)
|
||||
user << "<font color='blue'>You hitch [src] to [T].</font>"
|
||||
to_chat(user, "<font color='blue'>You hitch [src] to [T].</font>")
|
||||
|
||||
update_stats()
|
||||
|
||||
@@ -182,13 +182,13 @@
|
||||
//detaches the train from whatever is towing it
|
||||
/obj/vehicle/train/proc/unattach(mob/user)
|
||||
if (!lead)
|
||||
user << "<font color='red'>[src] is not hitched to anything.</font>"
|
||||
to_chat(user, "<font color='red'>[src] is not hitched to anything.</font>")
|
||||
return
|
||||
|
||||
lead.tow = null
|
||||
lead.update_stats()
|
||||
|
||||
user << "<font color='blue'>You unhitch [src] from [lead].</font>"
|
||||
to_chat(user, "<font color='blue'>You unhitch [src] from [lead].</font>")
|
||||
lead = null
|
||||
|
||||
update_stats()
|
||||
|
||||
Reference in New Issue
Block a user