mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-25 21:56:42 +01:00
Ports the Emote Panel
This Commit does the following: Ports the Emote Panel Turns SPLURT's emotes into /sound/human datums to reduce redundancy in the amount of emotes. Gives almost every emote a name for the emote panel. Removes herobrine. Also fixes a few errors and makes sure all files are properly tested for Pull Request
This commit is contained in:
+51
-1
@@ -156,9 +156,59 @@
|
||||
/datum/emote/sound
|
||||
var/vary = FALSE //used for the honk borg emote
|
||||
var/volume = 50
|
||||
// Default time before using another audio emote
|
||||
var/emote_cooldown = 1 SECONDS
|
||||
|
||||
// Default volume of the emote
|
||||
var/emote_volume = 50
|
||||
|
||||
// Default range modifier
|
||||
var/emote_range = -1
|
||||
var/emote_distance_multiplier = SOUND_DEFAULT_DISTANCE_MULTIPLIER
|
||||
var/emote_distance_multiplier_min_range = SOUND_DEFAULT_MULTIPLIER_EFFECT_RANGE
|
||||
|
||||
// Default pitch variance
|
||||
var/emote_pitch_variance = 1
|
||||
|
||||
// Default audio falloff settings
|
||||
var/emote_falloff_exponent = SOUND_FALLOFF_EXPONENT
|
||||
var/emote_falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE
|
||||
|
||||
// Default frequency
|
||||
var/emote_frequency = null
|
||||
|
||||
// Default channel
|
||||
var/emote_channel = 0
|
||||
|
||||
// Should the emote consider atmospheric pressure?
|
||||
var/emote_check_pressure = TRUE
|
||||
|
||||
// Should the emote ignore walls?
|
||||
var/emote_ignore_walls = FALSE
|
||||
|
||||
// Default wet and dry settings (???)
|
||||
var/emote_wetness = -10000
|
||||
var/emote_dryness = 0
|
||||
mob_type_allowed_typecache = list(/mob/living/brain, /mob/living/silicon, /mob/camera/aiEye)
|
||||
|
||||
/datum/emote/sound/can_run_emote(mob/living/user, status_check, intentional = FALSE)
|
||||
. = ..()
|
||||
|
||||
// Check parent return
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
// Check cooldown
|
||||
if(user?.nextsoundemote >= world.time)
|
||||
return FALSE
|
||||
|
||||
// Allow use
|
||||
return TRUE
|
||||
|
||||
/datum/emote/sound/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
playsound(user.loc, sound, volume, vary)
|
||||
playsound(user.loc, sound, emote_volume, emote_pitch_variance, emote_range, emote_falloff_exponent, emote_frequency, emote_channel, emote_check_pressure, emote_ignore_walls, emote_falloff_distance, emote_wetness, emote_dryness, emote_distance_multiplier, emote_distance_multiplier_min_range)
|
||||
|
||||
//Cooldown.
|
||||
user.nextsoundemote = world.time + emote_cooldown
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
"key" = emote.key,
|
||||
"name" = emote.name,
|
||||
"hands" = emote.restraint_check,
|
||||
"visible" = emote.emote_type & EMOTE_VISIBLE,
|
||||
"audible" = emote.emote_type & EMOTE_AUDIBLE,
|
||||
"visible" = emote.emote_type & (EMOTE_VISIBLE || EMOTE_BOTH || EMOTE_OMNI),
|
||||
"audible" = emote.emote_type & (EMOTE_AUDIBLE || EMOTE_BOTH || EMOTE_OMNI),
|
||||
"sound" = !isnull(emote.get_sound(user)),
|
||||
"use_params" = emote.message_param,
|
||||
))
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
/datum/emote/living/carbon/blink_r
|
||||
key = "blink_r"
|
||||
name = "blink rapidly"
|
||||
message = "blinks rapidly."
|
||||
|
||||
/datum/emote/living/carbon/clap
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
else
|
||||
H.dna.species.stop_wagging_tail(H)
|
||||
|
||||
/datum/emote/living/carbon/human/wag/can_run_emote(mob/user, status_check = TRUE)
|
||||
/datum/emote/living/carbon/human/wag/can_run_emote(mob/user, status_check = TRUE, intentional = FALSE)
|
||||
if(!..() || !ishuman(user))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -135,7 +135,7 @@
|
||||
else
|
||||
. = "closes " + message
|
||||
|
||||
/datum/emote/living/carbon/human/wing/can_run_emote(mob/user, status_check = TRUE)
|
||||
/datum/emote/living/carbon/human/wing/can_run_emote(mob/user, status_check = TRUE, intentional = FALSE)
|
||||
if(!..() || !ishuman(user))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
/datum/emote/living/audio_emote
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/audio_emote/can_run_emote(mob/living/user, status_check = TRUE)
|
||||
/datum/emote/living/audio_emote/can_run_emote(mob/living/user, status_check = TRUE, intentional = FALSE)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
|
||||
@@ -61,60 +61,60 @@
|
||||
|
||||
/datum/language/schechi
|
||||
|
||||
/datum/emote/living/audio/teshari/teshsqueak
|
||||
/datum/emote/sound/teshari/teshsqueak
|
||||
key = "surprised"
|
||||
key_third_person = "surprised"
|
||||
message = "chirps in surprise!"
|
||||
message_mime = "lets out an <b>inaudible</b> chirp!"
|
||||
emote_sound = 'modular_splurt/sound/voice/teshsqueak.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
sound = 'modular_splurt/sound/voice/teshsqueak.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
emote_cooldown = 2.1 SECONDS
|
||||
|
||||
/datum/emote/living/audio/teshari/teshsqueak/run_emote(mob/user, params)
|
||||
/datum/emote/sound/teshari/teshsqueak/run_emote(mob/user, params)
|
||||
var/datum/dna/D = user.has_dna()
|
||||
if(D.species.name != "Teshari")
|
||||
return
|
||||
// Return normally
|
||||
. = ..()
|
||||
|
||||
/datum/emote/living/audio/teshari/teshchirp
|
||||
/datum/emote/sound/teshari/teshchirp
|
||||
key = "tchirp"
|
||||
key_third_person = "tchirp"
|
||||
message = "chirps!"
|
||||
message_mime = "lets out an <b>inaudible</b> chirp!"
|
||||
emote_sound = 'modular_splurt/sound/voice/teshchirp.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
sound = 'modular_splurt/sound/voice/teshchirp.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
emote_cooldown = 2.1 SECONDS
|
||||
|
||||
/datum/emote/living/audio/teshari/teshchirp/run_emote(mob/user, params)
|
||||
/datum/emote/sound/teshari/teshchirp/run_emote(mob/user, params)
|
||||
var/datum/dna/D = user.has_dna()
|
||||
if(D.species.name != "Teshari")
|
||||
return
|
||||
// Return normally
|
||||
. = ..()
|
||||
|
||||
/datum/emote/living/audio/teshari/trill
|
||||
/datum/emote/sound/teshari/trill
|
||||
key = "trill"
|
||||
key_third_person = "trill"
|
||||
message = "trills!"
|
||||
message_mime = "lets out an <b>inaudible</b> chirp!"
|
||||
emote_sound = 'modular_splurt/sound/voice/teshtrill.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
sound = 'modular_splurt/sound/voice/teshtrill.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
emote_cooldown = 2.1 SECONDS
|
||||
|
||||
/datum/emote/living/audio/teshari/trill/run_emote(mob/user, params)
|
||||
/datum/emote/sound/teshari/trill/run_emote(mob/user, params)
|
||||
var/datum/dna/D = user.has_dna()
|
||||
if(D.species.name != "Teshari")
|
||||
return
|
||||
// Return normally
|
||||
. = ..()
|
||||
|
||||
/datum/emote/living/audio/teshari/teshscream
|
||||
/datum/emote/sound/teshari/teshscream
|
||||
key = "teshscream"
|
||||
key_third_person = "teshscream"
|
||||
message = "screams!"
|
||||
message_mime = "lets out an <b>inaudible</b> screams!"
|
||||
emote_sound = 'modular_splurt/sound/voice/teshscream.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
sound = 'modular_splurt/sound/voice/teshscream.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
emote_cooldown = 2.1 SECONDS
|
||||
|
||||
/datum/emote/living/audio/teshari/teshscream/run_emote(mob/user, params)
|
||||
/datum/emote/sound/teshari/teshscream/run_emote(mob/user, params)
|
||||
var/datum/dna/D = user.has_dna()
|
||||
if(D.species.name != "Teshari")
|
||||
return
|
||||
|
||||
@@ -60,15 +60,15 @@
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
|
||||
/datum/emote/living/audio/vox/shriek
|
||||
/datum/emote/sound/vox/shriek
|
||||
key = "shriek"
|
||||
key_third_person = "shrieks"
|
||||
message = "shrieks!"
|
||||
message_mime = "lets out an <b>inaudible</b> shriek!"
|
||||
emote_sound = 'modular_splurt/sound/voice/shriek1.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
sound = 'modular_splurt/sound/voice/shriek1.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
emote_cooldown = 2.1 SECONDS
|
||||
|
||||
/datum/emote/living/audio/vox/shriek/run_emote(mob/user, params)
|
||||
/datum/emote/sound/vox/shriek/run_emote(mob/user, params)
|
||||
var/datum/dna/D = user.has_dna()
|
||||
if(D.species.name != "Vox")
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -102,27 +102,28 @@ export const EmotePanelContent = (props, context) => {
|
||||
: `All Emotes`
|
||||
}
|
||||
buttons={
|
||||
<Flex>
|
||||
<Flex.Item>
|
||||
<Button onClick={() => toggleShowNames(!showNames)}>
|
||||
{showNames ? 'Show Names' : 'Show Keys'}
|
||||
</Button>
|
||||
<Button
|
||||
selected={showIcons}
|
||||
onClick={() => toggleShowIcons(!showIcons)}
|
||||
>
|
||||
Show Icons
|
||||
</Button>
|
||||
</Flex.Item>
|
||||
<Flex.Item>
|
||||
<Button
|
||||
icon="crosshairs"
|
||||
selected={useParams}
|
||||
onClick={() => toggleUseParams(!useParams)}
|
||||
>
|
||||
Use Params
|
||||
</Button>
|
||||
</Flex.Item>
|
||||
<Flex justify="end" inline width="100%">
|
||||
<Button
|
||||
onClick={() => toggleShowNames(!showNames)}
|
||||
height="20px"
|
||||
>
|
||||
{showNames ? 'Show Names' : 'Show Keys'}
|
||||
</Button>
|
||||
<Button
|
||||
selected={showIcons}
|
||||
onClick={() => toggleShowIcons(!showIcons)}
|
||||
height="20px"
|
||||
>
|
||||
Show Icons
|
||||
</Button>
|
||||
<Button
|
||||
icon="crosshairs"
|
||||
selected={useParams}
|
||||
onClick={() => toggleUseParams(!useParams)}
|
||||
height="20px" // God knows why classic tg just breaks this button, this is a patchwork solution.
|
||||
>
|
||||
Use Params
|
||||
</Button>
|
||||
</Flex>
|
||||
}
|
||||
>
|
||||
@@ -149,7 +150,7 @@ export const EmotePanelContent = (props, context) => {
|
||||
.sort((a, b) => (a.name > b.name ? 1 : -1))
|
||||
.map((emote) => (
|
||||
<Button
|
||||
width={showIcons ? 16 : 8}
|
||||
width={showIcons ? 16 : 12 }
|
||||
key={emote.name}
|
||||
tooltip={
|
||||
showIcons ? undefined : (
|
||||
|
||||
Reference in New Issue
Block a user