Files
fulpstation/code/modules/mapping/mapping_helpers.dm
MMMiracles 4eeb5b361d donut outreach initiative (#46005)
make donut great again
Why It's Good For The Game

make donut great again
Changelog

cl MMMiracles (Donutstation)
tweak: The southern/north-west parts of maintenance has been revamped to include more things to dig through and places to hide from authority.
tweak: The atmos tanks have had an extra layer of space added between the windows between them and maintenance.
tweak: The permabrig has had a small B-ball court added as well as an N2O release system.
tweak: Tweaks and additions to the various department excess storage rooms through-out maintenance.
tweak: The AI core now has a more proper internal defense against ranged attacks, the tri-ai spawns have gotten similar treatment as well.
tweak: The few maintenance-facing windows have been beefed up to their stronger plasma variants.
tweak: More directional signs to help those in finding some departments.
/cl

Hey you, yeah YOU:
Got any criticism of the map? Post it here! Don't have a github? Post it in the forum feedback thread !here! Don't have a forum account? @ me on discord ("ememem" or "not a g'nome#2914")! Don't have anything? Go make one and voice your complaint somewhere that isn't the cesspool of OOC! I can only fix problems if I know about them in the first place!!!

Updated map with all changes as of 8/22:
Big o' map

Changes so far:

    Permabrig has a separate pipeline and canister port for the N2O canisters. These vents start off but officers have access to the permabrig's air alarm.
    Permabrig now has a small ball court to practice your free throws and dunking the warden in it.
    Permabrig has a small set of gym equipment to get swole while you do hard time.
    Removed some rogue R-walls near the back side of security maintenance.
    Unfucks cargo's conveyor belts.
    Chemistry now has 2 large beakers.
    The few remaining maintenance shocked grilles that managed to slip through the first pass have been removed.
    The gateway maintenance room has been renovated into a theatre excess storage and some extra misc sections.
    The space maintenance room has been renovated into a miscellaneous tool storage with some basic building material for tiders and autism-fort builders alike.
    The north-west section of the station has had it's maintenance extended to be able to reach the top of departures. Includes a toggable blast-door bridge for the shuttle ferry and some extra maintenance rooms.
    The south-western part of maintenance near Atmospherics has been redone to allow a space gap between the atmos tanks, also includes some extra rooms.
    Added a small maintenance tunnel leading into Engineering on the most-left maintenance side, branching off from Hydroponics maintenance. The Engineering Storage room has had a few extra windoors added for security to compromise.
    Small excess storage in the most-right maintenance for Engineering.
    Small bits of fluff scattered around.
    The maintenance-facing windows of areas like Genetics have been reinforced to their plasma variant.
    Bits of additional maintenance loot in various areas.
    The camera outside the upload has been changed to a normal one due to complaints about motion detecting.
    The vault access now has a camera so the AI can actually see the turret controls (oops)
    Vault now has to be initially accessed through the public hall normally with an extra airlock.
    All on-station windows have been replaced with structure spawners for said windows.
    The gateway has been moved to where the commissary currently sits due to becoming active in rounds again.
    The commissary has been moved between tool storage and the vault, in front of the vault. the maintenance areas that once sat here have been renovated as excess storage rooms for the tool storage/commissary.
    The upload and captain's office now has an extra layer of R-walls due to complaints about ease of break-in via space.
    The AI core now has some basic frontal defense against ranged weapons as well as emergency blast doors to lock down around it's central cubby-hole. The tri-ai spawns are set up to be the same as the main AI spawn spot.
    Added a couple extra EVAC directional signs since there was some apparent confusion about where it was.
    Medical now has a couple roundstart wheelchairs because why not
    Xenobio has been given an extra slime
    Xenobio has been shifted around, removing the 2nd freezer and moving the slime consoles besides the rest of their equipment.

Non-station related changes:

    Airlock Note Placer mapping helper. Allows mappers to easily place paper notes on airlocks, whether they be custom or pre-made from one of the subtypes.
2019-08-26 21:04:47 +12:00

339 lines
11 KiB
Plaintext

//Landmarks and other helpers which speed up the mapping process and reduce the number of unique instances/subtypes of items/turf/ect
/obj/effect/baseturf_helper //Set the baseturfs of every turf in the /area/ it is placed.
name = "baseturf editor"
icon = 'icons/effects/mapping_helpers.dmi'
icon_state = ""
var/list/baseturf_to_replace
var/baseturf
layer = POINT_LAYER
/obj/effect/baseturf_helper/Initialize()
. = ..()
return INITIALIZE_HINT_LATELOAD
/obj/effect/baseturf_helper/LateInitialize()
if(!baseturf_to_replace)
baseturf_to_replace = typecacheof(list(/turf/open/space,/turf/baseturf_bottom))
else if(!length(baseturf_to_replace))
baseturf_to_replace = list(baseturf_to_replace = TRUE)
else if(baseturf_to_replace[baseturf_to_replace[1]] != TRUE) // It's not associative
var/list/formatted = list()
for(var/i in baseturf_to_replace)
formatted[i] = TRUE
baseturf_to_replace = formatted
var/area/our_area = get_area(src)
for(var/i in get_area_turfs(our_area, z))
replace_baseturf(i)
qdel(src)
/obj/effect/baseturf_helper/proc/replace_baseturf(turf/thing)
var/list/baseturf_cache = thing.baseturfs
if(length(baseturf_cache))
for(var/i in baseturf_cache)
if(baseturf_to_replace[i])
baseturf_cache -= i
if(!baseturf_cache.len)
thing.assemble_baseturfs(baseturf)
else
thing.PlaceOnBottom(null, baseturf)
else if(baseturf_to_replace[thing.baseturfs])
thing.assemble_baseturfs(baseturf)
else
thing.PlaceOnBottom(null, baseturf)
/obj/effect/baseturf_helper/space
name = "space baseturf editor"
baseturf = /turf/open/space
/obj/effect/baseturf_helper/asteroid
name = "asteroid baseturf editor"
baseturf = /turf/open/floor/plating/asteroid
/obj/effect/baseturf_helper/asteroid/airless
name = "asteroid airless baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/airless
/obj/effect/baseturf_helper/asteroid/basalt
name = "asteroid basalt baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/basalt
/obj/effect/baseturf_helper/asteroid/snow
name = "asteroid snow baseturf editor"
baseturf = /turf/open/floor/plating/asteroid/snow
/obj/effect/baseturf_helper/beach/sand
name = "beach sand baseturf editor"
baseturf = /turf/open/floor/plating/beach/sand
/obj/effect/baseturf_helper/beach/water
name = "water baseturf editor"
baseturf = /turf/open/floor/plating/beach/water
/obj/effect/baseturf_helper/lava
name = "lava baseturf editor"
baseturf = /turf/open/lava/smooth
/obj/effect/baseturf_helper/lava_land/surface
name = "lavaland baseturf editor"
baseturf = /turf/open/lava/smooth/lava_land_surface
/obj/effect/mapping_helpers
icon = 'icons/effects/mapping_helpers.dmi'
icon_state = ""
var/late = FALSE
/obj/effect/mapping_helpers/Initialize()
..()
return late ? INITIALIZE_HINT_LATELOAD : INITIALIZE_HINT_QDEL
//airlock helpers
/obj/effect/mapping_helpers/airlock
layer = DOOR_HELPER_LAYER
/obj/effect/mapping_helpers/airlock/Initialize(mapload)
. = ..()
if(!mapload)
log_mapping("[src] spawned outside of mapload!")
return
var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in loc
if(!airlock)
log_mapping("[src] failed to find an airlock at [AREACOORD(src)]")
else
payload(airlock)
/obj/effect/mapping_helpers/airlock/proc/payload(obj/machinery/door/airlock/payload)
return
/obj/effect/mapping_helpers/airlock/cyclelink_helper
name = "airlock cyclelink helper"
icon_state = "airlock_cyclelink_helper"
/obj/effect/mapping_helpers/airlock/cyclelink_helper/payload(obj/machinery/door/airlock/airlock)
if(airlock.cyclelinkeddir)
log_mapping("[src] at [AREACOORD(src)] tried to set [airlock] cyclelinkeddir, but it's already set!")
else
airlock.cyclelinkeddir = dir
/obj/effect/mapping_helpers/airlock/locked
name = "airlock lock helper"
icon_state = "airlock_locked_helper"
/obj/effect/mapping_helpers/airlock/locked/payload(obj/machinery/door/airlock/airlock)
if(airlock.locked)
log_mapping("[src] at [AREACOORD(src)] tried to bolt [airlock] but it's already locked!")
else
airlock.locked = TRUE
/obj/effect/mapping_helpers/airlock/unres
name = "airlock unresctricted side helper"
icon_state = "airlock_unres_helper"
/obj/effect/mapping_helpers/airlock/unres/payload(obj/machinery/door/airlock/airlock)
airlock.unres_sides ^= dir
/obj/effect/mapping_helpers/airlock/abandoned
name = "airlock abandoned helper"
icon_state = "airlock_abandoned"
/obj/effect/mapping_helpers/airlock/abandoned/payload(obj/machinery/door/airlock/airlock)
if(airlock.abandoned)
log_mapping("[src] at [AREACOORD(src)] tried to make [airlock] abandoned but it's already abandoned!")
else
airlock.abandoned = TRUE
//needs to do its thing before spawn_rivers() is called
INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
/obj/effect/mapping_helpers/no_lava
icon_state = "no_lava"
/obj/effect/mapping_helpers/no_lava/Initialize()
. = ..()
var/turf/T = get_turf(src)
T.flags_1 |= NO_LAVA_GEN_1
//This helper applies components to things on the map directly.
/obj/effect/mapping_helpers/component_injector
name = "Component Injector"
late = TRUE
var/target_type
var/target_name
var/component_type
//Late init so everything is likely ready and loaded (no warranty)
/obj/effect/mapping_helpers/component_injector/LateInitialize()
if(!ispath(component_type,/datum/component))
CRASH("Wrong component type in [type] - [component_type] is not a component")
var/turf/T = get_turf(src)
for(var/atom/A in T.GetAllContents())
if(A == src)
continue
if(target_name && A.name != target_name)
continue
if(target_type && !istype(A,target_type))
continue
var/cargs = build_args()
A.AddComponent(arglist(cargs))
qdel(src)
return
/obj/effect/mapping_helpers/component_injector/proc/build_args()
return list(component_type)
/obj/effect/mapping_helpers/component_injector/infective
name = "Infective Injector"
icon_state = "component_infective"
component_type = /datum/component/infective
var/disease_type
/obj/effect/mapping_helpers/component_injector/infective/build_args()
if(!ispath(disease_type,/datum/disease))
CRASH("Wrong disease type passed in.")
var/datum/disease/D = new disease_type()
return list(component_type,D)
/obj/effect/mapping_helpers/dead_body_placer
name = "Dead Body placer"
late = TRUE
icon_state = "deadbodyplacer"
var/bodycount = 2 //number of bodies to spawn
/obj/effect/mapping_helpers/dead_body_placer/LateInitialize()
var/area/a = get_area(src)
var/list/trays = list()
for (var/i in a.contents)
if (istype(i, /obj/structure/bodycontainer/morgue))
trays += i
if(!trays.len)
log_mapping("[src] at [x],[y] could not find any morgues.")
return
for (var/i = 1 to bodycount)
var/obj/structure/bodycontainer/morgue/j = pick(trays)
var/mob/living/carbon/human/h = new /mob/living/carbon/human(j, 1)
h.death()
for (var/part in h.internal_organs) //randomly remove organs from each body, set those we keep to be in stasis
if (prob(40))
qdel(part)
else
var/obj/item/organ/O = part
O.organ_flags |= ORGAN_FROZEN
j.update_icon()
qdel(src)
//On Ian's birthday, the hop's office is decorated.
/obj/effect/mapping_helpers/ianbirthday
name = "Ian's Bday Helper"
late = TRUE
icon_state = "iansbdayhelper"
var/balloon_clusters = 2
/obj/effect/mapping_helpers/ianbirthday/LateInitialize()
if(locate(/datum/holiday/ianbirthday) in SSevents.holidays)
birthday()
qdel(src)
/obj/effect/mapping_helpers/ianbirthday/proc/birthday()
var/area/a = get_area(src)
var/list/table = list()//should only be one aka the front desk, but just in case...
var/list/openturfs = list()
//confetti and a corgi balloon! (and some list stuff for more decorations)
for(var/thing in a.contents)
if(istype(thing, /obj/structure/table/reinforced))
table += thing
if(isopenturf(thing))
new /obj/effect/decal/cleanable/confetti(thing)
if(locate(/obj/structure/bed/dogbed/ian) in thing)
new /obj/item/toy/balloon/corgi(thing)
else
openturfs += thing
//cake + knife to cut it!
var/turf/food_turf = get_turf(pick(table))
new /obj/item/kitchen/knife(food_turf)
var/obj/item/reagent_containers/food/snacks/store/cake/birthday/iancake = new(food_turf)
iancake.desc = "Happy birthday, Ian!"
//some balloons! this picks an open turf and pops a few balloons in and around that turf, yay.
for(var/i in 1 to balloon_clusters)
var/turf/clusterspot = pick_n_take(openturfs)
new /obj/item/toy/balloon(clusterspot)
var/balloons_left_to_give = 3 //the amount of balloons around the cluster
var/list/dirs_to_balloon = GLOB.cardinals.Copy()
while(balloons_left_to_give > 0)
balloons_left_to_give--
var/chosen_dir = pick_n_take(dirs_to_balloon)
var/turf/balloonstep = get_step(clusterspot, chosen_dir)
var/placed = FALSE
if(isopenturf(balloonstep))
var/obj/item/toy/balloon/B = new(balloonstep)//this clumps the cluster together
placed = TRUE
if(chosen_dir == NORTH)
B.pixel_y -= 10
if(chosen_dir == SOUTH)
B.pixel_y += 10
if(chosen_dir == EAST)
B.pixel_x -= 10
if(chosen_dir == WEST)
B.pixel_x += 10
if(!placed)
new /obj/item/toy/balloon(clusterspot)
//remind me to add wall decor!
/obj/effect/mapping_helpers/ianbirthday/admin//so admins may birthday any room
name = "generic birthday setup"
icon_state = "bdayhelper"
/obj/effect/mapping_helpers/ianbirthday/admin/LateInitialize()
birthday()
qdel(src)
//lets mappers place notes on airlocks with custom info or a pre-made note from a path
/obj/effect/mapping_helpers/airlock_note_placer
name = "Airlock Note Placer"
late = TRUE
icon_state = "airlocknoteplacer"
var/note_info //for writing out custom notes without creating an extra paper subtype
var/note_name //custom note name
var/note_path //if you already have something wrote up in a paper subtype, put the path here
/obj/effect/mapping_helpers/airlock_note_placer/LateInitialize()
var/turf/turf = get_turf(src)
if(note_path && !istype(note_path, /obj/item/paper)) //don't put non-paper in the paper slot thank you
log_mapping("[src] at [x],[y] had an improper note_path path, could not place paper note.")
qdel(src)
if(locate(/obj/machinery/door/airlock) in turf)
var/obj/machinery/door/airlock/found_airlock = locate(/obj/machinery/door/airlock) in turf
if(note_path)
found_airlock.note = note_path
found_airlock.update_icon()
qdel(src)
if(note_info)
var/obj/item/paper/paper = new /obj/item/paper(src)
if(note_name)
paper.name = note_name
paper.info = "[note_info]"
found_airlock.note = paper
paper.forceMove(found_airlock)
found_airlock.update_icon()
qdel(src)
log_mapping("[src] at [x],[y] had no note_path or note_info, cannot place paper note.")
qdel(src)
log_mapping("[src] at [x],[y] could not find an airlock on current turf, cannot place paper note.")
qdel(src)