mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[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:
@@ -27,19 +27,19 @@
|
||||
/obj/machinery/transhuman/autoresleever/attack_ghost(mob/observer/dead/user as mob)
|
||||
update_icon()
|
||||
if(spawn_slots == 0)
|
||||
to_chat(user, "<span class='warning'>There are no more respawn slots.</span>")
|
||||
to_chat(user, span_warning("There are no more respawn slots."))
|
||||
return
|
||||
if(user.mind)
|
||||
if(user.mind.vore_death)
|
||||
if(vore_respawn <= world.time - user.timeofdeath)
|
||||
autoresleeve(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must wait [((vore_respawn - (world.time - user.timeofdeath)) * 0.1) / 60] minutes to use \the [src].</span>")
|
||||
to_chat(user, span_warning("You must wait [((vore_respawn - (world.time - user.timeofdeath)) * 0.1) / 60] minutes to use \the [src]."))
|
||||
return
|
||||
else if(respawn <= world.time - user.timeofdeath)
|
||||
autoresleeve(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must wait [((respawn - (world.time - user.timeofdeath)) * 0.1) /60] minutes to use \the [src].</span>")
|
||||
to_chat(user, span_warning("You must wait [((respawn - (world.time - user.timeofdeath)) * 0.1) /60] minutes to use \the [src]."))
|
||||
return
|
||||
else if(spawntype)
|
||||
if(tgui_alert(user, "This [src] spawns something special, would you like to play as it?", "Creachur", list("No","Yes")) == "Yes")
|
||||
@@ -48,7 +48,7 @@
|
||||
if(tgui_alert(user, "Would you like to be spawned here as your presently loaded character?", "Spawn here", list("No","Yes")) == "Yes")
|
||||
autoresleeve(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to have been spawned in order to respawn here.</span>")
|
||||
to_chat(user, span_warning("You need to have been spawned in order to respawn here."))
|
||||
|
||||
/obj/machinery/transhuman/autoresleever/attackby(var/mob/user) //Let's not let people mess with this.
|
||||
update_icon()
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/machinery/transhuman/autoresleever/proc/autoresleeve(var/mob/observer/dead/ghost)
|
||||
if(stat)
|
||||
to_chat(ghost, "<span class='warning'>This machine is not functioning...</span>")
|
||||
to_chat(ghost, span_warning("This machine is not functioning..."))
|
||||
return
|
||||
if(!istype(ghost,/mob/observer/dead))
|
||||
return
|
||||
@@ -70,13 +70,13 @@
|
||||
if(istype(ghost.mind.current.loc, /obj/item/mmi))
|
||||
qdel(ghost.mind.current.loc)
|
||||
else
|
||||
to_chat(ghost, "<span class='warning'>Your body is still alive, you cannot be resleeved.</span>")
|
||||
to_chat(ghost, span_warning("Your body is still alive, you cannot be resleeved."))
|
||||
return
|
||||
|
||||
var/client/ghost_client = ghost.client
|
||||
|
||||
if(!is_alien_whitelisted(ghost, GLOB.all_species[ghost_client?.prefs?.species]) && !check_rights(R_ADMIN, 0)) // Prevents a ghost ghosting in on a slot and spawning via a resleever with race they're not whitelisted for, getting around normal join restrictions.
|
||||
to_chat(ghost, "<span class='warning'>You are not whitelisted to spawn as this species!</span>")
|
||||
to_chat(ghost, span_warning("You are not whitelisted to spawn as this species!"))
|
||||
return
|
||||
|
||||
// CHOMPedit start
|
||||
@@ -85,7 +85,7 @@
|
||||
chosen_species = GLOB.all_species[ghost_client.prefs.species]
|
||||
|
||||
if((chosen_species.spawn_flags & SPECIES_IS_WHITELISTED) || (chosen_species.spawn_flags & SPECIES_IS_RESTRICTED))
|
||||
to_chat(ghost, "<span class='warning'>This species cannot be resleeved!</span>")
|
||||
to_chat(ghost, span_warning("This species cannot be resleeved!"))
|
||||
return
|
||||
// CHOMPEdit End: Add checks for Whitelist + Resleeving
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
else if(equip_body || ghost_spawns)
|
||||
charjob = default_job
|
||||
else
|
||||
to_chat(ghost, "<span class='warning'>It appears as though your loaded character has not been spawned this round, or has quit the round. If you died as a different character, please load them, and try again.</span>")
|
||||
to_chat(ghost, span_warning("It appears as though your loaded character has not been spawned this round, or has quit the round. If you died as a different character, please load them, and try again."))
|
||||
return
|
||||
|
||||
//For logging later
|
||||
@@ -111,7 +111,7 @@
|
||||
var/spawnloc = get_turf(src)
|
||||
//Did we actually get a loc to spawn them?
|
||||
if(!spawnloc)
|
||||
to_chat(ghost, "<span class='warning'>Could not find a valid location to spawn your character.</span>")
|
||||
to_chat(ghost, span_warning("Could not find a valid location to spawn your character."))
|
||||
return
|
||||
|
||||
if(spawntype)
|
||||
@@ -123,7 +123,7 @@
|
||||
log_admin("[L.ckey]'s has been spawned as [L] via \the [src].")
|
||||
message_admins("[L.ckey]'s has been spawned as [L] via \the [src].")
|
||||
else
|
||||
to_chat(ghost, "<span class='warning'>You can't play as a [spawnthing]...</span>")
|
||||
to_chat(ghost, span_warning("You can't play as a [spawnthing]..."))
|
||||
return
|
||||
if(spawn_slots == -1)
|
||||
return
|
||||
|
||||
@@ -90,21 +90,21 @@
|
||||
pods += P
|
||||
P.connected = src
|
||||
P.name = "[initial(P.name)] #[pods.len]"
|
||||
to_chat(user, "<span class='notice'>You connect [P] to [src].</span>")
|
||||
to_chat(user, span_notice("You connect [P] to [src]."))
|
||||
else if(istype(W, /obj/item/disk/transcore) && !our_db.core_dumped)
|
||||
user.unEquip(W)
|
||||
disk = W
|
||||
disk.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You insert \the [W] into \the [src]."))
|
||||
if(istype(W, /obj/item/disk/body_record))
|
||||
var/obj/item/disk/body_record/brDisk = W
|
||||
if(!brDisk.stored)
|
||||
to_chat(user, "<span class='warning'>\The [W] does not contain a stored body record.</span>")
|
||||
to_chat(user, span_warning("\The [W] does not contain a stored body record."))
|
||||
return
|
||||
user.unEquip(W)
|
||||
W.forceMove(get_turf(src)) // Drop on top of us
|
||||
active_br = new /datum/transhuman/body_record(brDisk.stored) // Loads a COPY!
|
||||
to_chat(user, "<span class='notice'>\The [src] loads the body record from \the [W] before ejecting it.</span>")
|
||||
to_chat(user, span_notice("\The [src] loads the body record from \the [W] before ejecting it."))
|
||||
attack_hand(user)
|
||||
view_b_rec(REF(active_br))
|
||||
else
|
||||
@@ -252,7 +252,7 @@
|
||||
if(disk)
|
||||
our_db.core_dump(disk)
|
||||
sleep(5)
|
||||
visible_message("<span class='warning'>\The [src] spits out \the [disk].</span>")
|
||||
visible_message(span_warning("\The [src] spits out \the [disk]."))
|
||||
disk.forceMove(get_turf(src))
|
||||
disk = null
|
||||
. = TRUE
|
||||
@@ -460,7 +460,7 @@
|
||||
|
||||
/obj/item/cmo_disk_holder/attack_self(var/mob/attacker)
|
||||
playsound(src, 'sound/items/poster_ripped.ogg', 50)
|
||||
to_chat(attacker, "<span class='warning'>You tear open \the [name].</span>")
|
||||
to_chat(attacker, span_warning("You tear open \the [name]."))
|
||||
attacker.unEquip(src)
|
||||
var/obj/item/disk/transcore/newdisk = new(get_turf(src))
|
||||
attacker.put_in_any_hand_if_possible(newdisk)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
user.unEquip(W)
|
||||
disk = W
|
||||
disk.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You insert \the [W] into \the [src]."))
|
||||
updateUsrDialog()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -85,14 +85,14 @@
|
||||
return
|
||||
|
||||
if(imps.len)
|
||||
to_chat(user, "<span class='notice'>You eject a backup implant.</span>")
|
||||
to_chat(user, span_notice("You eject a backup implant."))
|
||||
var/obj/item/implant/backup/imp = imps[imps.len]
|
||||
imp.forceMove(get_turf(user))
|
||||
imps -= imp
|
||||
user.put_in_any_hand_if_possible(imp)
|
||||
update()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] is empty.</span>")
|
||||
to_chat(user, span_warning("\The [src] is empty."))
|
||||
|
||||
return
|
||||
|
||||
@@ -104,15 +104,15 @@
|
||||
W.germ_level = 0
|
||||
W.forceMove(src)
|
||||
update()
|
||||
to_chat(user, "<span class='notice'>You load \the [W] into \the [src].</span>")
|
||||
to_chat(user, span_notice("You load \the [W] into \the [src]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] is already full!</span>")
|
||||
to_chat(user, span_warning("\The [src] is already full!"))
|
||||
|
||||
/obj/item/backup_implanter/attack(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
return
|
||||
if (user && imps.len)
|
||||
M.visible_message("<span class='notice'>[user] is injecting a backup implant into [M].</span>")
|
||||
M.visible_message(span_notice("[user] is injecting a backup implant into [M]."))
|
||||
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(M)
|
||||
@@ -120,7 +120,7 @@
|
||||
var/turf/T1 = get_turf(M)
|
||||
if (T1 && ((M == user) || do_after(user, 5 SECONDS, M)))
|
||||
if(user && M && (get_turf(M) == T1) && src && src.imps.len)
|
||||
M.visible_message("<span class='notice'>[M] has been backup implanted by [user].</span>")
|
||||
M.visible_message(span_notice("[M] has been backup implanted by [user]."))
|
||||
|
||||
var/obj/item/implant/backup/imp = imps[imps.len]
|
||||
if(imp.handle_implant(M,user.zone_sel.selecting))
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
/obj/machinery/transhuman/synthprinter/attackby(obj/item/W as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(busy)
|
||||
to_chat(user, "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>")
|
||||
to_chat(user, span_notice("\The [src] is busy. Please wait for completion of previous operation."))
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
@@ -421,15 +421,15 @@
|
||||
if(default_part_replacement(user, W))
|
||||
return
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>You can't load \the [src] while it's opened.</span>")
|
||||
to_chat(user, span_notice("You can't load \the [src] while it's opened."))
|
||||
return
|
||||
if(!istype(W, /obj/item/stack/material))
|
||||
to_chat(user, "<span class='notice'>You cannot insert this item into \the [src]!</span>")
|
||||
to_chat(user, span_notice("You cannot insert this item into \the [src]!"))
|
||||
return
|
||||
|
||||
var/obj/item/stack/material/S = W
|
||||
if(!(S.material.name in stored_material))
|
||||
to_chat(user, "<span class='warning'>\The [src] doesn't accept [S.material]!</span>")
|
||||
to_chat(user, span_warning("\The [src] doesn't accept [S.material]!"))
|
||||
return
|
||||
|
||||
var/amnt = S.perunit
|
||||
@@ -558,7 +558,7 @@
|
||||
C.removePersonality()
|
||||
qdel(C)
|
||||
sleevecards++
|
||||
to_chat(user, "<span class='notice'>You store \the [C] in \the [src].</span>")
|
||||
to_chat(user, span_notice("You store \the [C] in \the [src]."))
|
||||
return
|
||||
|
||||
return ..()
|
||||
@@ -575,7 +575,7 @@
|
||||
if(!ishuman(user) && !isrobot(user))
|
||||
return 0 //not a borg or human
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>Close the maintenance panel first.</span>")
|
||||
to_chat(user, span_notice("Close the maintenance panel first."))
|
||||
return 0 //panel open
|
||||
|
||||
if(O.buckled)
|
||||
@@ -612,7 +612,7 @@
|
||||
|
||||
//In case they already had a mind!
|
||||
if(occupant && occupant.mind)
|
||||
to_chat(occupant, "<span class='warning'>You feel your mind being overwritten...</span>")
|
||||
to_chat(occupant, span_warning("You feel your mind being overwritten..."))
|
||||
log_and_message_admins("was resleeve-wiped from their body.",occupant.mind)
|
||||
occupant.ghostize()
|
||||
|
||||
@@ -658,9 +658,9 @@
|
||||
|
||||
//Inform them and make them a little dizzy.
|
||||
if(confuse_amount + blur_amount <= 16)
|
||||
to_chat(occupant, "<span class='notice'>You feel a small pain in your head as you're given a new backup implant. Your new body feels comfortable already, however.</span>")
|
||||
to_chat(occupant, span_notice("You feel a small pain in your head as you're given a new backup implant. Your new body feels comfortable already, however."))
|
||||
else
|
||||
to_chat(occupant, "<span class='warning'>You feel a small pain in your head as you're given a new backup implant. Oh, and a new body. It's disorienting, to say the least.</span>")
|
||||
to_chat(occupant, span_warning("You feel a small pain in your head as you're given a new backup implant. Oh, and a new body. It's disorienting, to say the least."))
|
||||
|
||||
occupant.confused = max(occupant.confused, confuse_amount)
|
||||
occupant.eye_blurry = max(occupant.eye_blurry, blur_amount)
|
||||
@@ -687,10 +687,10 @@
|
||||
|
||||
/obj/machinery/transhuman/resleever/proc/put_mob(mob/living/carbon/human/M as mob)
|
||||
if(!ishuman(M))
|
||||
to_chat(usr, "<span class='warning'>\The [src] cannot hold this!</span>")
|
||||
to_chat(usr, span_warning("\The [src] cannot hold this!"))
|
||||
return
|
||||
if(src.occupant)
|
||||
to_chat(usr, "<span class='warning'>\The [src] is already occupied!</span>")
|
||||
to_chat(usr, span_warning("\The [src] is already occupied!"))
|
||||
return
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
desc = "You feel rather weak and unfocused, having been sleeved not so long ago."
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
on_created_text = "<span class='warning'><font size='3'>You feel weak and unfocused.</font></span>"
|
||||
on_expired_text = "<span class='notice'><font size='3'>You feel your strength and focus return to you.</font></span>"
|
||||
on_created_text = span_warning("<font size='3'>You feel weak and unfocused.</font>")
|
||||
on_expired_text = span_notice("<font size='3'>You feel your strength and focus return to you.</font>")
|
||||
|
||||
//YW Edit incoming_brute_damage_percent = 1.1 // 10% more brute damage YW Edit
|
||||
//YW Edit incoming_fire_damage_percent = 1.1 // 10% more burn damage
|
||||
@@ -21,6 +21,28 @@
|
||||
desc = "You feel somewhat weak and unfocused, having been sleeved not so long ago. (OOC: No real penalty for vore-related deaths)"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
on_created_text = "<span class='warning'>You feel slightly weak and unfocused.</span>"
|
||||
on_expired_text = "<span class='notice'>You feel your strength and focus return to you.</span>"
|
||||
|
||||
on_created_text = span_warning("You feel slightly weak and unfocused.")
|
||||
on_expired_text = span_notice("You feel your strength and focus return to you.")
|
||||
|
||||
/datum/modifier/gory_devourment
|
||||
name = "gory devourment"
|
||||
desc = "You are being devoured! Dying right now would definitely be same as dying as food."
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
hidden = TRUE
|
||||
var/datum/mind/cached_mind = null
|
||||
|
||||
/datum/modifier/gory_devourment/can_apply(var/mob/living/L)
|
||||
if(L.stat == DEAD)
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/datum/modifier/gory_devourment/on_applied()
|
||||
cached_mind = holder.mind
|
||||
return ..()
|
||||
|
||||
/datum/modifier/gory_devourment/on_expire()
|
||||
if(holder.stat == DEAD)
|
||||
cached_mind?.vore_death = TRUE
|
||||
cached_mind = null //Don't keep a hardref
|
||||
return ..()
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!pai)
|
||||
to_chat(user,"<span class='warning'>\The [src] does not have a mind in it!</span>")
|
||||
to_chat(user,span_warning("\The [src] does not have a mind in it!"))
|
||||
else
|
||||
if(!emagged)
|
||||
to_chat(user,"<span class='notice'>\The [src] displays the name '[pai]'.</span>")
|
||||
to_chat(user,span_notice("\The [src] displays the name '[pai]'."))
|
||||
else ..()
|
||||
|
||||
/mob/living/silicon/pai/infomorph
|
||||
@@ -138,4 +138,4 @@
|
||||
if(emagged)
|
||||
touch_window("Directives")
|
||||
else
|
||||
to_chat(src, "<span class='notice'>You are not bound by any laws or directives.</span>")
|
||||
to_chat(src, span_notice("You are not bound by any laws or directives."))
|
||||
|
||||
Reference in New Issue
Block a user