mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-14 12:12:37 +00:00
Largely ported from the work done at Baystation in Baystation12#17460 and later commits.
- Shuttles no longer require a separate area for each location they jump to.
Instead destinations are indicated by landmark objects, which are not necessarily exclusive to that shuttle.
This means that more than one shuttle could use the same docking port (not at the same time of course).
- Enhanced shuttle control computers to use nanoui if they didn't.
- Organizes shuttle datum code a bit better so there is less re-inventing the wheel in subtypes.
- Allows the possibility of shuttles (or destinations) that start on late-loaded maps.
- Deprecate the "extra" shuttle areas that are no longer needed and update shuttle areas in unit tests
This all required a bit of infrastructure improvements.
- ChangeArea proc, for changing the area of a turf.
- Fixed lighting overlays actually being able to be destroyed.
- Added a few utility macros and procs.
- Added "turf translation" procs which are like move_contents_to but more flexible.
(cherry picked from commit c837078105)
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
#define span(class, text) ("<span class='[class]'>[text]</span>")
|
|
|
|
#define get_turf(A) get_step(A,0)
|
|
|
|
#define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
|
|
|
#define to_chat(target, message) target << message
|
|
#define to_world(message) to_chat(world, message)
|
|
#define to_world_log(message) world.log << message
|
|
// TODO - Baystation has this log to crazy places. For now lets just world.log, but maybe look into it later.
|
|
#define log_world(message) to_world_log(message)
|
|
#define to_file(file_entry, source_var) file_entry << source_var
|
|
#define from_file(file_entry, target_var) file_entry >> target_var
|
|
#define show_browser(target, browser_content, browser_name) target << browse(browser_content, browser_name)
|
|
#define send_rsc(target, rsc_content, rsc_name) target << browse_rsc(rsc_content, rsc_name)
|
|
#define open_link(target, url) target << link(url)
|
|
|
|
// From TG, might be useful to have.
|
|
// Didn't port SEND_TEXT() since to_chat() appears to serve the same purpose.
|
|
#define DIRECT_OUTPUT(A, B) A << B
|
|
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
|
|
#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
|
|
//#define WRITE_LOG is in logging.dm
|
|
|
|
#define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE)
|
|
|
|
#define qdel_null(x) if(x) { qdel(x) ; x = null }
|
|
|
|
#define sequential_id(key) uniqueness_repository.Generate(/datum/uniqueness_generator/id_sequential, key)
|
|
|
|
#define random_id(key,min_id,max_id) uniqueness_repository.Generate(/datum/uniqueness_generator/id_random, key, min_id, max_id)
|
|
|
|
#define ARGS_DEBUG log_debug("[__FILE__] - [__LINE__]") ; for(var/arg in args) { log_debug("\t[log_info_line(arg)]") }
|