Merge pull request #5547 from Zuhayr/mining

Mining rework part 2, rebalance.
This commit is contained in:
Chinsky
2014-07-11 03:46:11 +04:00
8 changed files with 142 additions and 48 deletions
+10 -8
View File
@@ -144,8 +144,10 @@ var/list/admin_verbs_debug = list(
/client/proc/cmd_debug_tog_aliens,
/client/proc/air_report,
/client/proc/reload_admins,
/client/proc/reload_mentors,
/client/proc/reload_mentors,
/client/proc/restart_controller,
/client/proc/remake_distribution_map,
/client/proc/show_distribution_map,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/toggledebuglogs,
@@ -585,22 +587,22 @@ var/list/admin_verbs_mentor = list(
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the disease [D].", 1)
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
set category = "Fun"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/greater = ((input("Is this a lesser or greater disease?", "Give Disease") in list("Lesser", "Greater")) == "Greater")
D.makerandom(greater)
if (!greater)
D.infectionchance = 1
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
if (H.species)
@@ -609,7 +611,7 @@ var/list/admin_verbs_mentor = list(
var/mob/living/carbon/monkey/M = T
D.affected_species = list(M.greaterform)
infect_virus2(T,D,1)
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [(greater)? "greater":"lesser"] disease2 with infection chance [D.infectionchance].", 1)
+41 -32
View File
@@ -18,9 +18,9 @@
#define MAX_DEEP_COUNT 300
#define ITERATE_BEFORE_FAIL 200
#define RESOURCE_HIGH_MAX 3
#define RESOURCE_HIGH_MIN 0
#define RESOURCE_MID_MAX 2
#define RESOURCE_HIGH_MAX 4
#define RESOURCE_HIGH_MIN 2
#define RESOURCE_MID_MAX 3
#define RESOURCE_MID_MIN 1
#define RESOURCE_LOW_MAX 1
#define RESOURCE_LOW_MIN 0
@@ -106,6 +106,14 @@ Deep minerals:
for(var/y = 1, y <= real_size, y++)
map[MAP_CELL] = 0
/datum/ore_distribution/proc/print_distribution_map()
var/line = ""
for(var/x = 1, x <= real_size, x++)
for(var/y = 1, y <= real_size, y++)
line += num2text(round(map[MAP_CELL]/25.5))
world << line
line = ""
/datum/ore_distribution/proc/generate_distribution_map(var/x,var/y,var/input_size)
var/size = input_size
@@ -160,36 +168,37 @@ Deep minerals:
if(target_turf && target_turf.has_resources)
target_turf.resources = list()
target_turf.resources["silicates"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["carbonaceous rock"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["silicates"] = rand(3,5)
target_turf.resources["carbonaceous rock"] = rand(3,5)
if(map[MAP_CELL] > (range*0.60))
target_turf.resources["iron"] = 0
target_turf.resources["gold"] = 0
target_turf.resources["silver"] = 0
target_turf.resources["uranium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["diamond"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
else if(map[MAP_CELL] > (range*0.40))
target_turf.resources["iron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["diamond"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["phoron"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["osmium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["hydrogen"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
else
target_turf.resources["iron"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["phoron"] = 0
target_turf.resources["osmium"] = 0
target_turf.resources["hydrogen"] = 0
switch(map[MAP_CELL])
if(0 to 100)
target_turf.resources["iron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["gold"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["silver"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["diamond"] = 0
target_turf.resources["phoron"] = 0
target_turf.resources["osmium"] = 0
target_turf.resources["hydrogen"] = 0
if(100 to 124)
target_turf.resources["iron"] = 0
target_turf.resources["gold"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["silver"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["uranium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["diamond"] = 0
target_turf.resources["phoron"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["osmium"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
target_turf.resources["hydrogen"] = 0
if(125 to 255)
target_turf.resources["iron"] = 0
target_turf.resources["gold"] = 0
target_turf.resources["silver"] = 0
target_turf.resources["uranium"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["diamond"] = rand(RESOURCE_LOW_MIN,RESOURCE_LOW_MAX)
target_turf.resources["phoron"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["osmium"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
target_turf.resources["hydrogen"] = rand(RESOURCE_MID_MIN,RESOURCE_MID_MAX)
tx += chunk_size
tx = origin_x
+8 -3
View File
@@ -265,13 +265,13 @@
update_icon()
/obj/machinery/mining/drill/proc/get_harvest_capacity()
return 3 * (cutter ? cutter.rating : 0)
return (cutter ? cutter.rating : 0)
/obj/machinery/mining/drill/proc/get_storage_capacity()
return 100 * (storage ? storage.rating : 0)
return 200 * (storage ? storage.rating : 0)
/obj/machinery/mining/drill/proc/get_charge_use()
return 100 - (20 * (cellmount ? cellmount.rating : 0))
return 50 - (10 * (cellmount ? cellmount.rating : 0))
/obj/machinery/mining/drill/proc/get_resource_field()
@@ -346,6 +346,11 @@
/obj/machinery/mining/brace/proc/connect()
var/turf/T = get_step(get_turf(src), src.dir)
if(!T.has_resources)
src.visible_message("\red The terrain near the brace is unsuitable!")
return
for(var/thing in T.contents)
if(istype(thing,/obj/machinery/mining/drill))
connected = thing
+54
View File
@@ -0,0 +1,54 @@
/obj/item/weapon/mining_scanner
name = "ore detector"
desc = "A complex device used to locate ore deep underground."
icon = 'icons/obj/device.dmi'
icon_state = "forensic0-old" //GET A BETTER SPRITE.
item_state = "electronic"
matter = list("metal" = 150)
origin_tech = "magnets=1;engineering=1"
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
user << "You begin sweeping \the [src] about, scanning for metal deposits."
if(!do_after(user,50)) return
if(!user || !src) return
var/list/metals = list(
"surface minerals" = 0,
"precious metals" = 0,
"nuclear fuel" = 0,
"exotic matter" = 0
)
for(var/turf/T in oview(3,get_turf(user)))
if(!T.has_resources)
continue
for(var/metal in T.resources)
var/ore_type
switch(metal)
if("silicates" || "carbonaceous rock" || "iron") ore_type = "surface minerals"
if("gold" || "silver" || "diamond") ore_type = "precious metals"
if("uranium") ore_type = "nuclear fuel"
if("phoron" || "osmium" || "hydrogen") ore_type = "exotic matter"
if(ore_type) metals[ore_type] += T.resources[metal]
user << "\icon[src] \blue The scanner beeps and displays a readout."
for(var/ore_type in metals)
var/result = "no sign"
switch(metals[ore_type])
if(1 to 50) result = "trace amounts"
if(51 to 150) result = "significant amounts"
if(151 to INFINITY) result = "huge quantities"
user << "- [result] of [ore_type]."