Skip to content

Commit 6bf6e7e

Browse files
map fixes, open the door
1 parent 065c341 commit 6bf6e7e

File tree

4 files changed

+719
-383
lines changed

4 files changed

+719
-383
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/mob/living/simple_animal/hostile/dinosaur
2+
name="Dinosaur"
3+
desc="boom boom acka lacka boom boom"
4+
icon_gib=null
5+
icon_living="dino"
6+
icon_dead="dino_dead"
7+
icon_state="dino"
8+
var/walking=FALSE
9+
10+
/mob/living/simple_animal/hostile/dinosaur/Life()
11+
walking=FALSE
12+
var/wc=0
13+
var/wt=0
14+
var/list/l=view(vision_range, src)
15+
for( var/mob/living/carbon/human/h in l)
16+
if (h.resting) //get on the floor
17+
wc++
18+
wt++
19+
if(wc && wc==wt)
20+
walking=TRUE
21+
..()
22+
if(walking) //more active, since mob ticks are 2 seconds.
23+
openthedoor()
24+
spawn(5) openthedoor()
25+
spawn(10) openthedoor()
26+
spawn(15) openthedoor()
27+
28+
29+
30+
31+
32+
/mob/living/simple_animal/hostile/dinosaur/ListTargets()
33+
if(walking)
34+
return list()
35+
else
36+
..()
37+
38+
/mob/living/simple_animal/hostile/dinosaur/proc/openthedoor()
39+
if(!walking)
40+
return
41+
42+
var/list/l=view(vision_range, src)
43+
44+
var/dn=floor((world.time / 5)%4)
45+
switch(dn)
46+
if(0)
47+
dir=NORTH
48+
if(1)
49+
dir=EAST
50+
if(2)
51+
dir=SOUTH
52+
if(3)
53+
dir=WEST
54+
if(prob(10))
55+
var/nloc=get_step_rand(src.loc)
56+
if(nloc)
57+
Move(nloc)
58+
for( var/mob/living/carbon/human/h in l)
59+
h.dir=pick(list(NORTH,SOUTH,EAST,WEST))

icons/mob/animal.dmi

6.04 KB
Binary file not shown.

0 commit comments

Comments
 (0)