Tribbles can be turned into fur products, you monster.

This commit is contained in:
ZomgPonies
2013-11-23 03:07:39 -05:00
parent e837130d9e
commit e9dec4df5c
10 changed files with 922 additions and 309 deletions
+151 -51
View File
@@ -1,3 +1,6 @@
var/global/totaltribbles = 0 //global variable so it updates for all tribbles, not just the new one being made.
/mob/living/simple_animal/tribble
name = "tribble"
desc = "It's a small furry creature that makes a soft trill."
@@ -13,53 +16,27 @@
turns_per_move = 5
maxHealth = 10
health = 10
meat_type = /obj/item/stack/sheet/fur
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "whacks"
harm_intent_damage = 5
var/gestation = 0
var/maxtribbles = 50
var/list/tribble_list = list()
var/maxtribbles = 50 //change this to change the max limit
wander = 1
/mob/living/simple_animal/tribble/New()
..()
var/list/types = list("tribble1","tribble2","tribble3")
src.icon_state = pick(types)
src.icon_living = src.icon_state
src.icon_dead = "[src.icon_state]_dead"
//random pixel offsets so they cover the floor
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
tribble_list += src
totaltribbles += 1
/obj/item/toy/tribble
name = "tribble"
desc = "It's a small furry creature that makes a soft trill."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribble1"
item_state = "tribble1"
var/gestation = 0
/obj/item/toy/tribble/attack_self(mob/user as mob)
..()
new /mob/living/simple_animal/tribble(user.loc)
for(var/mob/living/simple_animal/tribble/T in user.loc)
T.icon_state = src.icon_state
T.icon_living = src.icon_state
T.icon_dead = "[src.icon_state]_dead"
T.gestation = src.gestation
user << "<span class='notice'>You place the tribble on the floor.</span>"
del(src)
/obj/item/toy/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
..()
if(istype(O, /obj/item/weapon/scalpel) && src.gestation != null)
gestation = null
user << "<span class='notice'>You neuter the tribble so that it can no longer re-produce.</span>"
else if (istype(O, /obj/item/weapon/cautery) && src.gestation == null)
gestation = 0
user << "<span class='notice'>You fuse some recently cut tubes together, it should be able to reproduce again.</span>"
/mob/living/simple_animal/tribble/attack_hand(mob/user as mob)
..()
@@ -73,19 +50,17 @@
user.put_in_active_hand(T)
del(src)
/mob/living/simple_animal/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/scalpel))
gestation = null
user << "<span class='notice'>You try to neuter the tribble so that it can no longer re-produce, but it's moving too much, and you fail!</span>"
user << "<span class='notice'>You try to neuter the tribble, but it's moving too much and you fail!</span>"
else if(istype(O, /obj/item/weapon/cautery))
user << "<span class='notice'>You try to un-neuter the tribble, but it's moving too much and you fail!</span>"
..()
/mob/living/simple_animal/tribble/proc/procreate()
..()
var/totaltribbles = 0
for(var/mob/living/simple_animal/tribble/T in tribble_list)
if(T.stat == CONSCIOUS && T.health >= 1)
totaltribbles++
if(totaltribbles <= maxtribbles)
for(var/mob/living/simple_animal/tribble/F in src.loc)
if(!F || F == src)
@@ -95,8 +70,8 @@
/mob/living/simple_animal/tribble/Life()
..()
if(src.health > 0)
if(gestation != null)
if(src.health > 0) //no mostly dead procreation
if(gestation != null) //neuter check
if(gestation < 30)
gestation++
else if(gestation >= 30)
@@ -104,7 +79,50 @@
src.procreate()
/obj/structure/tribble
/mob/living/simple_animal/tribble/Die() // Gotta make sure to remove tribbles from the list on death
..()
totaltribbles -= 1
//||Item version of the trible ||
/obj/item/toy/tribble
name = "tribble"
desc = "It's a small furry creature that makes a soft trill."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribble1"
item_state = "tribble1"
w_class = 10.0
var/gestation = 0
/obj/item/toy/tribble/attack_self(mob/user as mob) //hug that tribble (and play a sound if we add one)
..()
user << "<span class='notice'>You nuzzle the tribble and it trills softly.</span>"
/obj/item/toy/tribble/dropped(mob/user as mob) //now you can't item form them to get rid of them all so easily
..()
new /mob/living/simple_animal/tribble(user.loc)
for(var/mob/living/simple_animal/tribble/T in user.loc)
T.icon_state = src.icon_state
T.icon_living = src.icon_state
T.icon_dead = "[src.icon_state]_dead"
T.gestation = src.gestation
user << "<span class='notice'>The tribble gets up and wanders around.</span>"
del(src)
/obj/item/toy/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob) //neutering and un-neutering
..()
if(istype(O, /obj/item/weapon/scalpel) && src.gestation != null)
gestation = null
user << "<span class='notice'>You neuter the tribble so that it can no longer re-produce.</span>"
else if (istype(O, /obj/item/weapon/cautery) && src.gestation == null)
gestation = 0
user << "<span class='notice'>You fuse some recently cut tubes together, it should be able to reproduce again.</span>"
//|| Tribble Cage - Lovingly lifted from the lamarr-cage ||
/obj/structure/tribble_cage
name = "Lab Cage"
icon = 'icons/mob/tribbles.dmi'
icon_state = "labcage1"
@@ -116,7 +134,7 @@
var/occupied = 1
var/destroyed = 0
/obj/structure/tribble/ex_act(severity)
/obj/structure/tribble_cage/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
@@ -132,27 +150,27 @@
src.healthcheck()
/obj/structure/tribble/bullet_act(var/obj/item/projectile/Proj)
/obj/structure/tribble_cage/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
src.healthcheck()
return
/obj/structure/tribble/blob_act()
/obj/structure/tribble_cage/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
/obj/structure/tribble/meteorhit(obj/O as obj)
/obj/structure/tribble_cage/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
/obj/structure/tribble/proc/healthcheck()
/obj/structure/tribble_cage/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.density = 0
@@ -164,7 +182,7 @@
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
return
/obj/structure/tribble/update_icon()
/obj/structure/tribble_cage/update_icon()
if(src.destroyed)
src.icon_state = "labcageb[src.occupied]"
else
@@ -172,16 +190,16 @@
return
/obj/structure/tribble/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/tribble_cage/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.health -= W.force
src.healthcheck()
..()
return
/obj/structure/tribble/attack_paw(mob/user as mob)
/obj/structure/tribble_cage/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/tribble/attack_hand(mob/user as mob)
/obj/structure/tribble_cage/attack_hand(mob/user as mob)
if (src.destroyed)
return
else
@@ -193,9 +211,91 @@
healthcheck()
return
/obj/structure/tribble/proc/Break()
/obj/structure/tribble_cage/proc/Break()
if(occupied)
new /mob/living/simple_animal/tribble( src.loc )
occupied = 0
update_icon()
return
return
//||Fur and Fur Products ||
/obj
var/f_amt = 0 // registers fur amount as an object variable
/obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets)
name = "pile of fur"
desc = "The by-product of tribbles."
singular_name = "fur piece"
icon = 'icons/mob/tribbles.dmi'
icon_state = "sheet-fur"
origin_tech = "materials=2"
f_amt = 1000
max_amount = 50
/obj/item/clothing/ears/earmuffs/tribblemuffs //earmuffs but with tribbles
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
icon = 'icons/mob/tribbles.dmi'
icon_state = "tribblemuffs"
item_state = "tribblemuffs"
f_amt = 2000
/obj/item/clothing/gloves/furgloves
desc = "These gloves are warm and furry."
name = "fur gloves"
icon = 'icons/mob/tribbles.dmi'
icon_state = "furglovesico"
item_state = "furgloves"
f_amt = 3000
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/head/furcap
name = "fur cap"
desc = "A warm furry cap."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcap"
item_state = "furcap"
f_amt = 5000
cold_protection = HEAD
min_cold_protection_temperature = HELMET_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/shoes/furboots
name = "fur boots"
desc = "Warm, furry boots."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furboots"
item_state = "furboots"
f_amt = 4000
cold_protection = FEET
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/furcoat
name = "fur coat"
desc = "A trenchcoat made from fur. You could put an oxygen tank in one of the pockets."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcoat"
item_state = "furcoat"
blood_overlay_type = "armor"
f_amt = 15000
body_parts_covered = UPPER_TORSO|LEGS|ARMS|LOWER_TORSO
allowed = list (/obj/item/weapon/tank/emergency_oxygen)
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
/obj/item/clothing/suit/furcape
name = "fur cape"
desc = "A cape made from fur. You'll really be stylin' now."
icon = 'icons/mob/tribbles.dmi'
icon_state = "furcape"
item_state = "furcape"
blood_overlay_type = "armor"
f_amt = 10000
body_parts_covered = UPPER_TORSO|LEGS|ARMS
cold_protection = UPPER_TORSO | LEGS | ARMS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE