mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Easier gib spawning.
Monkey cubes. WIP bears. Cleaned up some sprites. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1740 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
+67
-160
@@ -1,174 +1,81 @@
|
||||
//HUMANS
|
||||
|
||||
/proc/gibs(atom/location, var/datum/disease/virus)
|
||||
var/obj/decal/cleanable/blood/gibs/gib = null
|
||||
if(virus && virus.spread_type == SPECIAL)
|
||||
virus = null
|
||||
|
||||
// NORTH
|
||||
gib = new /obj/decal/cleanable/blood/gibs(location)
|
||||
if (prob(30))
|
||||
gib.icon_state = "gibup1"
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(NORTH, NORTHEAST, NORTHWEST))
|
||||
|
||||
// SOUTH
|
||||
gib = new /obj/decal/cleanable/blood/gibs(location)
|
||||
if (prob(30))
|
||||
gib.icon_state = "gibdown1"
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(SOUTH, SOUTHEAST, SOUTHWEST))
|
||||
|
||||
// WEST
|
||||
gib = new /obj/decal/cleanable/blood/gibs(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(WEST, NORTHWEST, SOUTHWEST))
|
||||
|
||||
// EAST
|
||||
gib = new /obj/decal/cleanable/blood/gibs(location)
|
||||
if(virus)
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(EAST, NORTHEAST, SOUTHEAST))
|
||||
|
||||
// RANDOM BODY
|
||||
gib = new /obj/decal/cleanable/blood/gibs/body(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(alldirs)
|
||||
|
||||
// RANDOM LIMBS
|
||||
for (var/i = 0, i < pick(0, 1, 2), i++)
|
||||
gib = new /obj/decal/cleanable/blood/gibs/limb(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(alldirs)
|
||||
|
||||
// CORE
|
||||
gib = new /obj/decal/cleanable/blood/gibs/core(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
|
||||
//ALIENS
|
||||
//mostly carbon copy of the human code. N
|
||||
new /obj/gibspawner/human(get_turf(location),virus)
|
||||
|
||||
/proc/xgibs(atom/location, var/datum/disease/virus)
|
||||
var/obj/decal/cleanable/xenoblood/xgibs/gib = null
|
||||
if(virus && virus.spread_type == SPECIAL)
|
||||
virus = null
|
||||
new /obj/gibspawner/xeno(get_turf(location),virus)
|
||||
|
||||
// NORTH
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs(location)
|
||||
if (prob(30))
|
||||
gib.icon_state = "xgibup1"
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(NORTH, NORTHEAST, NORTHWEST))
|
||||
|
||||
// SOUTH
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs(location)
|
||||
if (prob(30))
|
||||
gib.icon_state = "xgibdown1"
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(SOUTH, SOUTHEAST, SOUTHWEST))
|
||||
|
||||
// WEST
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(WEST, NORTHWEST, SOUTHWEST))
|
||||
|
||||
// EAST
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs(location)
|
||||
if(virus)
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(list(EAST, NORTHEAST, SOUTHEAST))
|
||||
|
||||
// RANDOM BODY
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs/body(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(alldirs)
|
||||
|
||||
// RANDOM LIMBS
|
||||
for (var/i = 0, i < pick(0, 1, 2), i++)
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs/limb(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
gib.streak(alldirs)
|
||||
|
||||
// CORE
|
||||
gib = new /obj/decal/cleanable/xenoblood/xgibs/core(location)
|
||||
if(virus && prob(20))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
|
||||
//ROBOTS
|
||||
/proc/robogibs(atom/location, var/datum/disease/virus)
|
||||
var/obj/decal/cleanable/robot_debris/gib = null
|
||||
if(virus && virus.spread_type == SPECIAL)
|
||||
virus = null
|
||||
new /obj/gibspawner/robot(get_turf(location),virus)
|
||||
|
||||
// RUH ROH
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
/obj/gibspawner
|
||||
var/sparks = 0 //whether sparks spread on Gib()
|
||||
var/virusProb = 20 //the chance for viruses to spread on the gibs
|
||||
var/list/gibtypes = list()
|
||||
var/list/gibamounts = list()
|
||||
var/list/gibdirections = list() //of lists
|
||||
|
||||
// NORTH
|
||||
gib = new /obj/decal/cleanable/robot_debris(location)
|
||||
if (prob(25))
|
||||
gib.icon_state = "gibup1"
|
||||
gib.streak(list(NORTH, NORTHEAST, NORTHWEST))
|
||||
New(location, var/datum/disease/virus = null)
|
||||
..()
|
||||
|
||||
// SOUTH
|
||||
gib = new /obj/decal/cleanable/robot_debris(location)
|
||||
if (prob(25))
|
||||
gib.icon_state = "gibdown1"
|
||||
gib.streak(list(SOUTH, SOUTHEAST, SOUTHWEST))
|
||||
if(istype(loc,/turf)) //basically if a badmin spawns it
|
||||
Gib(loc,virus)
|
||||
|
||||
// WEST
|
||||
gib = new /obj/decal/cleanable/robot_debris(location)
|
||||
gib.streak(list(WEST, NORTHWEST, SOUTHWEST))
|
||||
proc/Gib(atom/location, var/datum/disease/virus = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
world << "\red Gib list length mismatch!"
|
||||
return
|
||||
|
||||
// EAST
|
||||
gib = new /obj/decal/cleanable/robot_debris(location)
|
||||
gib.streak(list(EAST, NORTHEAST, SOUTHEAST))
|
||||
var/obj/decal/cleanable/blood/gibs/gib = null
|
||||
if(virus && virus.spread_type == SPECIAL)
|
||||
virus = null
|
||||
|
||||
// RANDOM
|
||||
gib = new /obj/decal/cleanable/robot_debris(location)
|
||||
gib.streak(alldirs)
|
||||
if(sparks)
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
// RANDOM LIMBS
|
||||
for (var/i = 0, i < pick(0, 1, 2), i++)
|
||||
gib = new /obj/decal/cleanable/robot_debris/limb(location)
|
||||
gib.streak(alldirs)
|
||||
for(var/i = 1, i<= gibtypes.len, i++)
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(location)
|
||||
if(virus && prob(virusProb))
|
||||
gib.virus = new virus.type
|
||||
gib.virus.holder = gib
|
||||
gib.virus.spread_type = CONTACT_FEET
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/gibspawner
|
||||
human
|
||||
gibtypes = list(/obj/decal/cleanable/blood/gibs/up,/obj/decal/cleanable/blood/gibs/down,/obj/decal/cleanable/blood/gibs,/obj/decal/cleanable/blood/gibs,/obj/decal/cleanable/blood/gibs/body,/obj/decal/cleanable/blood/gibs/limb,/obj/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
xeno
|
||||
gibtypes = list(/obj/decal/cleanable/xenoblood/xgibs/up,/obj/decal/cleanable/xenoblood/xgibs/down,/obj/decal/cleanable/xenoblood/xgibs,/obj/decal/cleanable/xenoblood/xgibs,/obj/decal/cleanable/xenoblood/xgibs/body,/obj/decal/cleanable/xenoblood/xgibs/limb,/obj/decal/cleanable/xenoblood/xgibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
robot
|
||||
sparks = 1
|
||||
gibtypes = list(/obj/decal/cleanable/robot_debris/up,/obj/decal/cleanable/robot_debris/down,/obj/decal/cleanable/robot_debris,/obj/decal/cleanable/robot_debris,/obj/decal/cleanable/robot_debris,/obj/decal/cleanable/robot_debris/limb)
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
@@ -165,4 +165,34 @@ YOUR MUMS BOX
|
||||
usr << text("There are [] eggs in the box.", n)
|
||||
return
|
||||
|
||||
/obj/item/weapon/monkeycube_box
|
||||
name = "monkey cube box"
|
||||
desc = "Drymate brand monkey cubes. Just add water!"
|
||||
icon = 'food.dmi'
|
||||
icon_state = "monkeycubebox"
|
||||
var/amount = 5
|
||||
|
||||
attack_hand(mob/user as mob, unused, flag)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(amount)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped(src)
|
||||
if (user.hand)
|
||||
user.l_hand = M
|
||||
else
|
||||
user.r_hand = M
|
||||
M.loc = user
|
||||
M.layer = 20
|
||||
user.update_clothing()
|
||||
user << "You take a monkey cube out of the box."
|
||||
amount--
|
||||
else
|
||||
user << "There are no monkey cubes left in the box."
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -34,6 +34,8 @@
|
||||
var/obj/item/weapon/card/id/anicard //By default, animals can open doors but not any with access restrictions.
|
||||
var/intelligence = null // the intelligence var allows for additional access (by job).
|
||||
|
||||
var/species = "animal" //affects icon_state
|
||||
|
||||
New() //Initializes the livestock's AI and access
|
||||
..()
|
||||
anicard = new(src)
|
||||
@@ -307,6 +309,7 @@
|
||||
if (get_dist(src, src.target) >= distance) src.frustration++ //If it hasn't reached the target yet, get a little angry.
|
||||
else src.frustration-- //It reached the target! Get less angry.
|
||||
if(frustration >= patience) set_null() //If too angry? Fuck this shit.
|
||||
special_extra()
|
||||
if(target || flee_from.len)
|
||||
spawn(cycle_pause / 3)
|
||||
src.process()
|
||||
@@ -364,7 +367,7 @@
|
||||
if(!alive) return
|
||||
alive = 0
|
||||
density = 0
|
||||
icon_state = "[initial(icon_state)]_d"
|
||||
icon_state = "[species]_d"
|
||||
set_null()
|
||||
if(!messy)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
@@ -410,6 +413,7 @@
|
||||
name = "Spess Carp"
|
||||
desc = "Oh shit, you're really fucked now."
|
||||
icon_state = "spesscarp"
|
||||
species = "spesscarp"
|
||||
aggressive = 1
|
||||
health = 25
|
||||
maxhealth = 25
|
||||
@@ -439,6 +443,7 @@
|
||||
name = "Lizard"
|
||||
desc = "A cute tiny lizard."
|
||||
icon_state = "lizard"
|
||||
species = "lizard"
|
||||
cowardly = 1
|
||||
health = 10
|
||||
maxhealth = 10
|
||||
@@ -447,6 +452,47 @@
|
||||
patience = 50
|
||||
view_range = 7
|
||||
|
||||
/obj/livestock/bear
|
||||
name = "ninja space bear"
|
||||
desc = "Its sight is unbearable to your eye."
|
||||
icon_state = "bear"
|
||||
species = "bear"
|
||||
aggressive = 1
|
||||
health = 100
|
||||
maxhealth = 100
|
||||
cycle_pause = 15
|
||||
patience = 75
|
||||
strength = 30
|
||||
intelligence = "Captain"
|
||||
|
||||
var/adaptationChance = 10 //the chance per tick the bear will change its camouflage
|
||||
var/camouflage = "space" //"", "space" or "floor"
|
||||
|
||||
New()
|
||||
..()
|
||||
//new /obj/item/clothing/suit/bearpelt(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/bearmeat(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/bearmeat(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/bearmeat(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/bearmeat(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/bearmeat(src)
|
||||
//new /obj/item/weapon/reagent_containers/food/snacks/bearinnards(src)
|
||||
|
||||
special_extra() //camouflage check
|
||||
if(prob(adaptationChance))
|
||||
if(istype(loc,/turf/simulated/floor))
|
||||
if(camouflage != "floor")
|
||||
camouflage = "floor"
|
||||
else if(istype(loc,/turf/space))
|
||||
if(camouflage != "space")
|
||||
camouflage = "space"
|
||||
else if(camouflage != "")
|
||||
camouflage = ""
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
icon_state = "[species][camouflage][alive?"":"_d"]"
|
||||
|
||||
/* Commented out because of Filthy Xeno-lovers.
|
||||
/obj/livestock/cow
|
||||
name = "Pigmy Cow"
|
||||
|
||||
Reference in New Issue
Block a user