Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emote Refractoring #1204

Merged
merged 66 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
6c83862
what's an imp
MosleyTheMalO Sep 21, 2024
123552e
Revert "Change this cyborg"
MosleyTheMalO Sep 21, 2024
75205db
Reverts 85f0f61, 9e8b4f3 & e252a00
Just-Sim Sep 26, 2024
128aec7
Purge & Merge Emotes
Just-Sim Sep 26, 2024
cea6604
Removes Burps.
Just-Sim Sep 26, 2024
46a4d70
quick fixes
Just-Sim Sep 26, 2024
bc6603d
quick fixes
Just-Sim Sep 26, 2024
68d2c7a
Merge pull request #10 from Just-Sim/meow-emotes
ariaworld Sep 26, 2024
dd0d2e0
Automatic changelog generation for PR #10 [ci skip]
SPLURT-Station-Bot Sep 26, 2024
fcd8300
Automatic changelog compile [ci skip]
actions-user Sep 26, 2024
8825218
initial commit
Just-Sim Sep 27, 2024
47092f7
Merge branch 'master' into content-stuff
MosleyTheMalO Sep 27, 2024
9712521
Merge remote-tracking branch 'venus/master' into content-stuff
MosleyTheMalO Sep 27, 2024
1886ca4
update *burp, delete vore constants
Just-Sim Sep 28, 2024
f402b1a
Update emotes.dm
Just-Sim Sep 28, 2024
a0d9b26
Merge branch 'the-great-culling' into tgui-emote-2
Just-Sim Sep 28, 2024
0ed05ea
Merge pull request #11 from Just-Sim/the-great-culling
ariaworld Sep 28, 2024
0cb41c7
Automatic changelog generation for PR #11 [ci skip]
SPLURT-Station-Bot Sep 28, 2024
7c93f0e
Automatic changelog compile [ci skip]
actions-user Sep 28, 2024
64becde
Ports the Emote Panel
Just-Sim Oct 1, 2024
1a2a843
Merge branch 'master' into tgui-emote-2
Just-Sim Oct 1, 2024
660bbaf
runtime fix
Just-Sim Oct 1, 2024
c5173b9
Merge branch 'tgui-emote-2' of https://github.com/Just-Sim/VENUS-Stat…
Just-Sim Oct 1, 2024
7eb38be
changed cit_emotes to new audio system
Just-Sim Oct 1, 2024
7d5a802
Merge pull request #13 from Just-Sim/tgui-emote-2
ariaworld Oct 1, 2024
8a7d048
Automatic changelog generation for PR #13 [ci skip]
SPLURT-Station-Bot Oct 1, 2024
8289acd
Automatic changelog compile [ci skip]
actions-user Oct 1, 2024
f37074f
silicons can now use the emote panel
Just-Sim Oct 5, 2024
0657c12
Merge pull request #14 from Just-Sim/emote-fix
ariaworld Oct 5, 2024
e5d8ac6
Automatic changelog generation for PR #14 [ci skip]
SPLURT-Station-Bot Oct 5, 2024
92b0014
Automatic changelog compile [ci skip]
actions-user Oct 5, 2024
264c94d
emote guide
Just-Sim Oct 5, 2024
5d83deb
Merge branch 'VENUS-Station:master' into emote-fix
Just-Sim Oct 5, 2024
b467dfb
Update emotes.dm
ariaworld Oct 5, 2024
4e56c38
Update emotes.dm
ariaworld Oct 5, 2024
863aa14
Update emotes.dm
Just-Sim Oct 5, 2024
75ab56f
Merge branch 'emote-fix' of https://github.com/Just-Sim/VENUS-Station…
Just-Sim Oct 5, 2024
4c4e482
Merge pull request #15 from Just-Sim/emote-fix
ariaworld Oct 5, 2024
14380b6
Merge remote-tracking branch 'venus/master' into content-stuff
MosleyTheMalO Oct 7, 2024
5776449
Revert "Merge pull request #11 from Just-Sim/the-great-culling"
MosleyTheMalO Oct 8, 2024
c8ec168
Update emotes.dm
MosleyTheMalO Oct 8, 2024
a55e4a9
Merge branch 'master' into content-stuff
MosleyTheMalO Oct 8, 2024
fe54fd6
some fixes
MosleyTheMalO Oct 8, 2024
6e57a23
[MIRROR] Popup Notice tgstation/tgstation#61010
Just-Sim Oct 8, 2024
c762535
Merge branch 'VENUS-Station:master' into admin-stuff
Just-Sim Oct 8, 2024
c8983e1
Did you know Mosley pulls from downstreams without knowing what he pu…
Just-Sim Oct 8, 2024
df41f4c
anthro facial hair fix
cyfause Oct 8, 2024
3e4f8da
[Port] The Ocky Icky Phobia from tgstation/tgstation#57450 & tgstatio…
Just-Sim Oct 8, 2024
6cbc3a7
Adds Rejuvenate to the Context Menu
Just-Sim Oct 8, 2024
50c16cc
[PORT] Adds Immersion from tgstation/tgstation/47704
Just-Sim Oct 8, 2024
9396a11
Merge pull request #16 from cyfause/master
ariaworld Oct 8, 2024
99b901e
Automatic changelog generation for PR #16 [ci skip]
SPLURT-Station-Bot Oct 8, 2024
9027e74
Automatic changelog compile [ci skip]
actions-user Oct 8, 2024
2ed0e20
Fixes Lightning Smite
Just-Sim Oct 8, 2024
43b523b
Merge branch 'VENUS-Station:master' into admin-stuff
Just-Sim Oct 8, 2024
1cc099f
Merge pull request #17 from Just-Sim/admin-stuff
ariaworld Oct 8, 2024
a60a88e
Automatic changelog generation for PR #17 [ci skip]
SPLURT-Station-Bot Oct 8, 2024
3885d21
Automatic changelog compile [ci skip]
actions-user Oct 8, 2024
7f4d26f
Update FUNDING.yml
ariaworld Oct 9, 2024
587299b
Update FUNDING.yml
ariaworld Oct 9, 2024
4cda05e
Update README.md
ariaworld Oct 9, 2024
928b4c6
Merge remote-tracking branch 'venus/master' into content-stuff
MosleyTheMalO Oct 11, 2024
16f0aa2
*click* ported
MosleyTheMalO Oct 11, 2024
f9c16b4
thanks for porting these too btw
MosleyTheMalO Oct 11, 2024
7c8cbd3
Merge branch 'master' into content-stuff
MosleyTheMalO Oct 16, 2024
cd03ca1
Merge branch 'master' into content-stuff
MosleyTheMalO Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,6 @@
#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=[REF(user)]'>LOGS</a>)"

