Skip to content

Commit

Permalink
Burrows (#2408)
Browse files Browse the repository at this point in the history
* Working commit before rebase

* working commit, switching branches

* switching to TG to checkout T-ray scanners

* working commit

* working commit

* Added audio, fixed blattedin and tons of other bugs

* tiny fixes

* plant tweaks

* flooring flag

* mushroom tweak

* fix duplicate proc

* Done vines thing
  • Loading branch information
NanakoAC authored and SpadesSlick committed Dec 16, 2018
1 parent 5fa676e commit ab08fc9
Show file tree
Hide file tree
Showing 76 changed files with 1,605 additions and 186 deletions.
2 changes: 2 additions & 0 deletions cev_eris.dme
Expand Up @@ -199,6 +199,7 @@
#include "code\controllers\subsystems\lighting.dm"
#include "code\controllers\subsystems\machines.dm"
#include "code\controllers\subsystems\mapping.dm"
#include "code\controllers\subsystems\migration.dm"
#include "code\controllers\subsystems\pai.dm"
#include "code\controllers\subsystems\radio.dm"
#include "code\controllers\subsystems\shuttle.dm"
Expand Down Expand Up @@ -961,6 +962,7 @@
#include "code\game\objects\random\traps\traps.dm"
#include "code\game\objects\structures\barsign.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
#include "code\game\objects\structures\burrows.dm"
#include "code\game\objects\structures\catwalk.dm"
#include "code\game\objects\structures\curtains.dm"
#include "code\game\objects\structures\cyberplants.dm"
Expand Down
9 changes: 8 additions & 1 deletion code/__defines/mob_stats.dm
Expand Up @@ -15,4 +15,11 @@
#define STAT_LEVEL_PROF 60

#define STAT_LEVEL_MIN 0 // Min stat value selectable
#define STAT_LEVEL_MAX 60 // Max stat value selectable
#define STAT_LEVEL_MAX 60 // Max stat value selectable


//Compound stat checks. These tell the getStat function how to combine multiple stats
#define STAT_MAX "max" //Get the highest value among the stats passed in
#define STAT_MIN "min" //Lowest value among the stats passed in
#define STAT_AVG "avg" //Get the average (mean) value of the stats
#define STAT_SUM "sum" //Sum total of the stats
2 changes: 1 addition & 1 deletion code/__defines/tools_and_qualities.dm
Expand Up @@ -42,7 +42,7 @@
#define FAILCHANCE_HARD 80
#define FAILCHANCE_CHALLENGING 90
#define FAILCHANCE_VERY_HARD 120
#define FAILCHANCE_IMPOSSIBLY 150
#define FAILCHANCE_IMPOSSIBLE 150

//Sounds for working with tools
#define NO_WORKSOUND -1
Expand Down
6 changes: 5 additions & 1 deletion code/__defines/turfs.dm
Expand Up @@ -19,4 +19,8 @@
#define SMOOTH_ALL 1 //Smooth with all of type
#define SMOOTH_WHITELIST 2 //Smooth with a whitelist of subtypes
#define SMOOTH_BLACKLIST 3 //Smooth with all but a blacklist of subtypes
#define SMOOTH_GREYLIST 4 // Use a whitelist and a blacklist at the same time. atom smoothing only
#define SMOOTH_GREYLIST 4 // Use a whitelist and a blacklist at the same time. atom smoothing only


#define DECK_HEIGHT 3 //3 metres in vertical height between decks
//Note that the height of a turf's airspace is defined elsewhere as 2.5 metres, this adds extra to account for floor thickness
4 changes: 1 addition & 3 deletions code/_helpers/areas.dm
Expand Up @@ -48,7 +48,7 @@
if (istype(A, /area/shuttle))
continue

if (filter_maintenance && istype(A, /area/eris/maintenance))
if (filter_maintenance && A.is_maintenance)
continue

if (filter_critical && (A.flags & AREA_FLAG_CRITICAL))
Expand Down Expand Up @@ -84,5 +84,3 @@
return pick(turfs)
else return null



14 changes: 14 additions & 0 deletions code/_helpers/maths.dm
Expand Up @@ -138,3 +138,17 @@

/proc/rand_between(var/lower, var/upper)
return (rand() * (upper - lower)) + lower


/proc/dist3D(var/atom/A, var/atom/B)
var/turf/a = get_turf(A)
var/turf/b = get_turf(B)

if (!a || !b)
return 0

var/vecX = A.x - B.x
var/vecY = A.y - B.y
var/vecZ = (A.y - B.y)*DECK_HEIGHT

return abs(sqrt((vecX*vecX) + (vecY*vecY) +(vecZ*vecZ)))
24 changes: 12 additions & 12 deletions code/_helpers/matrices.dm
Expand Up @@ -2,18 +2,6 @@
. = new_angle - old_angle
Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT

//Changes our pixel offset by offset pixels towards the target atom
/atom/proc/offset_to(var/atom/target, var/offset = 1)
if (target.x < x)
pixel_x -= offset
else if (target.x > x)
pixel_x += offset

if (target.y < y)
pixel_y -= offset
else if (target.y > y)
pixel_y += offset



/atom/proc/shake_animation(var/intensity = 8)
Expand Down Expand Up @@ -120,6 +108,18 @@

return list(R + x,R,R, G,G + x,G, B,B,B + x)


//Changes our pixel offset by offset pixels towards the target atom
/atom/proc/offset_to(var/atom/target, var/offset = 1)
if (target.x < x)
pixel_x -= offset
else if (target.x > x)
pixel_x += offset
if (target.y < y)
pixel_y -= offset
else if (target.y > y)
pixel_y += offset

#undef LUMR
#undef LUMG
#undef LUMB
4 changes: 4 additions & 0 deletions code/_macros.dm
Expand Up @@ -38,6 +38,10 @@
#define iscorgi(A) istype(A, /mob/living/simple_animal/corgi)

#define ismouse(A) istype(A, /mob/living/simple_animal/mouse)

#define issuperioranimal(A) istype(A, /mob/living/carbon/superior_animal)

#define isburrow(A) istype(A, /obj/structure/burrow)
//---------------------------------------------------

#define issilicon(A) istype(A, /mob/living/silicon)
Expand Down
4 changes: 4 additions & 0 deletions code/controllers/subsystems/mapping.dm
Expand Up @@ -28,8 +28,12 @@ SUBSYSTEM_DEF(mapping)
else
testing("Overmap generation disabled in config.")




return ..()


/datum/controller/subsystem/mapping/proc/build_overmap()
testing("Building overmap...")
world.maxz++
Expand Down

0 comments on commit ab08fc9

Please sign in to comment.