mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-20 12:44:04 +01:00
Merge branch 'master' of https://github.com/VOREStation/VOREStation into self
# Conflicts: # code/_helpers/unsorted.dm # code/controllers/subsystems/mapping_vr.dm # code/datums/datum.dm # code/datums/datumvars.dm # code/datums/supplypacks/voidsuits.dm # code/game/machinery/suit_storage_unit.dm # code/game/objects/items/devices/defib.dm # code/game/objects/items/weapons/tools/weldingtool.dm # code/game/world.dm # code/modules/client/preference_setup/loadout/loadout_accessories.dm # code/modules/client/preference_setup/loadout/loadout_eyes.dm # code/modules/client/preference_setup/loadout/loadout_head.dm # code/modules/client/preference_setup/loadout/loadout_suit.dm # code/modules/client/preference_setup/loadout/loadout_uniform.dm # code/modules/clothing/glasses/glasses.dm # code/modules/food/food/snacks.dm # code/modules/mob/living/carbon/human/species/station/station_vr.dm # code/modules/reagents/Chemistry-Recipes.dm # code/world.dm # config/custom_items.txt # config/example/config.txt # config/example/game_options.txt # icons/mob/robots.dmi # icons/obj/mining.dmi # maps/submaps/surface_submaps/wilderness/wilderness.dm # vorestation.dme
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
name = "Coin"
|
||||
icon_state = "coin"
|
||||
flags = CONDUCT
|
||||
force = 0.0
|
||||
throwforce = 0.0
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
@@ -363,8 +363,8 @@
|
||||
connected.check_supports()
|
||||
connected = null
|
||||
|
||||
/obj/machinery/mining/brace/verb/rotate()
|
||||
set name = "Rotate"
|
||||
/obj/machinery/mining/brace/verb/rotate_clockwise()
|
||||
set name = "Rotate Brace Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
@@ -374,5 +374,5 @@
|
||||
to_chat(usr, "It is anchored in place!")
|
||||
return 0
|
||||
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
src.set_dir(turn(src.dir, 270))
|
||||
return 1
|
||||
@@ -158,7 +158,7 @@ var/global/list/total_extraction_beacons = list()
|
||||
density = FALSE
|
||||
var/beacon_network = "station"
|
||||
|
||||
/obj/structure/extraction_point/initialize()
|
||||
/obj/structure/extraction_point/Initialize()
|
||||
. = ..()
|
||||
name += " ([rand(100,999)]) ([get_area_name(src, TRUE)])"
|
||||
global.total_extraction_beacons += src
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/obj/machinery/mineral/processing_unit/machine = null
|
||||
var/show_all_ores = FALSE
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/initialize()
|
||||
/obj/machinery/mineral/processing_unit_console/Initialize()
|
||||
. = ..()
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit) in range(5, src)
|
||||
if (machine)
|
||||
@@ -192,7 +192,7 @@
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
/obj/machinery/mineral/processing_unit/initialize()
|
||||
/obj/machinery/mineral/processing_unit/Initialize()
|
||||
. = ..()
|
||||
// TODO - Eschew input/output machinery and just use dirs ~Leshana
|
||||
//Locate our output and input machinery.
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
else if(ores_processing[metal] == PROCESS_COMPRESS && O.compresses_to) //Compressing.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
var/can_make = CLAMP(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(can_make%2>0) can_make--
|
||||
|
||||
var/material/M = get_material_by_name(O.compresses_to)
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
else if(ores_processing[metal] == PROCESS_SMELT && O.smelts_to) //Smelting.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
var/can_make = CLAMP(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
|
||||
var/material/M = get_material_by_name(O.smelts_to)
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
name = "mining drill"
|
||||
desc = "The most basic of mining drills, for short excavations and small mineral extractions."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 15.0
|
||||
throwforce = 4.0
|
||||
@@ -29,6 +28,7 @@
|
||||
sharp = 1
|
||||
|
||||
var/excavation_amount = 200
|
||||
var/destroy_artefacts = FALSE // some mining tools will destroy artefacts completely while avoiding side-effects.
|
||||
|
||||
/obj/item/weapon/pickaxe/silver
|
||||
name = "silver pickaxe"
|
||||
@@ -112,7 +112,6 @@
|
||||
desc = "A large tool for digging and moving dirt."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "shovel"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 8.0
|
||||
throwforce = 4.0
|
||||
|
||||
@@ -32,7 +32,6 @@ var/list/mining_overlay_cache = list()
|
||||
var/sand_dug
|
||||
var/mined_ore = 0
|
||||
var/last_act = 0
|
||||
var/emitter_blasts_taken = 0 // EMITTER MINING! Muhehe.
|
||||
var/overlay_detail
|
||||
|
||||
var/datum/geosample/geologic_data
|
||||
@@ -129,7 +128,7 @@ var/list/mining_overlay_cache = list()
|
||||
//Cache hit
|
||||
return mining_overlay_cache["[cache_id]_[direction]"]
|
||||
|
||||
/turf/simulated/mineral/initialize()
|
||||
/turf/simulated/mineral/Initialize()
|
||||
. = ..()
|
||||
if(prob(20))
|
||||
overlay_detail = "asteroid[rand(0,9)]"
|
||||
@@ -210,20 +209,28 @@ var/list/mining_overlay_cache = list()
|
||||
if(severity <= 2) // Now to expose the ore lying under the sand.
|
||||
spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot.
|
||||
for(var/ore in resources)
|
||||
var/amount_to_give = rand(Ceiling(resources[ore]/2), resources[ore]) // Should result in at least one piece of ore.
|
||||
var/amount_to_give = rand(CEILING(resources[ore]/2, 1), resources[ore]) // Should result in at least one piece of ore.
|
||||
for(var/i=1, i <= amount_to_give, i++)
|
||||
var/oretype = ore_types[ore]
|
||||
new oretype(src)
|
||||
resources[ore] = 0
|
||||
|
||||
/turf/simulated/mineral/bullet_act(var/obj/item/projectile/Proj)
|
||||
/turf/simulated/mineral/bullet_act(var/obj/item/projectile/Proj) // only emitters for now
|
||||
if(Proj.excavation_amount)
|
||||
var/newDepth = excavation_level + Proj.excavation_amount // Used commonly below
|
||||
if(newDepth >= 200) // first, if the turf is completely drilled then don't bother checking for finds and just drill it
|
||||
GetDrilled(0)
|
||||
|
||||
// Emitter blasts
|
||||
if(istype(Proj, /obj/item/projectile/beam/emitter) || istype(Proj, /obj/item/projectile/beam/heavylaser/fakeemitter))
|
||||
emitter_blasts_taken++
|
||||
if(emitter_blasts_taken > 2) // 3 blasts per tile
|
||||
mined_ore = 1
|
||||
GetDrilled()
|
||||
//destroy any archaeological finds
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
if(newDepth > F.excavation_required) // Digging too deep with something as clumsy or random as a blaster will destroy artefacts
|
||||
finds.Remove(finds[1])
|
||||
if(prob(50))
|
||||
artifact_debris()
|
||||
|
||||
excavation_level += Proj.excavation_amount
|
||||
update_archeo_overlays(Proj.excavation_amount)
|
||||
|
||||
/turf/simulated/mineral/Bumped(AM)
|
||||
|
||||
@@ -391,17 +398,9 @@ var/list/mining_overlay_cache = list()
|
||||
var/datum/find/F = finds[1]
|
||||
if(newDepth > F.excavation_required) // Digging too deep can break the item. At least you won't summon a Balrog (probably)
|
||||
fail_message = ". <b>[pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]</b>"
|
||||
|
||||
wreckfinds(P.destroy_artefacts)
|
||||
to_chat(user, "<span class='notice'>You start [P.drill_verb][fail_message].</span>")
|
||||
|
||||
if(fail_message && prob(90))
|
||||
if(prob(25))
|
||||
excavate_find(prob(5), finds[1])
|
||||
else if(prob(50))
|
||||
finds.Remove(finds[1])
|
||||
if(prob(50))
|
||||
artifact_debris()
|
||||
|
||||
if(do_after(user,P.digspeed))
|
||||
|
||||
if(finds && finds.len)
|
||||
@@ -414,63 +413,14 @@ var/list/mining_overlay_cache = list()
|
||||
to_chat(user, "<span class='notice'>You finish [P.drill_verb] \the [src].</span>")
|
||||
|
||||
if(newDepth >= 200) // This means the rock is mined out fully
|
||||
var/obj/structure/boulder/B
|
||||
if(artifact_find)
|
||||
if( excavation_level > 0 || prob(15) )
|
||||
//boulder with an artifact inside
|
||||
B = new(src)
|
||||
if(artifact_find)
|
||||
B.artifact_find = artifact_find
|
||||
else
|
||||
artifact_debris(1)
|
||||
else if(prob(5))
|
||||
//empty boulder
|
||||
B = new(src)
|
||||
|
||||
if(B)
|
||||
if(P.destroy_artefacts)
|
||||
GetDrilled(0)
|
||||
else
|
||||
GetDrilled(1)
|
||||
excavate_turf()
|
||||
return
|
||||
|
||||
excavation_level += P.excavation_amount
|
||||
var/updateIcon = 0
|
||||
|
||||
//archaeo overlays
|
||||
if(!archaeo_overlay && finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
if(F.excavation_required <= excavation_level + F.view_range)
|
||||
cut_overlay(archaeo_overlay)
|
||||
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
add_overlay(archaeo_overlay)
|
||||
|
||||
else if(archaeo_overlay && (!finds || !finds.len))
|
||||
cut_overlay(archaeo_overlay)
|
||||
archaeo_overlay = null
|
||||
|
||||
//there's got to be a better way to do this
|
||||
var/update_excav_overlay = 0
|
||||
if(excavation_level >= 150)
|
||||
if(excavation_level - P.excavation_amount < 150)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 100)
|
||||
if(excavation_level - P.excavation_amount < 100)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 50)
|
||||
if(excavation_level - P.excavation_amount < 50)
|
||||
update_excav_overlay = 1
|
||||
|
||||
//update overlays displaying excavation level
|
||||
if( !(excav_overlay && excavation_level > 0) || update_excav_overlay )
|
||||
var/excav_quadrant = round(excavation_level / 25) + 1
|
||||
if(excav_quadrant > 5)
|
||||
excav_quadrant = 5
|
||||
cut_overlay(excav_overlay)
|
||||
excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]"
|
||||
add_overlay(excav_overlay)
|
||||
|
||||
if(updateIcon)
|
||||
update_icon()
|
||||
update_archeo_overlays(P.excavation_amount)
|
||||
|
||||
//drop some rocks
|
||||
next_rock += P.excavation_amount
|
||||
@@ -483,6 +433,54 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
return attack_hand(user)
|
||||
|
||||
/turf/simulated/mineral/proc/wreckfinds(var/destroy = FALSE)
|
||||
if(!destroy && prob(90)) //nondestructive methods have a chance of letting you step away to not trash things
|
||||
if(prob(25))
|
||||
excavate_find(prob(5), finds[1])
|
||||
else if(prob(50) || destroy) //destructive methods will always destroy finds, no bowls menacing with spikes for you
|
||||
finds.Remove(finds[1])
|
||||
if(prob(50))
|
||||
artifact_debris()
|
||||
|
||||
/turf/simulated/mineral/proc/update_archeo_overlays(var/excavation_amount = 0)
|
||||
var/updateIcon = 0
|
||||
|
||||
//archaeo overlays
|
||||
if(!archaeo_overlay && finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
if(F.excavation_required <= excavation_level + F.view_range)
|
||||
cut_overlay(archaeo_overlay)
|
||||
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
add_overlay(archaeo_overlay)
|
||||
|
||||
else if(archaeo_overlay && (!finds || !finds.len))
|
||||
cut_overlay(archaeo_overlay)
|
||||
archaeo_overlay = null
|
||||
|
||||
//there's got to be a better way to do this
|
||||
var/update_excav_overlay = 0
|
||||
if(excavation_level >= 150)
|
||||
if(excavation_level - excavation_amount < 150)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 100)
|
||||
if(excavation_level - excavation_amount < 100)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 50)
|
||||
if(excavation_level - excavation_amount < 50)
|
||||
update_excav_overlay = 1
|
||||
|
||||
//update overlays displaying excavation level
|
||||
if( !(excav_overlay && excavation_level > 0) || update_excav_overlay )
|
||||
var/excav_quadrant = round(excavation_level / 25) + 1
|
||||
if(excav_quadrant > 5)
|
||||
excav_quadrant = 5
|
||||
cut_overlay(excav_overlay)
|
||||
excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]"
|
||||
add_overlay(excav_overlay)
|
||||
|
||||
if(updateIcon)
|
||||
update_icon()
|
||||
|
||||
/turf/simulated/mineral/proc/clear_ore_effects()
|
||||
for(var/obj/effect/mineral/M in contents)
|
||||
qdel(M)
|
||||
@@ -497,6 +495,26 @@ var/list/mining_overlay_cache = list()
|
||||
O.geologic_data = geologic_data
|
||||
return O
|
||||
|
||||
/turf/simulated/mineral/proc/excavate_turf()
|
||||
var/obj/structure/boulder/B
|
||||
if(artifact_find)
|
||||
if( excavation_level > 0 || prob(15) )
|
||||
//boulder with an artifact inside
|
||||
B = new(src)
|
||||
if(artifact_find)
|
||||
B.artifact_find = artifact_find
|
||||
else
|
||||
artifact_debris(1)
|
||||
else if(prob(5))
|
||||
//empty boulder
|
||||
B = new(src)
|
||||
|
||||
if(B)
|
||||
GetDrilled(0)
|
||||
else
|
||||
GetDrilled(1)
|
||||
return
|
||||
|
||||
/turf/simulated/mineral/proc/GetDrilled(var/artifact_fail = 0)
|
||||
|
||||
if(!density)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
processing_objects.Add(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
name = "Money bag"
|
||||
icon_state = "moneybag"
|
||||
flags = CONDUCT
|
||||
force = 10.0
|
||||
throwforce = 2.0
|
||||
w_class = ITEMSIZE_LARGE
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
src.equipment_path = path
|
||||
src.cost = cost
|
||||
|
||||
/obj/machinery/power/quantumpad/initialize()
|
||||
/obj/machinery/power/quantumpad/Initialize()
|
||||
. = ..()
|
||||
default_apply_parts()
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
mouse_opacity = 0
|
||||
var/resonance_damage = 20
|
||||
|
||||
/obj/effect/resonance/initialize(mapload, var/creator = null, var/timetoburst)
|
||||
/obj/effect/resonance/Initialize(mapload, var/creator = null, var/timetoburst)
|
||||
. = ..()
|
||||
// Start small and grow to big size as we are about to burst
|
||||
transform = matrix()*0.75
|
||||
@@ -101,7 +101,7 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/temp_visual/resonance_crush/initialize()
|
||||
/obj/effect/temp_visual/resonance_crush/Initialize()
|
||||
. = ..()
|
||||
transform = matrix()*1.5
|
||||
animate(src, transform = matrix()*0.1, alpha = 50, time = 4)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
mouse_opacity = 0
|
||||
var/resonance_damage = 20
|
||||
|
||||
/obj/effect/resonance/initialize(mapload, var/creator = null, var/timetoburst)
|
||||
/obj/effect/resonance/Initialize(mapload, var/creator = null, var/timetoburst)
|
||||
. = ..()
|
||||
// Start small and grow to big size as we are about to burst
|
||||
transform = matrix()*0.75
|
||||
@@ -105,7 +105,7 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 4
|
||||
|
||||
/obj/effect/temp_visual/resonance_crush/initialize()
|
||||
/obj/effect/temp_visual/resonance_crush/Initialize()
|
||||
. = ..()
|
||||
transform = matrix()*1.5
|
||||
animate(src, transform = matrix()*0.1, alpha = 50, time = 4)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
basestate = "pwindow"
|
||||
|
||||
//The windows have diagonal versions, and will never be a full window
|
||||
/obj/structure/window/reinforced/survival_pod/is_full_window()
|
||||
/obj/structure/window/reinforced/survival_pod/is_fulltile()
|
||||
return FALSE
|
||||
|
||||
/obj/structure/window/reinforced/survival_pod/update_icon()
|
||||
@@ -219,7 +219,7 @@
|
||||
pixel_y = -4
|
||||
max_n_of_items = 100
|
||||
|
||||
/obj/machinery/smartfridge/survival_pod/initialize()
|
||||
/obj/machinery/smartfridge/survival_pod/Initialize()
|
||||
. = ..()
|
||||
for(var/obj/item/O in loc)
|
||||
if(accept_check(O))
|
||||
@@ -240,14 +240,10 @@
|
||||
desc = "A large machine releasing a constant gust of air."
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
var/buildstacktype = /obj/item/stack/material/steel
|
||||
var/buildstackamount = 5
|
||||
|
||||
/obj/structure/fans/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!height)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/fans/proc/deconstruct()
|
||||
new buildstacktype(loc,buildstackamount)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user