Skip to content

Commit

Permalink
Code Readability - Effects (#18150)
Browse files Browse the repository at this point in the history
* effects

* removed anchored = TRUE from objects that inherit that property within the effects folder and subfolders
  • Loading branch information
KalevTait authored Jul 2, 2022
1 parent 3c00a1f commit 89ba9c0
Show file tree
Hide file tree
Showing 31 changed files with 35 additions and 92 deletions.
3 changes: 1 addition & 2 deletions code/game/objects/effects/alien_acid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
desc = "Burbling corrosive stuff."
icon_state = "acid"
density = FALSE
opacity = 0
anchored = TRUE
opacity = FALSE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = ABOVE_NORMAL_TURF_LAYER
var/turf/target
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
desc = "A mysterious anomaly, seen commonly only in the region of space that the station orbits..."
icon_state = "bhole3"
density = FALSE
anchored = TRUE
light_range = 3
var/movechance = ANOMALY_MOVECHANCE
var/obj/item/assembly/signaler/anomaly/aSignal = /obj/item/assembly/signaler/anomaly
Expand Down
5 changes: 2 additions & 3 deletions code/game/objects/effects/bump_teleporter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ GLOBAL_LIST_EMPTY(bump_teleporters)
var/id = null //id of this bump_teleporter.
var/id_target = null //id of bump_teleporter which this moves you to.
invisibility = 101 //nope, can't see this
anchored = 1
density = 1
opacity = 0
density = TRUE
opacity = FALSE

/obj/effect/bump_teleporter/New()
..()
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/decals/Cleanable/fuel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
icon = 'icons/effects/effects.dmi'
icon_state = "fuel"
layer = LATTICE_LAYER
anchored = TRUE
var/amount = 1 //Basically moles.

/obj/effect/decal/cleanable/liquid_fuel/Initialize(mapload, amt = 1)
Expand Down
2 changes: 0 additions & 2 deletions code/game/objects/effects/decals/Cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ GLOBAL_LIST_EMPTY(splatter_cache)
var/drydesc = "It's dry and crusty. Someone is not doing their job."
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
plane = GAME_PLANE
icon = 'icons/effects/blood.dmi'
Expand Down Expand Up @@ -137,7 +136,6 @@ GLOBAL_LIST_EMPTY(splatter_cache)
desc = "They look bloody and gruesome."
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5"
Expand Down
16 changes: 0 additions & 16 deletions code/game/objects/effects/decals/Cleanable/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
desc = "Someone should clean that up."
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/obj/objects.dmi'
icon_state = "shards"
Expand All @@ -14,7 +13,6 @@
gender = PLURAL
icon = 'icons/obj/objects.dmi'
icon_state = "ash"
anchored = TRUE
scoop_reagents = list("ash" = 10)
mergeable_decal = FALSE

Expand All @@ -39,7 +37,6 @@
desc = "Someone should clean that up."
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/dirt.dmi'
icon_state = "dirt"
Expand Down Expand Up @@ -72,7 +69,6 @@
desc = "It's still good. Four second rule!"
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/effects.dmi'
icon_state = "flour"
Expand All @@ -91,7 +87,6 @@
desc = "Jeez. I hope that's not for lunch."
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
light_range = 1
icon = 'icons/effects/effects.dmi'
Expand All @@ -108,7 +103,6 @@
name = "cobweb"
desc = "Somebody should remove that."
density = FALSE
anchored = TRUE
layer = OBJ_LAYER
icon = 'icons/effects/effects.dmi'
icon_state = "cobweb1"
Expand All @@ -118,7 +112,6 @@
name = "gooey grey mass"
desc = "It looks like a melted... something."
density = FALSE
anchored = TRUE
layer = OBJ_LAYER
gender = NEUTER
icon = 'icons/effects/effects.dmi'
Expand All @@ -133,7 +126,6 @@
name = "cobweb"
desc = "Somebody should remove that."
density = FALSE
anchored = TRUE
layer = OBJ_LAYER
icon = 'icons/effects/effects.dmi'
icon_state = "cobweb2"
Expand All @@ -143,7 +135,6 @@
desc = "Gosh, how unpleasant."
gender = PLURAL
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/blood.dmi'
icon_state = "vomit_1"
Expand Down Expand Up @@ -178,15 +169,13 @@
name = "tomato smudge"
desc = "It's red."
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")

/obj/effect/decal/cleanable/plant_smudge
name = "plant smudge"
density = FALSE
anchored = TRUE
layer = TURF_LAYER
gender = NEUTER
icon = 'icons/effects/tomatodecal.dmi'
Expand All @@ -196,7 +185,6 @@
name = "smashed egg"
desc = "Seems like this one won't hatch."
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
Expand All @@ -205,7 +193,6 @@
name = "smashed pie"
desc = "It's pie cream from a cream pie."
density = FALSE
anchored = TRUE
layer = TURF_LAYER
icon = 'icons/effects/tomatodecal.dmi'
random_icon_states = list("smashed_pie")
Expand All @@ -214,7 +201,6 @@
name = "space fungus"
desc = "A fungal growth. Looks pretty nasty."
density = FALSE
anchored = TRUE
layer = TURF_LAYER
plane = GAME_PLANE
icon = 'icons/effects/effects.dmi'
Expand All @@ -229,12 +215,10 @@
icon = 'icons/obj/objects.dmi'
icon_state = "confetti1"
random_icon_states = list("confetti1", "confetti2", "confetti3")
anchored = TRUE

/obj/effect/decal/cleanable/insectguts
name = "bug guts"
desc = "One bug squashed. Four more will rise in its place."
icon = 'icons/effects/blood.dmi'
icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
anchored = TRUE
1 change: 0 additions & 1 deletion code/game/objects/effects/decals/cleanable.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/obj/effect/decal/cleanable
anchored = TRUE
var/list/random_icon_states = list()
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/decals/crayon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
icon_state = "rune1"
layer = MID_TURF_LAYER
plane = GAME_PLANE //makes the graffiti visible over a wall.
anchored = TRUE
mergeable_decal = FALSE // Allows crayon drawings to overlap one another.


Expand Down
4 changes: 0 additions & 4 deletions code/game/objects/effects/decals/misc.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Used for spray that you spray at walls, tables, hydrovats etc
/obj/effect/decal/spraystill
density = FALSE
anchored = TRUE
layer = 50
plane = HUD_PLANE

Expand All @@ -16,7 +15,6 @@
/obj/effect/decal/snow
name = "snow"
density = FALSE
anchored = TRUE
layer = TURF_DECAL_LAYER
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
Expand All @@ -36,15 +34,13 @@
/obj/effect/decal/leaves
name = "fall leaves"
density = FALSE
anchored = TRUE
layer = HIGH_TURF_LAYER
icon = 'icons/obj/flora/plants.dmi'
icon_state = "fallleaves"

/obj/effect/decal/straw
name = "scattered straw"
density = FALSE
anchored = TRUE
layer = HIGH_TURF_LAYER
icon = 'icons/obj/flora/plants.dmi'
icon_state = "strawscattered"
Expand Down
4 changes: 0 additions & 4 deletions code/game/objects/effects/decals/remains.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@
desc = "They look like human remains. They have a strange aura about them."
icon = 'icons/effects/blood.dmi'
icon_state = "remains"
anchored = TRUE

/obj/effect/decal/remains/xeno
name = "remains"
desc = "They look like the remains of something... alien. They have a strange aura about them."
icon = 'icons/effects/blood.dmi'
icon_state = "remainsxeno"
anchored = TRUE

/obj/effect/decal/remains/robot
name = "remains"
desc = "They look like the remains of something mechanical. They have a strange aura about them."
icon = 'icons/mob/robots.dmi'
icon_state = "remainsrobot"
anchored = TRUE

/obj/effect/decal/remains/robot/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["glass"] += 2
Expand All @@ -39,7 +36,6 @@
desc = "Noooooooooooooooooooooo"
icon = 'icons/effects/blood.dmi'
icon_state = "remains"
anchored = TRUE

/obj/effect/decal/remains/slime/New()
..()
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/effect_system/effect_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ would spawn and follow the beaker, even if it is carried or thrown.
name = "particle effect"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
pass_flags = PASSTABLE | PASSGRILLE
anchored = TRUE

/obj/effect/particle_effect/New()
..()
Expand Down
6 changes: 2 additions & 4 deletions code/game/objects/effects/effect_system/effects_explosion.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/obj/effect/particle_effect/expl_particles
name = "explosive particles"
icon_state = "explosion_particle"
opacity = 1
anchored = 1
opacity = TRUE

/obj/effect/particle_effect/expl_particles/New()
..()
Expand All @@ -25,8 +24,7 @@
name = "explosive particles"
icon = 'icons/effects/96x96.dmi'
icon_state = "explosion"
opacity = 1
anchored = 1
opacity = TRUE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
pixel_x = -32
pixel_y = -32
Expand Down
5 changes: 2 additions & 3 deletions code/game/objects/effects/effect_system/effects_foam.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
/obj/effect/particle_effect/foam
name = "foam"
icon_state = "foam"
opacity = 0
anchored = 1
density = 0
opacity = FALSE
density = FALSE
layer = OBJ_LAYER + 0.9
animate_movement = 0
var/amount = 3
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/effect_system/effects_other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/obj/effect/particle_effect/ion_trails
name = "ion trails"
icon_state = "ion_trails"
anchored = TRUE

/obj/effect/particle_effect/ion_trails/Initialize(mapload, targetdir)
. = ..()
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/effects/effect_system/effects_smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
opacity = 1
anchored = 0
opacity = TRUE
anchored = FALSE
var/steps = 0
var/lifetime = 5
var/direction
Expand Down Expand Up @@ -142,11 +142,11 @@
/obj/effect/particle_effect/smoke/freezing
name = "nanofrost smoke"
color = "#B2FFFF"
opacity = 0
opacity = FALSE

/datum/effect_system/smoke_spread/freezing
effect_type = /obj/effect/particle_effect/smoke/freezing
var/blast = 0
var/blast = FALSE

/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
if(istype(A, /turf/simulated))
Expand All @@ -163,12 +163,12 @@
G.toxins = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
if(!isnull(V.welded) && !V.welded) //must be an unwelded vent pump.
V.welded = 1
V.welded = TRUE
V.update_icon()
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
for(var/obj/machinery/atmospherics/unary/vent_scrubber/U in T)
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent scrubber.
U.welded = 1
U.welded = TRUE
U.update_icon()
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
for(var/mob/living/L in T)
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/effect_system/effects_sparks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
name = "sparks"
desc = "it's a spark what do you need to know?"
icon_state = "sparks"
anchored = TRUE
var/hotspottemp = 1000

/obj/effect/particle_effect/sparks/New()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/effect_system/effects_water.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/obj/effect/particle_effect/steam
name = "steam"
icon_state = "extinguish"
density = 0
density = FALSE

/obj/effect/particle_effect/steam/New()
..()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
icon = 'icons/effects/effects.dmi'
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
move_resist = INFINITY
anchored = 1
anchored = TRUE
can_be_hit = FALSE

/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
Expand Down
5 changes: 2 additions & 3 deletions code/game/objects/effects/forcefields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
name = "FORCEWALL"
icon = 'icons/effects/effects.dmi'
icon_state = "m_shield"
anchored = 1
opacity = 0
density = 1
opacity = FALSE
density = TRUE
var/lifetime = 30 SECONDS

/obj/effect/forcefield/New()
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/effects/glowshroom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
/obj/structure/glowshroom
name = "glowshroom"
desc = "Mycena Bregprox, a species of mushroom that glows in the dark."
anchored = TRUE
opacity = 0
opacity = FALSE
density = FALSE
icon = 'icons/obj/lighting.dmi'
icon_state = "glowshroom" //replaced in New
Expand Down
Loading

0 comments on commit 89ba9c0

Please sign in to comment.