Skip to content

Commit

Permalink
Vaults
Browse files Browse the repository at this point in the history
Added an /obj/vaultspawner which very shitty right now.
 Health Scanner
Added xeno embryo detection.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1542 316c924e-a436-60f5-8080-3fe189b3f50e
  • Loading branch information
uporotiy committed May 7, 2011
1 parent 864f58f commit d062e68
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 2 deletions.
14 changes: 14 additions & 0 deletions code/defines/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,17 @@
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L

/turf/simulated/floor/vault
icon_state = "rockvault"

New(location,type)
..()
icon_state = "[type]vault"

/turf/simulated/wall/vault
icon_state = "rockvault"

New(location,type)
..()
icon_state = "[type]vault"
2 changes: 2 additions & 0 deletions code/game/smoothwall.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
//I should really make the shuttle wall check run every time it's moved, but centcom uses unsimulated floors so !effort

/atom/proc/relativewall() //atom because it should be useable both for walls and false walls
if(istype(src,/turf/simulated/floor/vault)||istype(src,/turf/simulated/wall/vault)) //HACK!!!
return

var/junction = 0 //will be used to determine from which side the wall is connected to other walls

Expand Down
25 changes: 25 additions & 0 deletions code/game/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1178,3 +1178,28 @@ turf/simulated/floor/proc/update_icon()
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)

/obj/vaultspawner
var/maxX = 6
var/maxY = 6
var/minX = 2
var/minY = 2

/obj/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null)
if(!type)
type = pick("sandstone","rock","alien")

var/lowBoundX = location.x
var/lowBoundY = location.y

var/hiBoundX = location.x + rand(lX,uX)
var/hiBoundY = location.y + rand(lY,uY)

var/z = location.z

for(var/i = lowBoundX,i<=hiBoundX,i++)
for(var/j = lowBoundY,j<=hiBoundY,j++)
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
new /turf/simulated/wall/vault(locate(i,j,z),type)
else
new /turf/simulated/floor/vault(locate(i,j,z),type)
4 changes: 3 additions & 1 deletion code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@

if(client)
for(var/image/hud in client.images)
if(hud.icon_state in list("healthdead","healthill","healthy","health-100","health0","health1","health10","health25","health40","health60","health80","health100")) //ugly, but icon comparison is worse, I believe
if(copytext(hud.icon_state,6) == "health") //ugly, but icon comparison is worse, I believe
del(hud)

if (src.stat == 2 || src.mutations & 4)
Expand Down Expand Up @@ -802,6 +802,8 @@
client.images += image(tempHud,patient,RoundHealth(patient.health))
if(patient.stat == 2)
client.images += image(tempHud,patient,"healthdead")
else if(patient.alien_egg_flag)
client.images += image(tempHud,patient,"healthxeno")
else if(patient.virus)
client.images += image(tempHud,patient,"healthill")
else
Expand Down
2 changes: 1 addition & 1 deletion data/mode.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extended
traitor
Binary file modified icons/mob/eyes.dmi
Binary file not shown.
Binary file modified icons/mob/hud.dmi
Binary file not shown.
Binary file modified icons/turf/floors.dmi
Binary file not shown.
Binary file modified icons/turf/walls.dmi
Binary file not shown.

0 comments on commit d062e68

Please sign in to comment.