[MIRROR] Portable mapping devices

This commit is contained in:
Chompstation Bot
2021-06-14 18:37:53 +00:00
parent 7e0da20bae
commit 0f30402e40
5 changed files with 8114 additions and 36 deletions

View File

@@ -7,9 +7,17 @@
#define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump) #define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump)
#define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset. #define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset.
#define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation. #define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation.
<<<<<<< HEAD
#define MAP_LEVEL_VORESPAWN 0x100 //CHOMPedit Z-levels players are allowed to late join to via vorish means. Usually non-dangerous locations. #define MAP_LEVEL_VORESPAWN 0x100 //CHOMPedit Z-levels players are allowed to late join to via vorish means. Usually non-dangerous locations.
#define MAP_LEVEL_PERSIST 0x200 // Z-levels where SSpersistence should persist between rounds //CHOMPedit bumped to 0x200 because vorespawn, hopefully this doesn't break things #define MAP_LEVEL_PERSIST 0x200 // Z-levels where SSpersistence should persist between rounds //CHOMPedit bumped to 0x200 because vorespawn, hopefully this doesn't break things
#define MAP_LEVEL_MAPPABLE 0x400 // Z-levels where SSpersistence should persist between rounds //CHOMPedit bumped to 0x400, somethingsomething don't break #define MAP_LEVEL_MAPPABLE 0x400 // Z-levels where SSpersistence should persist between rounds //CHOMPedit bumped to 0x400, somethingsomething don't break
||||||| parent of 61dfa77962... Merge pull request #10637 from VOREStation/upstream-merge-8097
#define MAP_LEVEL_PERSIST 0x100 // Z-levels where SSpersistence should persist between rounds
#define MAP_LEVEL_MAPPABLE 0x200 // Z-levels where SSpersistence should persist between rounds
=======
#define MAP_LEVEL_PERSIST 0x100 // Z-levels where SSpersistence should persist between rounds
#define MAP_LEVEL_MAPPABLE 0x200 // Z-levels where mapping units will work fully
>>>>>>> 61dfa77962... Merge pull request #10637 from VOREStation/upstream-merge-8097
// Misc map defines. // Misc map defines.
#define SUBMAP_MAP_EDGE_PAD 8 // Automatically created submaps are forbidden from being this close to the main map's edge. //VOREStation Edit #define SUBMAP_MAP_EDGE_PAD 8 // Automatically created submaps are forbidden from being this close to the main map's edge. //VOREStation Edit

View File

@@ -711,7 +711,7 @@
var/obj/item/device/mapping_unit/owner var/obj/item/device/mapping_unit/owner
var/obj/screen/mapper/extras_holder/extras_holder var/obj/screen/mapper/extras_holder/extras_holder
/obj/screen/movable/mapper_holder/New(newloc, newowner) /obj/screen/movable/mapper_holder/Initialize(mapload, newowner)
owner = newowner owner = newowner
mask_full = new(src) // Full white square mask mask_full = new(src) // Full white square mask
@@ -849,15 +849,15 @@
/obj/screen/mapper/powbutton/Click() /obj/screen/mapper/powbutton/Click()
if(!usr.checkClickCooldown()) if(!usr.checkClickCooldown())
return 1 return TRUE
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened) if(usr.stat || usr.paralysis || usr.stunned || usr.weakened)
return 1 return TRUE
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1 return TRUE
parent.powerClick() parent.powerClick()
flick("powClick",src) flick("powClick",src)
usr << get_sfx("button") usr << get_sfx("button")
return 1 return TRUE
/obj/screen/mapper/mapbutton /obj/screen/mapper/mapbutton
icon = 'icons/effects/gpshud.dmi' icon = 'icons/effects/gpshud.dmi'
@@ -867,15 +867,15 @@
/obj/screen/mapper/mapbutton/Click() /obj/screen/mapper/mapbutton/Click()
if(!usr.checkClickCooldown()) if(!usr.checkClickCooldown())
return 1 return TRUE
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened) if(usr.stat || usr.paralysis || usr.stunned || usr.weakened)
return 1 return TRUE
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1 return TRUE
parent.mapClick() parent.mapClick()
flick("mapClick",src) flick("mapClick",src)
usr << get_sfx("button") usr << get_sfx("button")
return 1 return TRUE
// Markers are 16x16, people have apparently settled on centering them on the 8,8 pixel // Markers are 16x16, people have apparently settled on centering them on the 8,8 pixel
/obj/screen/mapper/marker /obj/screen/mapper/marker

