Aliens now bleed green when you hit them. The green blood can be mopped and cleaned.
Hurt people and bodies leave behind blood when you drag them.
Monkeys now also bleed when struck with items.
Added variable "update_icon" for mobs. Basically you can now change the icon on aliens and monkeys as an admin and it will not change back when you move around.
You can spawn monkey and alien "RolePlay" bodies which have update_icon = 0 at start.

Fixed:
Monkeys not slipping on wet floor and causing runtime errors.
Monkeys and Aliens not being able to speak on station bounced radios or intercoms and causing runtime errors.
Anything else than humans not being able to attack humans with items (did no damage).
Food sometimes dealing damage when you eat it (such as chips).

Changed:
Alien weeds and the blob now spread at a reasonable pace.
Removed some redundant code, such as what was left of poo and urine.
Removed nutrient.dm again, someone brought it back at some point, it's redundant.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@118 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Skiedrake
2010-09-19 22:19:32 +00:00
parent 8a85acc5e2
commit 9eb0e80ae7
26 changed files with 166 additions and 91 deletions
+4 -7
View File
@@ -607,6 +607,7 @@
proc
heal(var/mob/M)
var/healing = min(src.heal_amt/2, 1.0) // Should prevent taking damage from healing
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
for(var/A in H.organs)
@@ -614,13 +615,13 @@
if(!H.organs[A]) continue
affecting = H.organs[A]
if(!istype(affecting, /datum/organ/external)) continue
if(affecting.heal_damage(src.heal_amt/2.0, src.heal_amt/2.0))
if(affecting.heal_damage(healing, healing))
H.UpdateDamageIcon()
else
H.UpdateDamage()
else
M.bruteloss = max(0, M.bruteloss - src.heal_amt/2.0)
M.fireloss = max(0, M.fireloss - src.heal_amt/2.0)
M.bruteloss = max(0, M.bruteloss - healing)
M.fireloss = max(0, M.fireloss - healing)
M.updatehealth()
@@ -740,7 +741,6 @@
src.amount--
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
M.nutrition += src.heal_amt * 10
M.poo += 0.1
if(src.heal_amt > 0)
src.heal(M)
if(src.poison_amt > 0)
@@ -767,7 +767,6 @@
src.amount--
playsound(M.loc, 'eatfood.ogg', rand(10,50), 1)
M.nutrition += src.heal_amt * 10
M.poo += 0.1
if(src.heal_amt > 0)
src.heal(M)
if(src.poison_amt > 0)
@@ -837,7 +836,6 @@
reagents.trans_to(M, gulp_size)
playsound(M.loc,'drink.ogg', rand(10,50), 1)
M.urine += 0.1
return 1
else if( istype(M, /mob/living/carbon/human) )
@@ -854,7 +852,6 @@
reagents.trans_to(M, gulp_size)
playsound(M.loc,'drink.ogg', rand(10,50), 1)
M.urine += 0.1
return 1
return 0
+3 -1
View File
@@ -8,4 +8,6 @@
var/alien_invis = 0.0
var/max_plasma = 500
alien_talk_understand = 1
alien_talk_understand = 1
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
@@ -22,4 +22,7 @@
name = "alien queen"
health = 250
icon_state = "queen_s"
icon_state = "queen_s"
/mob/living/carbon/alien/humanoid/rpbody
update_icon = 0
+1
View File
@@ -1,5 +1,6 @@
/mob/living/carbon/human
name = "human"
real_name = "human"
voice_name = "human"
icon = 'mob.dmi'
icon_state = "m-none"
+7 -1
View File
@@ -5,4 +5,10 @@
icon = 'monkey.dmi'
icon_state = "monkey1"
gender = NEUTER
flags = 258.0
flags = 258.0
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
/mob/living/carbon/monkey/rpbody // For admin RP
update_icon = 0
voice_message = "says"
+6 -6
View File
@@ -22,12 +22,10 @@
var/obj/screen/healths = null
var/obj/screen/throw_icon = null
var/list/obj/hallucination/hallucinations = list()
// var/list/obj/hallucination/hallucinations = list() - Not used at all - Skie
var/alien_egg_flag = 0
var/last_special = 0
var/obj/screen/zone_sel/zone_sel = null
var/emote_allowed = 1
@@ -79,8 +77,6 @@
var/is_jittery = 0
var/jitteriness = 0
var/charges = 0.0
var/urine = 0.0
var/poo = 0.0
var/nutrition = 0.0
var/paralysis = 0.0
var/stunned = 0.0
@@ -171,4 +167,8 @@
var/alien_talk_understand = 0
// Ruby mode
var/incorporeal_move = 0
var/incorporeal_move = 0
var/update_icon = 1 // Set to 0 if you want that the mob's icon doesn't update when it moves -- Skie
// This can be used if you want to change the icon on the fly and want it to stay
+12 -1
View File
@@ -16,7 +16,7 @@
var/list/random_icon_states = list()
/obj/decal/cleanable/blood
name = "blood"
name = "Blood"
desc = "It's red."
density = 0
anchored = 1
@@ -28,6 +28,17 @@
blood_DNA = null
blood_type = null
/obj/decal/cleanable/xenoblood
name = "Xeno blood"
desc = "It's green."
density = 0
anchored = 1
layer = 2
icon = 'blood.dmi'
icon_state = "xfloor1"
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
var/datum/disease/virus = null
/obj/decal/cleanable/blood/splatter
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
-31
View File
@@ -1,31 +0,0 @@
/obj/item/nutrient
name = ""
icon = 'chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
var/mutmod = 0
var/yieldmod = 0
/obj/item/nutrient/ez
name = "E-Z-Nutrient"
icon = 'chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
mutmod = 1
yieldmod = 1
/obj/item/nutrient/l4z
name = "Left 4 Zed"
icon = 'chemical.dmi'
icon_state = "bottle18"
flags = FPRINT | TABLEPASS
mutmod = 2
yieldmod = 0
/obj/item/nutrient/rh
name = "Robust Harvest"
icon = 'chemical.dmi'
icon_state = "bottle15"
flags = FPRINT | TABLEPASS
mutmod = 0
yieldmod = 2
+16
View File
@@ -116,6 +116,22 @@
src.blood_DNA = list2params(L)
return
// Only adds blood on the floor -- Skie
/atom/proc/add_blood_floor(mob/living/carbon/M as mob)
if( istype(M, /mob/living/carbon/monkey) )
if( istype(src, /turf/simulated) )
var/turf/simulated/source1 = src
var/obj/decal/cleanable/blood/this = new /obj/decal/cleanable/blood(source1)
this.blood_DNA = M.dna.unique_enzymes
this.virus = M.virus
else if( istype(M, /mob/living/carbon/alien ))
if( istype(src, /turf/simulated) )
var/turf/simulated/source2 = src
var/obj/decal/cleanable/xenoblood/this = new /obj/decal/cleanable/xenoblood(source2)
this.virus = M.virus
/atom/proc/clean_blood()
if (!( src.flags ) & 256)
+1
View File
@@ -52,6 +52,7 @@
return
for(var/dirn in cardinal)
sleep(10) // -- Skie
var/turf/T = get_step(src, dirn)
if (istype(T.loc, /area/arrival))
+1
View File
@@ -189,6 +189,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
/obj/machinery/bot/cleanbot/proc/get_targets()
src.target_types = new/list()
if(src.blood)
target_types += /obj/decal/cleanable/xenoblood/
target_types += /obj/decal/cleanable/blood/
target_types += /obj/decal/cleanable/blood/gibs/
+1 -1
View File
@@ -45,7 +45,7 @@ Alien plants should do something if theres a lot of poison
if(T.Enter(B,src) && !(locate(/obj/alien/weeds) in T))
B.loc = T
spawn(80)
spawn(200)
if(B)
B.Life()
// open cell, so expand
+6 -2
View File
@@ -154,7 +154,7 @@
var/power = src.force
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if (ishuman(user) || isrobot(user) || ishivebot(user))
if (ishuman(user) || isrobot(user) || ishivebot(user) || ismonkey(user) || isalien(user))
if (!( def_zone ))
var/mob/user2 = user
var/t = user2:zone_sel.selecting
@@ -321,10 +321,14 @@
switch(src.damtype)
if("brute")
M.bruteloss += power
if (prob(33)) // Added blood for whacking non-humans too
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood_floor(M)
if("fire")
if (!(M.mutations & 2))
M.fireloss += power
M << "heres ur burn notice"
M << "Aargh it burns!"
M.updatehealth()
src.add_fingerprint(user)
return
@@ -63,7 +63,7 @@ MOP
src.reagents.reaction(A,1,10)
A.clean_blood()
mopcount++
else if (istype(A, /obj/decal/cleanable/blood) || istype(A, /obj/overlay))
else if (istype(A, /obj/decal/cleanable/blood) || istype(A, /obj/overlay) || istype(A, /obj/decal/cleanable/xenoblood) )
for(var/mob/O in viewers(user, null))
O.show_message(text("\red <B>[user] begins to clean [A]</B>"), 1)
sleep(20)
+22 -9
View File
@@ -151,16 +151,29 @@
playsound(src, "clownstep", 20, 1)
switch (src.wet)
if(1)
if ((M.m_intent == "run") && (!istype(M:shoes, /obj/item/clothing/shoes/galoshes)))
M.pulling = null
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
M.stunned = 8
M.weakened = 5
if (istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
if ((M.m_intent == "run") && (!istype(M:shoes, /obj/item/clothing/shoes/galoshes)))
M.pulling = null
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
M.stunned = 8
M.weakened = 5
else
M.inertia_dir = 0
return
else
M.inertia_dir = 0
return
if (M.m_intent == "run")
M.pulling = null
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
playsound(src.loc, 'slip.ogg', 50, 1, -3)
M.stunned = 8
M.weakened = 5
else
M.inertia_dir = 0
return
if(2) //lube
M.pulling = null
step(M, M.dir)
@@ -452,14 +452,16 @@ to clean it up, or just beat the shit out of it (which takes ages).
src.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", src.zone_sel.selecting))
if (src.lying)
src.icon = src.lying_icon
if(src.update_icon)
src.icon = src.lying_icon
src.overlays += src.body_lying
if (src.face_lying)
src.overlays += src.face_lying
else
src.icon = src.stand_icon
if(src.update_icon)
src.icon = src.stand_icon
src.overlays += src.body_standing
@@ -297,6 +297,12 @@
if(B.virus.type in src.resistances)
continue
src.contract_disease(new B.virus.type)
for(var/obj/decal/cleanable/xenoblood/X in range(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Alien"))
if(X.virus.type in src.resistances)
continue
src.contract_disease(new X.virus.type)
else
src.virus.stage_act()
/*
@@ -547,6 +547,7 @@
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
D.strain_data = M.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus && B.virus.spread == "Airborne")
if(B.virus.affected_species.Find("Alien"))
@@ -555,6 +556,15 @@
var/datum/disease/D = new B.virus.type
D.strain_data = B.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Alien"))
if(src.resistances.Find(X.virus.type))
continue
var/datum/disease/D = new X.virus.type
D.strain_data = X.virus.strain_data
src.contract_disease(D)
else
src.virus.stage_act()
@@ -24,8 +24,9 @@
if(src.client && src.stat == 2)
src.verbs += /mob/proc/ghostize
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
mind.store_memory("Time of death: [tod]", 0)
if(mind) // Skie - Added check that there's someone controlling the alien
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
mind.store_memory("Time of death: [tod]", 0)
var/cancel
for (var/mob/M in world)
@@ -475,6 +475,14 @@
var/datum/disease/D = new B.virus.type
D.strain_data = B.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Alien"))
if(src.resistances.Find(X.virus.type))
continue
var/datum/disease/D = new X.virus.type
D.strain_data = X.virus.strain_data
src.contract_disease(D)
else
src.virus.stage_act()
+5 -10
View File
@@ -792,11 +792,11 @@
var/t = M.pulling
M.pulling = null
//this is the gay blood on floor shit
// if (M.lying && (prob(M.bruteloss / 6)))
// var/turf/location = M.loc
// if (istype(location, /turf/simulated))
// location.add_blood(M)
//this is the gay blood on floor shit -- Added back -- Skie
if (M.lying && (prob(M.bruteloss / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
step(src.pulling, get_dir(src.pulling.loc, T))
@@ -2316,11 +2316,6 @@
onclose(user, "mob[src.name]")
return
/mob/living/carbon/human/verb/fuck()
set hidden = 1
alert("Go play HellMOO if you wanna do that.")
// called when something steps onto a human
// this could be made more general, but for now just handle mulebot
/mob/living/carbon/human/HasEntered(var/atom/movable/AM)
@@ -809,6 +809,7 @@
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
D.strain_data = M.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus && B.virus.spread == "Airborne")
if(B.virus.affected_species.Find("Human"))
@@ -817,6 +818,15 @@
var/datum/disease/D = new B.virus.type
D.strain_data = B.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Human"))
if(src.resistances.Find(X.virus.type))
continue
var/datum/disease/D = new X.virus.type
D.strain_data = X.virus.strain_data
src.contract_disease(D)
else
src.virus.stage_act()
@@ -564,6 +564,7 @@
var/datum/disease/D = new M.virus.type //Making sure strain_data is preserved
D.strain_data = M.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/blood/B in view(4, src))
if(B.virus && B.virus.spread == "Airborne")
if(B.virus.affected_species.Find("Monkey"))
@@ -572,6 +573,15 @@
var/datum/disease/D = new B.virus.type
D.strain_data = B.virus.strain_data
src.contract_disease(D)
for(var/obj/decal/cleanable/xenoblood/X in view(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Monkey"))
if(src.resistances.Find(X.virus.type))
continue
var/datum/disease/D = new X.virus.type
D.strain_data = X.virus.strain_data
src.contract_disease(D)
else
src.virus.stage_act()
+24 -16
View File
@@ -251,47 +251,55 @@
return
/mob/living/carbon/monkey/update_clothing()
..()
for(var/i in src.overlays)
src.overlays -= i
if(src.buckled)
if(istype(src.buckled, /obj/stool/bed))
src.lying = 1
else
src.lying = 0
if (!( src.lying ))
src.icon_state = "monkey1"
else
src.icon_state = "monkey0"
if(src.update_icon) // Skie
..()
for(var/i in src.overlays)
src.overlays -= i
if (!( src.lying ))
src.icon_state = "monkey1"
else
src.icon_state = "monkey0"
if (src.wear_mask)
if (istype(src.wear_mask, /obj/item/clothing/mask))
if (istype(src.wear_mask, /obj/item/clothing/mask) && src.update_icon)
var/t1 = src.wear_mask.item_state
if (!( t1 ))
t1 = src.wear_mask.icon_state
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = src.layer)
src.wear_mask.screen_loc = ui_mask
if (src.r_hand)
src.overlays += image("icon" = 'items_righthand.dmi', "icon_state" = src.r_hand.item_state ? src.r_hand.item_state : src.r_hand.icon_state, "layer" = src.layer)
if(src.update_icon)
src.overlays += image("icon" = 'items_righthand.dmi', "icon_state" = src.r_hand.item_state ? src.r_hand.item_state : src.r_hand.icon_state, "layer" = src.layer)
src.r_hand.screen_loc = ui_rhand
if (src.l_hand)
src.overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = src.l_hand.item_state ? src.l_hand.item_state : src.l_hand.icon_state, "layer" = src.layer)
if(src.update_icon)
src.overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = src.l_hand.item_state ? src.l_hand.item_state : src.l_hand.icon_state, "layer" = src.layer)
src.l_hand.screen_loc = ui_lhand
if (src.back)
if (!( src.lying ))
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "back", "layer" = src.layer)
else
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "back2", "layer" = src.layer)
if(src.update_icon)
if (!( src.lying ))
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "back", "layer" = src.layer)
else
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "back2", "layer" = src.layer)
src.back.screen_loc = ui_back
if (src.handcuffed)
if (src.handcuffed && src.update_icon)
src.pulling = null
if (!( src.lying ))
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff1", "layer" = src.layer)
else
src.overlays += image("icon" = 'monkey.dmi', "icon_state" = "handcuff2", "layer" = src.layer)
if (src.client)
src.client.screen -= src.contents
src.client.screen += src.contents
+1
View File
@@ -196,6 +196,7 @@
#include "code\defines\mob\living\carbon\human.dm"
#include "code\defines\mob\living\carbon\monkey.dm"
#include "code\defines\mob\living\silicon\ai.dm"
#include "code\defines\mob\living\silicon\decoy.dm"
#include "code\defines\mob\living\silicon\hivebot.dm"
#include "code\defines\mob\living\silicon\robot.dm"
#include "code\defines\mob\living\silicon\silicon.dm"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 41 KiB