mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
moved some re-used ul procs to another file
Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -17,9 +17,6 @@
|
|||||||
#define FILE_DIR "code/datums/spells"
|
#define FILE_DIR "code/datums/spells"
|
||||||
#define FILE_DIR "code/defines"
|
#define FILE_DIR "code/defines"
|
||||||
#define FILE_DIR "code/defines/area"
|
#define FILE_DIR "code/defines/area"
|
||||||
#define FILE_DIR "code/defines/mob"
|
|
||||||
#define FILE_DIR "code/defines/mob/living"
|
|
||||||
#define FILE_DIR "code/defines/mob/living/carbon"
|
|
||||||
#define FILE_DIR "code/defines/obj"
|
#define FILE_DIR "code/defines/obj"
|
||||||
#define FILE_DIR "code/defines/obj/clothing"
|
#define FILE_DIR "code/defines/obj/clothing"
|
||||||
#define FILE_DIR "code/defines/procs"
|
#define FILE_DIR "code/defines/procs"
|
||||||
@@ -1258,7 +1255,7 @@
|
|||||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
|
||||||
#include "code\WorkInProgress\Mini\atmos_control.dm"
|
#include "code\WorkInProgress\Mini\atmos_control.dm"
|
||||||
#include "code\WorkInProgress\SkyMarshal\Ultralight.dm"
|
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||||
#include "code\WorkInProgress\Tastyfish\livestock.dm"
|
#include "code\WorkInProgress\Tastyfish\livestock.dm"
|
||||||
#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"
|
#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"
|
||||||
#include "code\ZAS\Airflow.dm"
|
#include "code\ZAS\Airflow.dm"
|
||||||
|
|||||||
32
code/WorkInProgress/SkyMarshal/Ultralight_procs.dm
Normal file
32
code/WorkInProgress/SkyMarshal/Ultralight_procs.dm
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
// MOVED HERE FROM ULTRALIGHT WHICH IS PROBABLY A BAD THING
|
||||||
|
#define UL_I_FALLOFF_SQUARE 0
|
||||||
|
#define UL_I_FALLOFF_ROUND 1
|
||||||
|
#define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
|
||||||
|
var/list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
|
||||||
|
5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||||
|
7, 7)
|
||||||
|
|
||||||
|
atom/proc/ul_FalloffAmount(var/atom/ref)
|
||||||
|
if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
|
||||||
|
var/delta_x = (ref.x - src.x)
|
||||||
|
var/delta_y = (ref.y - src.y)
|
||||||
|
|
||||||
|
#ifdef ul_LightingResolution
|
||||||
|
if (round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt,1) > ul_FastRoot.len)
|
||||||
|
for(var/i = ul_FastRoot.len, i <= round(delta_x*delta_x+delta_y*delta_y*ul_LightingResolutionSqrt,1), i++)
|
||||||
|
ul_FastRoot += round(sqrt(i))
|
||||||
|
return ul_FastRoot[round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt, 1) + 1]/ul_LightingResolution
|
||||||
|
|
||||||
|
#else
|
||||||
|
if ((delta_x*delta_x + delta_y*delta_y) > ul_FastRoot.len)
|
||||||
|
for(var/i = ul_FastRoot.len, i <= delta_x*delta_x+delta_y*delta_y, i++)
|
||||||
|
ul_FastRoot += round(sqrt(i))
|
||||||
|
return ul_FastRoot[delta_x*delta_x + delta_y*delta_y + 1]
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE)
|
||||||
|
return get_dist(src, ref)
|
||||||
|
|
||||||
|
return 0
|
||||||
@@ -411,35 +411,3 @@ zone/proc/movables()
|
|||||||
if(istype(A, /obj/effect))
|
if(istype(A, /obj/effect))
|
||||||
continue
|
continue
|
||||||
. += A
|
. += A
|
||||||
|
|
||||||
// MOVED HERE FROM ULTRALIGHT WHICH IS PROBABLY A BAD THING
|
|
||||||
#define UL_I_FALLOFF_SQUARE 0
|
|
||||||
#define UL_I_FALLOFF_ROUND 1
|
|
||||||
#define ul_FalloffStyle UL_I_FALLOFF_ROUND // Sets the lighting falloff to be either squared or circular.
|
|
||||||
var/list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
|
|
||||||
5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
|
||||||
7, 7)
|
|
||||||
|
|
||||||
atom/proc/ul_FalloffAmount(var/atom/ref)
|
|
||||||
if (ul_FalloffStyle == UL_I_FALLOFF_ROUND)
|
|
||||||
var/delta_x = (ref.x - src.x)
|
|
||||||
var/delta_y = (ref.y - src.y)
|
|
||||||
|
|
||||||
#ifdef ul_LightingResolution
|
|
||||||
if (round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt,1) > ul_FastRoot.len)
|
|
||||||
for(var/i = ul_FastRoot.len, i <= round(delta_x*delta_x+delta_y*delta_y*ul_LightingResolutionSqrt,1), i++)
|
|
||||||
ul_FastRoot += round(sqrt(i))
|
|
||||||
return ul_FastRoot[round((delta_x*delta_x + delta_y*delta_y)*ul_LightingResolutionSqrt, 1) + 1]/ul_LightingResolution
|
|
||||||
|
|
||||||
#else
|
|
||||||
if ((delta_x*delta_x + delta_y*delta_y) > ul_FastRoot.len)
|
|
||||||
for(var/i = ul_FastRoot.len, i <= delta_x*delta_x+delta_y*delta_y, i++)
|
|
||||||
ul_FastRoot += round(sqrt(i))
|
|
||||||
return ul_FastRoot[delta_x*delta_x + delta_y*delta_y + 1]
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE)
|
|
||||||
return get_dist(src, ref)
|
|
||||||
|
|
||||||
return 0
|
|
||||||
@@ -15,7 +15,7 @@ datum/preferences
|
|||||||
underwear = 1
|
underwear = 1
|
||||||
backbag = 2
|
backbag = 2
|
||||||
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
|
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
|
||||||
age = rand(PLAYER_AGE_MIN,PLAYER_AGE_MAX)
|
age = rand(MIN_PLAYER_AGE,MAX_PLAYER_AGE)
|
||||||
copy_to(H,1)
|
copy_to(H,1)
|
||||||
|
|
||||||
proc/randomize_name()
|
proc/randomize_name()
|
||||||
|
|||||||
Reference in New Issue
Block a user