[MIRROR] adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs (#3737)

* adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs (#57263)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* adds a bitflag for no random pixel shift on dropping, adds turf_flags var to replace usage of flags_1 on turfs

Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-03-01 18:55:55 +01:00
committed by GitHub
parent 7ef6e29b0b
commit e63094d9ae
30 changed files with 105 additions and 88 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ This file contains the cult dagger and rune list code
to_chat(user, "<span class='cult'>There is already a rune here.</span>")
return FALSE
var/area/A = get_area(T)
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.flags_1 & CULT_PERMITTED_1)))
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.area_flags & CULT_PERMITTED)))
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
return FALSE
return TRUE
@@ -360,13 +360,13 @@
var/datum/excited_group/EG = our_excited_group || enemy_excited_group || new
if(!our_excited_group)
EG.add_turf(src)
if(!enemy_excited_group && enemy_tile.flags_1 & EXCITED_CLEANUP_1)
if(!enemy_excited_group && enemy_tile.turf_flags & EXCITED_CLEANUP)
EG.add_turf(enemy_tile)
our_excited_group = excited_group
if(our_excited_group)
our_excited_group.breakdown_cooldown = breakdown //Update with the old data
our_excited_group.dismantle_cooldown = dismantle
flags_1 &= ~EXCITED_CLEANUP_1
turf_flags &= ~EXCITED_CLEANUP
//////////////////////////SPACEWIND/////////////////////////////
@@ -528,7 +528,7 @@
var/turf/open/T = t
T.excited_group = null
if(will_cleanup)
T.flags_1 |= EXCITED_CLEANUP_1
T.turf_flags |= EXCITED_CLEANUP
if(will_cleanup)
SSair.add_to_cleanup(src)
turf_list.Cut()
+1 -1
View File
@@ -174,7 +174,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
/obj/effect/mapping_helpers/no_lava/Initialize()
. = ..()
var/turf/T = get_turf(src)
T.flags_1 |= NO_LAVA_GEN_1
T.turf_flags |= NO_LAVA_GEN
//This helper applies components to things on the map directly.
/obj/effect/mapping_helpers/component_injector
+3 -3
View File
@@ -12,7 +12,7 @@
for(var/turf/check in get_affected_turfs(central_turf,1))
var/area/new_area = get_area(check)
valid = FALSE // set to false before we check
if(check.flags_1 & NO_RUINS_1)
if(check.turf_flags & NO_RUINS)
break
for(var/type in allowed_areas)
if(istype(new_area, type)) // it's at least one of our types so it's whitelisted
@@ -39,7 +39,7 @@
loaded++
for(var/turf/T in get_affected_turfs(central_turf, 1))
T.flags_1 |= NO_RUINS_1
T.turf_flags |= NO_RUINS
new /obj/effect/landmark/ruin(central_turf, src)
return central_turf
@@ -52,7 +52,7 @@
load(placement)
loaded++
for(var/turf/T in get_affected_turfs(placement))
T.flags_1 |= NO_RUINS_1
T.turf_flags |= NO_RUINS
var/turf/center = locate(placement.x + round(width/2),placement.y + round(height/2),placement.z)
new /obj/effect/landmark/ruin(center, src)
return center
@@ -31,12 +31,12 @@
for(var/i in avail)
CHECK_TICK
BL = i
if(!(BL.flags_1 & UNUSED_RESERVATION_TURF_1))
if(!(BL.flags_1 & UNUSED_RESERVATION_TURF))
continue
if(BL.x + width > world.maxx || BL.y + height > world.maxy)
continue
TR = locate(BL.x + width - 1, BL.y + height - 1, BL.z)
if(!(TR.flags_1 & UNUSED_RESERVATION_TURF_1))
if(!(TR.flags_1 & UNUSED_RESERVATION_TURF))
continue
final = block(BL, TR)
if(!final)
@@ -44,7 +44,7 @@
passing = TRUE
for(var/I in final)
var/turf/checking = I
if(!(checking.flags_1 & UNUSED_RESERVATION_TURF_1))
if(!(checking.flags_1 & UNUSED_RESERVATION_TURF))
passing = FALSE
break
if(!passing)
@@ -57,7 +57,7 @@
for(var/i in final)
var/turf/T = i
reserved_turfs |= T
T.flags_1 &= ~UNUSED_RESERVATION_TURF_1
T.flags_1 &= ~UNUSED_RESERVATION_TURF
SSmapping.unused_turfs["[T.z]"] -= T
SSmapping.used_turfs[T] = src
T.ChangeTurf(turf_type, turf_type)
+1 -1
View File
@@ -281,7 +281,7 @@
*/
/mob/proc/dropItemToGround(obj/item/I, force = FALSE, silent = FALSE, invdrop = TRUE)
. = doUnEquip(I, force, drop_location(), FALSE, invdrop = invdrop, silent = silent)
if(. && I) //ensure the item exists and that it was dropped properly.
if(. && I && !(I.item_flags & NO_PIXEL_RANDOM_DROP)) //ensure the item exists and that it was dropped properly.
I.pixel_x = I.base_pixel_x + rand(-6, 6)
I.pixel_y = I.base_pixel_y + rand(-6, 6)
@@ -86,7 +86,7 @@
name = ""
icon = 'icons/misc/pic_in_pic.dmi'
icon_state = "room_background"
flags_1 = NOJAUNT_1
flags_1 = NOJAUNT
/area/ai_multicam_room
name = "ai_multicam_room"
+1 -1
View File
@@ -254,7 +254,7 @@
R.reveal(20)
R.stun(20)
return
if(stepTurf.flags_1 & NOJAUNT_1)
if(stepTurf.turf_flags & NOJAUNT)
to_chat(L, "<span class='warning'>Some strange aura is blocking the way.</span>")
return
if (locate(/obj/effect/blessing, stepTurf))
@@ -250,7 +250,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
icon_state = "bluespace"
base_icon_state = "bluespace"
baseturfs = /turf/open/space/bluespace
flags_1 = NOJAUNT_1
flags_1 = NOJAUNT
explosion_block = INFINITY
var/obj/item/hilbertshotel/parentSphere
+1 -1
View File
@@ -231,7 +231,7 @@
if(mapload)
for(var/turf/T in return_turfs())
T.flags_1 |= NO_RUINS_1
T.turf_flags |= NO_RUINS
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#f00")