mapping to mining, preparing for mob folder

This commit is contained in:
deathride58
2018-01-04 00:55:01 -05:00
parent 5dc3f29ad4
commit cffbbbbbd1
14 changed files with 67 additions and 57 deletions

View File

@@ -27,7 +27,7 @@ dmm_suite{
write_map(), which accepts three arguments:
- A turf representing one corner of a three dimensional grid (Required).
- Another turf representing the other corner of the same grid (Required).
- Any, or a combination, of several bit flags_1 (Optional, see documentation).
- Any, or a combination, of several bit flags (Optional, see documentation).
The order in which the turfs are supplied does not matter, the /dmm_writer will
determine the grid containing both, in much the same way as DM's block() function.

View File

@@ -1,3 +1,5 @@
/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins)
if(!z_levels || !z_levels.len)
WARNING("No Z levels provided - Not generating ruins")

View File

@@ -11,8 +11,8 @@
var/codelen = 4
tamperproof = 90
/obj/structure/closet/crate/secure/loot/New()
..()
/obj/structure/closet/crate/secure/loot/Initialize()
. = ..()
var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
code = ""
for(var/i = 0, i < codelen, i++)

View File

@@ -1,9 +1,10 @@
///Mining Base////
#define ZONE_SET 0
#define BAD_ZLEVEL 1
#define BAD_AREA 2
#define BAD_COORDS 3
#define ZONE_SET 4
#define BAD_TURF 4
/area/shuttle/auxillary_base
name = "Auxillary Base"
@@ -134,7 +135,6 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public"
/obj/machinery/computer/auxillary_base/proc/set_landing_zone(turf/T, mob/user, var/no_restrictions)
var/obj/docking_port/mobile/auxillary_base/base_dock = locate(/obj/docking_port/mobile/auxillary_base) in SSshuttle.mobile
if(!base_dock) //Not all maps have an Aux base. This object is useless in that case.
to_chat(user, "<span class='warning'>This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.</span>")
@@ -148,13 +148,18 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
if(!is_mining_level(T.z))
return BAD_ZLEVEL
var/colony_radius = max(base_dock.width, base_dock.height)*0.5
if(T.x - colony_radius < 1 || T.x + colony_radius >= world.maxx || T.y - colony_radius < 1 || T.y + colony_radius >= world.maxx)
return BAD_COORDS //Avoid dropping the base too close to map boundaries, as it results in parts of it being left in space
var/list/area_counter = get_areas_in_range(colony_radius, T)
if(area_counter.len > 1) //Avoid smashing ruins unless you are inside a really big one
return BAD_AREA
var/colony_radius = CEILING(max(base_dock.width, base_dock.height)*0.5, 1)
var/list/colony_turfs = block(locate(T.x - colony_radius, T.y - colony_radius, T.z), locate(T.x + colony_radius, T.y + colony_radius, T.z))
for(var/i in 1 to colony_turfs.len)
CHECK_TICK
var/turf/place = colony_turfs[i]
if(!place)
return BAD_COORDS
if(!istype(place.loc, /area/lavaland/surface))
return BAD_AREA
if(disallowed_turf_types[place.type])
return BAD_TURF
var/area/A = get_area(T)
@@ -214,14 +219,16 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
return
switch(AB.set_landing_zone(T, user, no_restrictions))
if(ZONE_SET)
qdel(src)
if(BAD_ZLEVEL)
to_chat(user, "<span class='warning'>This uplink can only be used in a designed mining zone.</span>")
if(BAD_AREA)
to_chat(user, "<span class='warning'>Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.</span>")
if(BAD_COORDS)
to_chat(user, "<span class='warning'>Location is too close to the edge of the station's scanning range. Move several paces away and try again.</span>")
if(ZONE_SET)
qdel(src)
if(BAD_TURF)
to_chat(user, "<span class='warning'>The landing zone contains turfs unsuitable for a base.</span>")
/obj/item/device/assault_pod/mining/unrestricted
name = "omni-locational landing field designator"
@@ -354,7 +361,8 @@ obj/docking_port/stationary/public_mining_dock
/obj/structure/mining_shuttle_beacon/attack_robot(mob/user)
return attack_hand(user) //So borgies can help
#undef ZONE_SET
#undef BAD_ZLEVEL
#undef BAD_AREA
#undef BAD_COORDS
#undef ZONE_SET
#undef BAD_TURF

View File

@@ -43,8 +43,8 @@
..()
w_class = mask_adjusted ? WEIGHT_CLASS_NORMAL : WEIGHT_CLASS_SMALL
/obj/item/clothing/mask/gas/explorer/folded/New()
..()
/obj/item/clothing/mask/gas/explorer/folded/Initialize()
. = ..()
adjustmask()
/obj/item/clothing/suit/space/hostile_environment

View File

@@ -71,7 +71,7 @@
plane = FULLSCREEN_PLANE
layer = FLASH_LAYER
icon = 'icons/effects/ore_visuals.dmi'
appearance_flags = 0 //to avoid having TILE_BOUND in the flags_1, so that the 480x480 icon states let you see it no matter where you are
appearance_flags = 0 //to avoid having TILE_BOUND in the flags, so that the 480x480 icon states let you see it no matter where you are
duration = 35
pixel_x = -224
pixel_y = -224