View File

@@ -286,13 +286,10 @@
continue continue
var/mob_indicator = HOLOMAP_ERROR var/mob_indicator = HOLOMAP_ERROR
var/turf/TU = get_turf(HC) var/turf/TU = get_turf(HC)
if(TU.z != T_z) // Mapper not on a turf or elsewhere
if(!TU || (TU.z != T_z))
continue continue
// Marker not on a turf
if(!TU)
continue
// We're the marker // We're the marker
if(HC == src) if(HC == src)
mob_indicator = HOLOMAP_YOU mob_indicator = HOLOMAP_YOU
@@ -342,26 +339,27 @@
handle_marker(mark,TU.x,TU.y) handle_marker(mark,TU.x,TU.y)
extras += mark extras += mark
// Marker beacon items // Marker beacon items
for(var/hb in mapping_beacons) for(var/hb in mapping_beacons)
var/obj/item/device/holomap_beacon/HB = hb var/obj/item/device/holomap_beacon/HB = hb
if(HB.mapper_filter != mapper_filter) if(HB.mapper_filter != mapper_filter)
continue continue
var/turf/TB = get_turf(HB) var/turf/TB = get_turf(HB)
if(TU.z != T_z) // Marker beacon not on a turf or elsewhere
continue if(!TB || (TB.z != T_z))
continue
var/marker_cache_key = "\ref[HB]_marker"
if(!(marker_cache_key in icon_image_cache)) var/marker_cache_key = "\ref[HB]_marker"
var/obj/screen/mapper/marker/mark = new() if(!(marker_cache_key in icon_image_cache))
mark.icon_state = "beacon" var/obj/screen/mapper/marker/mark = new()
mark.layer = 1 mark.icon_state = "beacon"
icon_image_cache[marker_cache_key] = mark mark.layer = 1
icon_image_cache[marker_cache_key] = mark
var/obj/screen/mapper/marker/mark = icon_image_cache[marker_cache_key]
handle_marker(mark,TB.x,TB.y) var/obj/screen/mapper/marker/mark = icon_image_cache[marker_cache_key]
extras += mark handle_marker(mark,TB.x,TB.y)
extras += mark
if(badmap) if(badmap)
var/obj/O = icon_image_cache["bad"] var/obj/O = icon_image_cache["bad"]
@@ -419,7 +417,7 @@
else else
in_list = FALSE in_list = FALSE
mapping_beacons -= src mapping_beacons -= src
icon_state = initial(icon_state) + in_list ? "_on" : "" icon_state = "[initial(icon_state)][in_list ? "_on" : ""]"
to_chat(user,SPAN_NOTICE("The [src] is now [in_list ? "broadcasting" : "disabled"].")) to_chat(user,SPAN_NOTICE("The [src] is now [in_list ? "broadcasting" : "disabled"]."))
/obj/item/device/holomap_beacon/Destroy() /obj/item/device/holomap_beacon/Destroy()

View File

@@ -147,6 +147,8 @@ var/list/all_maps = list()
mappable_levels = station_levels.Copy() mappable_levels = station_levels.Copy()
if(!persist_levels?.len) if(!persist_levels?.len)
persist_levels = station_levels.Copy() persist_levels = station_levels.Copy()
if(!mappable_levels?.len)
mappable_levels = station_levels.Copy()
if(!allowed_jobs || !allowed_jobs.len) if(!allowed_jobs || !allowed_jobs.len)
allowed_jobs = subtypesof(/datum/job) allowed_jobs = subtypesof(/datum/job)
if(default_skybox) //Type was specified if(default_skybox) //Type was specified

File diff suppressed because it is too large Load Diff