Force LF line endings with gitattributes and convert repo (#52266)

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
This commit is contained in:
jdawg1290
2020-07-16 03:02:40 +03:00
committed by GitHub
co-authored by Aleksej Komarov
parent 39e8bd721f
commit 62676e72a8
1133 changed files with 266492 additions and 266454 deletions
@@ -1,34 +1,34 @@
/proc/get_step_multiz(ref, dir)
if(dir & UP)
dir &= ~UP
return get_step(SSmapping.get_turf_above(get_turf(ref)), dir)
if(dir & DOWN)
dir &= ~DOWN
return get_step(SSmapping.get_turf_below(get_turf(ref)), dir)
return get_step(ref, dir)
/proc/get_dir_multiz(turf/us, turf/them)
us = get_turf(us)
them = get_turf(them)
if(!us || !them)
return NONE
if(us.z == them.z)
return get_dir(us, them)
else
var/turf/T = us.above()
var/dir = NONE
if(T && (T.z == them.z))
dir = UP
else
T = us.below()
if(T && (T.z == them.z))
dir = DOWN
else
return get_dir(us, them)
return (dir | get_dir(us, them))
/turf/proc/above()
return get_step_multiz(src, UP)
/turf/proc/below()
return get_step_multiz(src, DOWN)
/proc/get_step_multiz(ref, dir)
if(dir & UP)
dir &= ~UP
return get_step(SSmapping.get_turf_above(get_turf(ref)), dir)
if(dir & DOWN)
dir &= ~DOWN
return get_step(SSmapping.get_turf_below(get_turf(ref)), dir)
return get_step(ref, dir)
/proc/get_dir_multiz(turf/us, turf/them)
us = get_turf(us)
them = get_turf(them)
if(!us || !them)
return NONE
if(us.z == them.z)
return get_dir(us, them)
else
var/turf/T = us.above()
var/dir = NONE
if(T && (T.z == them.z))
dir = UP
else
T = us.below()
if(T && (T.z == them.z))
dir = DOWN
else
return get_dir(us, them)
return (dir | get_dir(us, them))
/turf/proc/above()
return get_step_multiz(src, UP)
/turf/proc/below()
return get_step_multiz(src, DOWN)
@@ -1,74 +1,74 @@
//Yes, they can only be rectangular.
//Yes, I'm sorry.
/datum/turf_reservation
var/list/reserved_turfs = list()
var/width = 0
var/height = 0
var/bottom_left_coords[3]
var/top_right_coords[3]
var/wipe_reservation_on_release = TRUE
var/turf_type = /turf/open/space
/datum/turf_reservation/transit
turf_type = /turf/open/space/transit
/datum/turf_reservation/proc/Release()
var/v = reserved_turfs.Copy()
for(var/i in reserved_turfs)
reserved_turfs -= i
SSmapping.used_turfs -= i
SSmapping.reserve_turfs(v)
/datum/turf_reservation/proc/Reserve(width, height, zlevel)
if(width > world.maxx || height > world.maxy || width < 1 || height < 1)
return FALSE
var/list/avail = SSmapping.unused_turfs["[zlevel]"]
var/turf/BL
var/turf/TR
var/list/turf/final = list()
var/passing = FALSE
for(var/i in avail)
CHECK_TICK
BL = i
if(!(BL.flags_1 & UNUSED_RESERVATION_TURF_1))
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))
continue
final = block(BL, TR)
if(!final)
continue
passing = TRUE
for(var/I in final)
var/turf/checking = I
if(!(checking.flags_1 & UNUSED_RESERVATION_TURF_1))
passing = FALSE
break
if(!passing)
continue
break
if(!passing || !istype(BL) || !istype(TR))
return FALSE
bottom_left_coords = list(BL.x, BL.y, BL.z)
top_right_coords = list(TR.x, TR.y, TR.z)
for(var/i in final)
var/turf/T = i
reserved_turfs |= T
T.flags_1 &= ~UNUSED_RESERVATION_TURF_1
SSmapping.unused_turfs["[T.z]"] -= T
SSmapping.used_turfs[T] = src
T.ChangeTurf(turf_type, turf_type)
src.width = width
src.height = height
return TRUE
/datum/turf_reservation/New()
LAZYADD(SSmapping.turf_reservations, src)
/datum/turf_reservation/Destroy()
Release()
LAZYREMOVE(SSmapping.turf_reservations, src)
return ..()
//Yes, they can only be rectangular.
//Yes, I'm sorry.
/datum/turf_reservation
var/list/reserved_turfs = list()
var/width = 0
var/height = 0
var/bottom_left_coords[3]
var/top_right_coords[3]
var/wipe_reservation_on_release = TRUE
var/turf_type = /turf/open/space
/datum/turf_reservation/transit
turf_type = /turf/open/space/transit
/datum/turf_reservation/proc/Release()
var/v = reserved_turfs.Copy()
for(var/i in reserved_turfs)
reserved_turfs -= i
SSmapping.used_turfs -= i
SSmapping.reserve_turfs(v)
/datum/turf_reservation/proc/Reserve(width, height, zlevel)
if(width > world.maxx || height > world.maxy || width < 1 || height < 1)
return FALSE
var/list/avail = SSmapping.unused_turfs["[zlevel]"]
var/turf/BL
var/turf/TR
var/list/turf/final = list()
var/passing = FALSE
for(var/i in avail)
CHECK_TICK
BL = i
if(!(BL.flags_1 & UNUSED_RESERVATION_TURF_1))
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))
continue
final = block(BL, TR)
if(!final)
continue
passing = TRUE
for(var/I in final)
var/turf/checking = I
if(!(checking.flags_1 & UNUSED_RESERVATION_TURF_1))
passing = FALSE
break
if(!passing)
continue
break
if(!passing || !istype(BL) || !istype(TR))
return FALSE
bottom_left_coords = list(BL.x, BL.y, BL.z)
top_right_coords = list(TR.x, TR.y, TR.z)
for(var/i in final)
var/turf/T = i
reserved_turfs |= T
T.flags_1 &= ~UNUSED_RESERVATION_TURF_1
SSmapping.unused_turfs["[T.z]"] -= T
SSmapping.used_turfs[T] = src
T.ChangeTurf(turf_type, turf_type)
src.width = width
src.height = height
return TRUE
/datum/turf_reservation/New()
LAZYADD(SSmapping.turf_reservations, src)
/datum/turf_reservation/Destroy()
Release()
LAZYREMOVE(SSmapping.turf_reservations, src)
return ..()