Moving files around to make code changes more modular from base BS12

This commit is contained in:
ZomgPonies
2013-08-04 14:48:26 -04:00
parent e3213894bd
commit 17d0a2232b
6 changed files with 371 additions and 2 deletions
@@ -0,0 +1,30 @@
//Mime's Hardsuit
/obj/item/clothing/head/helmet/space/mime
name = "mime hardsuit helmet"
// icon = 'spaceciv.dmi'
desc = "A hardsuit helmet specifically designed for the mime."
icon_state = "spacemimehelmet"
item_state = "spacemimehelmet"
obj/item/clothing/suit/space/mime
name = "mime hardsuit"
// icon = 'spaceciv.dmi'
desc = "A hardsuit specifically designed for the mime."
icon_state = "spacemime_suit"
item_state = "spacemime_items"
allowed = list(/obj/item/weapon/tank)
/obj/item/clothing/head/helmet/space/clown
name = "clown hardsuit helmet"
// icon = 'spaceciv.dmi'
desc = "A hardsuit helmet specifically designed for the clown. SPESSHONK!"
icon_state = "clownhelmet"
item_state = "clownhelmet"
obj/item/clothing/suit/space/clown
name = "clown hardsuit"
// icon = 'spaceciv.dmi'
desc = "A hardsuit specifically designed for the clown. SPESSHONK!"
icon_state = "spaceclown_suit"
item_state = "spaceclown_items"
allowed = list(/obj/item/weapon/tank)
@@ -0,0 +1 @@
replaces code/modules/mobs/living/carbon/metroid/powers.dm
@@ -0,0 +1,277 @@
/mob/living/carbon/slime/verb/Feed()
set category = "Slime"
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
if(Victim)
Feedstop()
return
if(stat)
src << "<i>I must be conscious to do this...</i>"
return
var/list/choices = list()
for(var/mob/living/C in view(1,src))
if(C!=src && !istype(C,/mob/living/carbon/slime))
choices += C
var/mob/living/carbon/M = input(src,"Who do you wish to feed on?") in null|choices
if(!M) return
if(M in view(1, src))
if(!istype(src, /mob/living/carbon/brain))
if(!istype(M, /mob/living/carbon/slime))
if(stat != 2)
if(health > -70)
for(var/mob/living/carbon/slime/met in view())
if(met.Victim == M && met != src)
src << "<i>The [met.name] is already feeding on this subject...</i>"
return
src << "\blue <i>I have latched onto the subject and begun feeding...</i>"
M << "\red <b>The [src.name] has latched onto your head!</b>"
Feedon(M)
else
src << "<i>This subject does not have a strong enough life energy...</i>"
else
src << "<i>This subject does not have an edible life energy...</i>"
else
src << "<i>I must not feed on my brothers...</i>"
else
src << "<i>This subject does not have an edible life energy...</i>"
/mob/living/carbon/slime/proc/Feedon(var/mob/living/carbon/M)
Victim = M
src.loc = M.loc
canmove = 0
anchored = 1
var/lastnut = nutrition
//if(M.client) M << "\red You legs become paralyzed!"
if(istype(src, /mob/living/carbon/slime/adult))
icon_state = "[colour] adult slime eat"
else
icon_state = "[colour] baby slime eat"
while(Victim && M.health > -70 && stat != 2)
// M.canmove = 0
canmove = 0
if(M in view(1, src))
loc = M.loc
if(prob(15) && M.client && istype(M, /mob/living/carbon))
M << "\red [pick("You can feel your body becoming weak!", \
"You feel like you're about to die!", \
"You feel every part of your body screaming in agony!", \
"A low, rolling pain passes through your body!", \
"Your body feels as if it's falling apart!", \
"You feel extremely weak!", \
"A sharp, deep pain bathes every inch of your body!")]"
if(istype(M, /mob/living/carbon))
Victim.adjustCloneLoss(rand(1,10))
Victim.adjustToxLoss(rand(1,2))
if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4))
// Heal yourself
adjustToxLoss(-10)
adjustOxyLoss(-10)
adjustBruteLoss(-10)
adjustFireLoss(-10)
adjustCloneLoss(-10)
if(Victim)
for(var/mob/living/carbon/slime/slime in view(1,M))
if(slime.Victim == M && slime != src)
slime.Feedstop()
nutrition += rand(10,25)
if(nutrition >= lastnut + 50)
if(prob(80))
lastnut = nutrition
powerlevel++
if(powerlevel > 10)
powerlevel = 10
if(istype(src, /mob/living/carbon/slime/adult))
if(nutrition > 1200)
nutrition = 1200
else
if(nutrition > 1000)
nutrition = 1000
Victim.updatehealth()
updatehealth()
else
if(prob(25))
src << "\red <i>[pick("This subject is incompatable", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]...</i>"
sleep(rand(15,45))
else
break
if(stat == 2)
if(!istype(src, /mob/living/carbon/slime/adult))
icon_state = "[colour] baby slime dead"
else
if(istype(src, /mob/living/carbon/slime/adult))
icon_state = "[colour] adult slime"
else
icon_state = "[colour] baby slime"
canmove = 1
anchored = 0
if(M)
if(M.health <= -70)
M.canmove = 0
if(!client)
if(Victim && !rabid && !attacked)
if(Victim.LAssailant && Victim.LAssailant != Victim)
if(prob(50))
if(!(Victim.LAssailant in Friends))
Friends.Add(Victim.LAssailant) // no idea why i was using the |= operator
if(M.client && istype(src, /mob/living/carbon/human))
if(prob(85))
rabid = 1 // UUUNNBGHHHH GONNA EAT JUUUUUU
if(client) src << "<i>This subject does not have a strong enough life energy anymore...</i>"
else
M.canmove = 1
if(client) src << "<i>I have stopped feeding...</i>"
else
if(client) src << "<i>I have stopped feeding...</i>"
Victim = null
/mob/living/carbon/slime/proc/Feedstop()
if(Victim)
if(Victim.client) Victim << "[src] has let go of your head!"
Victim = null
/mob/living/carbon/slime/proc/UpdateFeed(var/mob/M)
if(Victim)
if(Victim == M)
loc = M.loc // simple "attach to head" effect!
/mob/living/carbon/slime/verb/Evolve()
set category = "Slime"
set desc = "This will let you evolve from baby to adult slime."
if(stat)
src << "<i>I must be conscious to do this...</i>"
return
if(!istype(src, /mob/living/carbon/slime/adult))
if(amount_grown >= 10)
var/mob/living/carbon/slime/adult/new_slime = new adulttype(loc)
new_slime.nutrition = nutrition
new_slime.powerlevel = max(0, powerlevel-1)
new_slime.a_intent = "hurt"
new_slime.key = key
new_slime.universal_speak = universal_speak
new_slime << "<B>You are now an adult slime.</B>"
del(src)
else
src << "<i>I am not ready to evolve yet...</i>"
else
src << "<i>I have already evolved...</i>"
/mob/living/carbon/slime/verb/Reproduce()
set category = "Slime"
set desc = "This will make you split into four Slimes. NOTE: this will KILL you, but you will be transferred into one of the babies."
if(stat)
src << "<i>I must be conscious to do this...</i>"
return
if(istype(src, /mob/living/carbon/slime/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 slime.") in list("Yes","No")=="Yes")
if(stat)
src << "<i>I must be conscious to do this...</i>"
return
var/list/babies = list()
var/new_nutrition = round(nutrition * 0.9)
var/new_powerlevel = round(powerlevel / 4)
for(var/i=1,i<=4,i++)
if(prob(80))
var/mob/living/carbon/slime/M = new primarytype(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
else
var/mutations = pick("one","two","three","four")
switch(mutations)
if("one")
var/mob/living/carbon/slime/M = new mutationone(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
if("two")
var/mob/living/carbon/slime/M = new mutationtwo(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
if("three")
var/mob/living/carbon/slime/M = new mutationthree(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
if("four")
var/mob/living/carbon/slime/M = new mutationfour(loc)
M.nutrition = new_nutrition
M.powerlevel = new_powerlevel
if(i != 1) step_away(M,src)
babies += M
var/mob/living/carbon/slime/new_slime = pick_n_take(babies)
new_slime.a_intent = "hurt"
new_slime.universal_speak = universal_speak
new_slime.key = key
new_slime << "<B>You are now a slime!</B>"
if(new_slime.client)
if(babies.len)
var/list/candidates = get_active_candidates()
if(candidates.len)
var/mob/dead/observer/picked = pick(candidates)
var/mob/living/carbon/slime/S = pick(babies)
picked.mind.transfer_to(S)
S.a_intent = "hurt"
S.universal_speak = universal_speak
S << "<B>You are now a slime!</B>"
else return
else
new_slime << "<i>You're an only child!</i>"
else
src << "<i>I am not ready to reproduce yet...</i>"
else
src << "<i>I am not old enough to reproduce yet...</i>"
/mob/living/carbon/slime/verb/ventcrawl()
set name = "Crawl through Vent"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Slime"
if(Victim) return
handle_ventcrawl()
@@ -0,0 +1,89 @@
/mob/living/simple_animal/pony
name = "\improper pony"
desc = "A bound spirit"
icon = 'icons/mob/pony.dmi'
// icon_dead = "shade_dead"
maxHealth = 50
health = 50
speak_emote = list("whinnys")
emote_hear = list("excitedly says")
response_help = "nuzzles"
response_disarm = "flails it's hooves at"
response_harm = "kicks"
melee_damage_lower = 5
melee_damage_upper = 15
attacktext = "sends rainbows of power to"
minbodytemp = 0
maxbodytemp = 4000
min_oxy = 0
max_co2 = 0
max_tox = 0
speed = 0
stop_automated_movement = 0
status_flags = 0
faction = "cult"
status_flags = CANPUSH
Life()
..()
if(stat == 2)
new /obj/item/weapon/ectoplasm (src.loc)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
ghostize()
del src
return
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
return
/mob/living/simple_animal/pony/twilight
name = "Twilight Sparkle"
real_name = "Twilight Sparkle"
icon_state = "twilight"
icon_living = "twilight"
/mob/living/simple_animal/pony/pinkie
name = "Pinkie Pie"
real_name = "Pinkie Pie"
icon_state = "pinkie"
icon_living = "pinkie"
/mob/living/simple_animal/pony/rainbow
name = "Rainbow Dash"
real_name = "Rainbow Dash"
icon_state = "rainbow"
icon_living = "rainbow"
mob/living/simple_animal/pony/fluttershy
name = "Fluttershy"
real_name = "Fluttershy"
icon_state = "fluttershy"
icon_living = "fluttershy"
mob/living/simple_animal/pony/applejack
name = "Applejack"
real_name = "Applejack"
icon_state = "applejack"
icon_living = "applejack"
@@ -0,0 +1,120 @@
/obj/structure/stool/bed/chair/ambulance
name = "ambulance"
icon = 'icons/obj/vehicles.dmi'
icon_state = "docwagon"
anchored = 1
density = 1
/var/brightness = 4
/var/strobe = 0
/obj/structure/stool/bed/chair/ambulance/New()
handle_rotation()
/obj/structure/stool/bed/chair/ambulance/examine()
set src in usr
usr << "\icon[src] This is a specially designed ambulance unit for Emergency Medical Personel"
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/key/ambulance))
user << "Hold [W] in one of your hands while you drive this ambulance so noone steals it from you!."
/obj/structure/stool/bed/chair/ambulance/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle()
if(istype(user.l_hand, /obj/item/key/ambulance) || istype(user.r_hand, /obj/item/key/ambulance))
step(src, direction)
update_mob()
handle_rotation()
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this ambulance.</span>"
/obj/structure/stool/bed/chair/ambulance/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = loc
/obj/structure/stool/bed/chair/ambulance/buckle_mob(mob/M, mob/user)
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
return
unbuckle()
M.visible_message(\
"<span class='notice'>[M] climbs onto the ambulance!</span>",\
"<span class='notice'>You climb onto the ambulance!</span>")
M.buckled = src
M.loc = loc
M.dir = dir
M.update_canmove()
buckled_mob = M
update_mob()
add_fingerprint(user)
strobe = 1
icon_state = "docwagon2"
return
//Add red strobe effect call to this section
/obj/structure/stool/bed/chair/ambulance/unbuckle()
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
strobe = 0
icon_state = "docwagon"
..()
/obj/structure/stool/bed/chair/ambulance/handle_rotation()
if(dir == SOUTH)
layer = FLY_LAYER
else
layer = OBJ_LAYER
if(buckled_mob)
if(buckled_mob.loc != loc)
buckled_mob.buckled = null //Temporary, so Move() succeeds.
buckled_mob.buckled = src //Restoring
update_mob()
/obj/structure/stool/bed/chair/ambulance/proc/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
switch(dir)
if(SOUTH)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 7
if(WEST)
buckled_mob.pixel_x = 13
buckled_mob.pixel_y = 7
if(NORTH)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 4
if(EAST)
buckled_mob.pixel_x = -13
buckled_mob.pixel_y = 7
/obj/structure/stool/bed/chair/ambulance/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob)
if(prob(65))
return buckled_mob.bullet_act(Proj)
visible_message("<span class='warning'>[Proj] ricochets off the ambulance!</span>")
/obj/item/key/ambulance
name = "ambulance key"
desc = "A keyring with a small steel key, and tag with a red cross on it."
icon = 'icons/obj/vehicles.dmi'
icon_state = "keydoc"
w_class = 1
/*
/proc/ambulance/strobelight()
if (strobe)
for ALLTURF(range(1,mob))
icon = 'icons/turf/areas.dmi'
icon_state = "red"
*/