mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-23 15:14:43 +01:00
b804e1df79
## About The Pull Request <img width="565" height="201" alt="image" src="https://github.com/user-attachments/assets/f747992c-82d7-4cd2-9d5c-b94b7de37cdd" /> <img width="618" height="108" alt="image" src="https://github.com/user-attachments/assets/8d5c4e25-87ea-4e53-b9e6-e95e26b3e69f" /> - N-spect scanners can no longer print reports - Clown N-spect scanners have been removed as printing reports was their primary function - Security no longer get bounties to loot the brig's equipment. The contraband bounty is still available. - Patrol bounties have been reworked. - A patrol bounty will give you an area and a number of steps that you must take in an area. - To complete the bounty, you must walk to the area and take that many steps. It's that simple. - Your ID card will update you as you progress the bounty. - You are rewarded more for larger areas, and less for teeny tiny areas. - Walking back and forth the same two tiles will not count towards progress. - When done, all you need to do is go back to the civ console and press "send". You don't need to add any items to the pad. - All security officers can get general patrol bounties (service + maint + hallways). Departmental officers can get patrol bounties for their department. - And yes, it tracks if your *id card* moves. This means you can strap your ID card to a drone and it'll count. Get creative if you're lazy. - ID trims how handle bounty generation. This changes very little, besides allowing certain trims for certain jobs to add specific bounties. - There's now setters for bounties and bank accounts. - Fix Bountious Bounty trait by having a `get_reward` ## Why It's Good For The Game Sec bounties to loot a bunch of miscellaneous things from the brig is... odd. All it does is deprive your team of equipment should you need it. On the other hand, patrol bounties are really flavorful, but a bit cumbersome thanks to needing a hand scanner. By integrating the process of patrolling *into* the officer's ID card, it means you can just grab a bounty and go about your business. The idea is that this'll streamline the process of patrolling a bit and make it more natural and fun (well, as fun as "walking around" can be. Which is fun to me...) ## Changelog 🆑 Melbert del: N-spect scanners can no longer print reports. All it does now is scan for contraband. del: Clown N-spect scanners have been removed. del: Security no longer get bounties to loot the brig's equipment. Though the contraband bounty is still available. add: Security's patrol bounties have been reworked. Now, they just require you to walk around an area for a bit. No scanning necessary. refactor: Adds setters for bounties and bank accounts. Report any situations where your bank account is not set correctly. refactor: ID trims now handle bounty generation. Report any situations where you get a weird pool of bounties. fix: Bountious Bounties station trait works again /🆑
161 lines
5.4 KiB
Plaintext
161 lines
5.4 KiB
Plaintext
/// Attempts to spawn a crate twice based on the list of available locations
|
|
/obj/machinery/quantum_server/proc/attempt_spawn_cache(list/possible_turfs)
|
|
if(!length(possible_turfs))
|
|
return TRUE
|
|
|
|
shuffle_inplace(possible_turfs)
|
|
var/turf/chosen_turf = validate_turf(pick(possible_turfs))
|
|
|
|
if(isnull(chosen_turf))
|
|
possible_turfs.Remove(chosen_turf)
|
|
chosen_turf = validate_turf(pick(possible_turfs))
|
|
if(isnull(chosen_turf))
|
|
CRASH("vdom: after two attempts, could not find a valid turf for cache")
|
|
|
|
new /obj/structure/closet/crate/secure/bitrunning/encrypted(chosen_turf)
|
|
return TRUE
|
|
|
|
|
|
/// Attempts to spawn a lootbox
|
|
/obj/machinery/quantum_server/proc/attempt_spawn_curiosity(list/possible_turfs)
|
|
if(!length(possible_turfs)) // Out of turfs to place a curiosity
|
|
return FALSE
|
|
|
|
if(generated_domain.secondary_loot_generated >= counterlist_sum(generated_domain.secondary_loot)) // Out of curiosities to place
|
|
return FALSE
|
|
|
|
shuffle_inplace(possible_turfs)
|
|
var/turf/chosen_turf = validate_turf(pick(possible_turfs))
|
|
|
|
if(isnull(chosen_turf))
|
|
possible_turfs.Remove(chosen_turf)
|
|
chosen_turf = validate_turf(pick(possible_turfs))
|
|
if(isnull(chosen_turf))
|
|
CRASH("vdom: after two attempts, could not find a valid turf for curiosity")
|
|
|
|
new /obj/item/storage/lockbox/bitrunning/encrypted(chosen_turf)
|
|
return chosen_turf
|
|
|
|
|
|
/// Generates a new avatar for the bitrunner.
|
|
/obj/machinery/quantum_server/proc/generate_avatar(turf/destination, datum/outfit/netsuit)
|
|
var/mob/living/carbon/human/avatar = new(destination)
|
|
|
|
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.ears = null
|
|
to_wear.glasses = null
|
|
to_wear.gloves = null
|
|
to_wear.l_pocket = null
|
|
to_wear.r_pocket = null
|
|
to_wear.suit = null
|
|
to_wear.suit_store = null
|
|
|
|
avatar.equipOutfit(to_wear, visuals_only = TRUE)
|
|
|
|
var/obj/item/clothing/under/jumpsuit = avatar.w_uniform
|
|
if(istype(jumpsuit))
|
|
jumpsuit.set_armor(/datum/armor/clothing_under)
|
|
|
|
var/obj/item/clothing/head/hat = locate() in avatar.get_equipped_items()
|
|
if(istype(hat))
|
|
hat.set_armor(/datum/armor/none)
|
|
|
|
if(!generated_domain.forced_outfit)
|
|
for(var/obj/thing in avatar.held_items)
|
|
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.set_account(new /datum/bank_account)
|
|
outfit_id.registered_account.replaceable = FALSE
|
|
|
|
SSid_access.apply_trim_to_card(outfit_id, /datum/id_trim/bit_avatar)
|
|
|
|
avatar.AddComponent( \
|
|
/datum/component/simple_bodycam, \
|
|
camera_name = "bitrunner bodycam", \
|
|
c_tag = "Avatar [avatar.real_name]", \
|
|
network = BITRUNNER_CAMERA_NET, \
|
|
emp_proof = TRUE, \
|
|
)
|
|
|
|
return avatar
|
|
|
|
|
|
/// Loads in any mob segments of the map
|
|
/obj/machinery/quantum_server/proc/load_mob_segments()
|
|
if(!length(generated_domain.mob_modules))
|
|
return TRUE
|
|
|
|
var/current_index = 1
|
|
shuffle_inplace(generated_domain.mob_modules)
|
|
|
|
for(var/obj/effect/landmark/bitrunning/mob_segment/landmark in GLOB.landmarks_list)
|
|
if(current_index > length(generated_domain.mob_modules))
|
|
stack_trace("vdom: mobs segments are set to unique, but there are more landmarks than available segments")
|
|
return FALSE
|
|
|
|
var/path
|
|
if(generated_domain.modular_unique_mobs)
|
|
path = generated_domain.mob_modules[current_index]
|
|
current_index += 1
|
|
else
|
|
path = pick(generated_domain.mob_modules)
|
|
|
|
var/datum/modular_mob_segment/segment = new path()
|
|
|
|
var/list/mob_spawns = landmark.spawn_mobs(get_turf(landmark), segment)
|
|
if(length(mob_spawns))
|
|
mutation_candidate_refs += mob_spawns
|
|
|
|
qdel(landmark)
|
|
qdel(segment)
|
|
|
|
return TRUE
|
|
|
|
|
|
/// 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, datum/lazy_template/virtual_domain/generated_domain)
|
|
var/domain_forbids_flags = generated_domain.domain_flags
|
|
|
|
var/import_ban = list()
|
|
var/disk_ban = list()
|
|
if(domain_forbids_flags & DOMAIN_FORBIDS_ITEMS)
|
|
import_ban += "smuggled digital equipment"
|
|
disk_ban += "items"
|
|
if(domain_forbids_flags & DOMAIN_FORBIDS_ABILITIES)
|
|
import_ban += "imported_abilities"
|
|
disk_ban += "powers"
|
|
|
|
if(length(import_ban))
|
|
to_chat(neo, span_warning("This domain forbids the use of [english_list(import_ban)], your externally loaded [english_list(disk_ban)] will not be granted!"))
|
|
|
|
var/return_flags = NONE
|
|
return_flags = SEND_SIGNAL(neo, COMSIG_BITRUNNER_STOCKING_GEAR, avatar, domain_forbids_flags)
|
|
|
|
if(return_flags & BITRUNNER_GEAR_LOAD_FAILED)
|
|
to_chat(neo, span_warning("At least one of your external data sources has encountered a failure in its loading process. Check for overlapping or inactive disks."))
|
|
if(return_flags & BITRUNNER_GEAR_LOAD_BLOCKED)
|
|
to_chat(neo, span_warning("At least one of your external data sources has been blocked from fully loading. Check domain restrictions."))
|
|
|
|
var/obj/item/organ/brain/neo_brain = neo.get_organ_slot(ORGAN_SLOT_BRAIN)
|
|
for(var/obj/item/skillchip/skill_chip as anything in neo_brain?.skillchips)
|
|
if(!skill_chip.active)
|
|
continue
|
|
var/obj/item/skillchip/clone_chip = new skill_chip.type
|
|
avatar.implant_skillchip(clone_chip, force = TRUE)
|
|
clone_chip.try_activate_skillchip(silent = TRUE, force = TRUE)
|