mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
* dmdoc + Initialize * no errors anymore * removed duplicate comment, expanded the other * changelog * gdf * fix emotes F4
This commit is contained in:
@@ -9,19 +9,52 @@
|
||||
set category = "IC"
|
||||
set desc = "Type in an emote message that will be received by mobs that can hear you."
|
||||
|
||||
custom_emote(m_type = AUDIBLE_MESSAGE)
|
||||
custom_emote(m_type = AUDIBLE_MESSAGE, message = sanitize(input(src,"Choose an emote to display.") as text|null))
|
||||
|
||||
/mob/verb/custom_visible_emote()
|
||||
set name = "Visible Emote"
|
||||
set category = "IC"
|
||||
set desc = "Type in an emote message that will be received by mobs that can see you."
|
||||
|
||||
custom_emote(m_type = VISIBLE_MESSAGE)
|
||||
custom_emote(m_type = VISIBLE_MESSAGE, message = sanitize(input(src,"Choose an emote to display.") as text|null))
|
||||
|
||||
/mob/proc/emote(var/act, var/m_type, var/message)
|
||||
// s-s-snowflake
|
||||
if((src.stat == DEAD || src.status_flags & FAKEDEATH) && act != "deathgasp")
|
||||
return
|
||||
|
||||
var/splitpoint = findtext(act, " ")
|
||||
if(splitpoint > 0)
|
||||
var/tempstr = act
|
||||
act = copytext(tempstr,1,splitpoint)
|
||||
message = copytext(tempstr,splitpoint+1,0)
|
||||
|
||||
var/singleton/emote/use_emote = usable_emotes[act]
|
||||
if(!use_emote)
|
||||
to_chat(src, SPAN_WARNING("Unknown emote '[act]'. Type <b>say *help</b> for a list of usable emotes."))
|
||||
return
|
||||
|
||||
if(m_type && m_type != use_emote.message_type)
|
||||
return
|
||||
|
||||
if(!use_emote.can_do_emote(src))
|
||||
return
|
||||
|
||||
if(use_emote.message_type == AUDIBLE_MESSAGE && is_muzzled())
|
||||
audible_message("<b>\The [src]</b> makes a muffled sound.")
|
||||
return
|
||||
else
|
||||
use_emote.do_emote(src, message)
|
||||
|
||||
for (var/obj/item/implant/I in src)
|
||||
if (I.implanted)
|
||||
I.trigger(act, src)
|
||||
|
||||
|
||||
/mob/proc/client_emote(var/act, var/m_type, var/message)
|
||||
if((src.stat == DEAD || src.status_flags & FAKEDEATH) && act != "deathgasp")
|
||||
return
|
||||
|
||||
if(usr == src) //client-called emote
|
||||
if (client && (client.prefs.muted & MUTE_IC))
|
||||
to_chat(src, "<span class='warning'>You cannot send IC messages (muted).</span>")
|
||||
@@ -49,33 +82,7 @@
|
||||
else
|
||||
m_type = AUDIBLE_MESSAGE
|
||||
return custom_emote(m_type, message)
|
||||
|
||||
var/splitpoint = findtext(act, " ")
|
||||
if(splitpoint > 0)
|
||||
var/tempstr = act
|
||||
act = copytext(tempstr,1,splitpoint)
|
||||
message = copytext(tempstr,splitpoint+1,0)
|
||||
|
||||
var/singleton/emote/use_emote = usable_emotes[act]
|
||||
if(!use_emote)
|
||||
to_chat(src, "<span class='warning'>Unknown emote '[act]'. Type <b>say *help</b> for a list of usable emotes.</span>")
|
||||
return
|
||||
|
||||
if(m_type && m_type != use_emote.message_type)
|
||||
return
|
||||
|
||||
if(!use_emote.can_do_emote(src))
|
||||
return
|
||||
|
||||
if(use_emote.message_type == AUDIBLE_MESSAGE && is_muzzled())
|
||||
audible_message("<b>\The [src]</b> makes a muffled sound.")
|
||||
return
|
||||
else
|
||||
use_emote.do_emote(src, message)
|
||||
|
||||
for (var/obj/item/implant/I in src)
|
||||
if (I.implanted)
|
||||
I.trigger(act, src)
|
||||
return emote(act)
|
||||
|
||||
/mob/proc/format_emote(var/emoter = null, var/message = null)
|
||||
var/pretext
|
||||
@@ -138,17 +145,11 @@
|
||||
to_chat(src, "You are unable to emote.")
|
||||
return
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
input = sanitize(input(src,"Choose an emote to display.") as text|null)
|
||||
else
|
||||
input = message
|
||||
|
||||
if(input)
|
||||
message = format_emote(src, input)
|
||||
else
|
||||
return
|
||||
|
||||
message = format_emote(src, message)
|
||||
|
||||
if (message)
|
||||
log_emote("[name]/[key] : [message]")
|
||||
|
||||
|
||||
@@ -13,15 +13,19 @@
|
||||
if(exosuit)
|
||||
name = "wreckage of \the [exosuit.name]"
|
||||
if(!gibbed)
|
||||
for(var/hardpoint in exosuit.hardpoints)
|
||||
if(exosuit.hardpoints[hardpoint] && prob(40))
|
||||
var/obj/item/thing = exosuit.hardpoints[hardpoint]
|
||||
if(exosuit.remove_system(hardpoint))
|
||||
thing.forceMove(src)
|
||||
INVOKE_ASYNC(src, PROC_REF(wreck_break_hardpoint), exosuit)
|
||||
for(var/obj/item/mech_component/comp in list(exosuit.arms, exosuit.legs, exosuit.head, exosuit.body))
|
||||
if(comp && prob(40))
|
||||
exosuit.remove_body_part(comp, src)
|
||||
|
||||
/obj/structure/mech_wreckage/proc/wreck_break_hardpoint(var/mob/living/heavy_vehicle/exosuit)
|
||||
for(var/hardpoint in exosuit.hardpoints)
|
||||
if(exosuit.hardpoints[hardpoint] && prob(40))
|
||||
var/obj/item/thing = exosuit.hardpoints[hardpoint]
|
||||
if(exosuit.remove_system(hardpoint))
|
||||
thing.forceMove(src)
|
||||
|
||||
|
||||
/obj/structure/mech_wreckage/powerloader/Initialize(mapload)
|
||||
var/mob/living/heavy_vehicle/premade/ripley/new_mech = new(loc)
|
||||
. = ..(mapload, new_mech, FALSE)
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
update_icon()
|
||||
|
||||
add_language(LANGUAGE_TCB)
|
||||
set_default_language(all_languages[LANGUAGE_TCB])
|
||||
default_language = all_languages[LANGUAGE_TCB]
|
||||
|
||||
. = INITIALIZE_HINT_LATELOAD
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
material = SSmaterials.get_material_by_name(MATERIAL_STEEL)
|
||||
update_icon()
|
||||
. = ..()
|
||||
spawn_mech_equipment()
|
||||
INVOKE_ASYNC(src, PROC_REF(spawn_mech_equipment))
|
||||
if(remote_network)
|
||||
become_remote()
|
||||
INVOKE_ASYNC(src, PROC_REF(become_remote))
|
||||
|
||||
/mob/living/heavy_vehicle/premade/proc/add_parts()
|
||||
if(!head && e_head)
|
||||
|
||||
@@ -177,6 +177,8 @@ var/list/mineral_can_smooth_with = list(
|
||||
smoothing_hints = SMOOTHHINT_CUT_F | SMOOTHHINT_ONLY_MATCH_TURF | SMOOTHHINT_TARGETS_NOT_UNIQUE
|
||||
|
||||
/turf/unsimulated/mineral/asteroid/Initialize(mapload)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
|
||||
if(initialized)
|
||||
crash_with("Warning: [src]([type]) initialized multiple times!")
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
add_language(LANGUAGE_TCB)
|
||||
set_default_language(all_languages[LANGUAGE_TCB])
|
||||
default_language = all_languages[LANGUAGE_TCB]
|
||||
|
||||
botcard = new /obj/item/card/id(src)
|
||||
botcard.access = botcard_access.Copy()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/mob/living/carbon/brain/Initialize()
|
||||
. = ..()
|
||||
add_language(LANGUAGE_TCB)
|
||||
set_default_language(all_languages[LANGUAGE_TCB])
|
||||
default_language = all_languages[LANGUAGE_TCB]
|
||||
|
||||
/mob/living/carbon/brain/Destroy()
|
||||
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
@@ -33,4 +33,4 @@
|
||||
else
|
||||
canmove = 0
|
||||
|
||||
return canmove
|
||||
return canmove
|
||||
|
||||
@@ -642,6 +642,7 @@
|
||||
|
||||
for(var/obj/machinery/light/L in range(7))
|
||||
L.broken()
|
||||
CHECK_TICK
|
||||
|
||||
/mob/living/carbon/human/proc/create_darkness()
|
||||
set category = "Abilities"
|
||||
|
||||
@@ -135,8 +135,6 @@
|
||||
hud_type = /datum/hud_data/construct
|
||||
|
||||
/datum/species/apparition/handle_death(var/mob/living/carbon/human/H)
|
||||
set waitfor = 0
|
||||
sleep(1)
|
||||
new /obj/effect/decal/cleanable/ash(H.loc)
|
||||
qdel(H)
|
||||
|
||||
|
||||
@@ -116,8 +116,6 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL,
|
||||
|
||||
/datum/species/golem/handle_death(var/mob/living/carbon/human/H)
|
||||
if(turn_into_materials)
|
||||
set waitfor = 0
|
||||
sleep(1)
|
||||
new H.species.meat_type(H.loc, rand(3,8))
|
||||
qdel(H)
|
||||
|
||||
@@ -411,8 +409,6 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL,
|
||||
return -1 // complete projectile permutation
|
||||
|
||||
/datum/species/golem/glass/handle_death(var/mob/living/carbon/human/H)
|
||||
set waitfor = 0
|
||||
sleep(1)
|
||||
for(var/i in 1 to 5)
|
||||
var/obj/item/material/shard/T = new meat_type(H.loc)
|
||||
var/turf/landing = get_step(H, pick(alldirs))
|
||||
@@ -451,8 +447,6 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL,
|
||||
golem_designation = "Phoron"
|
||||
|
||||
/datum/species/golem/phoron/handle_death(var/mob/living/carbon/human/H)
|
||||
set waitfor = 0
|
||||
sleep(1)
|
||||
var/turf/location = get_turf(H)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,location))
|
||||
target_tile.assume_gas(GAS_PHORON, 200, 100+T0C)
|
||||
@@ -829,8 +823,6 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL,
|
||||
|
||||
/datum/species/golem/homunculus/handle_death(var/mob/living/carbon/human/H)
|
||||
if(turn_into_materials)
|
||||
set waitfor = 0
|
||||
sleep(1)
|
||||
H.gib()
|
||||
|
||||
/datum/species/golem/homunculus/handle_environment_special(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
icon_state = "bottle-1"
|
||||
|
||||
/obj/item/docility_serum/Initialize() // Better than hardsprited in stuff.
|
||||
. = ..()
|
||||
var/mutable_appearance/filling = mutable_appearance(icon, "[icon_state]-100")
|
||||
filling.color = COLOR_PINK
|
||||
add_overlay(filling)
|
||||
@@ -173,6 +174,7 @@
|
||||
icon_state = "bottle-1"
|
||||
|
||||
/obj/item/advanced_docility_serum/Initialize() // Better than hardsprited in stuff.
|
||||
. = ..()
|
||||
var/mutable_appearance/filling = mutable_appearance(icon, "[icon_state]-100")
|
||||
filling.color = COLOR_PALE_PINK
|
||||
add_overlay(filling)
|
||||
@@ -216,6 +218,8 @@
|
||||
icon_state = "bottle-1"
|
||||
|
||||
/obj/item/slimesteroid/Initialize() // Better than hardsprited in stuff.
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
|
||||
var/mutable_appearance/filling = mutable_appearance(icon, "[icon_state]-100")
|
||||
filling.color = COLOR_GREEN
|
||||
add_overlay(filling)
|
||||
@@ -248,6 +252,8 @@
|
||||
icon_state = "bottle-1"
|
||||
|
||||
/obj/item/extract_enhancer/Initialize() // Better than hardsprited in stuff.
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
|
||||
var/mutable_appearance/filling = mutable_appearance(icon, "[icon_state]-100")
|
||||
filling.color = COLOR_BLUE
|
||||
add_overlay(filling)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
add_verb(src, /mob/living/proc/ventcrawl)
|
||||
|
||||
add_language(LANGUAGE_TCB)
|
||||
set_default_language(all_languages[LANGUAGE_TCB])
|
||||
src.default_language = all_languages[LANGUAGE_TCB]
|
||||
|
||||
src.colour = colour
|
||||
number = rand(1, 1000)
|
||||
|
||||
@@ -196,7 +196,7 @@ var/list/channel_to_radio_key = new
|
||||
var/regex/emote = regex("^(\[\\*^\])\[^*\]+$")
|
||||
|
||||
if(emote.Find(message))
|
||||
if(emote.group[1] == "*") return emote(copytext(message, 2))
|
||||
if(emote.group[1] == "*") return client_emote(copytext(message, 2))
|
||||
if(emote.group[1] == "^") return custom_emote(VISIBLE_MESSAGE, copytext(message,2))
|
||||
|
||||
//parse the radio code and consume it
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
if(!card.radio)
|
||||
card.radio = new /obj/item/device/radio/pai(src.card)
|
||||
radio = card.radio
|
||||
card.recalculateChannels()
|
||||
INVOKE_ASYNC(card, TYPE_PROC_REF(/obj/item/device/paicard, recalculateChannels))
|
||||
|
||||
//Default languages without universal translator software
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
assigned_antagonist.add_antagonist_mind(src.mind, TRUE)
|
||||
if(assigned_antagonist.get_antag_radio())
|
||||
module.channels[assigned_antagonist.get_antag_radio()] = TRUE
|
||||
radio.recalculateChannels()
|
||||
INVOKE_ASYNC(radio, TYPE_PROC_REF(/obj/item/device/radio/borg, recalculateChannels))
|
||||
client.init_verbs()
|
||||
say("Boot sequence complete!")
|
||||
return src
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
/mob/living/silicon/robot/drone/Initialize()
|
||||
. = ..()
|
||||
set_default_language(all_languages[LANGUAGE_LOCAL_DRONE])
|
||||
default_language = all_languages[LANGUAGE_LOCAL_DRONE]
|
||||
|
||||
/mob/living/silicon/robot/drone/Destroy()
|
||||
if(master_matrix)
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
new spawn_module(src, src)
|
||||
if(key_type)
|
||||
radio.keyslot = new key_type(radio)
|
||||
radio.recalculateChannels()
|
||||
INVOKE_ASYNC(radio, TYPE_PROC_REF(/obj/item/device/radio/borg, recalculateChannels))
|
||||
if(law_update)
|
||||
var/new_ai = select_active_ai_with_fewest_borgs()
|
||||
if(new_ai)
|
||||
|
||||
@@ -67,7 +67,7 @@ var/global/list/robot_modules = list(
|
||||
apply_status_flags(R)
|
||||
|
||||
if(R.radio)
|
||||
R.radio.recalculateChannels()
|
||||
INVOKE_ASYNC(R.radio, TYPE_PROC_REF(/obj/item/device/radio/borg, recalculateChannels))
|
||||
|
||||
R.set_module_sprites(sprites)
|
||||
R.icon_selected = FALSE
|
||||
@@ -914,7 +914,7 @@ var/global/list/robot_modules = list(
|
||||
supported_upgrades = list(/obj/item/robot_parts/robot_component/jetpack)
|
||||
|
||||
if(R.radio)
|
||||
R.radio.recalculateChannels()
|
||||
INVOKE_ASYNC(R.radio, TYPE_PROC_REF(/obj/item/device/radio/borg, recalculateChannels))
|
||||
|
||||
/obj/item/robot_module/military
|
||||
name = "military robot module"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
var/corpseidicon = null //For setting it to be a gold, silver, centcomm etc ID
|
||||
|
||||
/obj/effect/landmark/mobcorpse/Initialize()
|
||||
. = ..()
|
||||
createCorpse()
|
||||
|
||||
initialized = TRUE
|
||||
|
||||
@@ -201,6 +201,8 @@
|
||||
L.broken()
|
||||
else
|
||||
L.flicker()
|
||||
CHECK_TICK
|
||||
|
||||
last_special = world.time + 30
|
||||
|
||||
/mob/living/simple_animal/rat/king/verb/devourdead(mob/target as mob in oview())
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/mob/living/simple_animal/slime/Initialize()
|
||||
. = ..()
|
||||
add_language(LANGUAGE_TCB)
|
||||
set_default_language(all_languages[LANGUAGE_TCB])
|
||||
default_language = all_languages[LANGUAGE_TCB]
|
||||
|
||||
/mob/living/simple_animal/slime/can_force_feed(var/feeder, var/food, var/feedback)
|
||||
if(feedback)
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
if(simple_default_language)
|
||||
add_language(simple_default_language)
|
||||
set_default_language(all_languages[simple_default_language])
|
||||
default_language = all_languages[simple_default_language]
|
||||
|
||||
if(dead_on_map)
|
||||
death()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return
|
||||
|
||||
if(use_me)
|
||||
usr.emote("me",usr.emote_type,message)
|
||||
usr.client_emote("me",usr.emote_type,message)
|
||||
else
|
||||
usr.emote(message)
|
||||
|
||||
|
||||
@@ -1595,7 +1595,7 @@
|
||||
if (prob(chance))
|
||||
L.stat &= ~POWEROFF
|
||||
L.broken()
|
||||
stoplag(1)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/machinery/power/apc/proc/flicker_all()
|
||||
var/offset = 0
|
||||
|
||||
@@ -633,8 +633,6 @@
|
||||
status = LIGHT_BROKEN
|
||||
stat |= BROKEN
|
||||
update()
|
||||
if (!skip_sound_and_sparks)
|
||||
CHECK_TICK // For lights-out events.
|
||||
|
||||
/obj/machinery/light/proc/shatter()
|
||||
if(status == LIGHT_EMPTY)
|
||||
|
||||
@@ -52,8 +52,9 @@
|
||||
armor_penetration = 20
|
||||
|
||||
/obj/item/projectile/beam/psi_lightning/wide/Initialize()
|
||||
. = ..()
|
||||
for(var/i = 1 to 4)
|
||||
var/turf/new_turf = get_random_turf_in_range(get_turf(firer), i + rand(0, i), 0, TRUE, FALSE)
|
||||
var/obj/item/projectile/beam/psi_lightning/pellet/pellet = new type(new_turf)
|
||||
var/turf/front_turf = get_step(pellet, pellet.dir)
|
||||
pellet.launch_projectile(front_turf)
|
||||
INVOKE_ASYNC(pellet, TYPE_PROC_REF(/obj/item/projectile/beam/psi_lightning/pellet, launch_projectile), front_turf)
|
||||
|
||||
@@ -318,6 +318,8 @@ var/list/GPS_list = list()
|
||||
gpstag = "STAT0"
|
||||
|
||||
/obj/item/device/gps/stationary/Initialize()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
|
||||
compass = new(src)
|
||||
update_position()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user