Files
Bubberstation/code/modules/bitrunning/server/obj_generation.dm
SkyratBot 964fc99589 [MIRROR] Feature: bitrunner, a new supply role (READY) [MDB IGNORE] (#23865)
* Feature: bitrunner, a new supply role (READY)

* Delete bepis.dm

* Conflicts

* Update dynamic_rulesets_midround.dm

* Fixing this invalid icon file path

It was trying to use the aesthetics one

* Bepis is dead

* New digi sprites courtesy of CandleJaxx!!

Now in the correct branch!

* Fixing merge conflict

* bitrunning hotfixes [NO GBP]

* Modular health adjustments

* Revert "Modular health adjustments"

This reverts commit 0ff3c48d398f6c1aac51cdf8fecaf869491bbc86.

* Modular health adjustments

Only this one should be necessary

* The screenshot test

* Bitrunner den for voidraptor (FOR #23865) (#23891)

* no shower in sight

* lets bitrunners actually get to their room and spawn there

* New digi sprites courtesy of CandleJaxx!!

* Revert "New digi sprites courtesy of CandleJaxx!!"

This reverts commit eea9f47de256dd407c78450bc8f2a09b814f93e9.

---------

Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>

* Removes bitrunning unit tests (#78607)

## About The Pull Request
Removes the fraction of unit tests I thought would be safe.
Not thrilled that I have to exclude ALL unit tests now, but hey.

The issue is that atmos attempts to process on a turf which hasn't
initialized yet.
## Why It's Good For The Game
Other PRs can pass checks now
## Changelog
N/A

* Update birdshot.dmm

* Tweaks the BEPIS category of the bitrunning order console

* Adds back the flashdark that we had skyrat edited in

* Update tgstation.dme

* Fixes Voidraptor bitrunning den not being connected to the powergrid

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
Co-authored-by: Profakos <profakos@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2023-09-29 20:53:36 -04:00

102 lines
2.7 KiB
Plaintext

/// Generates a new avatar for the bitrunner.
/obj/machinery/quantum_server/proc/generate_avatar(obj/structure/hololadder/wayout, datum/outfit/netsuit)
var/mob/living/carbon/human/avatar = new(wayout.loc)
var/outfit_path = generated_domain.forced_outfit || netsuit
var/datum/outfit/to_wear = new outfit_path()
to_wear.belt = /obj/item/bitrunning_host_monitor
to_wear.glasses = null
to_wear.gloves = null
to_wear.l_hand = null
to_wear.l_pocket = null
to_wear.r_hand = null
to_wear.r_pocket = null
to_wear.suit = null
to_wear.suit_store = null
avatar.equipOutfit(to_wear, visualsOnly = TRUE)
var/thing = avatar.get_active_held_item()
if(!isnull(thing))
qdel(thing)
thing = avatar.get_inactive_held_item()
if(!isnull(thing))
qdel(thing)
var/obj/item/storage/backpack/bag = avatar.back
if(istype(bag))
QDEL_LIST(bag.contents)
bag.contents += list(
new /obj/item/storage/box/survival,
new /obj/item/storage/medkit/regular,
new /obj/item/flashlight,
)
var/obj/item/card/id/outfit_id = avatar.wear_id
if(outfit_id)
outfit_id.assignment = "Bit Avatar"
outfit_id.registered_name = avatar.real_name
outfit_id.registered_account = new()
outfit_id.registered_account.replaceable = FALSE
SSid_access.apply_trim_to_card(outfit_id, /datum/id_trim/bit_avatar)
return avatar
/// Generates a new hololadder for the bitrunner. Effectively a respawn attempt.
/obj/machinery/quantum_server/proc/generate_hololadder()
if(!length(exit_turfs))
return
if(retries_spent >= length(exit_turfs))
return
var/turf/destination
for(var/turf/dest_turf in exit_turfs)
if(!locate(/obj/structure/hololadder) in dest_turf)
destination = dest_turf
break
if(isnull(destination))
return
var/obj/structure/hololadder/wayout = new(destination)
if(isnull(wayout))
return
retries_spent += 1
return wayout
/// Scans over neo's contents for bitrunning tech disks. Loads the items or abilities onto the avatar.
/obj/machinery/quantum_server/proc/stock_gear(mob/living/carbon/human/avatar, mob/living/carbon/human/neo)
var/failed = FALSE
for(var/obj/item/bitrunning_disk/disk in neo.get_contents())
if(istype(disk, /obj/item/bitrunning_disk/ability))
var/obj/item/bitrunning_disk/ability/ability_disk = disk
if(isnull(ability_disk.granted_action))
failed = TRUE
continue
var/datum/action/our_action = new ability_disk.granted_action()
our_action.Grant(avatar)
continue
if(istype(disk, /obj/item/bitrunning_disk/item))
var/obj/item/bitrunning_disk/item/item_disk = disk
if(isnull(item_disk.granted_item))
failed = TRUE
continue
avatar.put_in_hands(new item_disk.granted_item())
if(failed)
to_chat(neo, span_warning("One of your disks failed to load. You must activate them to make a selection."))