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 1 commit
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
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#define MODE_DISPOSABLE_MOBS (1<<10) // Toggles if mobs fit in disposals or not. Off by default.
#define MODE_BYPASS_JOE (1<<11) // Toggles if ghosts can bypass Working Joe spawn limitations, does NOT bypass WL requirement. Off by default.
#define MODE_NO_JOIN_AS_XENO (1<<12) // Toggles if players can join as xeno
#define MODE_BYPASS_VEHICLE_BLOCKERS (1<<13) /// Toggles if vehicles can bypass mapped vehicle blockers. Off by default.

#define ROUNDSTATUS_FOG_DOWN 1
#define ROUNDSTATUS_PODDOORS_OPEN 2
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/blocker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@


/obj/structure/blocker/forcefield/vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
if(MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_VEHICLE_BLOCKERS) || multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
return TRUE
return FALSE

Expand All @@ -116,7 +116,7 @@


/obj/structure/blocker/forcefield/multitile_vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
if(MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_VEHICLE_BLOCKERS) || multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
return TRUE
return FALSE

Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,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
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// 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.Extras"

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

if(!SSticker.mode)
to_chat(usr, SPAN_WARNING("A mode hasn't been selected yet!"))
return

SSticker.mode.toggleable_flags ^= MODE_BYPASS_VEHICLE_BLOCKERS
message_admins("[src] has [MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_VEHICLE_BLOCKERS) ? "allowed vehicles to bypass" : "prevented vehicles from bypassing"] vehicle blockers.")
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,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