diff --git a/code/modules/mapping/dmm_suite.dm b/code/modules/mapping/dmm_suite.dm index d272a10673..c4ceec33ee 100644 --- a/code/modules/mapping/dmm_suite.dm +++ b/code/modules/mapping/dmm_suite.dm @@ -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. diff --git a/code/modules/mapping/ruins.dm b/code/modules/mapping/ruins.dm index dfc602e725..89d9d07a14 100644 --- a/code/modules/mapping/ruins.dm +++ b/code/modules/mapping/ruins.dm @@ -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") diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 6c445c9ceb..5e7265f043 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -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++) diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index c1d90ed0c0..df20ce5921 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -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, "This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.") @@ -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, "This uplink can only be used in a designed mining zone.") if(BAD_AREA) to_chat(user, "Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.") if(BAD_COORDS) to_chat(user, "Location is too close to the edge of the station's scanning range. Move several paces away and try again.") - if(ZONE_SET) - qdel(src) + if(BAD_TURF) + to_chat(user, "The landing zone contains turfs unsuitable for a base.") /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 diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index f2cdefa9a4..729665034e 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -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 diff --git a/code/modules/mining/equipment/mineral_scanner.dm b/code/modules/mining/equipment/mineral_scanner.dm index 52160303cc..ec3dda28a0 100644 --- a/code/modules/mining/equipment/mineral_scanner.dm +++ b/code/modules/mining/equipment/mineral_scanner.dm @@ -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 diff --git a/code/modules/mining/laborcamp/laborshuttle.dm b/code/modules/mining/laborcamp/laborshuttle.dm index f2c782c279..60983aa25a 100644 --- a/code/modules/mining/laborcamp/laborshuttle.dm +++ b/code/modules/mining/laborcamp/laborshuttle.dm @@ -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, "Cannot locate shuttle!") - return 0 - var/obj/docking_port/stationary/S = M.get_docked() - if(S && S.name == "laborcamp_away") - to_chat(usr, "Shuttle is already at the outpost!") - 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, "Cannot locate shuttle!") + return 0 + var/obj/docking_port/stationary/S = M.get_docked() + if(S && S.name == "laborcamp_away") + to_chat(usr, "Shuttle is already at the outpost!") + return 0 ..() \ No newline at end of file diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 12c9bfb30e..7b38bc4cb5 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -102,8 +102,8 @@ to_chat(usr, "No permission to dock could be granted.") 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, "Shuttle received message and will be sent shortly.") /obj/machinery/mineral/labor_claim_console/proc/check_auth() diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 6ecdc91635..340ba16373 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -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) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index fe6cd8239d..60577ea7a9 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -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" diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm index 6896a1a805..c22ba5d757 100644 --- a/code/modules/mining/machine_unloading.dm +++ b/code/modules/mining/machine_unloading.dm @@ -29,4 +29,4 @@ limit++ if (limit>=10) return - CHECK_TICK + CHECK_TICK \ No newline at end of file diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 1e298604eb..c872756872 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -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) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 6d1ba30277..ba4850eb47 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -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" \ No newline at end of file + icon_state = "miningcar" diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index f13079861a..befaef31a2 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -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)