View File

@@ -1,27 +1,27 @@
/obj/machinery/computer/shuttle/labor
name = "labor shuttle console"
desc = "Used to call and send the labor camp shuttle."
circuit = /obj/item/circuitboard/computer/labor_shuttle
shuttleId = "laborcamp"
possible_destinations = "laborcamp_home;laborcamp_away"
/obj/machinery/computer/shuttle/labor
name = "labor shuttle console"
desc = "Used to call and send the labor camp shuttle."
circuit = /obj/item/circuitboard/computer/labor_shuttle
shuttleId = "laborcamp"
possible_destinations = "laborcamp_home;laborcamp_away"
req_access = list(ACCESS_BRIG)
/obj/machinery/computer/shuttle/labor/one_way
name = "prisoner shuttle console"
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
possible_destinations = "laborcamp_away"
circuit = /obj/item/circuitboard/computer/labor_shuttle/one_way
req_access = list( )
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
if(href_list["move"])
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
if(!M)
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
to_chat(usr, "<span class='warning'>Shuttle is already at the outpost!</span>")
return 0
/obj/machinery/computer/shuttle/labor/one_way
name = "prisoner shuttle console"
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
possible_destinations = "laborcamp_away"
circuit = /obj/item/circuitboard/computer/labor_shuttle/one_way
req_access = list( )
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
if(href_list["move"])
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
if(!M)
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
to_chat(usr, "<span class='warning'>Shuttle is already at the outpost!</span>")
return 0
..()

View File

@@ -102,8 +102,8 @@
to_chat(usr, "<span class='notice'>No permission to dock could be granted.</span>")
else
if(!emagged)
Radio.set_frequency(GLOB.SEC_FREQ)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", GLOB.SEC_FREQ, get_spans(), get_default_language())
Radio.set_frequency(FREQ_SECURITY)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY, get_spans(), get_default_language())
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
/obj/machinery/mineral/labor_claim_console/proc/check_auth()

View File

@@ -20,8 +20,8 @@
var/regrowth_time_low = 4800
var/regrowth_time_high = 8400
/obj/structure/flora/ash/New()
..()
/obj/structure/flora/ash/Initialize()
. = ..()
base_icon = "[icon_state][rand(1, 4)]"
icon_state = base_icon
if(prob(15))
@@ -153,8 +153,8 @@
max_integrity = 100
seed = /obj/item/seeds/lavaland/polypore
/obj/item/reagent_containers/food/snacks/grown/ash_flora/New()
..()
/obj/item/reagent_containers/food/snacks/grown/ash_flora/Initialize()
. = ..()
pixel_x = rand(-4, 4)
pixel_y = rand(-4, 4)

View File

@@ -107,6 +107,7 @@
/datum/design/unique_modkit
category = list("Mining Designs", "Cyborg Upgrade Modules") //can't be normally obtained
build_type = PROTOLATHE | MECHFAB
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/datum/design/unique_modkit/offensive_turf_aoe
name = "Kinetic Accelerator Offensive Mining Explosion Mod"

View File

@@ -29,4 +29,4 @@
limit++
if (limit>=10)
return
CHECK_TICK
CHECK_TICK

View File

@@ -276,8 +276,8 @@
name = "mining conscription kit"
desc = "A kit containing everything a crewmember needs to support a shaft miner in the field."
/obj/item/storage/backpack/duffelbag/mining_conscript/New()
..()
/obj/item/storage/backpack/duffelbag/mining_conscript/Initialize()
. = ..()
new /obj/item/pickaxe/mini(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/device/t_scanner/adv_mining_scanner/lesser(src)

View File

@@ -8,8 +8,8 @@
var/set_luminosity = 8
var/set_cap = 0
/obj/effect/light_emitter/New()
..()
/obj/effect/light_emitter/Initialize()
. = ..()
set_light(set_luminosity, set_cap)
/obj/effect/light_emitter/singularity_pull()
@@ -73,7 +73,6 @@
possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public"
no_destination_swap = 1
var/global/list/dumb_rev_heads = list()
req_access = list(ACCESS_MINING) // should slow the ashwalkers down.
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user)
if(is_station_level(user.z) && user.mind && is_head_revolutionary(user) && !(user.mind in dumb_rev_heads))
@@ -87,4 +86,4 @@
/obj/structure/closet/crate/miningcar
desc = "A mining car. This one doesn't work on rails, but has to be dragged."
name = "Mining car (not for rails)"
icon_state = "miningcar"
icon_state = "miningcar"

View File

@@ -14,8 +14,8 @@
can_hold = list(/obj/item/coin, /obj/item/stack/spacecash)
/obj/item/storage/bag/money/vault/New()
..()
/obj/item/storage/bag/money/vault/Initialize()
. = ..()
new /obj/item/coin/silver(src)
new /obj/item/coin/silver(src)
new /obj/item/coin/silver(src)