mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
78 lines
2.8 KiB
Plaintext
78 lines
2.8 KiB
Plaintext
/obj/machinery/botpad
|
|
name = "Bot pad"
|
|
desc = "A lighter version of the orbital mech pad modified to launch bots. Requires linking to a remote to function."
|
|
icon = 'icons/obj/machines/telepad.dmi'
|
|
icon_state = "botpad"
|
|
base_icon_state = "botpad"
|
|
circuit = /obj/item/circuitboard/machine/botpad
|
|
// ID of the console, used for linking up
|
|
var/id = "botlauncher"
|
|
var/obj/item/botpad_remote/connected_remote
|
|
var/datum/weakref/launched_bot // we need this to recall the bot
|
|
|
|
/obj/machinery/botpad/Destroy()
|
|
if(connected_remote)
|
|
connected_remote.connected_botpad = null
|
|
connected_remote = null
|
|
launched_bot = null
|
|
return ..()
|
|
|
|
/obj/machinery/botpad/update_icon_state()
|
|
. = ..()
|
|
icon_state = panel_open ? "[base_icon_state]-open" : base_icon_state
|
|
|
|
/obj/machinery/botpad/screwdriver_act(mob/user, obj/item/tool)
|
|
return default_deconstruction_screwdriver(user, tool)
|
|
|
|
/obj/machinery/botpad/crowbar_act(mob/user, obj/item/tool)
|
|
return default_deconstruction_crowbar(user, tool)
|
|
|
|
/obj/machinery/botpad/multitool_act(mob/living/user, obj/item/multitool/tool)
|
|
if(!panel_open)
|
|
return NONE
|
|
var/obj/item/multitool/multitool = tool
|
|
multitool.set_buffer(src)
|
|
balloon_alert(user, "saved to multitool buffer")
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
// Checks the turf for a bot and launches it if it's the only mob on the pad.
|
|
/obj/machinery/botpad/proc/launch(mob/living/user)
|
|
var/turf/reverse_turf = get_turf(user)
|
|
var/atom/possible_bot
|
|
for(var/mob/living/robot in get_turf(src))
|
|
if(!isbot(robot))
|
|
user.balloon_alert(user, "unidentified life form on the pad!")
|
|
return
|
|
if(!isnull(possible_bot))
|
|
user.balloon_alert(user, "too many bots on the pad!")
|
|
return
|
|
possible_bot = robot // We don't change the launched_bot var here because we are not sure if there is another bot on the pad.
|
|
|
|
if(!use_energy(active_power_usage, force = FALSE))
|
|
balloon_alert(user, "not enough energy!")
|
|
return
|
|
launched_bot = WEAKREF(possible_bot)
|
|
podspawn(list(
|
|
"target" = get_turf(src),
|
|
"path" = /obj/structure/closet/supplypod/transport/botpod,
|
|
"style" = /datum/pod_style/seethrough,
|
|
"reverse_dropoff_coords" = list(reverse_turf.x, reverse_turf.y, reverse_turf.z)
|
|
))
|
|
|
|
/obj/machinery/botpad/proc/recall(mob/living/user)
|
|
var/atom/our_bot = launched_bot?.resolve()
|
|
if(isnull(our_bot))
|
|
user.balloon_alert(user, "no bots sent from the pad!")
|
|
return
|
|
user.balloon_alert(user, "bot sent back to pad")
|
|
if(isbasicbot(our_bot))
|
|
var/mob/living/basic/bot/basic_bot = our_bot
|
|
basic_bot.summon_bot(src)
|
|
return
|
|
var/mob/living/simple_animal/bot/simple_bot = our_bot
|
|
simple_bot.call_bot(src, get_turf(src))
|
|
|
|
/obj/structure/closet/supplypod/transport/botpod
|
|
reverse_option_list = list("Mobs"=TRUE,"Objects"=FALSE,"Anchored"=FALSE,"Underfloor"=FALSE,"Wallmounted"=FALSE,"Floors"=FALSE,"Walls"=FALSE,"Mecha"=FALSE)
|
|
leavingSound = 'sound/vehicles/rocketlaunch.ogg'
|