mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Added mimics! There's the classic crate (chest) mimic which waits until somebody is close before trying to attack them. You can fill him with loot by putting items on him on your map. This was done by changing the base initialize proc to an /atom/movable and then instead of looping through the world for objects, instead loop for atom movables.
The next type of mimic is for the staff of animation! They will copy the icon of the object they're copying and will set themselves stats based on the object too. They will not attack the bearer of the staff which made them animated. Added the option to get the staff on the wizard's spell book. Added a "friends" var to hostile mobs. It will make the simple animal ignore friends when choosing targets. Changed the statues from /obj/effect/showcase to /obj/structure/showcase. Added a new variable to projectiles, "shot_from" is the gun that shot the projectile. It's used to determine what staff animated the mob and it will then add that staff, so it can ignore it when choosing targets. Added a wander var for simple animals, turning it to 0 will stop the simple animal from moving when idle. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5246 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -107,6 +107,7 @@
|
||||
in_chamber.original = target
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.shot_from = src
|
||||
user.next_move = world.time + 4
|
||||
in_chamber.silenced = silenced
|
||||
in_chamber.current = curloc
|
||||
|
||||
@@ -64,6 +64,11 @@ obj/item/weapon/gun/energy/staff
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/staff/animate
|
||||
name = "staff of animation"
|
||||
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
|
||||
projectile_type = "/obj/item/projectile/animate"
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun
|
||||
name = "floral somatoray"
|
||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
var/yo = null
|
||||
var/xo = null
|
||||
var/current = null
|
||||
var/obj/shot_from = null // the object which shot us
|
||||
var/atom/original = null // the original target clicked
|
||||
var/turf/starting = null // the projectile's starting turf
|
||||
var/list/permutated = list() // we've passed through these atoms, don't try to hit them again
|
||||
@@ -61,9 +62,9 @@
|
||||
Bump(atom/A as mob|obj|turf|area)
|
||||
if(A == firer)
|
||||
loc = A.loc
|
||||
return //cannot shoot yourself
|
||||
return 0 //cannot shoot yourself
|
||||
|
||||
if(bumped) return
|
||||
if(bumped) return 0
|
||||
var/forcedodge = 0 // force the projectile to pass
|
||||
|
||||
bumped = 1
|
||||
@@ -71,7 +72,7 @@
|
||||
var/mob/M = A
|
||||
if(!istype(A, /mob/living))
|
||||
loc = A.loc
|
||||
return // nope.avi
|
||||
return 0// nope.avi
|
||||
|
||||
// check for dodge (i can't place in bullet_act because then things get wonky)
|
||||
if(!M.stat && !M.lying && (REFLEXES in M.augmentations) && prob(85))
|
||||
@@ -104,7 +105,7 @@
|
||||
else
|
||||
loc = A.loc
|
||||
permutated.Add(A)
|
||||
return
|
||||
return 0
|
||||
|
||||
if(istype(A,/turf))
|
||||
for(var/obj/O in A)
|
||||
@@ -115,7 +116,7 @@
|
||||
density = 0
|
||||
invisibility = 101
|
||||
del(src)
|
||||
return
|
||||
return 1
|
||||
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/obj/item/projectile/animate
|
||||
name = "bolt of animation"
|
||||
icon_state = "ice_1"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
nodamage = 1
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/animate/Bump(var/atom/change)
|
||||
. = ..()
|
||||
if(istype(change, /obj/item) || istype(change, /obj/structure) && !is_type_in_list(change, protected_objects))
|
||||
var/obj/O = change
|
||||
new /mob/living/simple_animal/hostile/mimic/copy(O.loc, O, shot_from)
|
||||
Reference in New Issue
Block a user