-Committed RavingManiac (Smoke Carter)'s Roros laying eggs.

http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=10501
-You can insert the Auth Disk by clicking on the nuclear bomb.
-Changed how aliens are selected. It will filter the list of possible candidates by checking for players who aren't inactive for more than a minute. If no possible candidates are found, it increases the filter by another minute. It does this 5 times before giving up.
-Alien embryos cannot have carriers and they are more likely to infect someone.
-The time it takes before a larva bursts is increased a bit.




git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4897 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-10-17 06:04:25 +00:00
parent 4bb0e22624
commit 3b95730028
13 changed files with 134 additions and 92 deletions

View File

@@ -43,6 +43,7 @@ to null does not delete the object itself. Thank you.
var/severity = null//severity descr
var/longevity = 250//time in "ticks" the virus stays in inanimate object (blood stains, corpses, etc). In syringes, bottles and beakers it stays infinitely.
var/list/hidden = list(0, 0)
var/can_carry = 1 // If the disease allows "carriers".
// if hidden[1] is true, then virus is hidden from medical scanners
// if hidden[2] is true, then virus is hidden from PANDEMIC machine

View File

@@ -37,7 +37,8 @@
cure_id = list("lexorin","toxin","gargleblaster")
cure_chance = 20
affected_species = list("Human", "Monkey")
permeability_mod = 3//likely to infect
permeability_mod = 15//likely to infect
can_carry = 0
var/gibbed = 0
/datum/disease/alien_embryo/stage_act()
@@ -79,14 +80,17 @@
affected_mob << "\red You feel something tearing its way out of your stomach..."
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
if(prob(50))
if(gibbed != 0) return 0
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
if(candidates.len)

View File

@@ -138,44 +138,6 @@
anchored = 1
unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr
// Basically this Metroid Core catalyzes reactions that normally wouldn't happen anywhere
/obj/item/metroid_core
name = "roro core"
desc = "A very slimy and tender part of a Rorobeast. Legends claim these to have \"magical powers\"."
icon = 'icons/obj/surgery.dmi'
icon_state = "roro core"
flags = TABLEPASS
force = 1.0
w_class = 1.0
throwforce = 1.0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
var/POWERFLAG = 0 // sshhhhhhh
var/Flush = 30
var/Uses = 5 // uses before it goes inert
New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
POWERFLAG = rand(1,10)
Uses = rand(7, 25)
//flags |= NOREACT
spawn()
Life()
proc/Life()
while(src)
sleep(25)
Flush--
if(Flush <= 0)
reagents.clear_reagents()
Flush = 30
/obj/effect/deskclutter
name = "desk clutter"
icon = 'icons/obj/items.dmi'

View File

@@ -270,11 +270,14 @@
vents += temp_vent
var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5)
if(!(G.mind && G.mind.current && G.mind.current != DEAD))
candidates += G.key
var/i = 0
while(candidates.len <= 0 && i < 5)
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
i++
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
while((spawncount >= 1) && vents.len && candidates.len)

View File

@@ -31,6 +31,16 @@
src.attack_hand(M)
return
/obj/machinery/nuclearbomb/attackby(obj/item/weapon/I as obj, mob/user as mob)
if (src.extended)
if (istype(I, /obj/item/weapon/disk/nuclear))
usr.drop_item()
I.loc = src
src.auth = I
src.add_fingerprint(user)
return
..()
/obj/machinery/nuclearbomb/attack_paw(mob/user as mob)
return src.attack_hand(user)

View File

@@ -329,27 +329,22 @@
if(nutrition >= 800)
if(prob(40)) amount_grown++
//lay eggs or grow
if(amount_grown >= 10 && !Victim && !Target)
if(istype(src, /mob/living/carbon/metroid/adult))
if(!client)
var/number = pick(2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4)
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
// M.nutrition = round(nutrition * 0.9)
M.powerlevel = round(powerlevel/number)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
del(src)
if(!client && nutrition >= 1000)
var/number = pick(1,1,1,1,1,1,2,2,2,3) //number of eggs laid
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/E
for(var/i=1,i<=number,i++)
E = new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
src.nutrition -= 200
step_away(E,src)
else
if(!client)
var/mob/living/carbon/metroid/adult/A = new/mob/living/carbon/metroid/adult(src.loc)
A.nutrition = nutrition
// A.nutrition += 100
A.nutrition += 100
A.powerlevel = max(0, powerlevel-1)
A.Friends = Friends
A.tame = tame

View File