#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
#define ADMIN_PUNISHMENT_GIB "Gib"
#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
#define ADMIN_PUNISHMENT_FIREBALL "Fireball"
#define ADMIN_PUNISHMENT_ROD "Immovable Rod"
#define ADMIN_PUNISHMENT_SUPPLYPOD_QUICK "Supply Pod (Quick)"
#define ADMIN_PUNISHMENT_SUPPLYPOD "Supply Pod"
#define ADMIN_PUNISHMENT_MAZING "Puzzle"
#define ADMIN_PUNISHMENT_PIE "Cream Pie"
#define ADMIN_PUNISHMENT_CUSTOM_PIE "Custom Cream Pie"
#define ADMIN_PUNISHMENT_SHOES "Knot Shoes"
#define ADMIN_PUNISHMENT_CRACK ":B:oneless"
#define ADMIN_PUNISHMENT_BLEED ":B:loodless"
#define ADMIN_PUNISHMENT_SCARIFY "Scarify"
#define ADMIN_PUNISHMENT_PICKLE "Pickle-ify"
#define ADMIN_PUNISHMENT_FRY "Fry"
#define ADMIN_PUNISHMENT_PERFORATE ":B:erforate"
#define ADMIN_PUNISHMENT_CLUWNE "Cluwne"
#define ADMIN_PUNISHMENT_GOODBYE "Their final message" //sandstorm

