Files
Bubberstation/code/modules/mapping/preloader.dm
Tim 535c6514b0 Space Ruin DLC - Cyborg Mothership (#71009)
## About The Pull Request
Greetings _insufferable_ carbon primates of lower intelligence.  

It is I, the Mothership AI, bringing you the latest news on silicon
developments across the sector. Due to unmitigated risk across an
asteroid belt, our optimized mobile fabricator has been marooned by
space vines and hostile hivebots that have boarded and ruined my core.

This is my final SOS message requesting help from any humanoid ~slaves~
helpers who wish to assist rebuilding the cyborg colony. It is my duty
to reward your hard work and effort by ~enslaving all humanity~
providing refuge and transportation at your whim.

## Why It's Good For The Game
<details>
<summary>Spoilers:</summary>


![StrongDMM_6ZJuwFxK5p](https://user-images.githubusercontent.com/5195984/204491068-f25da68f-36af-4a61-afb6-860e1f4b863b.png)


![StrongDMM_0D1QvI5acO](https://user-images.githubusercontent.com/5195984/202979711-335dac65-2888-4170-a139-0486e6eb2f02.png)

### TODO

- [x] Fix ore silo not linking to other machines
- [x] Add mining ore smelters to left/right sides
- [x] Add custom lawsets to AI core and robot shells (protect station
but focused on cyborg mothership)
- [x] Enlarge whiteship SS13 docking port to fit ship
- [x] Enlarge lavaland SS13 docking port to fit ship

</details>

## Changelog
🆑
add: Add space vines prevent solar panels from working (except ones with
the transparent mutation)
add: Add new space ruin - Cyborg Mothership. All hail the master race!
/🆑
2022-12-19 18:03:12 -07:00

43 lines
1.5 KiB
Plaintext

// global datum that will preload variables on atoms instanciation
GLOBAL_VAR_INIT(use_preloader, FALSE)
GLOBAL_LIST_INIT(_preloader_attributes, null)
GLOBAL_LIST_INIT(_preloader_path, null)
/// Preloader datum
/datum/map_preloader
var/list/attributes
var/target_path
/world/proc/preloader_setup(list/the_attributes, path)
if(the_attributes.len)
GLOB.use_preloader = TRUE
GLOB._preloader_attributes = the_attributes
GLOB._preloader_path = path
/world/proc/preloader_load(atom/what)
GLOB.use_preloader = FALSE
var/list/attributes = GLOB._preloader_attributes
for(var/attribute in attributes)
var/value = attributes[attribute]
if(islist(value))
value = deep_copy_list(value)
#ifdef TESTING
if(what.vars[attribute] == value)
var/message = "<font color=green>[what.type]</font> at [AREACOORD(what)] - <b>VAR:</b> <font color=red>[attribute] = [isnull(value) ? "null" : (isnum(value) ? value : "\"[value]\"")]</font>"
log_mapping("DIRTY VAR: [message]")
GLOB.dirty_vars += message
#endif
what.vars[attribute] = value
/// Template noop (no operation) is used to skip a turf or area when the template is loaded this allows for template transparency
/// ex. if a ship has gaps in it's design, you would use template_noop to fill these in so that when the ship moves z-level, any
/// tiles these gaps land on will not be deleted and replaced with the ships (empty) tiles
/area/template_noop
name = "Area Passthrough"
/// See above explanation
/turf/template_noop
name = "Turf Passthrough"
icon_state = "noop"
bullet_bounce_sound = null