@@ -770,4 +770,81 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
return 0
return 1
return 1
// Basically this Metroid Core catalyzes reactions that normally wouldn't happen anywhere
/obj/item/metroid_core
name = "roro core"
desc = "A very slimy and tender part of a Rorobeast. Legends claim these to have \"magical powers\"."
icon = 'icons/obj/surgery.dmi'
icon_state = "roro core"
flags = TABLEPASS
force = 1.0
w_class = 1.0
throwforce = 1.0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
var/POWERFLAG = 0 // sshhhhhhh
var/Flush = 30
var/Uses = 5 // uses before it goes inert
New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
POWERFLAG = rand(1,10)
Uses = rand(7, 25)
//flags |= NOREACT
spawn()
Life()
proc/Life()
while(src)
sleep(25)
Flush--
if(Flush <= 0)
reagents.clear_reagents()
Flush = 30
/obj/item/weapon/reagent_containers/food/snacks/roro_egg
name = "roro egg"
desc = "A small, gelatinous egg."
icon = 'icons/mob/mob.dmi'
icon_state = "roro egg-growing"
bitesize = 12
origin_tech = "biotech=4"
var/grown = 0
New()
..()
reagents.add_reagent("nutriment", 5)
spawn(rand(1200,1500))//the egg takes a while to "ripen"
Grow()
proc/Grow()
grown = 1
icon_state = "roro egg-grown"
processing_objects.Add(src)
return
proc/Hatch()
processing_objects.Remove(src)
var/turf/T = get_turf(src)
for(var/mob/O in hearers(T))
O.show_message("\blue The [name] pulsates and quivers!")
spawn(rand(50,100))
for(var/mob/O in hearers(T))
O.show_message("\blue The [name] bursts open!")
new/mob/living/carbon/metroid(T)
del(src)
/obj/item/weapon/reagent_containers/food/snacks/roro_egg/process()
var/turf/location = get_turf(src)
var/datum/gas_mixture/environment = location.return_air()
if (environment.toxins > MOLES_PLASMA_VISIBLE)//plasma exposure causes the egg to hatch
src.Hatch()

View File

@@ -187,7 +187,7 @@
/mob/living/carbon/metroid/verb/Reproduce()
set category = "Roro"
set desc = "This will make you split into a random number of Metroids (usually 2). NOTE: this will KILL you, but you will be transferred into one of the babies."
set desc = "This will make you lay an egg. NOTE: This decreases your nutrition."
if(stat)
src << "<i>I must be conscious to do this...</i>"
@@ -195,32 +195,15 @@
if(istype(src, /mob/living/carbon/metroid/adult))
if(amount_grown >= 10)
if(input("Are you absolutely sure you want to reproduce? Your current body will cease to be, but your consciousness will be transferred into a produced rorobeast.") in list("Yes","No")=="Yes")
if(stat)
src << "<i>I must be conscious to do this...</i>"
return
var/list/babies = list()
var/number = pick(14;2,3,4)
var/new_nutrition = round(nutrition * 0.9)
var/new_powerlevel = round(powerlevel / number)
for(var/i=1,i<=number,i++) // reproduce (has a small chance of producing 3 or 4 offspring)
var/mob/living/carbon/metroid/M = new/mob/living/carbon/metroid(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
var/mob/living/carbon/metroid/new_metroid = pick(babies)
new_metroid.a_intent = "hurt"
new_metroid.key = key
new_metroid << "<B>You are now a Rorobeast. Skree!</B>"
del(src)
if(src.nutrition >= 300)
new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
src.nutrition -= 200
else
src << "<i>I have not fed enough...</i>"
else
src << "<i>I am not ready to reproduce yet...</i>"
else
src << "<i>I am not old enough to reproduce yet...</i>"
src << "<i>I am not old enough to lay eggs yet...</i>"

View File

@@ -42,7 +42,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
if(prob(5))
if(v.can_carry && prob(5))
v.carrier = 1
return
@@ -194,7 +194,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
v.holder = src
if(prob(5))
if(v.can_carry && prob(5))
v.carrier = 1
return
return

View File

@@ -1119,8 +1119,12 @@ datum
..()
return
reaction_obj(var/obj/O, var/volume)
if((!O) || (!volume)) return 0
src = null
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/roro_egg))
var/obj/item/weapon/reagent_containers/food/snacks/roro_egg/egg = O
if (egg.grown)
egg.Hatch()
if((!O) || (!volume)) return 0
var/turf/the_turf = get_turf(O)
var/datum/gas_mixture/napalm = new
var/datum/gas/volatile_fuel/fuel = new

View File

@@ -127,6 +127,8 @@ var/MAX_EXPLOSION_RANGE = 14
#define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone.
#define ALIEN_SELECT_AFK_BUFFER 2 // How many minutes that a person can be AFK before not being allowed to be an alien.
#define NORMPIPERATE 30 //pipe-insulation rate divisor
#define HEATPIPERATE 8 //heat-exch pipe insulation

View File

@@ -58,6 +58,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
<li class="rscadd">Extract DNA! A power that allows you to silently sting someone and take their DNA! Meaning you do not have to absorb someone to become them. Extracting their DNA doesn't count towards completing your objectives.</li>
<li class="rscadd">You can now get flares from red emergency toolboxes. Has a 50% chance of a flash-light or a flare spawning.</li>
<li class="imageadd">Flare icon by Ausops!</li>
<li class="rscadd">Thanks to RavingManiac (Smoke Carter), Roros now lay eggs which can grow into baby roros or be used for cooking recipes. Scientists will need to expose the egg to plasma for it to hatch; while it is orange (grown).</li>
</ul>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 182 KiB