Merge pull request #2661 from Citadel-Station-13/upstream-merge-30220

[MIRROR] Adds Archaeology Component
This commit is contained in:
LetterJay
2017-09-11 15:22:59 -05:00
committed by GitHub
26 changed files with 143 additions and 76 deletions
+3 -2
View File
@@ -304,6 +304,7 @@
/atom/proc/ex_act(severity, target)
set waitfor = FALSE
contents_explosion(severity, target)
SendSignal(COMSIG_ATOM_EX_ACT, severity, target)
/atom/proc/blob_act(obj/structure/blob/B)
return
@@ -468,8 +469,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/singularity_act()
return
/atom/proc/singularity_pull()
return
/atom/proc/singularity_pull(obj/singularity/S, current_size)
SendSignal(COMSIG_ATOM_SING_PULL, S, current_size)
/atom/proc/acid_act(acidpwr, acid_volume)
return
@@ -58,7 +58,9 @@
/turf/open/floor/plating/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
for(var/turf/open/floor/plating/asteroid/M in range(1, drill.chassis))
if(get_dir(drill.chassis,M)&drill.chassis.dir)
M.gets_dug()
for(var/I in GetComponents(/datum/component/archaeology))
var/datum/component/archaeology/archy = I
archy.gets_dug()
drill.log_message("Drilled through [src]")
drill.move_ores()
+2 -1
View File
@@ -549,9 +549,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
transfer_blood = 0
/obj/item/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FOUR)
throw_at(S,14,3, spin=0)
else ..()
else return
/obj/item/throw_impact(atom/A)
if(A && !QDELETED(A))
+1
View File
@@ -169,6 +169,7 @@
return
/obj/singularity_pull(S, current_size)
..()
if(!anchored || current_size >= STAGE_FIVE)
step_towards(src,S)
+1
View File
@@ -45,6 +45,7 @@
qdel(src)
/obj/structure/lattice/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FOUR)
deconstruct()
@@ -30,6 +30,7 @@
return ..()
/obj/structure/transit_tube/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
@@ -62,6 +62,7 @@
AM.ex_act(severity, target)
/obj/structure/transit_tube_pod/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
+1
View File
@@ -105,6 +105,7 @@
qdel(src)
/obj/structure/window/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
+3
View File
@@ -4,6 +4,9 @@
var/wet = 0
var/wet_time = 0 // Time in seconds that this floor will be wet for.
var/mutable_appearance/wet_overlay
var/postdig_icon_change = FALSE
var/postdig_icon
var/list/archdrops
/turf/open/indestructible
name = "floor"
+1
View File
@@ -170,6 +170,7 @@
return make_plating()
/turf/open/floor/singularity_pull(S, current_size)
..()
if(current_size == STAGE_THREE)
if(prob(30))
if(floor_tile)
@@ -269,6 +269,7 @@
narsie_act(force, ignore_mobs, probability)
/turf/open/floor/vines/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
if(prob(50))
ChangeTurf(src.baseturf)
@@ -9,11 +9,11 @@
icon = 'icons/turf/floors.dmi'
icon_state = "asteroid"
icon_plating = "asteroid"
postdig_icon_change = TRUE
var/environment_type = "asteroid"
var/turf_type = /turf/open/floor/plating/asteroid //Because caves do whacky shit to revert to normal
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
var/sand_type = /obj/item/ore/glass
var/floor_variance = 20 //probability floor has a different icon state
archdrops = list(/obj/item/ore/glass = 5)
/turf/open/floor/plating/asteroid/Initialize()
var/proper_name = name
@@ -22,6 +22,9 @@
if(prob(floor_variance))
icon_state = "[environment_type][rand(0,12)]"
if(LAZYLEN(archdrops))
AddComponent(/datum/component/archaeology, 100, archdrops)
/turf/open/floor/plating/asteroid/burn_tile()
return
@@ -31,46 +34,7 @@
/turf/open/floor/plating/asteroid/MakeDry(wet_setting = TURF_WET_WATER)
return
/turf/open/floor/plating/asteroid/ex_act(severity, target)
contents_explosion(severity, target)
switch(severity)
if(3)
return
if(2)
if(prob(20))
src.gets_dug()
if(1)
src.gets_dug()
/turf/open/floor/plating/asteroid/attackby(obj/item/W, mob/user, params)
//note that this proc does not call ..()
if(!W || !user)
return 0
var/digging_speed = 0
if (istype(W, /obj/item/shovel))
var/obj/item/shovel/S = W
digging_speed = S.digspeed
else if (istype(W, /obj/item/pickaxe))
var/obj/item/pickaxe/P = W
digging_speed = P.digspeed
if (digging_speed)
var/turf/T = user.loc
if(!isturf(T))
return
if (dug)
to_chat(user, "<span class='warning'>This area has already been dug!</span>")
return
to_chat(user, "<span class='notice'>You start digging...</span>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
if(do_after(user, digging_speed, target = src))
if(istype(src, /turf/open/floor/plating/asteroid))
to_chat(user, "<span class='notice'>You dig a hole.</span>")
gets_dug()
SSblackbox.add_details("pick_used_mining","[W.type]")
if(istype(W, /obj/item/storage/bag/ore))
var/obj/item/storage/bag/ore/S = W
if(S.collection_mode == 1)
@@ -88,37 +52,16 @@
var/turf/open/floor/light/F = T
F.state = L.state
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
/turf/open/floor/plating/asteroid/proc/gets_dug()
if(dug)
return
for(var/i in 1 to 5)
new sand_type(src)
dug = 1
icon_plating = "[environment_type]_dug"
icon_state = "[environment_type]_dug"
slowdown = 0
return
return ..()
/turf/open/floor/plating/asteroid/singularity_act()
if(turf_z_is_planet(src))
return ..()
ChangeTurf(/turf/open/space)
/turf/open/floor/plating/asteroid/singularity_pull(S, current_size)
if(dug)
return
switch(current_size)
if(STAGE_THREE)
if(!prob(30))
gets_dug()
if(STAGE_FOUR)
if(prob(50))
gets_dug()
else
if(current_size >= STAGE_FIVE && prob(70))
gets_dug()
/turf/open/floor/plating/asteroid/basalt
name = "volcanic floor"
@@ -127,7 +70,7 @@
icon_state = "basalt"
icon_plating = "basalt"
environment_type = "basalt"
sand_type = /obj/item/ore/glass/basalt
archdrops = list(/obj/item/ore/glass/basalt = 5)
floor_variance = 15
/turf/open/floor/plating/asteroid/basalt/lava //lava underneath
@@ -147,10 +90,10 @@
if("basalt5", "basalt9")
B.set_light(1.4, 0.6, LIGHT_COLOR_LAVA) //barely anything!
/turf/open/floor/plating/asteroid/basalt/gets_dug()
if(!dug)
set_light(0)
/turf/open/floor/plating/asteroid/basalt/ComponentActivated(datum/component/C)
..()
if(istype(C, /datum/component/archaeology))
set_light(0)
///////Surface. The surface is warm, but survivable without a suit. Internals are required. The floors break to chasms, which drop you into the underground.
@@ -340,8 +283,8 @@
initial_gas_mix = "TEMP=180"
slowdown = 2
environment_type = "snow"
sand_type = /obj/item/stack/sheet/mineral/snow
flags_1 = NONE
archdrops = list(/obj/item/stack/sheet/mineral/snow = 5)
/turf/open/floor/plating/asteroid/snow/airless
initial_gas_mix = "TEMP=2.7"
@@ -58,6 +58,7 @@
make_plating(1)
/turf/open/floor/engine/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
if(floor_tile)
if(prob(30))
@@ -247,6 +247,7 @@
icon_state = "r_wall"
/turf/closed/wall/r_wall/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()
+1
View File
@@ -245,6 +245,7 @@
QDEL_IN(O, 50)
/turf/closed/wall/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
if(prob(50))
dismantle_wall()