Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.
Open
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
6 changes: 6 additions & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
#include "code\__DEFINES\atom_hud.dm"
#include "code\__DEFINES\balloon_alert.dm"
#include "code\__DEFINES\bitfields.dm"
<<<<<<< HEAD
=======
#include "code\__DEFINES\bodyparts.dm"
#include "code\__DEFINES\bot_defines.dm"
>>>>>>> 197e63bb5e... [PORT] Bot Multi-Z Movement (#7587)
#include "code\__DEFINES\callbacks.dm"
#include "code\__DEFINES\cargo.dm"
#include "code\__DEFINES\chat.dm"
Expand Down Expand Up @@ -1196,6 +1201,7 @@
#include "code\game\objects\structures\artstuff.dm"
#include "code\game\objects\structures\barsigns.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\bot_elevator.dm"
#include "code\game\objects\structures\catwalk.dm"
#include "code\game\objects\structures\destructible_structures.dm"
#include "code\game\objects\structures\displaycase.dm"
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/bot_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#define BOT_Z_MODE_AI_CALLED 10
#define BOT_Z_MODE_PATROLLING 20
#define BOT_Z_MODE_SUMMONED 30

#define MULEBOT_Z_MODE_ACTIVE 10

1 change: 1 addition & 0 deletions code/_globalvars/lists/objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GLOBAL_LIST_EMPTY(zombie_infection_list) // A list of all zombie_infection org
GLOBAL_LIST_EMPTY(meteor_list) // List of all meteors.
GLOBAL_LIST_EMPTY(active_jammers) // List of active radio jammers
GLOBAL_LIST_EMPTY(ladders)
GLOBAL_LIST_EMPTY(bot_elevator)
GLOBAL_LIST_EMPTY(trophy_cases)

GLOBAL_LIST_EMPTY(wire_color_directory)
Expand Down
12 changes: 9 additions & 3 deletions code/game/objects/items/devices/PDA/cart.dm
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,16 @@ Code:
var/botcount = 0
for(var/B in GLOB.bots_list) //Git da botz
var/mob/living/simple_animal/bot/Bot = B
if(!Bot.on || Bot.get_virtual_z_level() != zlevel || Bot.remote_disabled || !(bot_access_flags & Bot.bot_type)) //Only non-emagged bots on the same Z-level are detected!
if(!Bot.on || Bot.remote_disabled || !(bot_access_flags & Bot.bot_type)) //Only non-emagged bots are detected!
continue //Also, the PDA must have access to the bot type.
menu += "<A href='byond://?src=[REF(src)];op=control;bot=[REF(Bot)]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
botcount++
if(Bot.get_virtual_z_level() in SSmapping.levels_by_trait(ZTRAIT_STATION))
if(zlevel in SSmapping.levels_by_trait(ZTRAIT_STATION))
menu += "<A href='byond://?src=[REF(src)];op=control;bot=[REF(Bot)]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
botcount++
else if (Bot.get_virtual_z_level() == zlevel)
if(!(zlevel in SSmapping.levels_by_trait(ZTRAIT_STATION)))
menu += "<A href='byond://?src=[REF(src)];op=control;bot=[REF(Bot)]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
botcount++
if(!botcount) //No bots at all? Lame.
menu += "No bots found.<BR>"
return
Expand Down
62 changes: 62 additions & 0 deletions code/game/objects/structures/bot_elevator.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/obj/structure/bot_elevator
name = "bot elevator"
desc = "A basic service elevator built specifically for the various bots onboard the vessel."
icon = 'icons/obj/structures/bot_elevator.dmi'
icon_state = "elevator1"
anchored = TRUE
var/obj/structure/bot_elevator/down
var/obj/structure/bot_elevator/up
max_integrity = 100

/obj/structure/bot_elevator/Initialize(mapload, obj/structure/bot_elevator/up, obj/structure/bot_elevator/down)
..()
GLOB.bot_elevator += src
if (up)
src.up = up
up.down = src
if (down)
src.down = down
down.up = src
return INITIALIZE_HINT_LATELOAD

/obj/structure/bot_elevator/Destroy(force)
if ((resistance_flags & INDESTRUCTIBLE) && !force)
return QDEL_HINT_LETMELIVE
GLOB.bot_elevator -= src
disconnect()
return ..()

/obj/structure/bot_elevator/proc/disconnect()
if(up && up.down == src)
up.down = null
if(down && down.up == src)
down.up = null
up = down = null

/obj/structure/bot_elevator/LateInitialize()
// By default, discover bot elevators above and below us vertically
var/turf/T = get_turf(src)
var/obj/structure/bot_elevator/Elevator

if (!down)
Elevator = locate() in SSmapping.get_turf_below(T)
if (Elevator)
down = Elevator
Elevator.up = src // Don't waste effort looping the other way
if (!up)
Elevator = locate() in SSmapping.get_turf_above(T)
if (Elevator)
up = Elevator
Elevator.down = src // Don't waste effort looping the other way



/obj/structure/bot_elevator/proc/travel(going_up, mob/user, is_ghost, obj/structure/bot_elevator/elevator, needs_do_after=TRUE)
var/turf/T = get_turf(elevator)
if(!is_ghost && isbot(user))
user.say("Weeeeeee!")
if(needs_do_after)
if(!do_after(user, 1 SECONDS, target=src))
return FALSE
user.forceMove(T)

Loading