#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2
#define AHELP_RESOLVED 3
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -712,3 +712,11 @@
#define COMSIG_ALARM_TRIGGERED "comsig_alarm_triggered"
///Send when an alarm source is cleared (alarm_type, area/source_area)
#define COMSIG_ALARM_CLEARED "comsig_alarm_clear"

/// Admin helps
/// From /datum/admin_help/RemoveActive().
/// Fired when an adminhelp is made inactive either due to closing or resolving.
#define COMSIG_ADMIN_HELP_MADE_INACTIVE "admin_help_made_inactive"

/// Called when the player replies. From /client/proc/cmd_admin_pm().
#define COMSIG_ADMIN_HELP_REPLIED "admin_help_replied"
3 changes: 3 additions & 0 deletions code/__DEFINES/layers_planes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,8 @@
#define SPLASHSCREEN_PLANE 90
#define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE"

// Admin popup layer
#define ADMIN_POPUP_LAYER 1

///Layer for screentips
#define SCREENTIP_LAYER 40
7 changes: 1 addition & 6 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@
for(var/path in subtypesof(/datum/surgery))
GLOB.surgeries_list += new path()

//Emotes
for(var/path in subtypesof(/datum/emote))
var/datum/emote/E = new path()
E.emote_list[E.key] = E

for(var/path in subtypesof(/datum/bark))
var/datum/bark/B = new path()
GLOB.bark_list[B.id] = path
Expand All @@ -96,7 +91,7 @@

// Keybindings
init_keybindings()

GLOB.emote_list = init_emote_list()
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)

INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(init_ref_coin_values)) //so the current procedure doesn't sleep because of UNTIL()
Expand Down
6 changes: 0 additions & 6 deletions code/__SPLURTCODE/DEFINES/admin.dm

This file was deleted.

8 changes: 8 additions & 0 deletions code/_globalvars/lists/admin.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/proc/init_smites()
var/list/smites = list()
for (var/_smite_path in subtypesof(/datum/smite))
var/datum/smite/smite_path = _smite_path
smites[initial(smite_path.name)] = smite_path
return smites

GLOBAL_LIST_INIT_TYPED(smites, /datum/smite, init_smites())
20 changes: 20 additions & 0 deletions code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ GLOBAL_LIST_EMPTY(sentient_disease_instances)

GLOBAL_LIST_EMPTY(latejoin_ai_cores)

GLOBAL_LIST_EMPTY(emote_list)

GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup_floating)

Expand Down Expand Up @@ -99,6 +101,24 @@ GLOBAL_LIST_EMPTY(pre_setup_antags) //minds that have been picked as antag by th
var/mob/M = i
M.update_config_movespeed()

/proc/init_emote_list()
. = list()
for(var/path in subtypesof(/datum/emote))
var/datum/emote/E = new path()
if(E.key)
if(!.[E.key])
.[E.key] = list(E)
else
.[E.key] += E
else if(E.message) //Assuming all non-base emotes have this
stack_trace("Keyless emote: [E.type]")

if(E.key_third_person) //This one is optional
if(!.[E.key_third_person])
.[E.key_third_person] = list(E)
else
.[E.key_third_person] |= E

