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

GM button: toggle vehicle blockers #75

Merged
merged 5 commits into from
Dec 1, 2023
Merged
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
5 changes: 5 additions & 0 deletions code/game/objects/structures/blocker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@
if(!visible)
invisibility = 101

GLOBAL_VAR_INIT(vehicle_blockers, TRUE)

/obj/structure/blocker/forcefield/vehicles
types = list(/obj/vehicle/)


/obj/structure/blocker/forcefield/vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
if(!GLOB.vehicle_blockers)
return TRUE
if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
return TRUE
return FALSE
Expand All @@ -116,6 +119,8 @@


/obj/structure/blocker/forcefield/multitile_vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
if(!GLOB.vehicle_blockers)
return TRUE
if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
return TRUE
return FALSE
Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ var/list/roundstart_mod_verbs = list(
add_verb(src, /client/proc/toggle_game_master)
add_verb(src, /client/proc/toggle_join_xeno)
add_verb(src, /client/proc/game_master_rename_platoon)
add_verb(src, /client/proc/toggle_vehicle_blockers)
Doubleumc marked this conversation as resolved.
Show resolved Hide resolved
if(CLIENT_HAS_RIGHTS(src, R_SERVER))
add_verb(src, admin_verbs_server)
if(CLIENT_HAS_RIGHTS(src, R_DEBUG))
Expand Down Expand Up @@ -361,6 +362,7 @@ var/list/roundstart_mod_verbs = list(
/client/proc/toggle_game_master,
/client/proc/toggle_join_xeno,
/client/proc/game_master_rename_platoon,
/client/proc/toggle_vehicle_blockers,
admin_verbs_admin,
admin_verbs_ban,
admin_verbs_minor_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// For PvE CM we start without the ability for people to join as xenos. This can be toggled by game masters.
/client/proc/toggle_join_xeno()
set name = "Toggle Player Xeno Joins"
set category = "Game Master.Extras"
set category = "Game Master.Flags"

if(!admin_holder || !check_rights(R_MOD, FALSE))
return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// For PvE CM a convenient button to enable/disable the invisible vehicle blockers.
/client/proc/toggle_vehicle_blockers()
set name = "Toggle Vehicle Blockers"
set category = "Game Master.Flags"

if(!admin_holder || !check_rights(R_MOD, FALSE))
return

GLOB.vehicle_blockers = !GLOB.vehicle_blockers
message_admins("[src] has [GLOB.vehicle_blockers ? "enabled" : "disabled"] vehicle blockers.")
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@
#include "code\modules\admin\game_master\game_master_submenu.dm"
#include "code\modules\admin\game_master\extra_buttons\rename_platoon.dm"
#include "code\modules\admin\game_master\extra_buttons\toggle_join_xeno.dm"
#include "code\modules\admin\game_master\extra_buttons\toggle_vehicle_blockers.dm"
#include "code\modules\admin\game_master\game_master_submenu\ambush.dm"
#include "code\modules\admin\game_master\game_master_submenu\tunnels.dm"
#include "code\modules\admin\game_master\game_master_submenu\vents.dm"
Expand Down
Loading