mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Newmap - SMC, Openturf, Arrivals Controller, and Mine Turf Improvements (#1958)
* Replace SSingulo with SScalamity; processing cleanup
- SScalamity now handles blobs as well as singularity-types.
- Processing subtypes have been simplified to not require a stop_processing definition.
* this is probably important
* Remove cascade disabling SSgarbage
* Fixed a bug where dust() did not qdel the target mob
* Misc fixes
* Fix decals surviving break-to-plating
* Subsystem flag tweaks
* Apparently subsystems are new'd before config is.
* Fix paper icons
* Speculative fix for insane lag
* Better machinery stat
* Make organs not use SSoverlay
* Misc bugfixes & tweaks
* Nightmode fixes
* Changelog for SMC
* Port /tg/'s improved MC crash handling
* Add some more SS Recover() procs
* supply_controller -> SScargo
* More New() -> Initialize()
* pAI and robot construction overlays
* Fix cargo unit tests
* Merge the DMM Suite's atom/New() into atoms_init
* Lighting pre-baking
* Lighting initialization logging
* Fix some bad SS init orders
* Fix SSlighting logging; rename Processes to MC
* Speculative fix for insane GC lag
* Prebaked openturf/icon_smooth & fix lighting prebake
* SS init status; SSatoms LATEQDEL
* Fix bug with MC init stat panel
* Fix parallax
* Misc
* Ignore SS_NO_DISPLAY during init
* apparently this is important
* REEEEEE
* Image GC fixes; broadcaster radio-new sanity
* RCON Cleanup
* Move pAI recruiter into subsystem
* Move global solars list into sun subsystem
* Make chickens not use a global
* Demote SSdisposals to SS_BACKGROUND; garbage-debug cleanup
* Speed up space init a little
* Fix bad timer flags on floor drying
* Subsystem panic-restart verb for mins
* Explosion speedup
* Minor subsystem & MC logging tweaks
* SSopenturf improvements
* Make pipenet actually initialize (whoops)
* Minor tweaks
* Implement lighting rounding
* comments are hard okay
* Minor lattice tweaks
* Fix some timer issues & better closet init
* Timer sanity
* Request console tweaks + Storage init sanity
* Minor SSmachiner RCON improvements
* Further reduce world-start timer count
* Standardize subsystem logging
* Garbage hard delete profiling from /tg/
* Timer hang detection & recovery
* Log machines that sleep in process() and fuck up SSmachinery
* Fix an issue with external airlocks sleeping in process()
* Failsafe logging
* Minor tweaks
* Revert "Request console tweaks + Storage init sanity"
This reverts commit 98d3579e35.
* Re-implement RC changes
* Fix SQL FT saving
* Fix SSmachinery sleep in disposals
* Minor SS tweaks
* Paper fixes
* Blood drying fixes
* Merge gameticker and SSticker
* Minor global list init cleanup
* Lagcheck biogenerator & bags
* Tweak SScargo init order; RIG Initialize()
* Caching tweaks
* Remove rogue comma
* Initialize fixes
* Lighting destroy cleanup
* Fix emagging airlocks
* Initial SSicon implementation
* Tweaks & Fixes
* Fire + Air alarm queued icon updates
* Overlays + Queued icon cleanup
* Runtime & background fixes
* Kill some meaningless set statements
* Kill some image qdels
* Bump up lighting rounding val
* Fix adv. scanner destroy runtimes
* Remove unneeded icon update limiting
* Move icon smoothing into helpers
* Show a warning if DM 510 compiles without memory leak hack enabled
* Re-organize subsystems & MC defines a little
* Airlock SFX
* Log of Changes
* Make SSicon_update disable itself when not doing anything
* Fix respawn verb runtime when used early in server-init
* Add more information to MC's stat_entry()
* Replace direct refernces to gcDestroyed with QDEL* macros
* plant_controller -> SSplants
* More plant tweaks
* Add more humor to changelog
* Move parallax globals into SSparallax
* Lighting responsiveness tweaks
* Fix parallax init order & better MC init panel stat
* Make mobs GC
* More overlays + Remove intercom spawn()
* SSfast_process; make pinpointers not use spawn-recursion to process
Also made the SM Cascade beach process with SSprocessing instead of a spawn loop.
* Update changelog
* Mob GC tweaks
* Del() cleanup
* Fix insomniac ZAS connection edges
* Minor pAI cleanup
* Convert more things to SSoverlay; fix duplicated overlay in field gens
* SM Bluespace turf tweaks
* Update SSgarbage debug globals list
* Human-type qdel tweaks
* Subsystem suspension; stat_entry improvements
* SQL Statistics cleanup
* Fix runtimes with ambrosia
* More disable() -> suspend(); fix nightmode again
* Human qdel fix; minor tweaks
* Update turbolift to work with StonedMC
* Make lifts use timers instead of a subsystem
* Make SSassets start earlier
* Convert the radio controller into a subsystem
* Fix some missing CHECK_TICKs in asteroid generation
* MC stat tweaks; make shouldnt_see a typecache
* Kill some redundant debug-controller entries
* radio_controller -> SSradio
* Better SSgarbage hard-del logging from /tg/ upstream
* Logging tweaks + GELF
* Misc client caching improvements
* Slime SSoverlay
* Oven icon fixes
* Implant fixes
- Death implants will no longer spam Common on death of user.
- Death implants should handle a deleted user better.
* Holder tweaks + Welding tool Initialize()
* Fix some bad subsystem logging
* Fix suit cooling units spawning without cells
* Starlight tweaks
* Gibber infinite gib fix
* More SSoverlay stuff
* Make crates use CUT_OVERLAY_IN
* Make SSarrivals suspend instead of disable
* Make openturf use split/phased tick checks
* Speculative fix for unwet timer runtimes
* Blood overlay tweaks/fixes
* Update crusher to play nice with SMC + SSoverlay
* Openturf improvements and fixes
* Minor turbolift tweaks
* Lighting performance improvements + ChangeTurf tweaks
* this is probably important
* Fix wall weld noises on changeturf
* More ChangeTurf tweaks
* Explosion tweaks
* Pre-game lobby tweaks
* Openturf tweaks
* Prevent admins from starting the game before init finishes
* Fix Travis
* Kill an unused var
* Fix ChangeTurf runtimes on openturfs
* Fixes
* Browser datum fixes, asset caching
* Update changelog
* Changelog
* Lobby tweaks
* Ticker tweaks; kill ticker var
* Further lobby tweaks
* Cascade tweaks
* air_master -> SSair
* Reduce overhead from radio autosay
* alarm_manager -> SSalarm
* bomb_processor -> SSexplosives
* corp_regs -> SSlaw
* ZAS overlay fixes
* Small wall icon optimization
* Fix effects master
* Assembly tweaks
* Megavend fixes
* Shuttle fixes
* Camera alert performance improvements
* Fix some world.log spam from lighting overlays
* Fix some Initialize() procs
* Openspace responsiveness tweaks
* Make HE pipes animate through openturfs
* Kill a spawn
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
var/codelen = 4
|
||||
locked = 1
|
||||
|
||||
/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")
|
||||
|
||||
for(var/i in 1 to codelen)
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
var/points = 0
|
||||
var/obj/item/weapon/card/id/inserted_id
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/New()
|
||||
..()
|
||||
spawn(7)
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
qdel(src)
|
||||
/obj/machinery/mineral/processing_unit_console/Initialize()
|
||||
. = ..()
|
||||
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
@@ -161,8 +160,8 @@
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
/obj/machinery/mineral/processing_unit/Initialize()
|
||||
. = ..()
|
||||
|
||||
// initialize static alloy_data list
|
||||
if(!alloy_data)
|
||||
@@ -177,16 +176,13 @@
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
//Locate our output and input machinery.
|
||||
spawn(5)
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
return
|
||||
//Locate our output and input machinery.
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
..()
|
||||
|
||||
@@ -12,16 +12,13 @@
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/New()
|
||||
|
||||
..()
|
||||
|
||||
spawn(7)
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
qdel(src)
|
||||
/obj/machinery/mineral/stacking_unit_console/Initialize()
|
||||
. = ..()
|
||||
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
if (machine)
|
||||
machine.console = src
|
||||
else
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
@@ -84,8 +81,8 @@
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
/obj/machinery/mineral/stacking_machine/Initialize()
|
||||
. = ..()
|
||||
|
||||
for(var/stacktype in typesof(/obj/item/stack/material)-/obj/item/stack/material)
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
@@ -100,15 +97,12 @@
|
||||
stack_storage["plasteel"] = 0
|
||||
stack_paths["plasteel"] = /obj/item/stack/material/plasteel
|
||||
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
return
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
..()
|
||||
|
||||
@@ -14,17 +14,14 @@
|
||||
var/obj/machinery/mineral/output = null
|
||||
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
return
|
||||
/obj/machinery/mineral/unloading_machine/Initialize()
|
||||
. = ..()
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/process()
|
||||
..()
|
||||
@@ -47,4 +44,4 @@
|
||||
O.loc = src.output.loc
|
||||
else
|
||||
return
|
||||
return
|
||||
return
|
||||
|
||||
@@ -155,7 +155,7 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
if(prize.cost > inserted_id.mining_points)
|
||||
else
|
||||
if(prize.shuttle)
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
var/datum/shuttle/ferry/supply/shuttle = SScargo.shuttle
|
||||
if(shuttle)
|
||||
var/area/area_shuttle = shuttle.get_location_area()
|
||||
if(!area_shuttle)
|
||||
|
||||
@@ -165,13 +165,27 @@
|
||||
icon_state = "offhand"
|
||||
item_state = null
|
||||
name = "offhand"
|
||||
simulated = FALSE
|
||||
|
||||
action_button_name = null
|
||||
|
||||
/obj/item/weapon/pickaxe/proc/copy_stats(obj/item/weapon/pickaxe/parent)
|
||||
digspeed_wielded = parent.digspeed_wielded
|
||||
excavation_amount = parent.excavation_amount
|
||||
force = parent.force_wielded
|
||||
|
||||
/obj/item/weapon/pickaxe/offhand/unwield()
|
||||
if (ismob(loc))
|
||||
var/mob/living/our_mob = loc
|
||||
our_mob.remove_from_mob(src)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/pickaxe/offhand/wield()
|
||||
if (ismob(loc))
|
||||
var/mob/living/our_mob = loc
|
||||
our_mob.remove_from_mob(src)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/pickaxe/hammer
|
||||
@@ -487,10 +501,12 @@
|
||||
w_class = 3
|
||||
layer = 2.44
|
||||
|
||||
/obj/structure/track/initialize()
|
||||
..()
|
||||
if (locate(/obj/structure/track) in loc)
|
||||
/obj/structure/track/Initialize()
|
||||
. = ..()
|
||||
var/obj/structure/track/track = locate() in loc
|
||||
if (track && track != src)
|
||||
qdel(src)
|
||||
return
|
||||
updateOverlays()
|
||||
for (var/dir in cardinal)
|
||||
var/obj/structure/track/R = locate(/obj/structure/track, get_step(src, dir))
|
||||
@@ -502,7 +518,7 @@
|
||||
var/obj/structure/track/R = locate(/obj/structure/track, get_step(src, dir))
|
||||
if(R)
|
||||
R.updateOverlays()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/track/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -522,7 +538,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>Slicing apart connectors ...</span>"
|
||||
getFromPool(/obj/item/stack/rods, src.loc)
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
qdel(src)
|
||||
|
||||
return
|
||||
@@ -559,8 +575,8 @@
|
||||
light_wedge = LIGHT_WIDE
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
|
||||
/obj/vehicle/train/cargo/engine/mining/initialize()
|
||||
..()
|
||||
/obj/vehicle/train/cargo/engine/mining/Initialize()
|
||||
. = ..()
|
||||
cell = new /obj/item/weapon/cell/high(src)
|
||||
key = null
|
||||
var/image/I = new(icon = 'icons/obj/cart.dmi', icon_state = "[icon_state]_overlay", layer = src.layer + 0.2) //over mobs
|
||||
@@ -753,8 +769,7 @@
|
||||
L.Weaken(3)
|
||||
if(ishuman(L))
|
||||
shake_camera(L, 20, 1)
|
||||
spawn(20)
|
||||
L.vomit()
|
||||
addtimer(CALLBACK(L, /mob/living/carbon/.proc/vomit), 20)
|
||||
|
||||
/**********************Lazarus Injector**********************/
|
||||
|
||||
@@ -1014,7 +1029,8 @@ var/list/total_extraction_beacons = list()
|
||||
if(pressure < 50)
|
||||
name = "strong resonance field"
|
||||
resonance_damage = 60
|
||||
schedule_task_with_source_in(timetoburst, src, .proc/burst, list(loc))
|
||||
|
||||
addtimer(CALLBACK(src, .proc/burst, loc), timetoburst)
|
||||
|
||||
/obj/effect/resonance/Destroy()
|
||||
if(res)
|
||||
@@ -1272,7 +1288,7 @@ var/list/total_extraction_beacons = list()
|
||||
if(!target)
|
||||
target = src
|
||||
if(location)
|
||||
getFromPool(/obj/effect/overlay/temp/explosion, location)
|
||||
new /obj/effect/overlay/temp/explosion(location)
|
||||
playsound(location, 'sound/effects/Explosion1.ogg', 100, 1)
|
||||
for(var/atom/A in range(4,location))
|
||||
if(istype(A,/turf/simulated/mineral))
|
||||
@@ -1292,8 +1308,8 @@ var/list/total_extraction_beacons = list()
|
||||
L.Weaken(3)
|
||||
if(ishuman(L))
|
||||
shake_camera(L, 20, 1)
|
||||
spawn(20)
|
||||
L.vomit()
|
||||
addtimer(CALLBACK(L, /mob/living/carbon/.proc/vomit), 20)
|
||||
|
||||
spawn(2)
|
||||
for(var/turf/simulated/mineral/M in range(7,location))
|
||||
if(prob(75))
|
||||
@@ -1301,4 +1317,4 @@ var/list/total_extraction_beacons = list()
|
||||
|
||||
if(target)
|
||||
target.overlays -= image_overlay
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -8,8 +8,17 @@
|
||||
|
||||
/turf/simulated/mineral //wall piece
|
||||
name = "Rock"
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
//icon = 'icons/turf/walls.dmi'
|
||||
//icon_state = "rock"
|
||||
icon = 'icons/turf/smooth/rock_wall.dmi' // Until we get sprites.
|
||||
icon_state = "rock"
|
||||
layer = 2.01
|
||||
smooth = SMOOTH_MORE | SMOOTH_BORDER
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/mineral,
|
||||
/turf/simulated/wall,
|
||||
/turf/unsimulated/wall
|
||||
)
|
||||
oxygen = 0
|
||||
nitrogen = 0
|
||||
opacity = 1
|
||||
@@ -31,21 +40,26 @@
|
||||
|
||||
has_resources = 1
|
||||
|
||||
/turf/simulated/mineral/initialize()
|
||||
MineralSpread()
|
||||
updateMineralOverlays(TRUE)
|
||||
// Copypaste parent call for performance.
|
||||
/turf/simulated/mineral/Initialize()
|
||||
if (initialized)
|
||||
crash_with("Warning: [src]([type]) initialized multiple times!")
|
||||
|
||||
/turf/simulated/mineral/proc/updateMineralOverlays(var/update_neighbors)
|
||||
var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
|
||||
for(var/direction in step_overlays)
|
||||
var/turf/turf_to_check = get_step(src,step_overlays[direction])
|
||||
if(update_neighbors && istype(turf_to_check,/turf/simulated/floor/asteroid))
|
||||
var/turf/simulated/floor/asteroid/T = turf_to_check
|
||||
T.updateMineralOverlays()
|
||||
else if(istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor))
|
||||
var/image/overlay = image('icons/turf/walls.dmi', "rock_side", dir = turn(step_overlays[direction], 180))
|
||||
overlay.plane = 0
|
||||
turf_to_check.overlays += overlay
|
||||
initialized = TRUE
|
||||
|
||||
if(dynamic_lighting)
|
||||
luminosity = 0
|
||||
else
|
||||
luminosity = 1
|
||||
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
if (smooth)
|
||||
pixel_x = -4
|
||||
pixel_y = -4
|
||||
queue_smooth(src)
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/turf/simulated/mineral/examine(mob/user)
|
||||
..()
|
||||
@@ -114,16 +128,24 @@
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
|
||||
M.selected.action(src)
|
||||
|
||||
#define SPREAD(the_dir) \
|
||||
if (prob(mineral.spread_chance)) { \
|
||||
var/turf/simulated/mineral/target = get_step(src, the_dir); \
|
||||
if (istype(target) && !target.mineral) { \
|
||||
target.mineral = mineral; \
|
||||
target.UpdateMineral(); \
|
||||
target.MineralSpread(); \
|
||||
} \
|
||||
}
|
||||
|
||||
/turf/simulated/mineral/proc/MineralSpread()
|
||||
if(mineral && mineral.spread)
|
||||
for(var/trydir in cardinal)
|
||||
if(prob(mineral.spread_chance))
|
||||
var/turf/simulated/mineral/target_turf = get_step(src, trydir)
|
||||
if(istype(target_turf) && !target_turf.mineral)
|
||||
target_turf.mineral = mineral
|
||||
target_turf.UpdateMineral()
|
||||
target_turf.MineralSpread()
|
||||
SPREAD(NORTH)
|
||||
SPREAD(SOUTH)
|
||||
SPREAD(EAST)
|
||||
SPREAD(WEST)
|
||||
|
||||
#undef SPREAD
|
||||
|
||||
/turf/simulated/mineral/proc/UpdateMineral()
|
||||
clear_ore_effects()
|
||||
@@ -137,7 +159,7 @@
|
||||
//Not even going to touch this pile of spaghetti
|
||||
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return
|
||||
|
||||
@@ -159,7 +181,7 @@
|
||||
user << "\blue \icon[P] [src] has been excavated to a depth of [2*excavation_level]cm."
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/pickaxe))
|
||||
if (istype(W, /obj/item/weapon/pickaxe) && W.simulated) // Pickaxe offhand is not simulated.
|
||||
var/turf/T = user.loc
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
@@ -207,8 +229,7 @@
|
||||
if(istype(O))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
O.geologic_data = geologic_data
|
||||
spawn(1)
|
||||
O.forceMove(user.loc)
|
||||
addtimer(CALLBACK(O, /atom/movable/.proc/forceMove, user.loc), 1)
|
||||
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
@@ -252,7 +273,7 @@
|
||||
var/datum/find/F = finds[1]
|
||||
if(F.excavation_required <= excavation_level + F.view_range)
|
||||
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
overlays += archaeo_overlay
|
||||
add_overlay(archaeo_overlay)
|
||||
|
||||
else
|
||||
user << "<span class='notice'> You stop [P.drill_verb] the rock.</span>"
|
||||
@@ -266,8 +287,6 @@
|
||||
|
||||
user << "<span class='warning'>You start chiselling [src] into a sculptable block.</span>"
|
||||
|
||||
|
||||
|
||||
if(!do_after(user,80))
|
||||
return
|
||||
|
||||
@@ -275,7 +294,6 @@
|
||||
new /obj/structure/sculpting_block(src)
|
||||
GetDrilled(1)
|
||||
|
||||
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -322,21 +340,13 @@
|
||||
if(prob(3))
|
||||
excavate_find(prob(5), finds[1])
|
||||
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
|
||||
//Add some rubble, you did just clear out a big chunk of rock.
|
||||
|
||||
var/turf/simulated/floor/asteroid/N = ChangeTurf(mined_turf)
|
||||
|
||||
// Kill and update the space overlays around us.
|
||||
for(var/direction in step_overlays)
|
||||
var/turf/space/T = get_step(src, step_overlays[direction])
|
||||
if(istype(T))
|
||||
T.overlays.Cut()
|
||||
for(var/next_direction in step_overlays)
|
||||
if(istype(get_step(T, step_overlays[next_direction]),/turf/simulated/mineral))
|
||||
T.overlays += image('icons/turf/walls.dmi', "rock_side", dir = step_overlays[next_direction])
|
||||
var/turf/simulated/open/O = get_step(src, step_overlays[direction])
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/open/O = get_step(src, direction)
|
||||
if(istype(O))
|
||||
O.update()
|
||||
|
||||
@@ -346,7 +356,6 @@
|
||||
|
||||
if(istype(N))
|
||||
N.overlay_detail = rand(0,9)
|
||||
N.updateMineralOverlays(1)
|
||||
|
||||
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
|
||||
//with skill and luck, players can cleanly extract finds
|
||||
@@ -429,13 +438,13 @@
|
||||
)
|
||||
var/mineralChance = 45
|
||||
|
||||
/turf/simulated/mineral/random/New()
|
||||
/turf/simulated/mineral/random/Initialize()
|
||||
if (prob(mineralChance) && !mineral)
|
||||
var/mineral_name = pickweight(mineralSpawnChanceList) //temp mineral name
|
||||
if (mineral_name && (mineral_name in ore_data))
|
||||
mineral = ore_data[mineral_name]
|
||||
UpdateMineral()
|
||||
|
||||
|
||||
. = ..()
|
||||
|
||||
/turf/simulated/mineral/random/high_chance
|
||||
@@ -472,8 +481,16 @@
|
||||
// This means you can put grass on the asteroid etc.
|
||||
/turf/simulated/floor/asteroid
|
||||
name = "sand"
|
||||
icon = 'icons/turf/flooring/asteroid.dmi'
|
||||
icon_state = "asteroid"
|
||||
//icon = 'icons/turf/flooring/asteroid.dmi'
|
||||
//icon_state = "asteroid"
|
||||
icon = 'icons/turf/smooth/ash.dmi'
|
||||
icon_state = "ash"
|
||||
smooth = SMOOTH_MORE | SMOOTH_BORDER
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/floor/asteroid,
|
||||
/turf/simulated/mineral,
|
||||
/turf/simulated/wall
|
||||
)
|
||||
base_name = "sand"
|
||||
base_desc = "Gritty and unpleasant."
|
||||
base_icon = 'icons/turf/flooring/asteroid.dmi'
|
||||
@@ -485,16 +502,29 @@
|
||||
temperature = TCMB
|
||||
var/dug = 0 //Increments by 1 everytime it's dug. 11 is the last integer that should ever be here.
|
||||
var/overlay_detail
|
||||
var/static/list/overlay_cache
|
||||
has_resources = 1
|
||||
footstep_sound = "gravelstep"
|
||||
|
||||
/turf/simulated/floor/asteroid/New()
|
||||
// Copypaste parent for performance.
|
||||
/turf/simulated/floor/asteroid/Initialize()
|
||||
if(initialized)
|
||||
crash_with("Warning: [src]([type]) initialized multiple times!")
|
||||
initialized = TRUE
|
||||
|
||||
if(dynamic_lighting)
|
||||
luminosity = 0
|
||||
else
|
||||
luminosity = 1
|
||||
|
||||
if(prob(20))
|
||||
overlay_detail = rand(0,9)
|
||||
|
||||
/turf/simulated/floor/asteroid/initialize()
|
||||
updateMineralOverlays(1)
|
||||
if (smooth)
|
||||
pixel_x = -4
|
||||
pixel_y = -4
|
||||
queue_smooth(src)
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/turf/simulated/floor/asteroid/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -665,37 +695,6 @@
|
||||
dug += 1
|
||||
else
|
||||
ChangeTurf(/turf/space)
|
||||
return
|
||||
|
||||
/turf/simulated/floor/asteroid/proc/updateMineralOverlays(var/update_neighbors)
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
for(var/direction in step_overlays)
|
||||
|
||||
if(istype(get_step(src, step_overlays[direction]), /turf/space))
|
||||
overlays += image('icons/turf/flooring/asteroid.dmi', "asteroid_edges", dir = step_overlays[direction])
|
||||
|
||||
if(istype(get_step(src, step_overlays[direction]), /turf/simulated/mineral))
|
||||
overlays += image('icons/turf/walls.dmi', "rock_side", dir = step_overlays[direction])
|
||||
|
||||
if (!overlay_cache)
|
||||
overlay_cache = list()
|
||||
overlay_cache.len = 10
|
||||
for (var/i = 1; i <= overlay_cache.len; i++)
|
||||
overlay_cache[i] = image('icons/turf/flooring/decals.dmi', "asteroid[i - 1]")
|
||||
|
||||
if(overlay_detail)
|
||||
overlays += overlay_cache[overlay_detail + 1]
|
||||
|
||||
if(update_neighbors)
|
||||
var/list/all_step_directions = list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,SOUTHWEST,WEST,NORTHWEST)
|
||||
for(var/direction in all_step_directions)
|
||||
var/turf/simulated/floor/asteroid/A
|
||||
if(istype(get_step(src, direction), /turf/simulated/floor/asteroid))
|
||||
A = get_step(src, direction)
|
||||
A.updateMineralOverlays()
|
||||
|
||||
/turf/simulated/floor/asteroid/Entered(atom/movable/M as mob|obj)
|
||||
..()
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
var/ore_key
|
||||
var/image/scanner_image
|
||||
|
||||
/obj/effect/mineral/New(var/newloc, var/ore/M)
|
||||
..(newloc)
|
||||
/obj/effect/mineral/Initialize(mapload, var/ore/M)
|
||||
. = ..()
|
||||
name = "[M.display_name] deposit"
|
||||
ore_key = M.name
|
||||
icon_state = "rock_[ore_key]"
|
||||
@@ -23,4 +23,4 @@
|
||||
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
|
||||
else
|
||||
world << "No ore data for [src]!"
|
||||
return scanner_image
|
||||
return scanner_image
|
||||
|
||||
+10
-15
@@ -20,20 +20,15 @@
|
||||
var/chosen = DEFAULT_WALL_MATERIAL //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/mint/Initialize()
|
||||
. = ..()
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
if ( src.input)
|
||||
@@ -209,4 +204,4 @@
|
||||
processing = 0;
|
||||
coinsToProduce = temp_coins
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
S.hide_from(usr)
|
||||
for(var/obj/item/weapon/ore/O in S.contents)
|
||||
S.remove_from_storage(O, src) //This will move the item to this item's contents
|
||||
user << "\blue You empty the satchel into the box."
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
user << span("notice", "You empty the satchel into the box.")
|
||||
|
||||
update_ore_count()
|
||||
|
||||
@@ -97,5 +100,7 @@
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
O.loc = src.loc
|
||||
O.ex_act(severity++)
|
||||
|
||||
CHECK_TICK
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user