//blood types
GLOBAL_LIST_INIT(regular_bloods,list(
"O-",
Expand Down
3 changes: 3 additions & 0 deletions code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,6 @@
default = list()

/datum/config_entry/flag/toast_notification_on_init

/// Gives the ability to send players a maptext popup.
/datum/config_entry/flag/popup_admin_pm
3 changes: 2 additions & 1 deletion code/controllers/subsystem/traumas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ SUBSYSTEM_DEF(traumas)
"mimes" = strings(PHOBIA_FILE, "mimes"),
"cats" = strings(PHOBIA_FILE, "cats"),
"syndicate"= strings(PHOBIA_FILE, "syndicate"),
"eye" = strings(PHOBIA_FILE, "eye")
"eye" = strings(PHOBIA_FILE, "eye"),
"ocky icky" = strings(PHOBIA_FILE, "ocky icky")
)

phobia_mobs = list("spiders" = typecacheof(list(/mob/living/simple_animal/hostile/poison/giant_spider)),
Expand Down
4 changes: 4 additions & 0 deletions code/datums/brain_damage/phobia.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,7 @@
/datum/brain_trauma/mild/phobia/conspiracies
phobia_type = "conspiracies"
random_gain = FALSE

/datum/brain_trauma/mild/phobia/ocky_icky
phobia_type = "ocky icky"
random_gain = FALSE
125 changes: 125 additions & 0 deletions code/datums/components/admin_popup.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/// Applied to clients when they receive an admin popup, alerting them to
/// their ticket.
/datum/component/admin_popup
/// The user's most active ticket. If this is resolved, closed, or replied to,
/// then the component will delete itself.
var/datum/admin_help/ticket

var/atom/movable/screen/admin_popup/admin_popup

/datum/component/admin_popup/Initialize(datum/admin_help/ticket)
if (!istype(parent, /client))
return COMPONENT_INCOMPATIBLE

if (!istype(ticket))
return COMPONENT_INCOMPATIBLE

create_notice()

RegisterSignal(
ticket,
list(
COMSIG_ADMIN_HELP_MADE_INACTIVE,
COMSIG_ADMIN_HELP_REPLIED,
COMSIG_PARENT_QDELETING,
),
PROC_REF(delete_self),
)

/datum/component/admin_popup/Destroy(force)
var/client/parent_client = parent

parent_client?.screen -= admin_popup
QDEL_NULL(admin_popup)

if (!QDELETED(ticket))
UnregisterSignal(ticket, list(
COMSIG_ADMIN_HELP_MADE_INACTIVE,
COMSIG_ADMIN_HELP_REPLIED,
COMSIG_PARENT_QDELETING,
))

ticket = null

return ..()

/datum/component/admin_popup/proc/create_notice()
if(admin_popup)
qdel(admin_popup)
admin_popup = new

var/client/parent_client = parent
admin_popup.maptext_width = view_to_pixels(parent_client.view_size.getView())[1]
parent_client.screen += admin_popup

/datum/component/admin_popup/proc/delete_self()
SIGNAL_HANDLER
qdel(src)

/// The UI element for admin popups
/atom/movable/screen/admin_popup
icon = null
icon_state = null
plane = ABOVE_HUD_PLANE
layer = ADMIN_POPUP_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
screen_loc = "TOP-5,LEFT"
maptext_height = 480
maptext_width = 480
maptext = ""

var/static/list/colors = list(
COLOR_RED,
COLOR_ORANGE,
COLOR_YELLOW,
COLOR_LIME,
COLOR_CYAN,
COLOR_PURPLE,
)

/// The last color chosen in the animation, sourced from the static list colors.
var/last_color_index = 0

/// The `world.time` when the last color update occurred.
var/last_update_time = 0

/atom/movable/screen/admin_popup/Initialize(mapload, datum/hud/hud_owner, ...)
. = ..()

START_PROCESSING(SSobj, src)
update_text()

/atom/movable/screen/admin_popup/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()

/atom/movable/screen/admin_popup/process(seconds_per_tick)
update_text()

/atom/movable/screen/admin_popup/proc/update_text()
// Even if processing time changes, we want this to remain slow.
// We want to pester them into reading their ticket, not give them a seizure!
if (world.time - last_update_time < 2 SECONDS)
return

last_color_index = (last_color_index % colors.len) + 1

var/message = "<span style='color: [colors[last_color_index]]; text-align: center; font-size: 24pt'>"
message += "HEY!<br>An admin is trying to talk to you!<br>Check your chat window,<br>and click their name to respond!"
message += "</span>"

maptext = MAPTEXT(message)
last_update_time = world.time

/// Tries to give the target an admin popup.
/// If it fails, will send the error to the passed admin.
/proc/give_admin_popup(client/target, client/admin, message)
log_admin("[key_name(admin)] sent an admin popup to [key_name(target)].")

var/datum/admin_help/current_ticket = target.current_ticket
if (!current_ticket)
to_chat(admin, span_warning("[key_name(target)] had no active ahelp, aborting."))
return

admin.cmd_admin_pm(target, message)
target.AddComponent(/datum/component/admin_popup, current_ticket)
83 changes: 83 additions & 0 deletions code/datums/components/manual_blinking.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/datum/component/manual_blinking
dupe_mode = COMPONENT_DUPE_UNIQUE

var/obj/item/organ/eyes/E
var/warn_grace = FALSE
var/warn_dying = FALSE
var/last_blink
var/check_every = 20 SECONDS
var/grace_period = 6 SECONDS
var/damage_rate = 1 // organ damage taken per tick
var/list/valid_emotes = list(/datum/emote/living/carbon/blink, /datum/emote/living/carbon/blink_r)

/datum/component/manual_blinking/Initialize()
if(!iscarbon(parent))
return COMPONENT_INCOMPATIBLE

var/mob/living/carbon/C = parent
E = C.getorganslot(ORGAN_SLOT_EYES)

if(E)
START_PROCESSING(SSdcs, src)
last_blink = world.time
to_chat(C, "<span class='notice'>You suddenly realize you're blinking manually.</span>")

/datum/component/manual_blinking/Destroy(force, silent)
E = null
STOP_PROCESSING(SSdcs, src)
to_chat(parent, "<span class='notice'>You revert back to automatic blinking.</span>")
return ..()

/datum/component/manual_blinking/RegisterWithParent()
RegisterSignal(parent, COMSIG_MOB_EMOTE, .proc/check_emote)
RegisterSignal(parent, COMSIG_ORGAN_INSERTED, .proc/check_added_organ)
RegisterSignal(parent, COMSIG_ORGAN_REMOVED, .proc/check_removed_organ)
RegisterSignal(parent, COMSIG_LIVING_REVIVE, .proc/restart)
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/pause)

/datum/component/manual_blinking/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_MOB_EMOTE)
UnregisterSignal(parent, COMSIG_ORGAN_INSERTED)
UnregisterSignal(parent, COMSIG_ORGAN_REMOVED)
UnregisterSignal(parent, COMSIG_LIVING_REVIVE)
UnregisterSignal(parent, COMSIG_MOB_DEATH)

