Files
Bubberstation/code/game/objects/items/dehy_carp.dm
kilkun b13bd68640 Makes dehydrated carps more fun (#17302)
* Beginning of new side-tag

First bit of code to implement the Syndicate Lawyer, a single-man antag
with a plethora of abilities and armor to help him including:
>Turning unimplanted crew into gang members
>Disguising himself as a crew member to implanted folks
>Ripping open doors and blast shields

This commit includes:
>Rudimentary event code
>WIP ganger code
>Clothing defines

And modifies the default gang_datum, which will be relevant when ganger
code is finished.

* Makes Dehydrated Carp more malleable for fun

Allows admins to change what mob spawns from dehydrated carp via var
editing.

* removes bloat

Wew this commit history will look wack

* wew

* wew number 2

* Revert "wew"

This reverts commit 75dce9ec56bc8c69c1e7a338d98d4f9e64f3cf9d.

* Revert "removes bloat"

This reverts commit 55a456593709d67a030f15c5b10e5d9aa6042f87.

* Revert "Revert "removes bloat""

This reverts commit 1994fdd08ecb51cd1fd9e09973954c9800ed0f54.

* makes codebase great again

* Final destination for codebase fixes

WEW LADS

* Fixes compiler errors

* Actually properly fixes compile errors

* Fixes missed incorrect variable

This is starting to get ridiculous for a simple feature

* This is starting to get embarrassing.
2016-05-03 19:30:32 -05:00

52 lines
1.7 KiB
Plaintext

/*
* Dehydrated Carp
* Instant carp, just add water
*/
//Child of carpplushie because this should do everything the toy does and more
/obj/item/toy/carpplushie/dehy_carp
var/mob/owner = null //Carp doesn't attack owner, set when using in hand
var/owned = 0 //Boolean, no owner to begin with
var/mobtype = /mob/living/simple_animal/hostile/carp //So admins can change what mob spawns via var fuckery
//Attack self
/obj/item/toy/carpplushie/dehy_carp/attack_self(mob/user)
src.add_fingerprint(user) //Anyone can add their fingerprints to it with this
if(!owned)
user << "<span class='notice'>You pet [src]. You swear it looks up at you.</span>"
owner = user
owned = 1
return ..()
/obj/item/toy/carpplushie/dehy_carp/afterattack(obj/O, mob/user,proximity)
if(!proximity) return
if(istype(O,/obj/structure/sink))
user.drop_item()
loc = get_turf(O)
return Swell()
..()
/obj/item/toy/carpplushie/dehy_carp/proc/Swell()
desc = "It's growing!"
visible_message("<span class='notice'>[src] swells up!</span>")
//Animation
icon = 'icons/mob/animal.dmi'
flick("carp_swell", src)
//Wait for animation to end
sleep(6)
//Make space carp
var/mob/living/M = new mobtype(get_turf(src))
//Make carp non-hostile to user, and their allies
if(owner)
var/list/factions = owner.faction
for(var/F in factions)
if(F == "neutral")
factions -= F
M.faction = factions
if (!owner || owner.faction != M.faction)
visible_message("<span class='warning'>You have a bad feeling about this.</span>") //welcome to the hostile carp enjoy your die
else
visible_message("<span class='notice'>The newly grown [M.name] looks up at you with friendly eyes.</span>")
qdel(src)