Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Nov 23, 2023
1 parent a883027 commit c37d762
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
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)
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

0 comments on commit c37d762

Please sign in to comment.