/datum/component/manual_blinking/proc/restart()
START_PROCESSING(SSdcs, src)

/datum/component/manual_blinking/proc/pause()
STOP_PROCESSING(SSdcs, src)

/datum/component/manual_blinking/process()
var/mob/living/carbon/C = parent

if(world.time > (last_blink + check_every + grace_period))
if(!warn_dying)
to_chat(C, "<span class='userdanger'>Your eyes begin to wither, you need to blink!</span>")
warn_dying = TRUE

E.applyOrganDamage(damage_rate)
else if(world.time > (last_blink + check_every))
if(!warn_grace)
to_chat(C, "<span class='danger'>You feel a need to blink!</span>")
warn_grace = TRUE

/datum/component/manual_blinking/proc/check_added_organ(mob/who_cares, obj/item/organ/O)
var/obj/item/organ/eyes/new_eyes = O

if(istype(new_eyes,/obj/item/organ/eyes))
E = new_eyes
START_PROCESSING(SSdcs, src)

/datum/component/manual_blinking/proc/check_removed_organ(mob/who_cares, obj/item/organ/O)
var/obj/item/organ/eyes/bye_beyes = O // oh come on, that's pretty good

if(istype(bye_beyes, /obj/item/organ/eyes))
E = null
STOP_PROCESSING(SSdcs, src)

/datum/component/manual_blinking/proc/check_emote(mob/living/carbon/user, datum/emote/emote)
if(emote.type in valid_emotes)
warn_grace = FALSE
warn_dying = FALSE
last_blink = world.time
Loading
Loading