Merge branch 'master' into upstream-merge-33919

This commit is contained in:
LetterJay
2018-01-01 04:11:29 -06:00
committed by GitHub
98 changed files with 1696 additions and 3482 deletions
@@ -8,6 +8,8 @@
/obj/effect/proc_holder/changeling/headcrab/sting_action(mob/user)
set waitfor = FALSE
if(alert("Are we sure we wish to kill ourself and create a headslug?",,"Yes", "No") == "No")
return
var/datum/mind/M = user.mind
var/list/organs = user.getorganszone("head", 1)
@@ -35,4 +37,4 @@
if(crab.origin)
crab.origin.active = 1
crab.origin.transfer_to(crab)
to_chat(crab, "<span class='warning'>You burst out of the remains of your former body in a shower of gore!</span>")
to_chat(crab, "<span class='warning'>You burst out of the remains of your former body in a shower of gore!</span>")
@@ -278,7 +278,7 @@
animate(src, alpha = 255, time = 10, flags = ANIMATION_END_NOW) //we may have a previous animation going. finish it first, then do this one without delay.
sleep(10)
//as long as they're still on the sigil and are either not a servant or they're a servant AND it has remaining vitality
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (GLOB.ratvar_awakens || GLOB.clockwork_vitality))) && get_turf(L) == get_turf(src))
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (GLOB.ratvar_awakens || GLOB.clockwork_vitality))) && get_turf(L) == get_turf(src) && !L.buckled)
sigil_active = TRUE
if(animation_number >= 4)
new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
@@ -313,21 +313,28 @@
revival_cost = 0
var/mob/dead/observer/ghost = L.get_ghost(TRUE)
if(GLOB.clockwork_vitality >= revival_cost && (ghost || (L.mind && L.mind.active)))
if(ghost)
ghost.reenter_corpse()
L.revive(1, 1)
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
animate(V, alpha = 0, transform = matrix()*2, time = 8)
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
L.visible_message("<span class='warning'>[L] suddenly gets back up, [L.p_their()] body dripping blue ichor!</span>", "<span class='inathneq'>\"[text2ratvar("You will be okay, child.")]\"</span>")
GLOB.clockwork_vitality -= revival_cost
if(L.has_status_effect(STATUS_EFFECT_ICHORIAL_STAIN))
visible_message("<span class='boldwarning'>[src] strains, but nothing happens...</span>")
if(L.pulledby)
to_chat(L.pulledby, "<span class='userdanger'>[L] was already revived recently by a vitality matrix! Wait a bit longer!</span>")
break
else
if(ghost)
ghost.reenter_corpse()
L.revive(1, 1)
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
animate(V, alpha = 0, transform = matrix()*2, time = 8)
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
to_chat(L, "<span class='inathneq'>\"[text2ratvar("You will be okay, child.")]\"</span>")
L.apply_status_effect(STATUS_EFFECT_ICHORIAL_STAIN)
GLOB.clockwork_vitality -= revival_cost
break
if(!L.client || L.client.is_afk())
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [L.name], an inactive clock cultist?", "[name]", null, "Clock Cultist", 50, L)
var/mob/dead/observer/theghost = null
if(candidates.len)
to_chat(L, "Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!")
to_chat(L, "<span class='userdanger'>Your physical form has been taken over by another soul due to your inactivity! Ahelp if you wish to regain your form!</span>")
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(L)]) to replace an inactive clock cultist.")
L.ghostize(0)
L.key = theghost.key
@@ -70,6 +70,12 @@
quickbind = TRUE
quickbind_desc = "Creates a Vitality Matrix, which drains non-Servants on it to heal Servants that cross it."
/datum/clockwork_scripture/create_object/vitality_matrix/check_special_requirements()
if(locate(object_path) in range(1, invoker))
to_chat(invoker, "<span class='danger'>Vitality matrices placed next to each other could interfere and cause a feedback loop! Move away from the other ones!</span>")
return FALSE
return ..()
//Judicial Visor: Creates a judicial visor, which can smite an area.
/datum/clockwork_scripture/create_object/judicial_visor
@@ -3,7 +3,7 @@
name = "pressure sensor"
desc = "A thin plate of brass, barely visible but clearly distinct."
clockwork_desc = "A trigger that will activate when a non-servant runs across it."
max_integrity = 25
max_integrity = 5
icon_state = "pressure_sensor"
alpha = 80
layer = LOW_ITEM_LAYER
@@ -21,9 +21,10 @@
STOP_PROCESSING(SSfastprocess, src)
if(buckled_mobs && buckled_mobs.len)
var/mob/living/L = buckled_mobs[1]
L.Knockdown(100)
L.visible_message("<span class='warning'>[L] is maimed as the skewer shatters while still in their body!</span>")
L.adjustBruteLoss(15)
if(iscarbon(L))
L.Knockdown(100)
L.visible_message("<span class='warning'>[L] is maimed as the skewer shatters while still in their body!</span>")
L.adjustBruteLoss(15)
unbuckle_mob(L)
return ..()
@@ -48,14 +49,22 @@
/obj/structure/destructible/clockwork/trap/brass_skewer/activate()
if(density)
return
var/mob/living/carbon/squirrel = locate() in get_turf(src)
var/mob/living/squirrel = locate() in get_turf(src)
if(squirrel)
squirrel.visible_message("<span class='boldwarning'>A massive brass spike erupts from the ground, impaling [squirrel]!</span>", \
"<span class='userdanger'>A massive brass spike rams through your chest, hoisting you into the air!</span>")
squirrel.emote("scream")
playsound(squirrel, 'sound/effects/splat.ogg', 50, TRUE)
playsound(squirrel, 'sound/misc/desceration-03.ogg', 50, TRUE)
squirrel.apply_damage(20, BRUTE, "chest")
if(iscyborg(squirrel))
if(!squirrel.stat)
squirrel.visible_message("<span class='boldwarning'>A massive brass spike erupts from the ground, rending [squirrel]'s chassis but shattering into pieces!</span>", \
"<span class='userdanger'>A massive brass spike rips through your chassis and bursts into shrapnel in your casing!</span>")
squirrel.adjustBruteLoss(50)
squirrel.Stun(20)
addtimer(CALLBACK(src, .proc/take_damage, max_integrity), 1)
else
squirrel.visible_message("<span class='boldwarning'>A massive brass spike erupts from the ground, impaling [squirrel]!</span>", \
"<span class='userdanger'>A massive brass spike rams through your chest, hoisting you into the air!</span>")
squirrel.emote("scream")
playsound(squirrel, 'sound/effects/splat.ogg', 50, TRUE)
playsound(squirrel, 'sound/misc/desceration-03.ogg', 50, TRUE)
squirrel.apply_damage(20, BRUTE, "chest")
mouse_opacity = MOUSE_OPACITY_OPAQUE //So players can interact with the tile it's on to pull them off
buckle_mob(squirrel, TRUE)
else
@@ -59,9 +59,9 @@
brass_floor = TRUE
if(W.use(2 - brass_floor))
if(anchored)
T.ChangeTurf(/turf/closed/wall/clockwork)
T.PlaceOnTop(/turf/closed/wall/clockwork)
else
T.ChangeTurf(/turf/open/floor/clockwork)
T.PlaceOnTop(/turf/open/floor/clockwork)
new /obj/structure/falsewall/brass(T)
qdel(src)
else
+26 -30
View File
@@ -149,8 +149,6 @@
if(href_list["make"])
var/turf/T = loc
/////////////////
//href protection
being_built = stored_research.isDesignResearchedID(href_list["make"])
@@ -174,34 +172,8 @@
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
if(is_stack)
spawn(32*coeff)
use_power(power)
var/list/materials_used = list(MAT_METAL=metal_cost*multiplier, MAT_GLASS=glass_cost*multiplier)
materials.use_amount(materials_used)
var/obj/item/stack/N = new being_built.build_path(T, multiplier)
N.update_icon()
N.autolathe_crafted(src)
for(var/obj/item/stack/S in T.contents - N)
if(istype(S, N.merge_type))
N.merge(S)
busy = FALSE
updateUsrDialog()
else
spawn(32*coeff*multiplier)
use_power(power)
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
materials.use_amount(materials_used)
for(var/i=1, i<=multiplier, i++)
var/obj/item/new_item = new being_built.build_path(T)
for(var/mat in materials_used)
new_item.materials[mat] = materials_used[mat] / multiplier
new_item.autolathe_crafted(src)
busy = FALSE
updateUsrDialog()
var/time = is_stack ? 32 : 32*coeff*multiplier
addtimer(CALLBACK(src, .proc/make_item, power, metal_cost, glass_cost, multiplier, coeff, is_stack), time)
if(href_list["search"])
matching_designs.Cut()
@@ -218,6 +190,30 @@
return
/obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack)
GET_COMPONENT(materials, /datum/component/material_container)
var/atom/A = drop_location()
use_power(power)
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
materials.use_amount(materials_used)
if(is_stack)
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
N.update_icon()
N.autolathe_crafted(src)
for(var/obj/item/stack/S in (A.contents - N))
if(istype(S, N.merge_type))
N.merge(S)
else
for(var/i=1, i<=multiplier, i++)
var/obj/item/new_item = new being_built.build_path(A)
for(var/mat in materials_used)
new_item.materials[mat] = materials_used[mat] / multiplier
new_item.autolathe_crafted(src)
busy = FALSE
updateDialog()
/obj/machinery/autolathe/RefreshParts()
var/T = 0
for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
+1 -1
View File
@@ -528,7 +528,7 @@
playsound(loc, 'sound/effects/bang.ogg', 100, 1)
var/turf/open/floor/F
for(F in orange(1, src))
F.ChangeTurf(F.baseturf)
F.ScrapeAway()
say("Something slams into the floor around [src], exposing it to space!")
if(hull)
sleep(10)
+1 -1
View File
@@ -135,7 +135,7 @@
for(var/turf/closed/T in range(2, src))
here.ChangeTurf(T.type)
return INITIALIZE_HINT_QDEL
here.ChangeTurf(/turf/closed/wall)
here.PlaceOnTop(/turf/closed/wall)
if(9 to 11)
lights = FALSE
locked = TRUE
+10 -1
View File
@@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(allCasters)
var/creationTime
var/authorCensor
var/bodyCensor
var/photo_file
/datum/newscaster/feed_message/proc/returnAuthor(censor)
if(censor == -1)
@@ -97,6 +98,7 @@ GLOBAL_LIST_EMPTY(allCasters)
var/scannedUser
var/isAdminMsg
var/icon/img
var/photo_file
/datum/newscaster/feed_network
var/list/datum/newscaster/feed_channel/network_channels = list()
@@ -126,6 +128,7 @@ GLOBAL_LIST_EMPTY(allCasters)
if(photo)
newMsg.img = photo.img
newMsg.caption = photo.scribble
newMsg.photo_file = save_photo(photo.img)
for(var/datum/newscaster/feed_channel/FC in network_channels)
if(FC.channel_name == channel_name)
FC.messages += newMsg
@@ -143,6 +146,7 @@ GLOBAL_LIST_EMPTY(allCasters)
wanted_issue.isAdminMsg = adminMsg
if(photo)
wanted_issue.img = photo.img
wanted_issue.photo_file = save_photo(photo.img)
if(newMessage)
for(var/obj/machinery/newscaster/N in GLOB.allCasters)
N.newsAlert()
@@ -157,7 +161,12 @@ GLOBAL_LIST_EMPTY(allCasters)
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.update_icon()
/datum/newscaster/feed_network/proc/save_photo(icon/photo)
var/photo_file = copytext(md5("\icon[photo]"), 1, 6)
if(!fexists("[GLOB.log_directory]/photos/[photo_file].png"))
var/icon/p = icon(photo, frame = 1)
fcopy(p, "[GLOB.log_directory]/photos/[photo_file].png")
return photo_file
/obj/item/wallframe/newscaster
name = "newscaster frame"
@@ -222,14 +222,14 @@
occupant_message("Deconstructing [W]...")
if(do_after_cooldown(W))
chassis.spark_system.start()
W.ChangeTurf(/turf/open/floor/plating)
W.ScrapeAway()
playsound(W, 'sound/items/deconstruct.ogg', 50, 1)
else if(isfloorturf(target))
var/turf/open/floor/F = target
occupant_message("Deconstructing [F]...")
if(do_after_cooldown(target))
chassis.spark_system.start()
F.ChangeTurf(F.baseturf)
F.ScrapeAway()
playsound(F, 'sound/items/deconstruct.ogg', 50, 1)
else if (istype(target, /obj/machinery/door/airlock))
occupant_message("Deconstructing [target]...")
@@ -242,14 +242,14 @@
var/turf/open/space/S = target
occupant_message("Building Floor...")
if(do_after_cooldown(S))
S.ChangeTurf(/turf/open/floor/plating)
S.PlaceOnTop(/turf/open/floor/plating)
playsound(S, 'sound/items/deconstruct.ogg', 50, 1)
chassis.spark_system.start()
else if(isfloorturf(target))
var/turf/open/floor/F = target
occupant_message("Building Wall...")
if(do_after_cooldown(F))
F.ChangeTurf(/turf/closed/wall)
F.PlaceOnTop(/turf/closed/wall)
playsound(F, 'sound/items/deconstruct.ogg', 50, 1)
chassis.spark_system.start()
if(2)
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "recharge_floor" // Some people just want to watch the world burn i guess
/turf/open/floor/mech_bay_recharge_floor/break_tile()
src.ChangeTurf(/turf/open/floor/plating)
ScrapeAway()
/turf/open/floor/mech_bay_recharge_floor/airless
icon_state = "recharge_floor_asteroid"
@@ -76,7 +76,7 @@
if(metal)
var/turf/T = get_turf(src)
if(isspaceturf(T)) //Block up any exposed space
T.ChangeTurf(/turf/open/floor/plating/foam)
T.PlaceOnTop(/turf/open/floor/plating/foam)
for(var/direction in GLOB.cardinals)
var/turf/cardinal_turf = get_step(T, direction)
if(get_area(cardinal_turf) != get_area(T)) //We're at an area boundary, so let's block off this turf!
+13 -3
View File
@@ -5,19 +5,29 @@
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = TRUE //if the same item can be spawned twice
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
var/fan_out_items = FALSE //Whether the items should be distributed to offsets 0,3,-3,6,-6,9,-9.. This overrides pixel_x/y on the spawner itself
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
if(loot && loot.len)
var/turf/T = get_turf(src)
while(lootcount && loot.len)
var/loot_spawned = 0
while((lootcount-loot_spawned) && loot.len)
var/lootspawn = pickweight(loot)
if(!lootdoubles)
loot.Remove(lootspawn)
if(lootspawn)
new lootspawn(T)
lootcount--
var/atom/movable/spawned_loot = new lootspawn(T)
if (!fan_out_items)
if (pixel_x != 0)
spawned_loot.pixel_x = pixel_x
if (pixel_y != 0)
spawned_loot.pixel_y = pixel_y
else
if (loot_spawned)
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-3)+((loot_spawned%2)*(loot_spawned+1)/2*3)
loot_spawned++
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/lootdrop/armory_contraband
@@ -20,9 +20,9 @@
for(var/j = lowBoundY,j<=hiBoundY,j++)
var/turf/T = locate(i,j,z)
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
T.ChangeTurf(/turf/closed/wall/vault)
T.PlaceOnTop(/turf/closed/wall/vault)
else
T.ChangeTurf(/turf/open/floor/vault)
T.PlaceOnTop(/turf/open/floor/vault)
T.icon_state = "[type]vault"
qdel(src)
+1 -1
View File
@@ -233,7 +233,7 @@
/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
var/obj/item/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
owner.visible_message("<span class='danger'>\The [attack_text] hits the fueltank on [owner]'s [name], rupturing it! What a shot!</span>")
var/target_turf = get_turf(owner)
igniter.ignite_turf(src,target_turf, release_amount = 100)
qdel(ptank)
+4 -3
View File
@@ -275,13 +275,14 @@
consume_turf(target)
/obj/item/melee/supermatter_sword/proc/consume_turf(turf/T)
if(istype(T, T.baseturf))
return //Can't void the void, baby!
var/oldtype = T.type
var/turf/newT = T.ScrapeAway()
if(newT.type == oldtype)
return
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>[T] smacks into [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
shard.Consume()
T.ChangeTurf(T.baseturf)
T.CalculateAdjacentTurfs()
/obj/item/melee/supermatter_sword/add_blood(list/blood_dna)
+1 -1
View File
@@ -85,7 +85,7 @@
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
T.ChangeTurf(walltype)
T.PlaceOnTop(walltype)
if(delete)
qdel(src)
return T
+6 -6
View File
@@ -86,7 +86,7 @@
S.use(5)
to_chat(user, "<span class='notice'>You add the plating.</span>")
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall/mineral/iron)
T.PlaceOnTop(/turf/closed/wall/mineral/iron)
transfer_fingerprints_to(T)
qdel(src)
return
@@ -120,7 +120,7 @@
S.use(2)
to_chat(user, "<span class='notice'>You add the plating.</span>")
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall)
T.PlaceOnTop(/turf/closed/wall)
transfer_fingerprints_to(T)
qdel(src)
return
@@ -150,7 +150,7 @@
S.use(1)
to_chat(user, "<span class='notice'>You fully reinforce the wall.</span>")
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall/r_wall)
T.PlaceOnTop(/turf/closed/wall/r_wall)
transfer_fingerprints_to(T)
qdel(src)
return
@@ -194,7 +194,7 @@
S.use(2)
to_chat(user, "<span class='notice'>You add the plating.</span>")
var/turf/T = get_turf(src)
T.ChangeTurf(text2path("/turf/closed/wall/mineral/[M]"))
T.PlaceOnTop(text2path("/turf/closed/wall/mineral/[M]"))
transfer_fingerprints_to(T)
qdel(src)
return
@@ -397,7 +397,7 @@
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
R.use(1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/closed/wall/mineral/cult)
T.PlaceOnTop(/turf/closed/wall/mineral/cult)
qdel(src)
else
@@ -424,7 +424,7 @@
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You finish a wall.</span>")
T.ChangeTurf(/turf/closed/wall)
T.PlaceOnTop(/turf/closed/wall)
qdel(src)
return TRUE
if(RCD_DECONSTRUCT)
+23 -8
View File
@@ -123,27 +123,42 @@
// Take the input as baseturfs and put it underneath the current baseturfs
// If fake_turf_type is provided and new_baseturfs is not the baseturfs list will be created identical to the turf type's
// If both or just new_baseturfs is provided they will be inserted below the existing baseturfs
/turf/proc/PlaceOnBottom(turf/fake_turf_type, list/new_baseturfs)
/turf/proc/PlaceOnBottom(list/new_baseturfs, turf/fake_turf_type)
if(fake_turf_type)
if(!new_baseturfs)
var/list/old_baseturfs = baseturfs.Copy()
assemble_baseturfs(fake_turf_type)
if(!length(baseturfs))
baseturfs = list(baseturfs)
baseturfs += old_baseturfs
return
else if(!length(new_baseturfs))
new_baseturfs = list(new_baseturfs, fake_turf_type)
else
new_baseturfs += fake_turf_type
if(!length(baseturfs))
baseturfs = list(baseturfs)
baseturfs.Insert(1, new_baseturfs)
// Make a new turf and put it on top
/turf/proc/PlaceOnTop(turf/fake_turf_type, list/new_baseturfs)
var/list/temp_baseturfs = list()
temp_baseturfs += baseturfs // Doesn't matter if baseturfs is a list or single item, either will get added correctly
temp_baseturfs += type
if(new_baseturfs)
temp_baseturfs += new_baseturfs
return ChangeTurf(fake_turf_type, temp_baseturfs)
// The args behave identical to PlaceOnBottom except they go on top
/turf/proc/PlaceOnTop(list/new_baseturfs, turf/fake_turf_type)
if(fake_turf_type)
if(!new_baseturfs)
var/list/old_baseturfs = baseturfs.Copy()
assemble_baseturfs(fake_turf_type)
if(!length(baseturfs))
baseturfs = list(baseturfs)
baseturfs.Insert(1, old_baseturfs)
return
else if(!length(new_baseturfs))
new_baseturfs = list(new_baseturfs, fake_turf_type)
else
new_baseturfs += fake_turf_type
if(!length(baseturfs))
baseturfs = list(baseturfs)
baseturfs += new_baseturfs
// Copy an existing turf and put it on top
/turf/proc/CopyOnTop(turf/copytarget, ignore_bottom=1, depth=INFINITY)
+2 -17
View File
@@ -58,21 +58,6 @@
if("icon")
SStitle.icon = icon
/turf/closed/indestructible/reebe
name = "void"
icon_state = "reebe"
opacity = FALSE
baseturf = /turf/closed/indestructible/reebe
/turf/closed/indestructible/reebe/ratvar_act()
return
/turf/closed/indestructible/reebe/narsie_act()
return
/turf/closed/indestructible/reebe/CollidedWith(atom/movable/AM)
playsound(src, 'sound/effects/bamf.ogg', 25, TRUE)
/turf/closed/indestructible/riveted
icon = 'icons/turf/walls/riveted.dmi'
icon_state = "riveted"
@@ -136,7 +121,7 @@
icon = 'icons/turf/walls.dmi'
icon_state = "necro"
explosion_block = 50
baseturf = /turf/closed/indestructible/necropolis
baseturfs = /turf/closed/indestructible/necropolis
/turf/closed/indestructible/necropolis/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/floors.dmi'
@@ -150,7 +135,7 @@
icon_state = "wall"
canSmoothWith = list(/turf/closed/indestructible/riveted/boss, /turf/closed/indestructible/riveted/boss/see_through)
explosion_block = 50
baseturf = /turf/closed/indestructible/riveted/boss
baseturfs = /turf/closed/indestructible/riveted/boss
/turf/closed/indestructible/riveted/boss/see_through
opacity = FALSE
+4 -4
View File
@@ -30,7 +30,7 @@
desc = "It's regarding you suspiciously."
icon = 'icons/turf/floors.dmi'
icon_state = "necro1"
baseturf = /turf/open/indestructible/necropolis
baseturfs = /turf/open/indestructible/necropolis
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
/turf/open/indestructible/necropolis/Initialize()
@@ -45,7 +45,7 @@
name = "necropolis floor"
icon = 'icons/turf/boss_floors.dmi'
icon_state = "boss"
baseturf = /turf/open/indestructible/boss
baseturfs = /turf/open/indestructible/boss
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
/turf/open/indestructible/boss/air
@@ -54,7 +54,7 @@
/turf/open/indestructible/hierophant
icon = 'icons/turf/floors/hierophant_floor.dmi'
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
baseturf = /turf/open/indestructible/hierophant
baseturfs = /turf/open/indestructible/hierophant
smooth = SMOOTH_TRUE
/turf/open/indestructible/hierophant/two
@@ -71,7 +71,7 @@
name = "cogmetal"
desc = "Brass plating that gently radiates heat. For some reason, it reminds you of blood."
icon_state = "reebe"
baseturf = /turf/open/indestructible/clock_spawn_room
baseturfs = /turf/open/indestructible/clock_spawn_room
/turf/open/indestructible/clock_spawn_room/Entered()
..()
+6 -6
View File
@@ -2,7 +2,7 @@
/turf/open/chasm
name = "chasm"
desc = "Watch your step."
baseturf = /turf/open/chasm
baseturfs = /turf/open/chasm
smooth = SMOOTH_TRUE | SMOOTH_BORDER | SMOOTH_MORE
icon = 'icons/turf/floors/chasms.dmi'
icon_state = "smooth"
@@ -55,7 +55,7 @@
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
to_chat(user, "<span class='notice'>You build a floor.</span>")
// Create a floor, which has this chasm underneath it
ChangeTurf(/turf/open/floor/plating, type)
PlaceOnTop(/turf/open/floor/plating)
else
to_chat(user, "<span class='warning'>You need one floor tile to build a floor!</span>")
else
@@ -67,7 +67,7 @@
// Naive "down" which just subtracts a z-level
/turf/open/chasm/straight_down
baseturf = /turf/open/chasm/straight_down
baseturfs = /turf/open/chasm/straight_down
/turf/open/chasm/straight_down/Initialize()
. = ..()
@@ -78,7 +78,7 @@
/turf/open/chasm/lavaland
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
baseturf = /turf/open/chasm/lavaland
baseturfs = /turf/open/chasm/lavaland
light_range = 1.9 //slightly less range than lava
light_power = 0.65 //less bright, too
light_color = LIGHT_COLOR_LAVA //let's just say you're falling into lava, that makes sense right
@@ -89,7 +89,7 @@
icon = 'icons/turf/floors/junglechasm.dmi'
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
baseturf = /turf/open/chasm/jungle
baseturfs = /turf/open/chasm/jungle
/turf/open/chasm/jungle/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/floors.dmi'
@@ -97,7 +97,7 @@
return TRUE
/turf/open/chasm/jungle/straight_down
baseturf = /turf/open/chasm/jungle/straight_down
baseturfs = /turf/open/chasm/jungle/straight_down
/turf/open/chasm/jungle/straight_down/Initialize(mapload)
. = ..()
+7 -8
View File
@@ -51,13 +51,13 @@
if(severity != 1 && shielded && target != src)
return
if(target == src)
src.ChangeTurf(src.baseturf)
ScrapeAway()
if(target != null)
severity = 3
switch(severity)
if(1)
src.ChangeTurf(src.baseturf)
ScrapeAway()
if(2)
switch(pick(1,2;75,3))
if(1)
@@ -65,7 +65,7 @@
if(prob(33))
new /obj/item/stack/sheet/metal(src)
if(2)
src.ChangeTurf(src.baseturf)
ScrapeAway()
if(3)
if(prob(80))
src.break_tile_to_plating()
@@ -119,7 +119,7 @@
/turf/open/floor/proc/make_plating()
return ChangeTurf(/turf/open/floor/plating)
/turf/open/floor/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
/turf/open/floor/ChangeTurf(path, new_baseturf, flags)
if(!isfloorturf(src))
return ..() //fucking turfs switch the fucking src of the fucking running procs
if(!ispath(path, /turf/open/floor))
@@ -202,7 +202,7 @@
ChangeTurf(/turf/open/floor/clockwork)
/turf/open/floor/acid_melt()
ChangeTurf(baseturf)
ScrapeAway()
/turf/open/floor/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
@@ -223,7 +223,7 @@
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You build a wall.</span>")
ChangeTurf(/turf/closed/wall)
PlaceOnTop(/turf/closed/wall)
return TRUE
if(RCD_AIRLOCK)
if(locate(/obj/machinery/door/airlock) in src)
@@ -244,10 +244,9 @@
A.autoclose = TRUE
return TRUE
if(RCD_DECONSTRUCT)
if(istype(src, baseturf))
if(ScrapeAway() == src)
return FALSE
to_chat(user, "<span class='notice'>You deconstruct [src].</span>")
ChangeTurf(baseturf)
return TRUE
if(RCD_WINDOWGRILLE)
if(locate(/obj/structure/grille) in src)
@@ -47,7 +47,7 @@
icon_state = "light_off"
/turf/open/floor/light/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
/turf/open/floor/light/ChangeTurf(path, new_baseturf, flags)
set_light(0)
return ..()
@@ -142,7 +142,7 @@
name = "clockwork floor"
desc = "Tightly-pressed brass tiles. They emit minute vibration."
icon_state = "plating"
baseturf = /turf/open/floor/clockwork
baseturfs = /turf/open/floor/clockwork
var/uses_overlay = TRUE
var/obj/effect/clockwork/overlay/floor/realappearence
@@ -161,9 +161,7 @@
return ..()
/turf/open/floor/clockwork/ReplaceWithLattice()
if(baseturf == type)
return
..()
. = ..()
for(var/obj/structure/lattice/L in src)
L.ratvar_act()
@@ -196,7 +194,7 @@
L.adjustToxLoss(-3, TRUE, TRUE)
/turf/open/floor/clockwork/attackby(obj/item/I, mob/living/user, params)
if(baseturf == type)
if(baseturfs == type)
return
if(istype(I, /obj/item/crowbar))
user.visible_message("<span class='notice'>[user] begins slowly prying up [src]...</span>", "<span class='notice'>You begin painstakingly prying up [src]...</span>")
@@ -225,7 +223,7 @@
name = "cogplate"
desc = "Warm brass plating. You can feel it gently vibrating, as if machinery is on the other side."
icon_state = "reebe"
baseturf = /turf/open/floor/clockwork/reebe
baseturfs = /turf/open/floor/clockwork/reebe
uses_overlay = FALSE
/turf/open/floor/bluespace
+2 -2
View File
@@ -109,10 +109,10 @@
if(prob(I.force * 20 - 25))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>", \
"<span class='danger'>You smash through [src] with [I]!</span>")
ChangeTurf(baseturf)
ScrapeAway()
else
to_chat(user, "<span class='danger'>You hit [src], to no effect!</span>")
/turf/open/floor/plating/foam/ex_act()
..()
ChangeTurf(baseturf)
ScrapeAway()
@@ -5,7 +5,7 @@
/turf/open/floor/plating/asteroid //floor piece
name = "asteroid sand"
baseturf = /turf/open/floor/plating/asteroid
baseturfs = /turf/open/floor/plating/asteroid
icon = 'icons/turf/floors.dmi'
icon_state = "asteroid"
icon_plating = "asteroid"
@@ -61,7 +61,7 @@
/turf/open/floor/plating/asteroid/singularity_act()
if(turf_z_is_planet(src))
return ..()
ChangeTurf(/turf/open/space)
ScrapeAway()
/turf/open/floor/plating/asteroid/ex_act(severity, target)
. = SendSignal(COMSIG_ATOM_EX_ACT, severity, target)
@@ -70,7 +70,7 @@
/turf/open/floor/plating/asteroid/basalt
name = "volcanic floor"
baseturf = /turf/open/floor/plating/asteroid/basalt
baseturfs = /turf/open/floor/plating/asteroid/basalt
icon = 'icons/turf/floors.dmi'
icon_state = "basalt"
icon_plating = "basalt"
@@ -79,7 +79,7 @@
floor_variance = 15
/turf/open/floor/plating/asteroid/basalt/lava //lava underneath
baseturf = /turf/open/lava/smooth
baseturfs = /turf/open/lava/smooth
/turf/open/floor/plating/asteroid/basalt/airless
initial_gas_mix = "TEMP=2.7"
@@ -103,7 +103,7 @@
/turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
baseturf = /turf/open/lava/smooth/lava_land_surface
baseturfs = /turf/open/lava/smooth/lava_land_surface
@@ -206,7 +206,7 @@
if(istype(tunnel))
// Small chance to have forks in our tunnel; otherwise dig our tunnel.
if(i > 3 && prob(20))
var/turf/open/floor/plating/asteroid/airless/cave/C = tunnel.ChangeTurf(data_having_type,FALSE,FALSE,TRUE)
var/turf/open/floor/plating/asteroid/airless/cave/C = tunnel.ChangeTurf(data_having_type, null, CHANGETURF_IGNORE_AIR)
C.going_backwards = FALSE
C.produce_tunnel_from_data(rand(10, 15), dir)
else
@@ -232,7 +232,7 @@
SpawnFlora(T)
SpawnMonster(T)
T.ChangeTurf(turf_type,FALSE,FALSE,TRUE)
T.ChangeTurf(turf_type, null, CHANGETURF_IGNORE_AIR)
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T)
if(prob(30))
@@ -279,7 +279,7 @@
name = "snow"
desc = "Looks cold."
icon = 'icons/turf/snow.dmi'
baseturf = /turf/open/floor/plating/asteroid/snow
baseturfs = /turf/open/floor/plating/asteroid/snow
icon_state = "snow"
icon_plating = "snow"
initial_gas_mix = "TEMP=180"
@@ -3,7 +3,7 @@
desc = "Upon closer examination, it's still dirt."
icon = 'icons/turf/floors.dmi'
icon_state = "dirt"
baseturf = /turf/open/chasm/jungle/straight_down
baseturfs = /turf/open/chasm/jungle/straight_down
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
attachment_holes = FALSE
@@ -37,7 +37,7 @@
smooth = SMOOTH_MORE|SMOOTH_BORDER
var/smooth_icon = 'icons/turf/floors/ash.dmi'
desc = "The ground is covered in volcanic ash."
baseturf = /turf/open/floor/plating/ashplanet/wateryrock //I assume this will be a chasm eventually, once this becomes an actual surface
baseturfs = /turf/open/floor/plating/ashplanet/wateryrock //I assume this will be a chasm eventually, once this becomes an actual surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
attachment_holes = FALSE
@@ -91,24 +91,24 @@
name = "sand"
desc = "Surf's up."
icon_state = "sand"
baseturf = /turf/open/floor/plating/beach/sand
baseturfs = /turf/open/floor/plating/beach/sand
/turf/open/floor/plating/beach/coastline_t
name = "coastline"
desc = "Tide's high tonight. Charge your batons."
icon_state = "sandwater_t"
baseturf = /turf/open/floor/plating/beach/coastline_t
baseturfs = /turf/open/floor/plating/beach/coastline_t
/turf/open/floor/plating/beach/coastline_b
name = "coastline"
icon_state = "sandwater_b"
baseturf = /turf/open/floor/plating/beach/coastline_b
baseturfs = /turf/open/floor/plating/beach/coastline_b
/turf/open/floor/plating/beach/water
name = "water"
desc = "You get the feeling that nobody's bothered to actually make this water functional..."
icon_state = "water"
baseturf = /turf/open/floor/plating/beach/water
baseturfs = /turf/open/floor/plating/beach/water
/turf/open/floor/plating/ironsand
@@ -129,7 +129,7 @@
icon = 'icons/turf/snow.dmi'
icon_state = "ice"
temperature = 180
baseturf = /turf/open/floor/plating/ice
baseturfs = /turf/open/floor/plating/ice
slowdown = 1
wet = TURF_WET_PERMAFROST
attachment_holes = FALSE
@@ -48,14 +48,14 @@
if(severity != 1 && shielded && target != src)
return
if(target == src)
src.ChangeTurf(src.baseturf)
ScrapeAway()
return
switch(severity)
if(1)
if(prob(80))
ReplaceWithLattice()
else if(prob(50))
ChangeTurf(src.baseturf)
ScrapeAway()
else
make_plating(1)
if(2)
@@ -122,7 +122,7 @@
be_removed()
return ..()
/turf/open/floor/engine/cult/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
/turf/open/floor/engine/cult/ChangeTurf(path, new_baseturf, flags)
if(path != type)
be_removed()
return ..()
+3 -3
View File
@@ -4,7 +4,7 @@
name = "lava"
icon_state = "lava"
gender = PLURAL //"That's some lava."
baseturf = /turf/open/lava //lava all the way down
baseturfs = /turf/open/lava //lava all the way down
slowdown = 2
light_range = 2
@@ -128,7 +128,7 @@
/turf/open/lava/smooth
name = "lava"
baseturf = /turf/open/lava/smooth
baseturfs = /turf/open/lava/smooth
icon = 'icons/turf/floors/lava.dmi'
icon_state = "unsmooth"
smooth = SMOOTH_MORE | SMOOTH_BORDER
@@ -137,7 +137,7 @@
/turf/open/lava/smooth/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
baseturf = /turf/open/chasm/lavaland
baseturfs = /turf/open/chasm/lavaland
/turf/open/lava/smooth/airless
initial_gas_mix = "TEMP=2.7"
+26 -20
View File
@@ -7,7 +7,7 @@
var/smooth_icon = 'icons/turf/smoothrocks.dmi'
smooth = SMOOTH_MORE|SMOOTH_BORDER
canSmoothWith
baseturf = /turf/open/floor/plating/asteroid/airless
baseturfs = /turf/open/floor/plating/asteroid/airless
initial_gas_mix = "TEMP=2.7"
opacity = 1
density = TRUE
@@ -78,7 +78,10 @@
SSblackbox.record_feedback("tally", "ore_mined", 1, mineralType)
for(var/obj/effect/temp_visual/mining_overlay/M in src)
qdel(M)
ChangeTurf(turf_type, FALSE, defer_change)
var/flags = NONE
if(defer_change) // TODO: make the defer change var a var for any changeturf flag
flags = CHANGETURF_DEFER_CHANGE
ChangeTurf(turf_type, null, flags)
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
@@ -111,7 +114,7 @@
return
/turf/closed/mineral/acid_melt()
ChangeTurf(baseturf)
ScrapeAway()
/turf/closed/mineral/ex_act(severity, target)
..()
@@ -153,7 +156,7 @@
M.mineralAmt = rand(1, 5)
M.environment_type = src.environment_type
M.turf_type = src.turf_type
M.baseturf = src.baseturf
M.baseturfs = src.baseturfs
src = M
M.levelupdate()
@@ -168,7 +171,7 @@
/turf/closed/mineral/random/high_chance/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/lava/smooth/lava_land_surface
baseturfs = /turf/open/lava/smooth/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
mineralSpawnChanceList = list(
@@ -189,7 +192,7 @@
/turf/closed/mineral/random/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/lava/smooth/lava_land_surface
baseturfs = /turf/open/lava/smooth/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -211,7 +214,7 @@
/turf/closed/mineral/random/labormineral/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/lava/smooth/lava_land_surface
baseturfs = /turf/open/lava/smooth/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
mineralSpawnChanceList = list(
@@ -230,7 +233,7 @@
/turf/closed/mineral/iron/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -244,7 +247,7 @@
/turf/closed/mineral/uranium/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -258,7 +261,7 @@
/turf/closed/mineral/diamond/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -272,7 +275,7 @@
/turf/closed/mineral/gold/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -286,7 +289,7 @@
/turf/closed/mineral/silver/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -300,7 +303,7 @@
/turf/closed/mineral/titanium/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -314,7 +317,7 @@
/turf/closed/mineral/plasma/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -337,7 +340,7 @@
/turf/closed/mineral/bscrystal/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
@@ -345,13 +348,13 @@
/turf/closed/mineral/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt
baseturf = /turf/open/floor/plating/asteroid/basalt
baseturfs = /turf/open/floor/plating/asteroid/basalt
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
/turf/closed/mineral/volcanic/lava_land_surface
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/lava/smooth/lava_land_surface
baseturfs = /turf/open/lava/smooth/lava_land_surface
defer_change = 1
/turf/closed/mineral/ash_rock //wall piece
@@ -361,7 +364,7 @@
icon_state = "rock2"
smooth = SMOOTH_MORE|SMOOTH_BORDER
canSmoothWith = list (/turf/closed)
baseturf = /turf/open/floor/plating/ashplanet/wateryrock
baseturfs = /turf/open/floor/plating/ashplanet/wateryrock
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
environment_type = "waste"
turf_type = /turf/open/floor/plating/ashplanet/rocky
@@ -459,13 +462,16 @@
G.quality = 2
G.icon_state = "Gibtonite ore 2"
ChangeTurf(turf_type, FALSE, defer_change)
var/flags = NONE
if(defer_change)
flags = CHANGETURF_DEFER_CHANGE
ChangeTurf(turf_type, null, flags)
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
/turf/closed/mineral/gibtonite/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
+1 -1
View File
@@ -2,7 +2,7 @@
name = "void"
icon_state = "reebemap"
layer = SPACE_LAYER
baseturf = /turf/open/indestructible/reebe_void
baseturfs = /turf/open/indestructible/reebe_void
planetary_atmos = TRUE
/turf/open/indestructible/reebe_void/Initialize(mapload)
+5 -5
View File
@@ -20,7 +20,7 @@
continue
W.connected = 1
var/turf/cur_turf = get_turf(W)
cur_turf.ChangeTurf(turf_type,FALSE,FALSE,TRUE)
cur_turf.ChangeTurf(turf_type, null, CHANGETURF_IGNORE_AIR)
var/turf/target_turf = get_turf(pick(river_nodes - W))
if(!target_turf)
break
@@ -49,7 +49,7 @@
cur_turf = get_step(cur_turf, cur_dir)
continue
else
var/turf/river_turf = cur_turf.ChangeTurf(turf_type,FALSE,FALSE,TRUE)
var/turf/river_turf = cur_turf.ChangeTurf(turf_type, null, CHANGETURF_IGNORE_AIR)
river_turf.Spread(25, 11, whitelist_area)
for(var/WP in river_nodes)
@@ -85,16 +85,16 @@
for(var/F in cardinal_turfs) //cardinal turfs are always changed but don't always spread
var/turf/T = F
if(!istype(T, logged_turf_type) && T.ChangeTurf(type,FALSE,FALSE,TRUE) && prob(probability))
if(!istype(T, logged_turf_type) && T.ChangeTurf(type, null, CHANGETURF_IGNORE_AIR) && prob(probability))
T.Spread(probability - prob_loss, prob_loss, whitelisted_area)
for(var/F in diagonal_turfs) //diagonal turfs only sometimes change, but will always spread if changed
var/turf/T = F
if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type,FALSE,FALSE,TRUE))
if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type, null, CHANGETURF_IGNORE_AIR))
T.Spread(probability - prob_loss, prob_loss, whitelisted_area)
else if(ismineralturf(T))
var/turf/closed/mineral/M = T
M.ChangeTurf(M.turf_type,FALSE,FALSE,TRUE)
M.ChangeTurf(M.turf_type, null, CHANGETURF_IGNORE_AIR)
#undef RANDOM_UPPER_X
+3 -3
View File
@@ -55,7 +55,7 @@
sheet_type = /obj/item/stack/tile/brass
sheet_amount = 1
girder_type = /obj/structure/destructible/clockwork/wall_gear
baseturf = /turf/open/floor/clockwork/reebe
baseturfs = /turf/open/floor/clockwork/reebe
var/heated
var/obj/effect/clockwork/overlay/wall/realappearence
@@ -88,13 +88,13 @@
/turf/closed/wall/clockwork/dismantle_wall(devastated=0, explode=0)
if(devastated)
devastate_wall()
ChangeTurf(/turf/open/floor/plating)
ScrapeAway()
else
playsound(src, 'sound/items/welder.ogg', 100, 1)
var/newgirder = break_wall()
if(newgirder) //maybe we want a gear!
transfer_fingerprints_to(newgirder)
ChangeTurf(/turf/open/floor/clockwork)
ScrapeAway()
for(var/obj/O in src) //Eject contents!
if(istype(O, /obj/structure/sign/poster))
+5 -3
View File
@@ -10,6 +10,8 @@
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
baseturfs = /turf/open/floor/plating
var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through.
var/slicing_duration = 100 //default time taken to slice the wall
var/sheet_type = /obj/item/stack/sheet/metal
@@ -78,7 +80,7 @@
var/obj/structure/sign/poster/P = O
P.roll_and_drop(src)
ChangeTurf(/turf/open/floor/plating)
ScrapeAway()
/turf/closed/wall/proc/break_wall()
new sheet_type(src, sheet_amount)
@@ -96,7 +98,7 @@
switch(severity)
if(1)
//SN src = null
var/turf/NT = ChangeTurf(baseturf)
var/turf/NT = ScrapeAway()
NT.contents_explosion(severity, target)
return
if(2)
@@ -294,7 +296,7 @@
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the wall.</span>")
ChangeTurf(/turf/open/floor/plating)
ScrapeAway()
return TRUE
return FALSE
+1 -1
View File
@@ -3,7 +3,7 @@
desc = "Shallow water."
icon = 'icons/turf/floors.dmi'
icon_state = "riverwater"
baseturf = /turf/open/chasm/lavaland
baseturfs = /turf/open/chasm/lavaland
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
slowdown = 1
+2 -2
View File
@@ -118,7 +118,7 @@
qdel(L)
playsound(src, 'sound/weapons/genhit.ogg', 50, 1)
to_chat(user, "<span class='notice'>You build a floor.</span>")
ChangeTurf(/turf/open/floor/plating)
PlaceOnTop(/turf/open/floor/plating)
else
to_chat(user, "<span class='warning'>You need one floor tile to build a floor!</span>")
else
@@ -192,7 +192,7 @@
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You build a floor.</span>")
ChangeTurf(/turf/open/floor/plating)
PlaceOnTop(/turf/open/floor/plating)
return TRUE
return FALSE
+1 -1
View File
@@ -1,7 +1,7 @@
/turf/open/space/transit
icon_state = "black"
dir = SOUTH
baseturf = /turf/open/space/transit
baseturfs = /turf/open/space/transit
flags_1 = NOJAUNT_1 //This line goes out to every wizard that ever managed to escape the den. I'm sorry.
explosion_block = INFINITY
+59 -154
View File
@@ -3,7 +3,13 @@
level = 1
var/intact = 1
var/turf/baseturf = /turf/open/space
// baseturfs can be either a list or a single turf type.
// In class definition like here it should always be a single type.
// A list will be created in initialization that figures out the baseturf's baseturf etc.
// In the case of a list it is sorted from bottom layer to top.
// This shouldn't be modified directly, use the helper procs.
var/list/baseturfs = /turf/open/space
var/temperature = T20C
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
@@ -35,6 +41,8 @@
stack_trace("Warning: [src]([type]) initialized multiple times!")
initialized = TRUE
assemble_baseturfs()
levelupdate()
if(smooth)
queue_smooth(src)
@@ -180,6 +188,55 @@
/turf/proc/is_plasteel_floor()
return FALSE
// A proc in case it needs to be recreated or badmins want to change the baseturfs
/turf/proc/assemble_baseturfs(turf/fake_baseturf_type)
var/static/list/created_baseturf_lists = list()
var/turf/current_target
if(fake_baseturf_type)
if(length(fake_baseturf_type)) // We were given a list, just apply it and move on
baseturfs = fake_baseturf_type
return
current_target = fake_baseturf_type
else
if(length(baseturfs))
return // No replacement baseturf has been given and the current baseturfs value is already a list/assembled
if(!baseturfs)
current_target = initial(baseturfs) || type // This should never happen but just in case...
stack_trace("baseturfs var was null for [type]. Failsafe activated and it has been given a new baseturfs value of [current_target].")
else
current_target = baseturfs
// If we've made the output before we don't need to regenerate it
if(created_baseturf_lists[current_target])
var/list/premade_baseturfs = created_baseturf_lists[current_target]
if(length(premade_baseturfs))
baseturfs = premade_baseturfs.Copy()
else
baseturfs = premade_baseturfs
return baseturfs
var/turf/next_target = initial(current_target.baseturfs)
//Most things only have 1 baseturf so this loop won't run in most cases
if(current_target == next_target)
baseturfs = current_target
created_baseturf_lists[current_target] = current_target
return current_target
var/list/new_baseturfs = list(current_target)
for(var/i=0;current_target != next_target;i++)
if(i > 100)
// A baseturfs list over 100 members long is silly
// Because of how this is all structured it will only runtime/message once per type
stack_trace("A turf <[type]> created a baseturfs list over 100 members long. This is most likely an infinite loop.")
message_admins("A turf <[type]> created a baseturfs list over 100 members long. This is most likely an infinite loop.")
break
new_baseturfs.Insert(1, next_target)
current_target = next_target
next_target = initial(current_target.baseturfs)
baseturfs = new_baseturfs
created_baseturf_lists[new_baseturfs[new_baseturfs.len]] = new_baseturfs.Copy()
return new_baseturfs
/turf/proc/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
@@ -197,119 +254,6 @@
if(L)
qdel(L)
//wrapper for ChangeTurf()s that you want to prevent/affect without overriding ChangeTurf() itself
/turf/proc/TerraformTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
return ChangeTurf(path, new_baseturf, defer_change, ignore_air, forceop)
//Creates a new turf
/turf/proc/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE, forceop = FALSE)
if(!path)
return
if(!GLOB.use_preloader && path == type && !forceop) // Don't no-op if the map loader requires it to be reconstructed
return src
var/old_opacity = opacity
var/old_dynamic_lighting = dynamic_lighting
var/old_affecting_lights = affecting_lights
var/old_lighting_object = lighting_object
var/old_corners = corners
var/old_exl = explosion_level
var/old_exi = explosion_id
var/old_bp = blueprint_data
blueprint_data = null
var/old_baseturf = baseturf
changing_turf = TRUE
qdel(src) //Just get the side effects and call Destroy
var/turf/W = new path(src)
if(new_baseturf)
W.baseturf = new_baseturf
else
W.baseturf = old_baseturf
W.explosion_id = old_exi
W.explosion_level = old_exl
if(!defer_change)
W.AfterChange(ignore_air)
W.blueprint_data = old_bp
if(SSlighting.initialized)
recalc_atom_opacity()
lighting_object = old_lighting_object
affecting_lights = old_affecting_lights
corners = old_corners
if (old_opacity != opacity || dynamic_lighting != old_dynamic_lighting)
reconsider_lights()
if (dynamic_lighting != old_dynamic_lighting)
if (IS_DYNAMIC_LIGHTING(src))
lighting_build_overlay()
else
lighting_clear_overlay()
for(var/turf/open/space/S in RANGE_TURFS(1, src)) //RANGE_TURFS is in code\__HELPERS\game.dm
S.update_starlight()
return W
/turf/proc/AfterChange(ignore_air = FALSE) //called after a turf has been replaced in ChangeTurf()
levelupdate()
CalculateAdjacentTurfs()
//update firedoor adjacency
var/list/turfs_to_check = get_adjacent_open_turfs(src) | src
for(var/I in turfs_to_check)
var/turf/T = I
for(var/obj/machinery/door/firedoor/FD in T)
FD.CalculateAffectingAreas()
queue_smooth_neighbors(src)
HandleTurfChange(src)
/turf/open/AfterChange(ignore_air)
..()
RemoveLattice()
if(!ignore_air)
Assimilate_Air()
//////Assimilate Air//////
/turf/open/proc/Assimilate_Air()
var/turf_count = LAZYLEN(atmos_adjacent_turfs)
if(blocks_air || !turf_count) //if there weren't any open turfs, no need to update.
return
var/datum/gas_mixture/total = new//Holders to assimilate air from nearby turfs
var/list/total_gases = total.gases
for(var/T in atmos_adjacent_turfs)
var/turf/open/S = T
if(!S.air)
continue
var/list/S_gases = S.air.gases
for(var/id in S_gases)
ASSERT_GAS(id, total)
total_gases[id][MOLES] += S_gases[id][MOLES]
total.temperature += S.air.temperature
air.copy_from(total)
var/list/air_gases = air.gases
for(var/id in air_gases)
air_gases[id][MOLES] /= turf_count //Averages contents of the turfs, ignoring walls and the like
air.temperature /= turf_count
SSair.add_to_active(src)
/turf/proc/ReplaceWithLattice()
ChangeTurf(baseturf)
new /obj/structure/lattice(locate(x, y, z))
/turf/proc/phase_damage_creatures(damage,mob/U = null)//>Ninja Code. Hurts and knocks out creatures on this turf //NINJACODE
for(var/mob/living/M in src)
if(M==U)
@@ -361,7 +305,7 @@
continue
if(O.invisibility == INVISIBILITY_MAXIMUM)
O.singularity_act()
ChangeTurf(src.baseturf)
ScrapeAway()
return(2)
/turf/proc/can_have_cabling()
@@ -437,21 +381,6 @@
if(!SSticker.HasRoundStarted())
add_blueprints(AM)
/turf/proc/empty(turf_type=/turf/open/space, baseturf_type, list/ignore_typecache, forceop = FALSE)
// Remove all atoms except observers, landmarks, docking ports
var/static/list/ignored_atoms = typecacheof(list(/mob/dead, /obj/effect/landmark, /obj/docking_port, /atom/movable/lighting_object))
var/list/allowed_contents = typecache_filter_list_reverse(GetAllContentsIgnoring(ignore_typecache), ignored_atoms)
allowed_contents -= src
for(var/i in 1 to allowed_contents.len)
var/thing = allowed_contents[i]
qdel(thing, force=TRUE)
var/turf/newT = ChangeTurf(turf_type, baseturf_type, FALSE, FALSE, forceop)
SSair.remove_from_active(newT)
newT.CalculateAdjacentTurfs()
SSair.add_to_active(newT,1)
/turf/proc/is_transition_turf()
return
@@ -473,33 +402,9 @@
if(!has_acid_effect)
new acid_type(src, acidpwr, acid_volume)
/turf/proc/acid_melt()
return
/turf/proc/copyTurf(turf/T)
if(T.type != type)
var/obj/O
if(underlays.len) //we have underlays, which implies some sort of transparency, so we want to a snapshot of the previous turf as an underlay
O = new()
O.underlays.Add(T)
T.ChangeTurf(type)
for(var/group in decals)
T.add_decal(decals[group],group)
if(underlays.len)
T.underlays = O.underlays
if(T.icon_state != icon_state)
T.icon_state = icon_state
if(T.icon != icon)
T.icon = icon
if(color)
T.atom_colours = atom_colours.Copy()
T.update_atom_colour()
if(T.dir != dir)
T.setDir(dir)
return T
/turf/handle_fall(mob/faller, forced)
faller.lying = pick(90, 270)
if(!forced)