mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Changes how destroying turfs works
Turfs now have a baseturf var which determines what is "under" every turf. The default is space. Actions that previously did changeturf(/turf/space) (like bombs or RCD deconstruction) now do changeturf(baseturf). Functionally the same for the station, but allows special turf types that don't break to space (such as planet tiles). Right now the asteroid tiles are the only thing with a baseturf other than space (the baseturf is an asteroid tile). Baseturf is tracked when new things are built, so building a floor and then a wall on the asteroid tile, and then bombing that wall will return it to an asteroid tile, not space. Allows building on asteroid tiles now that doing so wont randomly make holes to space. Time for giant mining forts. I should have done this years ago for away missions. Also added myself to admins.txt
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
else
|
||||
chance_of_deletion = 100
|
||||
if(prob(chance_of_deletion))
|
||||
T.ChangeTurf(/turf/space)
|
||||
T.ChangeTurf(T.baseturf)
|
||||
else
|
||||
T.to_be_destroyed = 0
|
||||
T.max_fire_temperature_sustained = 0
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 100, 1)
|
||||
var/turf/simulated/floor/F
|
||||
for(F in orange(1, src))
|
||||
F.ChangeTurf(/turf/space)
|
||||
F.ChangeTurf(F.baseturf)
|
||||
src.visible_message("<span class='userdanger'>Something slams into the floor around [src], exposing it to space!</span>")
|
||||
if(hull)
|
||||
sleep(10)
|
||||
|
||||
@@ -310,12 +310,13 @@
|
||||
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
chassis.use_power(energy_drain)
|
||||
else if (istype(target, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = target
|
||||
occupant_message("Deconstructing [target]...")
|
||||
set_ready_state(0)
|
||||
if(do_after_cooldown(target))
|
||||
if(disabled) return
|
||||
chassis.spark_system.start()
|
||||
target:ChangeTurf(/turf/space)
|
||||
target:ChangeTurf(F.baseturf)
|
||||
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
chassis.use_power(energy_drain)
|
||||
else if (istype(target, /obj/machinery/door/airlock))
|
||||
|
||||
@@ -221,13 +221,17 @@ RCD
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(5, user))
|
||||
var/turf/simulated/floor/F = A
|
||||
if(istype(F, F.baseturf))
|
||||
user << "<span class='notice'>You can't dig any deeper!</span>"
|
||||
return 0
|
||||
else if(checkResource(5, user))
|
||||
user << "<span class='notice'>You start deconstructing floor...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!useResource(5, user)) return 0
|
||||
activate()
|
||||
A:ChangeTurf(/turf/space)
|
||||
F:ChangeTurf(F.baseturf)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -47,20 +47,20 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
/turf/simulated/floor/ex_act(severity, target)
|
||||
..()
|
||||
if(target == src)
|
||||
src.ChangeTurf(/turf/space)
|
||||
src.ChangeTurf(src.baseturf)
|
||||
if(target != null)
|
||||
ex_act(3)
|
||||
return
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.ChangeTurf(/turf/space)
|
||||
src.ChangeTurf(src.baseturf)
|
||||
if(2.0)
|
||||
switch(pick(1,2;75,3))
|
||||
if(1)
|
||||
src.ReplaceWithLattice()
|
||||
if(prob(33)) new /obj/item/stack/sheet/metal(src)
|
||||
if(2)
|
||||
src.ChangeTurf(/turf/space)
|
||||
src.ChangeTurf(src.baseturf)
|
||||
if(3)
|
||||
if(prob(80))
|
||||
src.break_tile_to_plating()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
src.ChangeTurf(/turf/space)
|
||||
src.ChangeTurf(src.baseturf)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
level = 1.0
|
||||
|
||||
var/intact = 1
|
||||
var/baseturf =/turf/space
|
||||
|
||||
//Properties for open tiles (/floor)
|
||||
var/oxygen = 0
|
||||
@@ -10,6 +11,7 @@
|
||||
var/nitrogen = 0
|
||||
var/toxins = 0
|
||||
|
||||
|
||||
//Properties for airtight tiles (/wall)
|
||||
var/thermal_conductivity = 0.05
|
||||
var/heat_capacity = 1
|
||||
@@ -132,11 +134,9 @@
|
||||
SSair.remove_from_active(src)
|
||||
|
||||
var/turf/W = new path(src)
|
||||
|
||||
if(istype(W, /turf/simulated))
|
||||
W:Assimilate_Air()
|
||||
W.RemoveLattice()
|
||||
|
||||
W.levelupdate()
|
||||
W.CalculateAdjacentTurfs()
|
||||
return W
|
||||
@@ -173,11 +173,11 @@
|
||||
SSair.add_to_active(src)
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
src.ChangeTurf(/turf/space)
|
||||
src.ChangeTurf(src.baseturf)
|
||||
new /obj/structure/lattice(locate(src.x, src.y, src.z) )
|
||||
|
||||
/turf/proc/ReplaceWithCatwalk()
|
||||
src.ChangeTurf(/turf/space)
|
||||
src.ChangeTurf(src.baseturf)
|
||||
new /obj/structure/lattice/catwalk(locate(src.x, src.y, src.z) )
|
||||
|
||||
/turf/proc/phase_damage_creatures(damage,mob/U = null)//>Ninja Code. Hurts and knocks out creatures on this turf //NINJACODE
|
||||
@@ -248,7 +248,7 @@
|
||||
continue
|
||||
if(O.invisibility == 101)
|
||||
O.singularity_act()
|
||||
ChangeTurf(/turf/space)
|
||||
ChangeTurf(src.baseturf)
|
||||
return(2)
|
||||
|
||||
/turf/proc/can_have_cabling()
|
||||
|
||||
@@ -88,16 +88,16 @@
|
||||
|
||||
/turf/simulated/floor/vines/ex_act(severity, target)
|
||||
if(severity < 3 || target == src)
|
||||
ChangeTurf(/turf/space)
|
||||
ChangeTurf(src.baseturf)
|
||||
|
||||
/turf/simulated/floor/vines/narsie_act()
|
||||
if(prob(20))
|
||||
ChangeTurf(/turf/space) //nar sie eats this shit
|
||||
ChangeTurf(src.baseturf) //nar sie eats this shit
|
||||
|
||||
/turf/simulated/floor/vines/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
if(prob(50))
|
||||
ChangeTurf(/turf/space)
|
||||
ChangeTurf(src.baseturf)
|
||||
|
||||
/turf/simulated/floor/vines/ChangeTurf(turf/simulated/floor/T)
|
||||
for(var/obj/effect/spacevine/SV in src)
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
qdel(light)
|
||||
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
var/oldbaseturf = baseturf
|
||||
|
||||
var/list/our_lights //reset affecting_lights if needed
|
||||
if(opacity != initial(path:opacity) && old_lumcount)
|
||||
@@ -260,12 +261,14 @@
|
||||
|
||||
lighting_changed = 1 //Don't add ourself to SSlighting.changed_turfs
|
||||
update_lumcount(old_lumcount)
|
||||
baseturf = oldbaseturf
|
||||
lighting_object = locate() in src
|
||||
init_lighting()
|
||||
|
||||
for(var/turf/space/S in orange(src,1))
|
||||
S.update_starlight()
|
||||
|
||||
|
||||
/turf/proc/update_lumcount(amount)
|
||||
lighting_lumcount += amount
|
||||
if(!lighting_changed)
|
||||
|
||||
@@ -10,6 +10,7 @@ var/global/list/rockTurfEdgeCache
|
||||
name = "rock"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
icon_state = "rock_nochance"
|
||||
baseturf = /turf/simulated/floor/plating/asteroid
|
||||
oxygen = 0
|
||||
nitrogen = 0
|
||||
opacity = 1
|
||||
@@ -498,6 +499,7 @@ var/global/list/rockTurfEdgeCache
|
||||
|
||||
/turf/simulated/floor/plating/asteroid //floor piece
|
||||
name = "Asteroid"
|
||||
baseturf = /turf/simulated/floor/plating/asteroid
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "asteroid"
|
||||
icon_plating = "asteroid"
|
||||
@@ -585,6 +587,17 @@ var/global/list/rockTurfEdgeCache
|
||||
O.attackby(W,user)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/tile))
|
||||
var/obj/item/stack/tile/Z = W
|
||||
if(!Z.use(1))
|
||||
return
|
||||
var/turf/simulated/floor/T = ChangeTurf(Z.turf_type)
|
||||
if(istype(Z,/obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow
|
||||
var/obj/item/stack/tile/light/L = Z
|
||||
var/turf/simulated/floor/light/F = T
|
||||
F.state = L.state
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
|
||||
/turf/simulated/floor/plating/asteroid/proc/gets_dug()
|
||||
if(dug)
|
||||
return
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
contents_explosion(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
ChangeTurf(/turf/space)
|
||||
ChangeTurf(src.baseturf)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
ChangeTurf(/turf/space)
|
||||
ChangeTurf(src.baseturf)
|
||||
else
|
||||
return
|
||||
|
||||
/turf/simulated/floor/engine/blob_act()
|
||||
if (prob(25))
|
||||
ChangeTurf(/turf/space)
|
||||
ChangeTurf(src.baseturf)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
@@ -51,7 +51,7 @@ datum/reagent/nitroglycerin
|
||||
if(istype(T, /turf/simulated/floor/plating))
|
||||
var/turf/simulated/floor/plating/F = T
|
||||
if(prob(1 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed
|
||||
F.ChangeTurf(/turf/space)
|
||||
F.ChangeTurf(F.baseturf)
|
||||
if(istype(T, /turf/simulated/floor/))
|
||||
var/turf/simulated/floor/F = T
|
||||
if(prob(volume/10))
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
MrStonedOne = Host
|
||||
microscopics = Game Master
|
||||
Gun Hog = Game Master
|
||||
KorPhaeron = Game Master
|
||||
razharas = Game Master
|
||||
Niknakflak = Game Master
|
||||
rolan7 = Game Master
|
||||
|
||||
36
html/changelogs/KORPHAERON-TURF.yml
Normal file
36
html/changelogs/KORPHAERON-TURF.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# tgs (TG-ported fixes?)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: KorPhaeron
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "You can now lay tiles on the asteroid. Go nuts building forts."
|
||||
Reference in New Issue
Block a user