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

Porting Event Coordinator panel and fullscreen #4

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
#define VV_HK_REMOVECOMPONENT "removecomponent"
#define VV_HK_MASS_REMOVECOMPONENT "massremovecomponent"
#define VV_HK_MODIFY_TRAITS "modtraits"
#define VV_HK_VIEW_REFERENCES "viewreferences"
#define VV_HK_MODIFY_RECIPES "modrecipes"

// /atom
#define VV_HK_MODIFY_TRANSFORM "atom_transform"
Expand Down
6 changes: 6 additions & 0 deletions code/datums/datumvars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
VV_DROPDOWN_OPTION(VV_HK_REMOVECOMPONENT, "Remove Component/Element")
VV_DROPDOWN_OPTION(VV_HK_MASS_REMOVECOMPONENT, "Mass Remove Component/Element")
VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRAITS, "Modify Traits")
VV_DROPDOWN_OPTION(VV_HK_MODIFY_RECIPES, "Modify Recipes")
#ifdef REFERENCE_TRACKING
VV_DROPDOWN_OPTION(VV_HK_VIEW_REFERENCES, "View References")
#endif

//This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks!
//href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
Expand All @@ -45,6 +49,8 @@
return FALSE
if(href_list[VV_HK_MODIFY_TRAITS])
usr.client.holder.modify_traits(src)
if(href_list[VV_HK_MODIFY_RECIPES])
usr.client.modify_recipes(src)
return TRUE

/datum/proc/vv_get_header()
Expand Down
10 changes: 10 additions & 0 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,16 @@
return
M.mind_initialize()

else if(href_list["toggle_build"])
if(!check_rights(R_SPAWN))
return
usr.client.togglebuildmodeself()

else if(href_list["toggle_invis"])
if(!check_rights(R_SPAWN))
return
usr.client.invisimin()

else if(href_list["create_object"])
if(!check_rights(R_SPAWN))
return
Expand Down
1 change: 1 addition & 0 deletions code/modules/client/client_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@

/// If the client is currently under the restrictions of the interview system
var/interviewee = FALSE
var/is_fullscreen = 0

/// Whether or not this client has standard hotkeys enabled
var/hotkeys = TRUE
Expand Down
6 changes: 3 additions & 3 deletions fallout/code/misc/staffchat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GLOBAL_PROTECT(staff)
if(!add_or_remove)
return


switch(add_or_remove)
if("Add")
chosen_recipe = input(src, "Enter the recipe name to add to [target.name].", "Search recipes") as null|text
Expand Down Expand Up @@ -100,7 +100,7 @@ GLOBAL_PROTECT(staff)
to_chat(src, span_warning("Target does not know any recipes!"))
return


//event coordinator stuff
/datum/admins/proc/event_panel()
if(!check_rights(R_SPAWN))
Expand Down Expand Up @@ -153,7 +153,7 @@ GLOBAL_PROTECT(staff)
message_admins("[ADMIN_TPMONTY(usr)] tried to use open_event_panel() without perms!")
log_admin("INVALID ADMIN PROC ACCESS: [key_name(usr)] tried to use open_event_panel() without perms!")
return

src.holder.event_panel()

//for the client to optionally go fullscreen
Expand Down