mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 23:51:17 +01:00
Live Animal Traps (#5744)
In summary: changes path of beartrap to make it a generic trap Updated paths everywhere Adds small trap, can capture mice, lizards, chick and spiderlings. Adds medium trap, can capture cat, diyaab, monkey, yithian, pengiuns, chicken, nymph. Sometimes even maintainence drones, spiderbots and PAi. Adds large trap, that is dense object. It cannot be picked up and releases animal in the opposite direction from a user. It can capture: medium size animals like dog, spider, carp, goat, cow, shark, fox, bear, cavern dwellers, and other kinds of Xenomorphs. Adds medium trap, can capture Medium-sized mobs such as Diyaabs, Cats, Monkeys, Yithians(?), Nymphs, the occasional wandering pAI and Maintenance Drones.
This commit is contained in:
committed by
Erki
parent
d769b7ba01
commit
70824906c5
@@ -658,9 +658,12 @@ default behaviour is:
|
||||
spawn() escape_buckle()
|
||||
|
||||
//Breaking out of a locker?
|
||||
if( src.loc && (istype(src.loc, /obj/structure/closet)) )
|
||||
if( src.loc && istype(src.loc, /obj/structure/closet) )
|
||||
var/obj/structure/closet/C = loc
|
||||
spawn() C.mob_breakout(src)
|
||||
else if(src.loc && istype(src.loc, /obj/item/weapon/trap/animal))
|
||||
var/obj/item/weapon/trap/animal/A = loc
|
||||
spawn() A.mob_breakout(src)
|
||||
|
||||
/mob/living/proc/escape_inventory(obj/item/weapon/holder/H)
|
||||
if(H != src.loc) return
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
///////////////Great Worm///////////////
|
||||
////////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/beartrap/sarlacc
|
||||
/obj/item/weapon/trap/sarlacc
|
||||
name = "great worm maw"
|
||||
desc = "Hop in, the gastrointestinal juices are just fine."
|
||||
icon = 'icons/mob/cavern.dmi'
|
||||
@@ -21,12 +21,12 @@
|
||||
var/mob/living/simple_animal/hostile/greatworm/originator
|
||||
var/mob/living/captive
|
||||
|
||||
/obj/item/weapon/beartrap/sarlacc/Destroy()
|
||||
/obj/item/weapon/trap/sarlacc/Destroy()
|
||||
if(originator)
|
||||
originator = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/beartrap/sarlacc/Crossed(AM as mob|obj)
|
||||
/obj/item/weapon/trap/sarlacc/Crossed(AM as mob|obj)
|
||||
if(originator)
|
||||
if(deployed && isliving(AM) && !originator.eating)
|
||||
var/mob/living/L = AM
|
||||
@@ -41,7 +41,7 @@
|
||||
addtimer(CALLBACK(src, .proc/devour, L), 50 SECONDS)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/beartrap/sarlacc/proc/devour(var/mob/living/C)
|
||||
/obj/item/weapon/trap/sarlacc/proc/devour(var/mob/living/C)
|
||||
if(!C)
|
||||
if(!deployed)
|
||||
deployed = 1
|
||||
@@ -117,7 +117,7 @@
|
||||
var/asleep = 0
|
||||
var/tentacles = 6
|
||||
var/list/active_tentacles = list()
|
||||
var/obj/item/weapon/beartrap/sarlacc/sarlacc
|
||||
var/obj/item/weapon/trap/sarlacc/sarlacc
|
||||
var/loot_count
|
||||
var/spawn_delay = 0
|
||||
var/spawn_time = 5
|
||||
@@ -128,7 +128,7 @@
|
||||
. = ..()
|
||||
SSmob.greatworms += src
|
||||
loot_count = 4+(rand(0,4))
|
||||
var/obj/item/weapon/beartrap/sarlacc/L = new /obj/item/weapon/beartrap/sarlacc(src.loc)
|
||||
var/obj/item/weapon/trap/sarlacc/L = new /obj/item/weapon/trap/sarlacc(src.loc)
|
||||
L.originator = src
|
||||
sarlacc = L
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
/mob/living/simple_animal/hostile/greatworm/Life()
|
||||
..()
|
||||
if(!sarlacc)
|
||||
var/obj/item/weapon/beartrap/sarlacc/L = new /obj/item/weapon/beartrap/sarlacc(src.loc)
|
||||
var/obj/item/weapon/trap/sarlacc/L = new /obj/item/weapon/trap/sarlacc(src.loc)
|
||||
L.originator = src
|
||||
sarlacc = L
|
||||
if(sarlacc && sarlacc.loc != src.loc) //if the sarlacc is not located on us, move it back onto us.
|
||||
|
||||
@@ -407,6 +407,9 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
//TODO: refactor mob attackby(), attacked_by(), and friends.
|
||||
/mob/living/simple_animal/proc/attacked_with_item(var/obj/item/O, var/mob/user)
|
||||
if(istype(O, /obj/item/weapon/trap/animal))
|
||||
O.attack(src, user)
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(!O.force)
|
||||
visible_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
|
||||
|
||||
Reference in New Issue
Block a user