Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into xenoarch

Conflicts:
	baystation12.dme
	code/modules/reagents/Chemistry-Holder.dm
	code/modules/reagents/Chemistry-Machinery.dm
	code/modules/research/xenoarchaeology/artifact_effect.dm
	code/modules/research/xenoarchaeology/finds.dm
	icons/obj/device.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-02-02 16:55:24 +10:00
1196 changed files with 105274 additions and 74852 deletions
+41 -39
View File
@@ -17,7 +17,7 @@
//If you died in the game and are a ghsot - this will remain as null.
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
universal_speak = 1
var/atom/movable/following = null
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
@@ -25,10 +25,7 @@
verbs += /mob/dead/observer/proc/dead_tele
stat = DEAD
dead_mob_list += src
add_to_mob_list(src)
var/turf/T
if(ismob(body))
T = get_turf(body) //Where is the body located?
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
@@ -53,7 +50,7 @@
if(!name) //To prevent nameless ghosts
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
real_name = name
return
..()
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 1
@@ -145,7 +142,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune).
var/obj/effect/rune/R = locate() in mind.current.loc //whilst corpse is alive, we can only reenter the body if it's on the rune
if(!(R && R.word1 == wordhell && R.word2 == wordtravel && R.word3 == wordself)) //astral journeying rune
if(!(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"])) //astral journeying rune
usr << "<span class='warning'>The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.</span>"
return
mind.current.ajourn=0
@@ -170,6 +167,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
L+=T
if(!L || !L.len)
usr << "No area available."
usr.loc = pick(L)
/mob/dead/observer/verb/follow()
@@ -182,17 +183,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
if(target && target != usr)
following = target
spawn(0)
var/turf/pos = get_turf(src)
while(src.loc == pos)
var/turf/T = get_turf(target)
if(!T)
break
if(following != target)
break
if(!client)
break
src.loc = T
pos = src.loc
sleep(15)
following = null
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
@@ -235,38 +241,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//Maybe in the future we can add more <i>spooky</i> code here!
return
*/
/mob/dead/observer/verb/toggle_alien_candidate()
set name = "Toggle Be Alien Candidate"
set category = "Ghost"
set desc = "Determines whether you will or will not be an alien candidate when someone bursts."
if(client.be_alien)
client.be_alien = 0
src << "You are now excluded from alien candidate lists until end of round."
else if(!client.be_alien)
client.be_alien = 1
src << "You are now included in alien candidate lists until end of round."
/mob/dead/observer/verb/toggle_pai_candidate()
set name = "Toggle Be pAI Candidate"
set category = "Ghost"
set desc = "Receive a pop-up request when a pAI device requests a new personality. (toggle)"
if(client.be_pai)
client.be_pai = 0
src << "You will no longer receive pAI recruitment pop-ups this round."
else
client.be_pai = 1
src << "You will now be considered a viable candidate when a pAI device requests a new personality, effective until the end of this round."
/mob/dead/observer/verb/toggle_spaceninja_candidate()
set name = "Toggle Be Space Ninja Candidate"
set category = "Ghost"
set desc = "Determines whether you will be a candidate for when a new space ninja spawns. (toggle)"
if(client.be_spaceninja)
client.be_spaceninja = 0
src << "You are now excluded from space ninja candidate lists until end of round."
else
client.be_spaceninja = 1
src << "You are now included in space ninja candidate lists until end of round."
/mob/dead/observer/memory()
set hidden = 1
@@ -283,4 +257,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
see_invisible = SEE_INVISIBLE_OBSERVER
else
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
/mob/dead/observer/verb/become_mouse()
set name = "Become mouse"
set category = "Ghost"
//find a viable mouse candidate
var/mob/living/simple_animal/mouse/host
var/list/mouse_candidates = list()
for(var/mob/living/simple_animal/mouse/M in world)
if(!M.ckey && !M.stat)
mouse_candidates.Add(M)
if(mouse_candidates.len)
host = pick(mouse_candidates)
else
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
if(!v.welded && v.z == src.z)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
host = new /mob/living/simple_animal/mouse(vent_found.loc)
else
src << "<span class='warning'>Unable to find any live mice, or unwelded vents to spawn one at.</span>"
if(host)
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
+1 -1
View File
@@ -10,7 +10,7 @@
log_say("Ghost/[src.key] : [message]")
if (src.client)
if(src.client.muted & MUTE_DEADCHAT)
if(src.client.prefs.muted & MUTE_DEADCHAT)
src << "\red You cannot talk in deadchat (muted)."
return
+2 -6
View File
@@ -27,6 +27,7 @@
// l_hand.screen_loc = ui_lhand
W.equipped(src,slot_l_hand)
if(client) client.screen |= W
if(pulling == W) stop_pulling()
update_inv_l_hand()
return 1
return 0
@@ -42,6 +43,7 @@
// r_hand.screen_loc = ui_rhand
W.equipped(src,slot_r_hand)
if(client) client.screen |= W
if(pulling == W) stop_pulling()
update_inv_r_hand()
return 1
return 0
@@ -167,12 +169,6 @@
else if (W == l_hand)
l_hand = null
update_inv_l_hand(0)
else if (W == handcuffed)
handcuffed = null
update_inv_handcuffed(0)
else if (W == legcuffed)
legcuffed = null
update_inv_legcuffed()
else if (W == back)
back = null
update_inv_back(0)
+5
View File
@@ -8,6 +8,7 @@
see_invisible = SEE_INVISIBLE_LEVEL_TWO
var/ghost_name = "Unknown"
var/creating_blob = 0
faction = "blob"
New()
@@ -251,3 +252,7 @@
B << "Check your Blob verbs and hit Create Node to build a node."
spawn(10)
del(G_found)
+14 -7
View File
@@ -9,6 +9,7 @@
say_message = "hisses"
icon = 'icons/mob/alien.dmi'
gender = NEUTER
dna = null
var/storedPlasma = 250
var/max_plasma = 500
@@ -20,7 +21,7 @@
var/move_delay_add = 0 // movement delay to add
status_flags = CANPARALYSE
status_flags = CANPARALYSE|CANPUSH
var/heal_rate = 1
var/plasma_rate = 5
@@ -36,7 +37,7 @@
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
if(amount > 0)
..(amount * 1.5)
..(amount * 2)
else
..(amount)
return
@@ -48,7 +49,7 @@
return 2
/mob/living/carbon/alien/updatehealth()
if(nodamage)
if(status_flags & GODMODE)
health = maxHealth
stat = CONSCIOUS
else
@@ -60,7 +61,7 @@
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/effect/alien/weeds) in loc)
if(health >= maxHealth)
if(health >= maxHealth - getCloneLoss())
adjustToxLoss(plasma_rate)
else
adjustBruteLoss(-heal_rate)
@@ -172,6 +173,11 @@
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
return
/mob/living/carbon/alien/getDNA()
return null
/mob/living/carbon/alien/setDNA()
return
/*----------------------------------------
Proc: AddInfectionImages()
@@ -179,9 +185,10 @@ Des: Gives the client of the alien an image on each infected mob.
----------------------------------------*/
/mob/living/carbon/alien/proc/AddInfectionImages()
if (client)
for (var/mob/living/carbon/C in mob_list)
for (var/mob/living/C in mob_list)
if(C.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
var/obj/item/alien_embryo/A = locate() in C
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
client.images += I
return
@@ -193,7 +200,7 @@ Des: Removes all infected images from the alien.
/mob/living/carbon/alien/proc/RemoveInfectionImages()
if (client)
for(var/image/I in client.images)
if(I.icon_state == "infected")
if(dd_hasprefix_case(I.icon_state, "infected"))
del(I)
return
@@ -76,29 +76,37 @@ Doesn't work on other aliens/AI.*/
src << "\green You need to be closer."
return
/*Xenos now have a proc and a verb for drenching stuff in acid. I couldn't get them to work right when combined so this was the next best solution.
The first proc defines the acid throw function while the other two work in the game itself. Probably a good idea to revise this later.
I kind of like the right click only--the window version can get a little confusing. Perhaps something telling the alien they need to right click?
/N*/
/obj/proc/acid(user as mob)
var/obj/effect/alien/acid/A = new(src.loc)
A.target = src
for(var/mob/M in viewers(src, null))
M.show_message(text("\green <B>[user] vomits globs of vile stuff all over [src]. It begins to sizzle and melt under the bubbling mess of acid!</B>"), 1)
A.tick()
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(obj/O as obj in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
set name = "Corrossive Acid (200)"
set desc = "Drench an object in acid, destroying it over time."
set category = "Alien"
if(powerc(200))
if(O in oview(1))
if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "\green You cannot dissolve this object."
else
adjustToxLoss(-200)
O.acid(src)
// OBJ CHECK
if(isobj(O))
var/obj/I = O
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "\green You cannot dissolve this object."
return
// TURF CHECK
else if(istype(O, /turf/simulated))
var/turf/T = O
// R WALL
if(istype(T, /turf/simulated/wall/r_wall))
src << "\green You cannot dissolve this object."
return
// R FLOOR
if(istype(T, /turf/simulated/floor/engine))
src << "\green You cannot dissolve this object."
return
else// Not a type we can acid.
return
adjustToxLoss(-200)
new /obj/effect/alien/acid(get_turf(O), O)
visible_message("\green <B>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</B>")
else
src << "\green Target is too far away."
return
@@ -129,13 +137,12 @@ I kind of like the right click only--the window version can get a little confusi
if(!istype(T, /turf))
return
if (U == T)
usr.bullet_act(new /obj/item/projectile/neurotoxin(usr.loc), get_organ_target())
usr.bullet_act(new /obj/item/projectile/energy/neurotoxin(usr.loc), get_organ_target())
return
if(!istype(U, /turf))
return
var/obj/item/projectile/neurotoxin/A = new /obj/item/projectile/neurotoxin(usr.loc)
var/obj/item/projectile/energy/neurotoxin/A = new /obj/item/projectile/energy/neurotoxin(usr.loc)
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
@@ -143,14 +150,14 @@ I kind of like the right click only--the window version can get a little confusi
return
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
set name = "Secrete Resin (100)"
set name = "Secrete Resin (75)"
set desc = "Secrete tough malleable resin."
set category = "Alien"
if(powerc(100))
if(powerc(75))
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
if(!choice || !powerc(100)) return
adjustToxLoss(-100)
if(!choice || !powerc(75)) return
adjustToxLoss(-75)
src << "\green You shape a [choice]."
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
@@ -164,3 +171,18 @@ I kind of like the right click only--the window version can get a little confusi
if("resin nest")
new /obj/structure/stool/bed/nest(loc)
return
/mob/living/carbon/alien/humanoid/verb/regurgitate()
set name = "Regurgitate"
set desc = "Empties the contents of your stomach"
set category = "Alien"
if(powerc())
if(stomach_contents.len)
for(var/mob/M in src)
if(M in stomach_contents)
stomach_contents.Remove(M)
M.loc = loc
//Paralyse(10)
src.visible_message("\green <B>[src] hurls out the contents of their stomach!</B>")
return
@@ -14,8 +14,7 @@
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
//verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers //<-- pointless
add_to_mob_list(src)
..()
//Drones use the same base as generic humanoids.
//Drone verbs
@@ -38,7 +37,6 @@
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
new_xeno.UI = UI
mind.transfer_to(new_xeno)
del(src)
else
@@ -15,7 +15,7 @@
if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])")
real_name = name
add_to_mob_list(src)
..()
/mob/living/carbon/alien/humanoid/hunter
@@ -73,19 +73,4 @@
update_icons()
src << "\green You are no longer invisible."
return
*/
/mob/living/carbon/alien/humanoid/hunter/verb/regurgitate()
set name = "Regurgitate"
set desc = "Empties the contents of your stomach"
set category = "Alien"
if(powerc())
if(stomach_contents.len)
for(var/mob/M in src)
if(M in stomach_contents)
stomach_contents.Remove(M)
M.loc = loc
Paralyse(10)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] hurls out the contents of their stomach!</B>"), 1)
return
*/
@@ -16,7 +16,7 @@
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
add_to_mob_list(src)
..()
/mob/living/carbon/alien/humanoid/sentinel
@@ -9,6 +9,7 @@
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
update_canmove()
if(client) blind.layer = 0
update_icons()
tod = worldtime2text() //weasellos time of death patch
if(mind) mind.store_memory("Time of death: [tod]", 0)
@@ -5,6 +5,9 @@
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
var/message
@@ -232,7 +232,7 @@
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
@@ -6,7 +6,6 @@
var/obj/item/clothing/head/head = null //
var/obj/item/weapon/r_store = null
var/obj/item/weapon/l_store = null
// var/alien_invis = 0
var/caste = ""
update_icon = 1
@@ -134,82 +133,6 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/Move(a, b, flag)
if (buckled)
return 0
if (restrained())
stop_pulling()
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
else
if(Debug)
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
stop_pulling()
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
stop_pulling()
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
if (!ticker)
@@ -257,7 +180,7 @@
return
/mob/living/carbon/alien/humanoid/attack_metroid(mob/living/carbon/metroid/M as mob)
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -268,11 +191,11 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
if(istype(M, /mob/living/carbon/slime/adult))
damage = rand(10, 40)
else
damage = rand(5, 35)
@@ -401,7 +324,7 @@
if ("hurt")
var/damage = rand(1, 9)
if (prob(90))
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH
if (HULK in M.mutations)//HULK SMASH
damage += 14
spawn(0)
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
@@ -500,7 +423,7 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/humanoid/show_inv(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
@@ -47,9 +47,6 @@
//to find it.
blinded = null
//Disease Check
//handle_virus_updates() There is no disease that affects aliens
//Handle temperature/pressure differences between body and environment
handle_environment(environment)
@@ -167,7 +164,7 @@
return null
proc/handle_breath(datum/gas_mixture/breath)
if(nodamage)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles == 0))
@@ -362,6 +359,8 @@
//Other
if(stunned)
AdjustStunned(-1)
if(!stunned)
update_icons()
if(weakened)
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
@@ -446,12 +445,6 @@
return 1
proc/handle_virus_updates()
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
return
proc/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
@@ -465,6 +458,6 @@
del(M)
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
if(!(status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
@@ -1,12 +1,11 @@
/mob/living/carbon/alien/humanoid/queen
name = "alien queen"
caste = "q"
maxHealth = 250
health = 250
icon_state = "alienq_s"
nopush = 1
heal_rate = 10 // Let's regenerate more than our average underling.
status_flags = CANPARALYSE
heal_rate = 5
plasma_rate = 20
@@ -26,7 +25,8 @@
real_name = src.name
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
verbs -= /mob/living/carbon/alien/verb/ventcrawl
add_to_mob_list(src)
..()
/mob/living/carbon/alien/humanoid/queen
@@ -56,7 +56,7 @@
//Queen verbs
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
set name = "Lay Egg (50)"
set name = "Lay Egg (75)"
set desc = "Lay an egg to produce huggers to impregnate prey with."
set category = "Alien"
@@ -64,9 +64,29 @@
src << "There's already an egg here."
return
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
adjustToxLoss(-50)
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
adjustToxLoss(-75)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
new /obj/effect/alien/egg(loc)
return
return
/mob/living/carbon/alien/humanoid/queen/large
icon = 'icons/mob/alienqueen.dmi'
icon_state = "queen_s"
pixel_x = -16
/mob/living/carbon/alien/humanoid/queen/large/update_icons()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this to be here
overlays.Cut()
if(lying)
if(resting) icon_state = "queen_sleep"
else icon_state = "queen_l"
for(var/image/I in overlays_lying)
overlays += I
else
icon_state = "queen_s"
for(var/image/I in overlays_standing)
overlays += I
@@ -13,10 +13,22 @@
/mob/living/carbon/alien/humanoid/update_icons()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this to be here
overlays = null
if(lying)
if(resting) icon_state = "alien[caste]_sleep"
else icon_state = "alien[caste]_l"
overlays.Cut()
if(stat == DEAD)
//If we mostly took damage from fire
if(fireloss > 125)
icon_state = "alien[caste]_husked"
else
icon_state = "alien[caste]_dead"
for(var/image/I in overlays_lying)
overlays += I
else if(lying)
if(resting)
icon_state = "alien[caste]_sleep"
else if(stat == UNCONSCIOUS)
icon_state = "alien[caste]_unconscious"
else
icon_state = "alien[caste]_l"
for(var/image/I in overlays_lying)
overlays += I
else
@@ -2,7 +2,7 @@
if(stat == DEAD) return
if(healths) healths.icon_state = "health6"
stat = DEAD
icon_state = "larva_l"
icon_state = "larva_dead"
if(!gibbed)
update_canmove()
@@ -5,6 +5,9 @@
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
var/message
@@ -85,6 +88,9 @@
if("jump")
message = "<B>The [src.name]</B> jumps!"
m_type = 1
if("hiss_")
message = "<B>The [src.name]</B> hisses softly."
m_type = 1
if("collapse")
Paralyse(2)
message = text("<B>[]</B> collapses!", src)
@@ -73,7 +73,7 @@
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.client.screen = null
@@ -1,7 +1,7 @@
/mob/living/carbon/alien/larva
name = "alien larva"
real_name = "alien larva"
icon_state = "larva"
icon_state = "larva0"
pass_flags = PASSTABLE
maxHealth = 25
@@ -11,6 +11,7 @@
var/amount_grown = 0
var/max_grown = 200
var/time_of_birth
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/larva/New()
@@ -37,7 +38,7 @@
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
@@ -138,72 +139,6 @@
updatehealth()
return
/mob/living/carbon/alien/larva/Move(a, b, flag)
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
else
if(Debug)
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
stop_pulling()
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
if (!ticker)
@@ -270,7 +205,7 @@
return
/mob/living/carbon/alien/larva/attack_metroid(mob/living/carbon/metroid/M as mob)
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -281,11 +216,11 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
damage = rand(20, 40)
else
damage = rand(5, 35)
@@ -369,7 +304,7 @@
else
var/damage = rand(1, 9)
if (prob(90))
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
if (HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
@@ -442,7 +377,7 @@
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
@@ -41,9 +41,6 @@
//to find it.
blinded = null
//Disease Check
//handle_virus_updates() There is no disease that affects larva
//Handle temperature/pressure differences between body and environment
handle_environment(enviroment)
@@ -58,6 +55,9 @@
for(var/obj/item/weapon/grab/G in src)
G.process()
//some kind of bug in canmove() isn't properly calling update_icons, so this is here as a placeholder
update_icons()
if(client)
handle_regular_hud_updates()
@@ -139,7 +139,7 @@
return null
proc/handle_breath(datum/gas_mixture/breath)
if(nodamage)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles == 0))
@@ -229,7 +229,7 @@ FUCK YOU MORE FAT CODE -Hawk*/
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (0 > health) )
if( (getOxyLoss() > 25) || (0 > health) )
//if( health <= 20 && prob(1) )
// spawn(0)
// emote("gasp")
@@ -247,7 +247,7 @@ FUCK YOU MORE FAT CODE -Hawk*/
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss")
emote("hiss_")
//CONSCIOUS
else
stat = CONSCIOUS
@@ -363,11 +363,6 @@ FUCK YOU MORE FAT CODE -Hawk*/
proc/handle_random_events()
return
proc/handle_virus_updates()
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
return
proc/handle_stomach()
spawn(0)
@@ -382,6 +377,6 @@ FUCK YOU MORE FAT CODE -Hawk*/
del(M)
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
@@ -28,12 +28,16 @@
if(stat != CONSCIOUS)
return
if(handcuffed || legcuffed)
src << "\red You cannot evolve when you are cuffed."
if(amount_grown >= max_grown) //TODO ~Carn
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
src << "\green There are three to choose from:"
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
//green is impossible to read, so i made these blue and changed the formatting slightly
src << "\blue <b>You are growing into a beautiful alien! It is time to choose a caste.</b>"
src << "\blue There are three to choose from:"
src << "<B>Hunters</B> \blue are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
src << "<B>Sentinels</B> \blue are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
src << "<B>Drones</B> \blue are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/mob/living/carbon/alien/humanoid/new_xeno
@@ -44,7 +48,6 @@
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
new_xeno.UI = UI
if(mind) mind.transfer_to(new_xeno)
del(src)
return
@@ -1 +1,22 @@
//No special icons processing
/mob/living/carbon/alien/larva/regenerate_icons()
overlays = list()
update_icons()
/mob/living/carbon/alien/larva/update_icons()
var/state = 0
if(amount_grown > 150)
state = 2
else if(amount_grown > 50)
state = 1
if(stat == DEAD)
icon_state = "larva[state]_dead"
else if (handcuffed || legcuffed)
icon_state = "larva[state]_cuff"
else if (stunned)
icon_state = "larva[state]_stun"
else if(lying || resting)
icon_state = "larva[state]_sleep"
else
icon_state = "larva[state]"
@@ -1,5 +1,5 @@
/mob/living/carbon/alien/verb/ventcrawl() // -- TLE
set name = "Crawl through Vent"
set name = "Crawl through vent"
set desc = "Enter an air vent and crawl through the pipe system."
set category = "Alien"
handle_ventcrawl()
+1 -1
View File
@@ -9,7 +9,7 @@
return
if (length(message) >= 2)
if (copytext(message, 1, 3) == ":a")
if (copytext(message, 1, 3) == ":a" || copytext(message, 1, 3) == "#a" || copytext(message, 1, 3) == ".a" )
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (stat == 2)
@@ -0,0 +1,143 @@
// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
/obj/item/alien_embryo
name = "alien embryo"
desc = "All slimy and yuck."
icon = 'icons/mob/alien.dmi'
icon_state = "larva0_dead"
var/mob/living/affected_mob
var/stage = 0
/obj/item/alien_embryo/New()
if(istype(loc, /mob/living))
affected_mob = loc
processing_objects.Add(src)
spawn(0)
AddInfectionImages(affected_mob)
else
del(src)
/obj/item/alien_embryo/Del()
if(affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
spawn(0)
RemoveInfectionImages(affected_mob)
..()
/obj/item/alien_embryo/process()
if(!affected_mob) return
if(loc != affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
processing_objects.Remove(src)
spawn(0)
RemoveInfectionImages(affected_mob)
affected_mob = null
return
if(stage < 5 && prob(3))
stage++
spawn(0)
RefreshInfectionImage(affected_mob)
switch(stage)
if(2, 3)
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
affected_mob << "\red Your throat feels sore."
if(prob(1))
affected_mob << "\red Mucous runs down the back of your throat."
if(4)
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(2))
affected_mob << "\red Your muscles ache."
if(prob(20))
affected_mob.take_organ_damage(1)
if(prob(2))
affected_mob << "\red Your stomach hurts."
if(prob(20))
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
if(5)
affected_mob << "\red You feel something tearing its way out of your stomach..."
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(50))
AttemptGrow()
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
var/list/candidates = get_alien_candidates()
var/picked = null
// To stop clientless larva, we will check that our host has a client
// if we find no ghosts to become the alien. If the host has a client
// he will become the alien but if he doesn't then we will set the stage
// to 2, so we don't do a process heavy check everytime.
if(candidates.len)
picked = pick(candidates)
else if(affected_mob.client)
picked = affected_mob.key
else
stage = 4 // Let's try again later.
return
if(affected_mob.lying)
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
else
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
spawn(6)
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
new_xeno.key = picked
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
if(gib_on_success)
affected_mob.gib()
del(src)
/*----------------------------------------
Proc: RefreshInfectionImage()
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
----------------------------------------*/
/obj/item/alien_embryo/proc/RefreshInfectionImage()
for(var/mob/living/carbon/alien/alien in player_list)
if(alien.client)
for(var/image/I in alien.client.images)
if(dd_hasprefix_case(I.icon_state, "infected"))
del(I)
for(var/mob/living/L in mob_list)
if(iscorgi(L) || iscarbon(L))
if(L.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[stage]")
alien.client.images += I
/*----------------------------------------
Proc: AddInfectionImages(C)
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
----------------------------------------*/
/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
if(C)
for(var/mob/living/carbon/alien/alien in player_list)
if(alien.client)
if(C.status_flags & XENO_HOST)
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]")
alien.client.images += I
/*----------------------------------------
Proc: RemoveInfectionImage(C)
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
----------------------------------------*/
/obj/item/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C)
if(C)
for(var/mob/living/carbon/alien/alien in player_list)
if(alien.client)
for(var/image/I in alien.client.images)
if(I.loc == C)
if(dd_hasprefix_case(I.icon_state, "infected"))
del(I)
@@ -15,7 +15,8 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "facehugger"
item_state = "facehugger"
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH|MASKCOVERSEYES
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
throw_range = 5
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
@@ -34,7 +35,7 @@ var/const/MAX_ACTIVE_TIME = 400
return
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
if(stat == CONSCIOUS && !isalien(user))
if((stat == CONSCIOUS && !sterile) && !isalien(user))
Attach(user)
return
else
@@ -83,18 +84,32 @@ var/const/MAX_ACTIVE_TIME = 400
HasProximity(target)
return
/obj/item/clothing/mask/facehugger/dropped()
..()
GoActive()
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
if(stat == CONSCIOUS)
HasProximity(finder)
return 1
return
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
if(CanHug(AM))
Attach(AM)
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
..()
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]_thrown"
spawn(15)
if(icon_state == "[initial(icon_state)]_thrown")
icon_state = "[initial(icon_state)]"
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
if(prob(25))
..()
if(stat == CONSCIOUS)
icon_state = "[initial(icon_state)]"
Attach(hit_atom)
return
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
if(!iscarbon(M) || isalien(M))
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
return
if(attached)
return
@@ -105,67 +120,67 @@ var/const/MAX_ACTIVE_TIME = 400
var/mob/living/L = M //just so I don't need to use :
if(loc == L) return
if(stat != CONSCIOUS) return
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
var/mob/living/carbon/target = L
L.visible_message("\red \b [src] leaps at [L]'s face!")
for(var/mob/O in viewers(target, null))
O.show_message("\red \b [src] leaps at [target]'s face!", 1)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.head && H.head.flags & HEADCOVERSMOUTH)
for(var/mob/O in viewers(H, null))
O.show_message("\red \b [src] smashes against [H]'s [H.head]!", 1)
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
Die()
return
if(target.wear_mask)
if(prob(20)) return
var/obj/item/clothing/W = target.wear_mask
if(!W.canremove) return
target.drop_from_inventory(W)
if(iscarbon(M))
var/mob/living/carbon/target = L
for(var/mob/O in viewers(target, null))
O.show_message("\red \b [src] tears [W] off of [target]'s face!", 1)
if(target.wear_mask)
if(prob(20)) return
var/obj/item/clothing/W = target.wear_mask
if(!W.canremove) return
target.drop_from_inventory(W)
if(prob(75))
loc = target
layer = 20
target.wear_mask = src
target.update_inv_wear_mask()
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
GoIdle() //so it doesn't jump the people that tear it off
target.equip_to_slot(src, slot_wear_mask)
if(!sterile) target.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
else if (iscorgi(M))
var/mob/living/simple_animal/corgi/C = M
src.loc = C
C.facehugger = src
C.wear_mask = src
//C.regenerate_icons()
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
Impregnate(target)
else
for(var/mob/O in viewers(target, null))
O.show_message("\red \b [src] misses [target]'s face!", 1)
GoIdle() //so it doesn't jump the people that tear it off
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
Impregnate(L)
return
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/carbon/target as mob)
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
return
if(!sterile)
target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
for(var/datum/disease/alien_embryo/A in target.viruses)
target.status_flags |= XENO_HOST
break
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
new /obj/item/alien_embryo(target)
target.status_flags |= XENO_HOST
for(var/mob/O in viewers(target,null))
O.show_message("\red \b [src] falls limp after violating [target]'s face!", 1)
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
Die()
icon_state = "[initial(icon_state)]_impregnated"
if(iscorgi(target))
var/mob/living/simple_animal/corgi/C = target
src.loc = get_turf(C)
C.facehugger = null
else
for(var/mob/O in viewers(target,null))
O.show_message("\red \b [src] violates [target]'s face!", 1)
target.update_inv_wear_mask()
target.visible_message("\red \b [src] violates [target]'s face!")
return
/obj/item/clothing/mask/facehugger/proc/GoActive()
@@ -205,16 +220,15 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "[initial(icon_state)]_dead"
stat = DEAD
for(var/mob/O in viewers(src, null))
O.show_message("\red \b[src] curls up into a ball!", 1)
src.visible_message("\red \b[src] curls up into a ball!")
return
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
if(CanHug(AM))
Attach(AM)
/proc/CanHug(var/mob/M)
if(iscorgi(M))
return 1
if(!iscarbon(M) || isalien(M))
return 0
var/mob/living/carbon/C = M
@@ -222,4 +236,4 @@ var/const/MAX_ACTIVE_TIME = 400
var/mob/living/carbon/human/H = C
if(H.head && H.head.flags & HEADCOVERSMOUTH)
return 0
return 1
return 1
@@ -1,590 +0,0 @@
/mob/living/carbon/amorph
name = "amorph"
real_name = "amorph"
voice_name = "amorph"
icon = 'icons/mob/amorph.dmi'
icon_state = ""
var/species = "Amorph"
age = 30.0
var/used_skillpoints = 0
var/skill_specialization = null
var/list/skills = null
var/obj/item/l_ear = null
// might use this later to recolor armorphs with icon.SwapColor
var/slime_color = null
var/examine_text = ""
/mob/living/carbon/amorph/New()
..()
// Amorphs don't have a blood vessel, but they can have reagents in their body
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
// Amorphs have no DNA(they're more like carbon-based machines)
// Amorphs don't have organs
..()
/mob/living/carbon/amorph/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if (ismob(AM))
var/mob/tmob = AM
//BubbleWrap - Should stop you pushing a restrained person out of the way
if(istype(tmob, /mob/living/carbon/human))
for(var/mob/M in range(tmob, 1))
if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "\red [tmob] is restrained, you cannot push past"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "\red [tmob] is restraining [M], you cannot push past"
now_pushing = 0
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
if(Metroid.Victim == tmob)
Metroid.UpdateFeed()
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
spawn(0)
..()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = 0
return
return
/mob/living/carbon/amorph/movement_delay()
var/tally = 2 // amorphs are a bit slower than humans
var/mob/M = pulling
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if(analgesic) return -1
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
var/health_deficiency = traumatic_shock
if(health_deficiency >= 40) tally += (health_deficiency / 25)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/300
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
if (stuttering < 10)
stuttering = 10
if(shock_stage >= 10) tally += 3
if(tally < 0)
tally = 0
if(istype(M) && M.lying) //Pulling lying down people is slower
tally += 3
if(mRun in mutations)
tally = 0
return tally
/mob/living/carbon/amorph/Stat()
..()
statpanel("Status")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
if (client.statpanel == "Status")
if (internal)
if (!internal.air_contents)
del(internal)
else
stat("Internal Atmosphere Info", internal.name)
stat("Tank Pressure", internal.air_contents.return_pressure())
stat("Distribution Pressure", internal.distribute_pressure)
if (mind)
if (mind.special_role == "Changeling" && changeling)
stat("Chemical Storage", changeling.chem_charges)
stat("Genetic Damage Time", changeling.geneticdamage)
/mob/living/carbon/amorph/ex_act(severity)
flick("flash", flash)
var/shielded = 0
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
b_loss += 500
if (!prob(getarmor(null, "bomb")))
gib()
return
else
var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(target, 200, 4)
if (2.0)
if (!shielded)
b_loss += 60
f_loss += 60
if (!prob(getarmor(null, "bomb")))
b_loss = b_loss/1.5
f_loss = f_loss/1.5
if(3.0)
b_loss += 30
if (!prob(getarmor(null, "bomb")))
b_loss = b_loss/2
if (prob(50) && !shielded)
Paralyse(10)
src.bruteloss += b_loss
src.fireloss += f_loss
UpdateDamageIcon()
/mob/living/carbon/amorph/blob_act()
if(stat == 2) return
show_message("\red The blob attacks you!")
src.bruteloss += rand(30,40)
UpdateDamageIcon()
return
/mob/living/carbon/amorph/u_equip(obj/item/W as obj)
// These are the only slots an amorph has
if (W == l_ear)
l_ear = null
else if (W == r_hand)
r_hand = null
update_clothing()
/mob/living/carbon/amorph/db_click(text, t1)
var/obj/item/W = equipped()
var/emptyHand = (W == null)
if ((!emptyHand) && (!istype(W, /obj/item)))
return
if (emptyHand)
usr.next_move = usr.prev_move
usr:lastDblClick -= 3 //permit the double-click redirection to proceed.
switch(text)
if("l_ear")
if (l_ear)
if (emptyHand)
l_ear.DblClick()
return
else if(emptyHand)
return
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) ) && W.w_class != 1)
return
u_equip(W)
l_ear = W
W.equipped(src, text)
update_clothing()
return
/mob/living/carbon/amorph/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
if (istype(O, /obj/effect/immovablerod))
src.bruteloss += 101
else
src.bruteloss += 25
UpdateDamageIcon()
updatehealth()
return
/mob/living/carbon/amorph/Move(a, b, flag)
if (buckled)
return
if (restrained())
pulling = null
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
pulling = null
return
else
if(Debug)
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
pulling = null
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/t = M.pulling
M.pulling = null
//this is the gay blood on floor shit -- Added back -- Skie
if (M.lying && (prob(M.getBruteLoss() / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
if(ishuman(M))
var/mob/living/carbon/H = M
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
if(blood_volume > 0)
H:vessel.remove_reagent("blood",1)
if(prob(5))
M.adjustBruteLoss(1)
visible_message("\red \The [M]'s wounds open more from being dragged!")
if(M.pull_damage())
if(prob(25))
M.adjustBruteLoss(2)
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
if(ishuman(M))
var/mob/living/carbon/H = M
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
if(blood_volume > 0)
H:vessel.remove_reagent("blood",1)
step(pulling, get_dir(pulling.loc, T))
M.pulling = t
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
pulling = null
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
pulling = null
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/amorph/proc/misc_clothing_updates()
// Temporary proc to shove stuff in that was put into update_clothing()
// for questionable reasons
if (client)
if (i_select)
if (intent)
client.screen += hud_used.intents
var/list/L = dd_text2list(intent, ",")
L[1] += ":-11"
i_select.screen_loc = dd_list2text(L,",") //ICONS4
else
i_select.screen_loc = null
if (m_select)
if (m_int)
client.screen += hud_used.mov_int
var/list/L = dd_text2list(m_int, ",")
L[1] += ":-11"
m_select.screen_loc = dd_list2text(L,",") //ICONS4
else
m_select.screen_loc = null
// Probably a lazy way to make sure all items are on the screen exactly once
if (client)
client.screen -= contents
client.screen += contents
/mob/living/carbon/amorph/rebuild_appearance()
// Lazy method: Just rebuild everything.
// This can be called when the mob is created, but on other occasions, rebuild_body_overlays(),
// rebuild_clothing_overlays() etc. should be called individually.
misc_clothing_updates() // silly stuff
/mob/living/carbon/amorph/update_body_appearance()
// Should be called whenever something about the body appearance itself changes.
misc_clothing_updates() // silly stuff
if(lying)
icon_state = "lying"
else
icon_state = "standing"
/mob/living/carbon/amorph/update_lying()
// Should be called whenever something about the lying status of the mob might have changed.
if(lying)
icon_state = "lying"
else
icon_state = "standing"
/mob/living/carbon/amorph/hand_p(mob/M as mob)
// not even sure what this is meant to do
return
/mob/living/carbon/amorph/restrained()
if (handcuffed)
return 0 // handcuffs don't work on amorphs
return 0
/mob/living/carbon/amorph/var/co2overloadtime = null
/mob/living/carbon/amorph/var/temperature_resistance = T0C+75
/mob/living/carbon/amorph/show_inv(mob/user as mob)
// TODO: add a window for extracting stuff from an amorph's mouth
// called when something steps onto an amorph
// this could be made more general, but for now just handle mulebot
/mob/living/carbon/amorph/HasEntered(var/atom/movable/AM)
var/obj/machinery/bot/mulebot/MB = AM
if(istype(MB))
MB.RunOver(src)
//gets assignment from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/amorph/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
// TODO: get the ID from the amorph's contents
return
//gets name from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/amorph/proc/get_authentification_name(var/if_no_id = "Unknown")
// TODO: get the ID from the amorph's contents
return
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
/mob/living/carbon/amorph/proc/get_visible_name()
// amorphs can't wear clothes or anything, so always return face_name
return get_face_name()
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/amorph/proc/get_face_name()
// there might later be ways for amorphs to change the appearance of their face
return "[real_name]"
//gets ID card object from special clothes slot or null.
/mob/living/carbon/amorph/proc/get_idcard()
// TODO: get the ID from the amorph's contents
// heal the amorph
/mob/living/carbon/amorph/heal_overall_damage(var/brute, var/burn)
bruteloss -= brute
fireloss -= burn
bruteloss = max(bruteloss, 0)
fireloss = max(fireloss, 0)
updatehealth()
UpdateDamageIcon()
// damage MANY external organs, in random order
/mob/living/carbon/amorph/take_overall_damage(var/brute, var/burn, var/used_weapon = null)
bruteloss += brute
fireloss += burn
updatehealth()
UpdateDamageIcon()
/mob/living/carbon/amorph/Topic(href, href_list)
if (href_list["refresh"])
if((machine)&&(in_range(src, usr)))
show_inv(machine)
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
machine = null
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = usr
O.target = src
O.item = usr.equipped()
O.s_loc = usr.loc
O.t_loc = loc
O.place = href_list["item"]
if(href_list["loc"])
O.internalloc = href_list["loc"]
requests += O
spawn( 0 )
O.process()
return
if (href_list["criminal"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
var/modified = 0
/*if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
else*/
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(setcriminal != "Cancel")
R.fields["criminal"] = setcriminal
modified = 1
spawn()
H.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
..()
return
///eyecheck()
///Returns a number between -1 to 2
/mob/living/carbon/amorph/eyecheck()
return 1
/mob/living/carbon/amorph/IsAdvancedToolUser()
return 1//Amorphs can use guns and such
/mob/living/carbon/amorph/updatehealth()
if(src.nodamage)
src.health = 100
src.stat = 0
return
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() -src.halloss
return
/mob/living/carbon/amorph/abiotic(var/full_body = 0)
return 0
/mob/living/carbon/amorph/abiotic2(var/full_body2 = 0)
return 0
/mob/living/carbon/amorph/getBruteLoss()
return src.bruteloss
/mob/living/carbon/amorph/adjustBruteLoss(var/amount, var/used_weapon = null)
src.bruteloss += amount
if(bruteloss < 0) bruteloss = 0
/mob/living/carbon/amorph/getFireLoss()
return src.fireloss
/mob/living/carbon/amorph/adjustFireLoss(var/amount,var/used_weapon = null)
src.fireloss += amount
if(fireloss < 0) fireloss = 0
/mob/living/carbon/amorph/get_visible_gender()
return gender
@@ -1,248 +0,0 @@
/mob/living/carbon/amorph/attack_paw(mob/living/carbon/monkey/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
..()
switch(M.a_intent)
if ("help")
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
if (health > 0)
attacked += 10
playsound(loc, 'bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
adjustBruteLoss(rand(0, 1))
updatehealth()
return
/mob/living/carbon/amorph/attack_hand(mob/living/carbon/human/M as mob)
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
Weaken(5)
if (stuttering < 5)
stuttering = 5
Stun(5)
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
return
else
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
help_shake_act(M)
else
if (M.a_intent == "hurt")
var/attack_verb
switch(M.mutantrace)
if("lizard")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
else
attack_verb = "punch"
if(M.type == /mob/living/carbon/human/tajaran)
attack_verb = "slash"
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has [attack_verb]ed [name]!</B>", M), 1)
var/damage = rand(5, 10)
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, "punch", 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
damage += 10
playsound(loc, 'slice.ogg', 25, 1, -1)
adjustBruteLoss(damage/10)
updatehealth()
else
if(M.type != /mob/living/carbon/human/tajaran)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
else if(M.type == /mob/living/carbon/human/tajaran)
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to [attack_verb] [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
else
if (!( paralysis ))
drop_item()
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
return
/mob/living/carbon/amorph/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if ((prob(95) && health > 0))
playsound(loc, 'slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
adjustBruteLoss(damage/10)
updatehealth()
react_to_attack(M)
else
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
G.assailant = M
if (M.hand)
M.l_hand = G
else
M.r_hand = G
G.layer = 20
G.affecting = src
grabbed_by += G
G.synch()
LAssailant = M
playsound(loc, 'thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
playsound(loc, 'pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(rand(10,15))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
else
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
adjustBruteLoss(damage)
react_to_attack(M)
updatehealth()
return
/mob/living/carbon/amorph/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
bruteloss += damage
/mob/living/carbon/amorph/attack_metroid(mob/living/carbon/metroid/M as mob)
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
damage = rand(10, 35)
else
damage = rand(5, 25)
src.cloneloss += damage
UpdateDamageIcon()
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
Weaken(power)
if (stuttering < power)
stuttering = power
Stun(power)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
@@ -1,12 +0,0 @@
/mob/living/carbon/amorph/proc/HealDamage(zone, brute, burn)
return heal_overall_damage(brute, burn)
/mob/living/carbon/amorph/UpdateDamageIcon()
// no damage sprites for amorphs yet
return
/mob/living/carbon/amorph/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
if(damagetype == BRUTE)
take_overall_damage(damage, 0)
else
take_overall_damage(0, damage)
@@ -1,300 +0,0 @@
/obj/hud/proc/amorph_hud(var/ui_style='screen1_old.dmi')
src.adding = list( )
src.other = list( )
src.intents = list( )
src.mon_blo = list( )
src.m_ints = list( )
src.mov_int = list( )
src.vimpaired = list( )
src.darkMask = list( )
src.intent_small_hud_objects = list( )
src.g_dither = new /obj/screen( src )
src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.g_dither.name = "Mask"
src.g_dither.icon = ui_style
src.g_dither.icon_state = "dither12g"
src.g_dither.layer = 18
src.g_dither.mouse_opacity = 0
src.alien_view = new /obj/screen(src)
src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.alien_view.name = "Alien"
src.alien_view.icon = ui_style
src.alien_view.icon_state = "alien"
src.alien_view.layer = 18
src.alien_view.mouse_opacity = 0
src.blurry = new /obj/screen( src )
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.blurry.name = "Blurry"
src.blurry.icon = ui_style
src.blurry.icon_state = "blurry"
src.blurry.layer = 17
src.blurry.mouse_opacity = 0
src.druggy = new /obj/screen( src )
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.druggy.name = "Druggy"
src.druggy.icon = ui_style
src.druggy.icon_state = "druggy"
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
var/obj/screen/using
using = new /obj/screen( src )
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen( src )
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen( src )
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_dropbutton
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "r_hand"
using.dir = WEST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_rhand
using.layer = 19
src.r_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "l_hand"
using.dir = EAST
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
using.icon_state = "hand_active"
using.screen_loc = ui_lhand
using.layer = 19
src.l_hand_hud_object = using
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "mask"
using.dir = NORTH
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = "back"
using.dir = NORTHEAST
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
using.layer = 19
src.adding += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "1,1 to 5,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "5,1 to 10,5"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "6,11 to 10,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
using = new /obj/screen( src )
using.name = null
using.icon = ui_style
using.icon_state = "dither50"
using.screen_loc = "11,1 to 15,15"
using.layer = 17
using.mouse_opacity = 0
src.vimpaired += using
mymob.throw_icon = new /obj/screen(null)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_throw
mymob.oxygen = new /obj/screen( null )
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen( null )
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen( null )
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen( null )
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen( null )
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen( null )
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen( null )
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen( null )
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.client.screen = null
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach, mymob.hands, )
mymob.client.screen += src.adding + src.other
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
return
@@ -1,516 +0,0 @@
/mob/living/carbon/amorph
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
var/oxygen_alert = 0
var/toxins_alert = 0
var/fire_alert = 0
var/temperature_alert = 0
/mob/living/carbon/amorph/Life()
set invisibility = 0
set background = 1
if (src.monkeyizing)
return
..()
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(src.loc)
environment = loc.return_air()
if (src.stat != 2) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
breathe()
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
src.blinded = null
//Disease Check
handle_virus_updates()
//Handle temperature/pressure differences between body and environment
if(environment) // More error checking -- TLE
handle_environment(environment)
//Mutations and radiation
handle_mutations_and_radiation()
//Chemicals in the body
handle_chemicals_in_body()
//Disabilities
handle_disabilities()
//Status updates, death etc.
// UpdateLuminosity()
handle_regular_status_updates()
if(client)
handle_regular_hud_updates()
//Being buckled to a chair or bed
check_if_buckled()
// Yup.
update_canmove()
clamp_values()
// Grabbing
for(var/obj/item/weapon/grab/G in src)
G.process()
/mob/living/carbon/amorph
proc
clamp_values()
AdjustStunned(0)
AdjustParalysis(0)
AdjustWeakened(0)
handle_disabilities()
if (src.disabilities & 4)
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
src.drop_item()
spawn( 0 )
emote("cough")
return
if (src.disabilities & 8)
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (src.disabilities & 16)
if (prob(10))
src.stuttering = max(10, src.stuttering)
update_mind()
if(!mind && client)
mind = new
mind.current = src
mind.key = key
handle_mutations_and_radiation()
// amorphs are immune to this stuff
breathe()
if(src.reagents)
if(src.reagents.has_reagent("lexorin")) return
if(!loc) return //probably ought to make a proper fix for this, but :effort: --NeoFite
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
if(losebreath>0) //Suffocating so do not take a breath
src.losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
var/block = 0
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
block = 1
if(!block)
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
if(smoke.reagents.total_volume)
smoke.reagents.reaction(src, INGEST)
spawn(5)
if(smoke)
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
break // If they breathe in the nasty stuff once, no need to continue checking
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(src.internal))
internal = null
if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
internal = null
if(internal)
if (src.internals)
src.internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (src.internals)
src.internals.icon_state = "internal0"
return null
update_canmove()
if(paralysis || stunned || weakened || buckled || (changeling && changeling.changeling_fakedeath)) canmove = 0
else canmove = 1
handle_breath(datum/gas_mixture/breath)
if(src.nodamage)
return
if(!breath || (breath.total_moles == 0))
adjustOxyLoss(7)
oxygen_alert = max(oxygen_alert, 1)
return 0
var/safe_oxygen_min = 8 // Minimum safe partial pressure of O2, in kPa
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
var/SA_para_min = 0.5
var/SA_sleep_min = 5
var/oxygen_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the O2 in our breath
var/O2_pp = (breath.oxygen/breath.total_moles())*breath_pressure
if(O2_pp < safe_oxygen_min) // Too little oxygen
if(prob(20))
spawn(0) emote("gasp")
if (O2_pp == 0)
O2_pp = 0.01
var/ratio = safe_oxygen_min/O2_pp
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
oxygen_used = breath.oxygen*ratio/6
oxygen_alert = max(oxygen_alert, 1)
else // We're in safe limits
adjustOxyLoss(-5)
oxygen_used = breath.oxygen/6
oxygen_alert = 0
breath.oxygen -= oxygen_used
breath.carbon_dioxide += oxygen_used
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
Paralyse(3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
src.sleeping = max(src.sleeping+2, 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
return 1
handle_environment(datum/gas_mixture/environment)
if(!environment)
return
var/environment_heat_capacity = environment.heat_capacity()
if(istype(loc, /turf/space))
environment_heat_capacity = loc:heat_capacity
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
transfer_coefficient = 1
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
transfer_coefficient *= wear_mask.heat_transfer_coefficient
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
//Account for massive pressure differences
var/pressure = environment.return_pressure()
// if(!wear_suit) Monkies cannot into space.
// if(!istype(wear_suit, /obj/item/clothing/suit/space))
/*if(pressure < 20)
if(prob(25))
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
adjustBruteLoss(5)
*/
if(pressure > HAZARD_HIGH_PRESSURE)
adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
return //TODO: DEFERRED
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(src.nodamage) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
if(exposed_temperature > bodytemperature)
adjustFireLoss(20.0*discomfort)
else
adjustFireLoss(5.0*discomfort)
handle_chemicals_in_body()
// most chemicals will have no effect on amorphs
//if(reagents) reagents.metabolize(src)
if (src.drowsyness)
src.drowsyness--
src.eye_blurry = max(2, src.eye_blurry)
if (prob(5))
src.sleeping += 1
Paralyse(5)
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
src.updatehealth()
return //TODO: DEFERRED
handle_regular_status_updates()
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 25) Paralyse(3)
if(src.sleeping)
Paralyse(5)
if (prob(1) && health) spawn(0) emote("snore")
if(src.resting)
Weaken(5)
if(health < config.health_threshold_dead && stat != 2)
death()
else if(src.health < config.health_threshold_crit)
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
// shuffle around the chemical effects for amorphs a little ;)
if(!src.reagents.has_reagent("antitoxin") && src.stat != 2) src.adjustOxyLoss(2)
if(src.stat != 2) src.stat = 1
Paralyse(5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
AdjustWeakened(-1)
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
AdjustParalysis(-1)
src.blinded = 1
src.lying = 1
src.stat = 1
var/h = src.hand
src.hand = 0
drop_item()
src.hand = 1
drop_item()
src.hand = h
else //Not stunned.
src.lying = 0
src.stat = 0
else //Dead.
src.lying = 1
src.blinded = 1
src.stat = 2
if (src.stuttering) src.stuttering--
if (src.slurring) src.slurring--
if (src.eye_blind)
src.eye_blind--
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf--
if (src.ear_damage < 25)
src.ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0)
src.density = !( src.lying )
if (src.disabilities & 128)
src.blinded = 1
if (src.disabilities & 32)
src.ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry--
src.eye_blurry = max(0, src.eye_blurry)
if (src.druggy > 0)
src.druggy--
src.druggy = max(0, src.druggy)
return 1
handle_regular_hud_updates()
if (src.stat == 2 || (XRAY in mutations))
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = 2
else if (src.stat != 2)
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_MOBS
src.sight &= ~SEE_OBJS
src.see_in_dark = 2
src.see_invisible = 0
if (src.sleep)
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
src.sleep.overlays = null
if(src.sleeping_willingly)
src.sleep.overlays += icon(src.sleep.icon, "sleep_willing")
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
if (src.healths)
if (src.stat != 2)
switch(health)
if(100 to INFINITY)
src.healths.icon_state = "health0"
if(80 to 100)
src.healths.icon_state = "health1"
if(60 to 80)
src.healths.icon_state = "health2"
if(40 to 60)
src.healths.icon_state = "health3"
if(20 to 40)
src.healths.icon_state = "health4"
if(0 to 20)
src.healths.icon_state = "health5"
else
src.healths.icon_state = "health6"
else
src.healths.icon_state = "health7"
if (pressure)
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
switch(environment.return_pressure())
if(HAZARD_HIGH_PRESSURE to INFINITY)
pressure.icon_state = "pressure2"
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
pressure.icon_state = "pressure1"
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
pressure.icon_state = "pressure0"
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure.icon_state = "pressure-1"
else
pressure.icon_state = "pressure-2"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
if(bodytemp)
switch(src.bodytemperature) //310.055 optimal body temp
if(345 to INFINITY)
src.bodytemp.icon_state = "temp4"
if(335 to 345)
src.bodytemp.icon_state = "temp3"
if(327 to 335)
src.bodytemp.icon_state = "temp2"
if(316 to 327)
src.bodytemp.icon_state = "temp1"
if(300 to 316)
src.bodytemp.icon_state = "temp0"
if(295 to 300)
src.bodytemp.icon_state = "temp-1"
if(280 to 295)
src.bodytemp.icon_state = "temp-2"
if(260 to 280)
src.bodytemp.icon_state = "temp-3"
else
src.bodytemp.icon_state = "temp-4"
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy
src.client.screen -= src.hud_used.vimpaired
if ((src.blind && src.stat != 2))
if ((src.blinded))
src.blind.layer = 18
else
src.blind.layer = 0
if (src.disabilities & 1)
src.client.screen += src.hud_used.vimpaired
if (src.eye_blurry)
src.client.screen += src.hud_used.blurry
if (src.druggy)
src.client.screen += src.hud_used.druggy
if (src.stat != 2)
if (src.machine)
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
handle_virus_updates()
// amorphs can't come down with human diseases
return
@@ -1,6 +0,0 @@
/mob/living/carbon/amorph/emote(var/act,var/m_type=1,var/message = null)
if(act == "me")
return custom_emote(m_type, message)
/mob/living/carbon/amorph/say_quote(var/text)
return "[src.say_message], \"[text]\"";
@@ -42,7 +42,7 @@
return 1
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/metroid))
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
@@ -23,7 +23,7 @@
brainmob.client.screen.len = null //clear the hud
proc
transfer_identity(var/mob/living/carbon/human/H)
transfer_identity(var/mob/living/carbon/H)
name = "[H]'s brain"
brainmob = new(src)
brainmob.name = H.real_name
@@ -32,7 +32,7 @@
brainmob.timeofhostdeath = H.timeofdeath
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out."
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a brain."
return
/obj/item/brain/examine() // -- TLE
@@ -41,10 +41,10 @@
return
usr << "This is \icon[src] \an [name]."
if(brainmob)//if thar be a brain inside... the brain.
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
usr << "You can feel the small spark of life still left in this one."
else
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Probably not."
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
/obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
@@ -6,6 +6,9 @@
var/t1 = findtext(act, "-", 1, null)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
if(src.stat == DEAD)
return
switch(act)
@@ -50,7 +53,7 @@
for(var/mob/M in dead_mob_list)
if (!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers, and new_players
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
+1 -9
View File
@@ -10,9 +10,6 @@
//Chemicals in the body
handle_chemicals_in_body()
//Disease Check
//handle_virus_updates() There is no disease that affects brains
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(loc)
environment = loc.return_air()
@@ -91,7 +88,7 @@
return //TODO: DEFERRED
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(nodamage) return
if(status_flags & GODMODE) return
if(exposed_temperature > bodytemperature)
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
@@ -270,11 +267,6 @@
return 1
proc/handle_virus_updates()
if(bodytemperature > 409)
for(var/datum/disease/D in viruses)
D.cure()
return
/*/mob/living/carbon/brain/emp_act(severity)
if(!(container && istype(container, /obj/item/device/mmi)))
@@ -0,0 +1,123 @@
/obj/item/device/posibrain
name = "positronic brain"
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves."
icon = 'icons/obj/assemblies.dmi'
icon_state = "posibrain"
w_class = 3
origin_tech = "engineering=4;materials=4;bluespace=2;programming=6"
var/list/construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"plasma"=100,"diamond"=10)
var/construction_time = 75
var/searching = 0
var/askDelay = 10 * 60 * 1
req_access = list(access_robotics)
var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attack_self(mob/user as mob)
if(!brainmob && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
icon_state = "posibrain-searching"
src.searching = 1
src.request_player()
spawn(600) reset_search()
proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "pAI"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_PAI)
question(O.client)
proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
if(!C || brainmob) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
C.prefs.be_special ^= BE_PAI
proc/transfer_personality(var/mob/candidate)
var/mob/living/carbon/brain/B = new(src)
src.searching = 0
src.brainmob = B
src.brainmob.mind = candidate.mind
src.brainmob.name = "PBU-[rand(100, 999)]"
src.brainmob.real_name = "PBU-[rand(100, 999)]"
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.robot_talk_understand = 1
src.brainmob.stat = 0
src.brainmob.silent = 0
src.brainmob.brain_op_stage = 4.0
src.brainmob.key = candidate.key
dead_mob_list -= src.brainmob
living_mob_list += src.brainmob
src.brainmob << "<b>You are a positronic brain, brought into existence on [station_name()].</b>"
src.brainmob << "<b>As a synthetic intelligence, you answer to all crewmembers, as well as the AI.</b>"
src.brainmob << "Use say :b to speak to other artificial intelligences on the station."
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(brainmob) return
src.searching = 0
icon_state = "posibrain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/posibrain/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
if(src.brainmob)
switch(src.brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responsive.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "<span class='info'>*---------*</span>"
usr << msg
return
/obj/item/device/posibrain/emp_act(severity)
if(!brainmob)
return
else
switch(severity)
if(1)
brainmob.emp_damage += rand(20,30)
if(2)
brainmob.emp_damage += rand(10,20)
if(3)
brainmob.emp_damage += rand(0,10)
..()
+6 -1
View File
@@ -2,9 +2,14 @@
if (silent)
return
if(!(container && istype(container, /obj/item/device/mmi)))
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/posibrain))))
return //No MMI, can't speak, bucko./N
else
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") && (container && istype(container, /obj/item/device/posibrain)))
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)
return
if(prob(emp_damage*4))
if(prob(10))//10% chane to drop the message entirely
return
+70 -65
View File
@@ -59,36 +59,17 @@
return
for(var/datum/disease/D in viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
M.contract_disease(D)
D.spread_type = s_spread_type
if(D.spread_by_touch())
M.contract_disease(D, 0, 1, CONTACT_HANDS)
for(var/datum/disease/D in M.viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
contract_disease(D)
D.spread_type = s_spread_type
/* // old code: doesn't support multiple viruses
if(src.virus || M.virus)
var/s_spread_type
if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE)
s_spread_type = src.virus.spread_type
src.virus.spread_type = CONTACT_HANDS
M.contract_disease(src.virus)
src.virus.spread_type = s_spread_type
if(D.spread_by_touch())
contract_disease(D, 0, 1, CONTACT_HANDS)
if(M.virus && M.virus.spread_type!=SPECIAL && M.virus.spread_type!=AIRBORNE)
s_spread_type = M.virus.spread_type
M.virus.spread_type = CONTACT_GENERAL
src.contract_disease(M.virus)
M.virus.spread_type = s_spread_type
*/
return
@@ -104,37 +85,15 @@
return
for(var/datum/disease/D in viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
M.contract_disease(D)
D.spread_type = s_spread_type
if(D.spread_by_touch())
M.contract_disease(D, 0, 1, CONTACT_HANDS)
for(var/datum/disease/D in M.viruses)
var/s_spread_type
if(D.spread_type!=SPECIAL && D.spread_type!=AIRBORNE)
s_spread_type = D.spread_type
D.spread_type = CONTACT_HANDS
contract_disease(D)
D.spread_type = s_spread_type
/*
if(D.spread_by_touch())
contract_disease(D, 0, 1, CONTACT_HANDS)
if(src.virus || M.virus)
var/s_spread_type
if(src.virus && src.virus.spread_type!=SPECIAL && src.virus.spread_type!=AIRBORNE)
s_spread_type = src.virus.spread_type
src.virus.spread_type = CONTACT_HANDS
M.contract_disease(src.virus)
src.virus.spread_type = s_spread_type
if(M.virus && M.virus.spread_type!=SPECIAL && M.virus.spread_type!=AIRBORNE)
s_spread_type = M.virus.spread_type
M.virus.spread_type = CONTACT_GENERAL
src.contract_disease(M.virus)
M.virus.spread_type = s_spread_type
*/
return
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0)
@@ -192,7 +151,7 @@
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if (src.health > config.health_threshold_crit)
if (src.health >= config.health_threshold_crit)
if(src == M && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
src.visible_message( \
@@ -329,6 +288,9 @@
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
else
src << "You need to remain still while entering a vent."
@@ -416,24 +378,22 @@
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
log_attack("<font color='red'>[usr.name] ([usr.ckey]) Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
log_admin("ATTACK: [usr.name] ([usr.ckey]) Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]")
msg_admin_attack("ATTACK: [usr.name] ([usr.ckey]) Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]")
if(!item) return //Grab processing has a chance of returning null
item.layer = initial(item.layer)
u_equip(item)
update_icons()
if(src.client)
src.client.screen -= item
//if(src.client)
//src.client.screen -= item
item.loc = src.loc
//item.loc = src.loc
if(istype(item, /obj/item))
item:dropped(src) // let it know it's been dropped
//if(istype(item, /obj/item))
//item:dropped(src) // let it know it's been dropped
//actually throw it!
if (item)
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
if(!src.lastarea)
@@ -452,7 +412,52 @@
item.throw_at(target, item.throw_range, item.throw_speed)
/mob/living/carbon/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > CARBON_LIFEFORM_FIRE_RESISTANCE)
adjustFireLoss(CARBON_LIFEFORM_FIRE_DAMAGE)
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10)
/mob/living/carbon/can_use_hands()
if(handcuffed)
return 0
if(buckled && ! istype(buckled, /obj/structure/stool/bed/chair)) // buckling does not restrict hands
return 0
return 1
/mob/living/carbon/restrained()
if (handcuffed)
return 1
return
/mob/living/carbon/u_equip(obj/item/W as obj)
if(!W) return 0
else if (W == handcuffed)
handcuffed = null
update_inv_handcuffed()
else if (W == legcuffed)
legcuffed = null
update_inv_legcuffed()
else
..()
return
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
<BR>"}
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[name]")
return
@@ -2,14 +2,8 @@
gender = MALE
var/list/stomach_contents = list()
var/brain_op_stage = 0.0
var/ribcage_op_stage = 0
/*
var/eye_op_stage = 0.0
var/appendix_op_stage = 0.0
*/
var/datum/disease2/disease/virus2 = null
var/list/datum/disease2/disease/resistances2 = list()
var/antibodies = 0
var/silent = null //Can't talk. Value goes down every life proc.
@@ -20,3 +14,9 @@
// life should decrease this by 1 every tick
// total amount of wounds on mob, used to spread out healing and the like over all wounds
var/number_wounds = 0
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
//Surgery info
var/datum/surgery_status/op_stage = new/datum/surgery_status
//Active emote/pose
var/pose = null
+13 -3
View File
@@ -11,6 +11,14 @@
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
for(var/datum/organ/external/E in src.organs)
if(istype(E, /datum/organ/external/chest))
continue
// Only make the limb drop if it's not too damaged
if(prob(100 - E.get_damage()))
// Override the current limb status and don't cause an explosion
E.droplimb(1,1)
flick("gibbed-h", animation)
hgibs(loc, viruses, dna)
@@ -63,8 +71,10 @@
tod = worldtime2text() //weasellos time of death patch
if(mind) mind.store_memory("Time of death: [tod]", 0)
sql_report_death(src)
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
if(ticker && ticker.mode)
// world.log << "k"
sql_report_death(src)
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
return ..(gibbed)
/mob/living/carbon/human/proc/makeSkeleton()
@@ -100,4 +110,4 @@
/mob/living/carbon/human/proc/Drain()
ChangeToHusk()
mutations |= NOCLONE
return
return
+188 -80
View File
@@ -6,6 +6,9 @@
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
//var/m_type = 1
@@ -50,23 +53,33 @@
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
if (!input)
return
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
if (input2 == "Visible")
m_type = 1
else if (input2 == "Hearable")
if (src.miming)
return
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
if(copytext(input,1,5) == "says")
src << "\red Invalid emote."
return
message = "<B>[src]</B> [input]"
else if(copytext(input,1,9) == "exclaims")
src << "\red Invalid emote."
return
else if(copytext(input,1,5) == "asks")
src << "\red Invalid emote."
return
else
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
if (input2 == "Visible")
m_type = 1
else if (input2 == "Hearable")
if (src.miming)
return
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
if ("me")
if(silent)
return
if (src.client)
if (client.muted & MUTE_IC)
if (client.prefs.muted & MUTE_IC)
src << "\red You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
@@ -75,6 +88,15 @@
return
if(!(message))
return
if(copytext(message,1,5) == "says")
src << "\red Invalid emote."
return
else if(copytext(message,1,9) == "exclaims")
src << "\red Invalid emote."
return
else if(copytext(message,1,5) == "asks")
src << "\red Invalid emote."
return
else
message = "<B>[src]</B> [message]"
@@ -96,26 +118,36 @@
m_type = 1
if ("choke")
if (!muzzled)
message = "<B>[src]</B> chokes!"
m_type = 2
if(miming)
message = "<B>[src]</B> clutches his throat desperately!"
m_type = 1
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> chokes!"
m_type = 2
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if ("clap")
if (!src.restrained())
message = "<B>[src]</B> claps."
m_type = 2
if(miming)
m_type = 1
if ("flap")
if (!src.restrained())
message = "<B>[src]</B> flaps his wings."
m_type = 2
if(miming)
m_type = 1
if ("aflap")
if (!src.restrained())
message = "<B>[src]</B> flaps his wings ANGRILY!"
m_type = 2
if(miming)
m_type = 1
if ("drool")
message = "<B>[src]</B> drools."
@@ -126,12 +158,16 @@
m_type = 1
if ("chuckle")
if (!muzzled)
message = "<B>[src]</B> chuckles."
m_type = 2
if(miming)
message = "<B>[src]</B> appears to chuckle."
m_type = 1
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> chuckles."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("twitch")
message = "<B>[src]</B> twitches violently."
@@ -149,12 +185,16 @@
m_type = 1
if ("cough")
if (!muzzled)
message = "<B>[src]</B> coughs!"
m_type = 2
if(miming)
message = "<B>[src]</B> appears to cough!"
m_type = 1
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> coughs!"
m_type = 2
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if ("frown")
message = "<B>[src]</B> frowns."
@@ -173,24 +213,32 @@
m_type = 1
if ("gasp")
if (!muzzled)
message = "<B>[src]</B> gasps!"
m_type = 2
if(miming)
message = "<B>[src]</B> appears to be gasping!"
m_type = 1
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> gasps!"
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if ("deathgasp")
message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..."
m_type = 1
if ("giggle")
if (!muzzled)
message = "<B>[src]</B> giggles."
m_type = 2
if(miming)
message = "<B>[src]</B> giggles silently!"
m_type = 1
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> giggles."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("glare")
var/M = null
@@ -244,34 +292,51 @@
m_type = 1
if ("cry")
if (!muzzled)
if(miming)
message = "<B>[src]</B> cries."
m_type = 2
m_type = 1
else
message = "<B>[src]</B> makes a weak noise. \He frowns."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> cries."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise. \He frowns."
m_type = 2
if ("sigh")
if (!muzzled)
if(miming)
message = "<B>[src]</B> sighs."
m_type = 2
m_type = 1
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> sighs."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if ("laugh")
if (!muzzled)
message = "<B>[src]</B> laughs."
m_type = 2
if(miming)
message = "<B>[src]</B> acts out a laugh."
m_type = 1
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> laughs."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("mumble")
message = "<B>[src]</B> mumbles!"
m_type = 2
if(miming)
m_type = 1
if ("grumble")
if(miming)
message = "<B>[src]</B> grumbles!"
m_type = 1
if (!muzzled)
message = "<B>[src]</B> grumbles!"
m_type = 2
@@ -280,16 +345,24 @@
m_type = 2
if ("groan")
if (!muzzled)
message = "<B>[src]</B> groans!"
m_type = 2
if(miming)
message = "<B>[src]</B> appears to groan!"
m_type = 1
else
message = "<B>[src]</B> makes a loud noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> groans!"
m_type = 2
else
message = "<B>[src]</B> makes a loud noise."
m_type = 2
if ("moan")
message = "<B>[src]</B> moans!"
m_type = 2
if(miming)
message = "<B>[src]</B> appears to moan!"
m_type = 1
else
message = "<B>[src]</B> moans!"
m_type = 2
if ("johnny")
var/M
@@ -298,8 +371,12 @@
if (!M)
param = null
else
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
m_type = 2
if(miming)
message = "<B>[src]</B> takes a drag from a cigarette and blows \"[M]\" out in smoke."
m_type = 1
else
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
m_type = 2
if ("point")
if (!src.restrained())
@@ -350,6 +427,8 @@
if ("shiver")
message = "<B>[src]</B> shivers."
m_type = 2
if(miming)
m_type = 1
if ("pale")
message = "<B>[src]</B> goes pale for a second."
@@ -360,32 +439,46 @@
m_type = 1
if ("sneeze")
if (!muzzled)
if (miming)
message = "<B>[src]</B> sneezes."
m_type = 2
m_type = 1
else
message = "<B>[src]</B> makes a strange noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> sneezes."
m_type = 2
else
message = "<B>[src]</B> makes a strange noise."
m_type = 2
if ("sniff")
message = "<B>[src]</B> sniffs."
m_type = 2
if(miming)
m_type = 1
if ("snore")
if (!muzzled)
message = "<B>[src]</B> snores."
m_type = 2
if (miming)
message = "<B>[src]</B> sleeps soundly."
m_type = 1
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> snores."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("whimper")
if (!muzzled)
message = "<B>[src]</B> whimpers."
m_type = 2
if (miming)
message = "<B>[src]</B> appears hurt."
m_type = 1
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> whimpers."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if ("wink")
message = "<B>[src]</B> winks."
@@ -395,11 +488,15 @@
if (!muzzled)
message = "<B>[src]</B> yawns."
m_type = 2
if(miming)
m_type = 1
if ("collapse")
Paralyse(2)
message = "<B>[src]</B> collapses!"
m_type = 2
if(miming)
m_type = 1
if("hug")
m_type = 1
@@ -436,7 +533,7 @@
else
message = "<B>[src]</B> holds out \his hand to [M]."
if("daps")
if("dap")
m_type = 1
if (!src.restrained())
var/M = null
@@ -451,12 +548,16 @@
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
if ("scream")
if (!muzzled)
message = "<B>[src]</B> screams!"
m_type = 2
if (miming)
message = "<B>[src]</B> acts out a scream!"
m_type = 1
else
message = "<B>[src]</B> makes a very loud noise."
m_type = 2
if (!muzzled)
message = "<B>[src]</B> screams!"
m_type = 2
else
message = "<B>[src]</B> makes a very loud noise."
m_type = 2
if ("help")
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
@@ -475,9 +576,9 @@
// Maybe some people are okay with that.
for(var/mob/M in dead_mob_list)
if (!M.client || istype(M, /mob/new_player))
if(!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers and new players
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
@@ -488,3 +589,10 @@
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
O.show_message(message, m_type)
/mob/living/carbon/human/verb/pose()
set name = "Set pose"
set desc = "Sets description which will be shown when someone examines you"
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
+16 -13
View File
@@ -191,7 +191,7 @@
msg += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>\n"
if(suiciding)
msg += "<span class='warning'>[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!</span>\n"
msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n"
if(mSmallsize in mutations)
msg += "[t_He] [t_is] small halfling!\n"
@@ -396,26 +396,29 @@
var/criminal = "None"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
else
perpname = name
else
perpname = name
for (var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]
if(perpname)
for (var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
//msg += "\[Set Hostile Identification\]\n"
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
//msg += "\[Set Hostile Identification\]\n"
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
msg += "*---------*</span>"
if (pose)
msg += "\n[t_He] is [pose]."
usr << msg
+1 -161
View File
@@ -482,7 +482,7 @@
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
@@ -507,166 +507,6 @@
src.hud_used.hotkey_ui_hidden = 1
/*
Radar-related things
*/
/mob/living/carbon/human/proc/close_radar()
radar_open = 0
for(var/obj/screen/x in client.screen)
if( (x.name == "radar" && x.icon == 'icons/misc/radar.dmi') || (x in radar_blips) )
client.screen -= x
del(x)
place_radar_closed()
/mob/living/carbon/human/proc/place_radar_closed()
var/obj/screen/closedradar = new()
closedradar.icon = 'icons/misc/radar.dmi'
closedradar.icon_state = "radarclosed"
closedradar.screen_loc = "WEST,NORTH-1"
closedradar.name = "radar closed"
client.screen += closedradar
/mob/living/carbon/human/proc/start_radar()
for(var/obj/screen/x in client.screen)
if(x.name == "radar closed" && x.icon == 'icons/misc/radar.dmi')
client.screen -= x
del(x)
var/obj/screen/cornerA = new()
cornerA.icon = 'icons/misc/radar.dmi'
cornerA.icon_state = "radar(1,1)"
cornerA.screen_loc = "WEST,NORTH-2"
cornerA.name = "radar"
var/obj/screen/cornerB = new()
cornerB.icon = 'icons/misc/radar.dmi'
cornerB.icon_state = "radar(2,1)"
cornerB.screen_loc = "WEST+1,NORTH-2"
cornerB.name = "radar"
var/obj/screen/cornerC = new()
cornerC.icon = 'icons/misc/radar.dmi'
cornerC.icon_state = "radar(1,2)"
cornerC.screen_loc = "WEST,NORTH-1"
cornerC.name = "radar"
var/obj/screen/cornerD = new()
cornerD.icon = 'icons/misc/radar.dmi'
cornerD.icon_state = "radar(2,2)"
cornerD.screen_loc = "WEST+1,NORTH-1"
cornerD.name = "radar"
client.screen += cornerA
client.screen += cornerB
client.screen += cornerC
client.screen += cornerD
radar_open = 1
while(radar_open && (RADAR in augmentations))
update_radar()
sleep(6)
/mob/living/carbon/human/proc/update_radar()
if(!client) return
var/list/found_targets = list()
var/max_dist = 29 // 29 tiles is the max distance
// If the mob is inside a turf, set the center to the object they're in
var/atom/distance_ref = src
if(!isturf(src.loc))
distance_ref = loc
// Clear the radar_blips cache
for(var/x in radar_blips)
client.screen -= x
del(x)
radar_blips = list()
var/starting_px = 3
var/starting_py = 3
for(var/mob/living/M in orange(max_dist, distance_ref))
if(M.stat == 2) continue
found_targets.Add(M)
for(var/obj/effect/critter/C in orange(max_dist, distance_ref))
if(!C.alive) continue
found_targets.Add(C)
for(var/obj/mecha/M in orange(max_dist, distance_ref))
if(!M.occupant) continue
found_targets.Add(M)
for(var/obj/structure/closet/C in orange(max_dist, distance_ref))
for(var/mob/living/M in C.contents)
if(M.stat == 2) continue
found_targets.Add(M)
// Loop through all living mobs in a range.
for(var/atom/A in found_targets)
var/a_x = A.x
var/a_y = A.y
if(!isturf(A.loc))
a_x = A.loc.x
a_y = A.loc.y
var/blip_x = max_dist + (-( distance_ref.x-a_x ) ) + starting_px
var/blip_y = max_dist + (-( distance_ref.y-a_y ) ) + starting_py
var/obj/screen/blip = new()
blip.icon = 'icons/misc/radar.dmi'
blip.name = "Blip"
blip.layer = 21
blip.screen_loc = "WEST:[blip_x-1],NORTH-2:[blip_y-1]" // offset -1 because the center of the blip is not at the bottomleft corner (14)
if(istype(A, /mob/living))
var/mob/living/M = A
if(ishuman(M))
if(M:wear_id)
var/job = M:wear_id:GetJobName()
if(job == "Security Officer")
blip.icon_state = "secblip"
blip.name = "Security Officer"
else if(job == "Captain" || job == "Research Director" || job == "Chief Engineer" || job == "Chief Medical Officer" || job == "Head of Security" || job == "Head of Personnel")
blip.icon_state = "headblip"
blip.name = "Station Head"
else
blip.icon_state = "civblip"
blip.name = "Civilian"
else
blip.icon_state = "civblip"
blip.name = "Civilian"
else if(issilicon(M))
blip.icon_state = "roboblip"
blip.name = "Robotic Organism"
else
blip.icon_state = "unknownblip"
blip.name = "Unknown Organism"
else if(istype(A, /obj/effect/critter))
blip.icon_state = "unknownblip"
blip.name = "Unknown Organism"
else if(istype(A, /obj/mecha))
blip.icon_state = "roboblip"
blip.name = "Robotic Organism"
radar_blips.Add(blip)
client.screen += blip
/mob/living/carbon/human/update_action_buttons()
var/num = 1
if(!src.hud_used) return
@@ -1,19 +0,0 @@
mob/var/image/antag_img
mob/living/carbon/human
var/image/med_img
var/image/sec_img
var/image/sec2_img
var/image/imp_img
var/image/health_img
mob/New()
. = ..()
antag_img = image('icons/mob/hud.dmi',src)
mob/living/carbon/human/New()
. = ..()
med_img = image('icons/mob/hud.dmi',src)
sec_img = image('icons/mob/hud.dmi',src)
sec2_img = image('icons/mob/hud.dmi',src)
imp_img = image('icons/mob/hud.dmi',src)
health_img = image('icons/mob/hud.dmi',src)
+53 -146
View File
@@ -12,7 +12,7 @@
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
nodamage = 1
status_flags = GODMODE|CANPUSH
@@ -97,18 +97,13 @@
for(var/obj/effect/decal/cleanable/blood/drip/G in T)
nums += G
iconL.Remove(G.icon_state)
if(nums.len >= 3)
var/obj/effect/decal/cleanable/blood/drip/D = pick(nums)
D.blood_DNA[dna.unique_enzymes] = dna.b_type
return
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
this.icon_state = pick(iconL)
this.blood_DNA = list()
this.blood_DNA[dna.unique_enzymes] = dna.b_type
// replace many drips with something larger
if(nums.len > 3)
if (nums.len < 5)
var/obj/effect/decal/cleanable/blood/drip/this = new(T)
this.icon_state = pick(iconL)
this.blood_DNA = list()
this.blood_DNA[dna.unique_enzymes] = dna.b_type
else
for(var/obj/effect/decal/cleanable/blood/drip/G in nums)
del G
T.add_blood(src)
@@ -149,9 +144,9 @@
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/metroid/Metroid in view(1,tmob))
if(Metroid.Victim == tmob)
Metroid.UpdateFeed()
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
slime.UpdateFeed()
return
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
@@ -167,7 +162,7 @@
if(prob(99))
now_pushing = 0
return
if(tmob.nopush)
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -250,17 +245,19 @@
f_loss += 60
if (!prob(getarmor(null, "bomb")))
if (prob(getarmor(null, "bomb")))
b_loss = b_loss/1.5
f_loss = f_loss/1.5
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
ear_damage += 30
ear_deaf += 120
if (prob(70) && !shielded)
Paralyse(10)
if(3.0)
b_loss += 30
if (!prob(getarmor(null, "bomb")))
if (prob(getarmor(null, "bomb")))
b_loss = b_loss/2
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
ear_damage += 15
@@ -329,110 +326,6 @@
updatehealth()
return
/mob/living/carbon/human/Move(a, b, flag)
if (buckled)
return
if (restrained())
stop_pulling()
var/t7 = 1
if (restrained())
for(var/mob/living/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
else
if(Debug)
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
stop_pulling()
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (isliving(pulling))
var/mob/living/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
//this is the gay blood on floor shit -- Added back -- Skie
if (M.lying && (prob(M.getBruteLoss() / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
if(ishuman(M))
var/mob/living/carbon/H = M
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
if(blood_volume > 0)
H:vessel.remove_reagent("blood",1)
if(prob(5))
M.adjustBruteLoss(1)
visible_message("\red \The [M]'s wounds open more from being dragged!")
if(M.pull_damage())
if(prob(25))
M.adjustBruteLoss(2)
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
if(ishuman(M))
var/mob/living/carbon/H = M
var/blood_volume = round(H:vessel.get_reagent_amount("blood"))
if(blood_volume > 0)
H:vessel.remove_reagent("blood",1)
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
stop_pulling()
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/human/hand_p(mob/M as mob)
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
@@ -469,18 +362,18 @@
if(armor >= 2) return
/mob/living/carbon/human/attack_metroid(mob/living/carbon/metroid/M as mob)
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
if(M.Victim) return // can't attack while eating!
if (health > -100)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(M, /mob/living/carbon/metroid/adult))
if(istype(M, /mob/living/carbon/slime/adult))
damage = rand(10, 35)
else
damage = rand(5, 25)
@@ -547,7 +440,7 @@
/mob/living/carbon/human/show_inv(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR>
@@ -671,7 +564,7 @@
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
machine = null
unset_machine()
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
@@ -691,32 +584,46 @@
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
var/perpname = "wot"
/* // Uncomment if you want sechuds to need security access
var/allowed_access = 0
if(H.wear_id)
var/list/access = H.wear_id.GetAccess()
if(access_security in access)
allowed_access = 1
return
if(!allowed_access)
H << "<span class='warning'>ERROR: Invalid Access</span>"
return
*/
var/modified = 0
var/perpname = "wot"
if(wear_id)
if(istype(wear_id,/obj/item/weapon/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
perpname = tempPda.owner
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
else
perpname = name
else
perpname = src.name
perpname = name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(perpname)
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(setcriminal != "Cancel")
R.fields["criminal"] = setcriminal
modified = 1
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud))
if(setcriminal != "Cancel")
R.fields["criminal"] = setcriminal
modified = 1
spawn()
H.handle_regular_hud_updates()
spawn()
H.handle_regular_hud_updates()
if(!modified)
usr << "\red Unable to locate a data core entry for this person."
@@ -5,9 +5,7 @@
switch(M.a_intent)
if ("help")
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if(M == src) return
if (w_uniform)
@@ -21,9 +19,7 @@
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
visible_message(text("\red [] has grabbed [] passively!", M, src))
if("hurt")
if (w_uniform)
@@ -58,12 +54,8 @@
if (prob(80))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
drop_item()
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] disarmed []!</B>", M, src), 1)
visible_message(text("\red <B>[] disarmed []!</B>", M, src))
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tried to disarm []!</B>", M, src), 1)
visible_message(text("\red <B>[] has tried to disarm []!</B>", M, src))
return
@@ -20,9 +20,6 @@
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])")
msg_admin_attack("ATTACK: [M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])") //BS12 EDIT ALG
log_attack("<font color='red'>[M.name] ([M.ckey]) stungloved [src.name] ([src.ckey])</font>")
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
@@ -44,7 +41,6 @@
var/armor_block = run_armor_check(affecting, "melee")
if(HULK in M.mutations) damage += 5
if(SUPRSTR in M.augmentations) damage += 5
playsound(loc, "punch", 25, 1, -1)
@@ -60,8 +56,7 @@
switch(M.a_intent)
if("help")
if(health > config.health_threshold_crit)
diary << "\[[time2text(world.timeofday, "hh:mm.ss")]\] CPR BUGHINTING: [M] shakes [src]: health - [health], threshold - [config.health_threshold_crit]. Health details: OX [getOxyLoss()] TX [getToxLoss()] BU [getFireLoss()] BR [getBruteLoss()] Blood: [round(vessel.get_reagent_amount("blood"))] out of 560"
if(health >= config.health_threshold_crit)
help_shake_act(M)
return 1
// if(M.health < -75) return 0
@@ -101,27 +96,6 @@
if("hurt")
if(ELECTRICHANDS in M.augmentations)
var/gendertxt = "their"
if(M.gender == MALE)
gendertxt = "his"
if(M.gender == FEMALE)
gendertxt = "her"
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Used Electric Hands nanoaug power on [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])</font>")
log_admin("ATTACK: [M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them")
msg_admin_attack("ATTACK: [M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name] ([src.ckey]), shocking them") //BS12 EDIT ALG
log_attack("<font color='red'>[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name]([src.ckey]), shocking them </font>")
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,armorblock)
return
var/attack_verb
if(M.dna)
switch(M.dna.mutantrace)
@@ -137,9 +111,6 @@
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[attack_verb]ed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [attack_verb]ed by [M.name] ([M.ckey])</font>")
log_admin("ATTACK: [M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])")
msg_admin_attack("ATTACK: [M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])") //BS12 EDIT ALG
log_attack("<font color='red'>[M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])</font>")
var/damage = rand(0, 5)//BS12 EDIT
@@ -160,7 +131,6 @@
var/armor_block = run_armor_check(affecting, "melee")
if(HULK in M.mutations) damage += 5
if(SUPRSTR in M.augmentations) damage += 5
switch(attack_verb)
@@ -172,7 +142,7 @@
playsound(loc, "punch", 25, 1, -1)
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
//Rearranged, so claws don't increase weaken chance.
//Rearranged, so claws don't increase weaken chance.
if(damage >= 5 && prob(50))
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(2, WEAKEN, armor_block)
@@ -1,6 +1,6 @@
//Updates the mob's health from organs and mob damage variables
/mob/living/carbon/human/updatehealth()
if(nodamage)
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
return
@@ -117,7 +117,7 @@
// damage MANY external organs, in random order
/mob/living/carbon/human/take_overall_damage(var/brute, var/burn, var/sharp = 0, var/used_weapon = null)
if(nodamage) return //godmode
if(status_flags & GODMODE) return //godmode
var/list/datum/organ/external/parts = get_damageable_organs()
var/update = 0
while(parts.len && (brute>0 || burn>0) )
@@ -127,7 +127,6 @@
var/burn_was = picked.burn_dam
update |= picked.take_damage(brute,burn,sharp,used_weapon)
brute -= (picked.brute_dam - brute_was)
burn -= (picked.burn_dam - burn_was)
@@ -168,18 +167,19 @@
if(!def_zone) def_zone = ran_zone(def_zone)
organ = get_organ(check_zone(def_zone))
if(!organ) return 0
if(blocked)
damage = (damage/(blocked+1))
if(DERMALARMOR in augmentations)
damage = damage - (round(damage*0.35)) // reduce damage by 35%
switch(damagetype)
if(BRUTE)
if(organ.take_damage(damage, 0, sharp, used_weapon))
UpdateDamageIcon()
damageoverlaytemp = 20
if(organ.take_damage(damage, 0, sharp, used_weapon)) UpdateDamageIcon()
if(BURN)
if(organ.take_damage(0, damage, sharp, used_weapon))
UpdateDamageIcon()
damageoverlaytemp = 20
if(organ.take_damage(damage, 0, sharp, used_weapon)) UpdateDamageIcon()
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
return 1
@@ -113,7 +113,12 @@ emp_act
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
if(!I || !user) return 0
var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src)
if(!target_zone)
visible_message("\red <B>[user] misses [src] with \the [I]!")
return
var/datum/organ/external/affecting = get_organ(target_zone)
if (!affecting)
return
if(affecting.status & ORGAN_DESTROYED)
@@ -148,21 +153,8 @@ emp_act
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(get_dist(H, src) > 1) //people with TK won't get smeared with blood
if(H.wear_suit)
H.wear_suit.add_blood(src)
H.update_inv_wear_suit(0) //updates mob overlays to show the new blood (no refresh)
else if(H.w_uniform)
H.w_uniform.add_blood(src)
H.update_inv_w_uniform(0) //updates mob overlays to show the new blood (no refresh)
if (H.gloves)
H.gloves.add_blood(H)
H.gloves:transfer_blood = 2
H.gloves:bloody_hands_mob = H
else
H.add_blood(H)
H.bloody_hands = 2
H.bloody_hands_mob = H
H.update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
H.bloody_body(src)
H.bloody_hands(src)
switch(hit_area)
if("head")//Harder to score a stun but if you do it lasts a bit longer
@@ -189,10 +181,23 @@ emp_act
visible_message("\red <B>[src] has been knocked down!</B>")
if(bloody)
bloody_body(src)
if(wear_suit)
wear_suit.add_blood(src)
update_inv_wear_suit(0)
if(w_uniform)
w_uniform.add_blood(src)
update_inv_w_uniform(0)
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
if (gloves)
gloves.add_blood(source)
gloves:transfer_blood = amount
gloves:bloody_hands_mob = source
else
add_blood(source)
bloody_hands = amount
bloody_hands_mob = source
update_inv_gloves() //updates on-mob overlays for bloody hands and/or bloody gloves
/mob/living/carbon/human/proc/bloody_body(var/mob/living/source)
if(wear_suit)
wear_suit.add_blood(source)
update_inv_wear_suit(0)
if(w_uniform)
w_uniform.add_blood(source)
update_inv_w_uniform(0)
@@ -1,5 +1,4 @@
/mob/living/carbon/human
//Hair colour and style
var/r_hair = 0
var/g_hair = 0
@@ -36,7 +35,7 @@
var/obj/item/glasses = null
var/obj/item/head = null
var/obj/item/ears = null
var/obj/item/weapon/card/id/wear_id = null
var/obj/item/wear_id = null
var/obj/item/r_store = null
var/obj/item/l_store = null
var/obj/item/s_store = null
@@ -52,6 +51,7 @@
var/list/organs_by_name = list() // map organ names to organs
var/miming = null //Toggle for the mime's abilities.
var/special_voice = "" // For changing our voice. Used by a symptom.
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
@@ -159,9 +159,8 @@
client.screen -= W
W.loc = loc
W.dropped(src)
if(W)
W.layer = initial(W.layer)
//if(W)
//W.layer = initial(W.layer)
update_action_buttons()
return 1
@@ -365,6 +364,7 @@
if("mask")
if(target.wear_mask && !target.wear_mask.canremove)
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [source.wear_mask] from [target]'s head!</B>"
if("l_hand")
@@ -374,26 +374,31 @@
if("gloves")
if(target.gloves && !target.gloves.canremove)
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.gloves] from [target]'s hands!</B>"
if("eyes")
if(target.glasses && !target.glasses.canremove)
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
if("ears")
if(target.ears && !target.ears.canremove)
message = "\red <B>[source] fails to take off \a [target.ears] from [target]'s ears!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.ears] from [target]'s ears!</B>"
if("head")
if(target.head && !target.head.canremove)
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.head] from [target]'s head!</B>"
if("shoes")
if(target.shoes && !target.shoes.canremove)
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.shoes] from [target]'s feet!</B>"
if("belt")
@@ -401,6 +406,7 @@
if("suit")
if(target.wear_suit && !target.wear_suit.canremove)
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.wear_suit] from [target]'s body!</B>"
if("back")
@@ -410,26 +416,19 @@
if("legcuff")
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
if("uniform")
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if(target.w_uniform && !target.w_uniform.canremove)
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
if("s_store")
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
if("pockets")
for(var/obj/item/weapon/mousetrap/MT in list(target.l_store, target.r_store))
if(MT.armed)
for(var/mob/O in viewers(target, null))
if(O == source)
O.show_message("\red <B>You reach into the [target]'s pockets, but there was a live mousetrap in there!</B>", 1)
else
O.show_message("\red <B>[source] reaches into [target]'s pockets and sets off a hidden mousetrap!</B>", 1)
target.u_equip(MT)
if (target.client)
target.client.screen -= MT
MT.loc = source.loc
MT.triggered(source, source.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
if("CPR")
@@ -475,11 +474,11 @@ It can still be worn/put on as normal.
switch(place) //here we go again...
if("mask")
slot_to_process = slot_wear_mask
if (target.wear_mask)
if (target.wear_mask && target.wear_mask.canremove)
strip_item = target.wear_mask
if("gloves")
slot_to_process = slot_gloves
if (target.gloves)
if (target.gloves && target.gloves.canremove)
strip_item = target.gloves
if("eyes")
slot_to_process = slot_glasses
@@ -495,7 +494,7 @@ It can still be worn/put on as normal.
strip_item = target.s_store
if("head")
slot_to_process = slot_head
if (target.head)
if (target.head && target.head.canremove)
strip_item = target.head
if("ears")
slot_to_process = slot_ears
@@ -503,7 +502,7 @@ It can still be worn/put on as normal.
strip_item = target.ears
if("shoes")
slot_to_process = slot_shoes
if (target.shoes)
if (target.shoes && target.shoes.canremove)
strip_item = target.shoes
if("l_hand")
if (istype(target, /obj/item/clothing/suit/straight_jacket))
@@ -519,11 +518,11 @@ It can still be worn/put on as normal.
strip_item = target.r_hand
if("uniform")
slot_to_process = slot_w_uniform
if (target.w_uniform)
if(target.w_uniform && target.w_uniform.canremove)
strip_item = target.w_uniform
if("suit")
slot_to_process = slot_wear_suit
if (target.wear_suit)
if (target.wear_suit && target.wear_suit.canremove)
strip_item = target.wear_suit
if("id")
slot_to_process = slot_wear_id
@@ -592,7 +591,15 @@ It can still be worn/put on as normal.
target.internals.icon_state = "internal1"
if(slot_to_process)
if(strip_item) //Stripping an item from the mob
target.u_equip(strip_item)
var/obj/item/W = strip_item
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
W.dropped(target)
W.add_fingerprint(source)
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
if(target.r_store)
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
@@ -601,6 +608,7 @@ It can still be worn/put on as normal.
if(item.mob_can_equip(target, slot_to_process, 0))
source.u_equip(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
item.dropped(source)
source.update_icons()
target.update_icons()
+84 -151
View File
@@ -8,23 +8,29 @@
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
#define COLD_DAMAGE_LEVEL_1 1 //Amount of damage applied when your body temperature just passes the 260.15k safety point
#define COLD_DAMAGE_LEVEL_2 2 //Amount of damage applied when your body temperature passes the 200K point
#define COLD_DAMAGE_LEVEL_3 4 //Amount of damage applied when your body temperature passes the 120K point
#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point
#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point
#define COLD_DAMAGE_LEVEL_3 3 //Amount of damage applied when your body temperature passes the 120K point
//Note that gas heat damage is only applied once every FOUR ticks.
#define HEAT_GAS_DAMAGE_LEVEL_1 2 //Amount of damage applied when the current breath's temperature just passes the 360.15k safety point
#define HEAT_GAS_DAMAGE_LEVEL_2 4 //Amount of damage applied when the current breath's temperature passes the 400K point
#define HEAT_GAS_DAMAGE_LEVEL_3 8 //Amount of damage applied when the current breath's temperature passes the 1000K point
#define COLD_GAS_DAMAGE_LEVEL_1 1 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
#define COLD_GAS_DAMAGE_LEVEL_2 2 //Amount of damage applied when the current breath's temperature passes the 200K point
#define COLD_GAS_DAMAGE_LEVEL_3 4 //Amount of damage applied when the current breath's temperature passes the 120K point
#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
var/const/BLOOD_VOLUME_SAFE = 501
var/const/BLOOD_VOLUME_OKAY = 336
var/const/BLOOD_VOLUME_BAD = 224
var/const/BLOOD_VOLUME_SURVIVE = 122
/mob/living/carbon/human
var/oxygen_alert = 0
var/toxins_alert = 0
var/fire_alert = 0
var/pressure_alert = 0
var/prev_gender = null // Debug for plural genders
var/temperature_alert = 0
@@ -44,7 +50,7 @@
if(prev_gender != gender)
prev_gender = gender
if(gender in list(PLURAL, NEUTER))
message_admins("[src] ([ckey]) gender has been changed to plural or neuter. Please record what has happened recently to the person and then notify coders. (<A HREF='?src=%holder_ref%;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?src=%holder_ref%;adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=%admin_ref%;priv_msg=\ref[src]'>PM</A>) (<A HREF='?src=%holder_ref%;adminplayerobservejump=\ref[src]'>JMP</A>)",1,1) //The 1,1 at the end is there to make '%holder_ref%' get replaced with the actual ref object
message_admins("[src] ([ckey]) gender has been changed to plural or neuter. Please record what has happened recently to the person and then notify coders. (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?priv_msg=\ref[src]'>PM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>)")
*/
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
@@ -68,9 +74,6 @@
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Disease Check
handle_virus_updates()
//Updates the number of stored chemicals for powers
handle_changeling()
@@ -140,7 +143,7 @@
if(D.data["donor"] == src)
B = D
break
var/datum/reagent/nutriment/F = locate() in vessel.reagent_list
var/datum/reagent/nutriment/F = locate() in reagents.reagent_list
if(F != null)
if(F.volume >= 1)
// nutriment speeds it up quite a bit
@@ -152,11 +155,11 @@
switch(blood_volume)
if(501 to 10000)
if(BLOOD_VOLUME_SAFE to 10000)
if(pale)
pale = 0
update_body()
if(336 to 500)
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(!pale)
pale = 1
update_body()
@@ -168,7 +171,7 @@
if(oxyloss < 20)
// hint that they're getting close to suffocation
oxyloss += 3
if(224 to 335)
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
if(!pale)
pale = 1
update_body()
@@ -180,19 +183,25 @@
Paralyse(rand(1,3))
var/word = pick("dizzy","woosey","faint")
src << "\red You feel extremely [word]"
if(122 to 244)
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
oxyloss += 5
toxloss += 5
if(prob(15))
var/word = pick("dizzy","woosey","faint")
src << "\red You feel extremely [word]"
if(0 to 122)
if(0 to BLOOD_VOLUME_SURVIVE)
// There currently is a strange bug here. If the mob is not below -100 health
// when death() is called, apparently they will be just fine, and this way it'll
// spam deathgasp. Adjusting toxloss ensures the mob will stay dead.
toxloss += 300 // just to be safe!
death()
// Without enough blood you slowly go hungry.
if(blood_volume < BLOOD_VOLUME_SAFE)
if(nutrition >= 300)
nutrition -= 10
else if(nutrition >= 200)
nutrition -= 3
var/blood_max = 0
for(var/datum/organ/external/temp in organs)
@@ -241,7 +250,7 @@
if (prob(10))
stuttering = max(10, stuttering)
if (getBrainLoss() >= 60 && stat != 2)
if (prob(7))
if (prob(3))
switch(pick(1,2,3))
if(1)
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
@@ -274,7 +283,7 @@
if(E.name == "l_hand" || E.name == "l_arm")
if(hand && equipped())
drop_item()
emote("custom v drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -284,7 +293,7 @@
else if(E.name == "r_hand" || E.name == "r_arm")
if(!hand && equipped())
drop_item()
emote("custom v drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -357,94 +366,6 @@
if((COLD_RESISTANCE in mutations) || (prob(1)))
heal_organ_damage(0,1)
if(mHallucination in mutations)
hallucination = 100
halloss = 0
if(mSmallsize in mutations)
if(!(pass_flags & PASSTABLE))
pass_flags |= PASSTABLE
else
if(pass_flags & PASSTABLE)
pass_flags &= ~PASSTABLE
// Make nanoregen heal youu, -3 all damage types
if((NANOREGEN in augmentations) || (mRegen in mutations))
var/healed = 0
var/hptoreg = 0
if(NANOREGEN in augmentations)
hptoreg += 3
if(mRegen in mutations)
hptoreg += 2
if(stat==UNCONSCIOUS) hptoreg/=2
if(stat==DEAD) hptoreg=0
for(var/i=0, i<hptoreg, i++)
var/list/damages = new/list()
if(getToxLoss())
damages+="tox"
if(getOxyLoss())
damages+="oxy"
if(getCloneLoss())
damages+="clone"
if(getBruteLoss())
damages+="brute"
if(getFireLoss())
damages+="burn"
if(halloss != 0)
damages+="hal"
if(damages.len)
switch(pick(damages))
if("tox")
adjustToxLoss(-1)
healed = 1
if("oxy")
adjustOxyLoss(-1)
healed = 1
if("clone")
adjustCloneLoss(-1)
healed = 1
if("brute")
heal_organ_damage(1,0)
healed = 1
if("burn")
heal_organ_damage(0,1)
healed = 1
if("hal")
if(halloss > 0)
halloss -= 1
if(halloss < 0)
halloss = 0
healed = 1
else
break
if(healed)
if(prob(5))
src << "\blue You feel your wounds mending..."
if(!(/mob/living/carbon/human/proc/morph in src.verbs))
if(mMorph in mutations)
src.verbs += /mob/living/carbon/human/proc/morph
else
if(!(mMorph in mutations))
src.verbs -= /mob/living/carbon/human/proc/morph
if(!(/mob/living/carbon/human/proc/remoteobserve in src.verbs))
if(mRemote in mutations)
src.verbs += /mob/living/carbon/human/proc/remoteobserve
else
if(!(mRemote in mutations))
src.verbs -= /mob/living/carbon/human/proc/remoteobserve
if(!(/mob/living/carbon/human/proc/remotesay in src.verbs))
if(mRemotetalk in mutations)
src.verbs += /mob/living/carbon/human/proc/remotesay
else
if(!(mRemotetalk in mutations))
src.verbs -= /mob/living/carbon/human/proc/remotesay
if ((HULK in mutations) && health <= 25)
mutations.Remove(HULK)
update_mutations() //update our mutation overlays
@@ -597,7 +518,7 @@
proc/handle_breath(datum/gas_mixture/breath)
if(nodamage || (REBREATHER in augmentations) || (mNobreath in mutations))
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0) || suiciding)
@@ -679,8 +600,10 @@
co2overloadtime = 0
if(Toxins_pp > safe_toxins_max) // Too much toxins
var/ratio = breath.toxins/safe_toxins_max
adjustToxLoss(min(ratio, MIN_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
var/ratio = (breath.toxins/safe_toxins_max) * 10
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
if(reagents)
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
toxins_alert = max(toxins_alert, 1)
else
toxins_alert = 0
@@ -755,50 +678,63 @@
//Place is colder than we are
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR)
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
else
//Place is hotter than we are
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
if(bodytemperature > 360.15)
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
//Body temperature is too hot.
fire_alert = max(fire_alert, 1)
switch(bodytemperature)
if(360 to 400)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(400 to 1000)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
if(1000 to INFINITY)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else if(bodytemperature < 260.15)
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
fire_alert = max(fire_alert, 1)
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
switch(bodytemperature)
if(200 to 260)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN)
apply_damage(COLD_DAMAGE_LEVEL_1, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
if(120 to 200)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN)
apply_damage(COLD_DAMAGE_LEVEL_2, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
if(-INFINITY to 120)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN)
apply_damage(COLD_DAMAGE_LEVEL_3, BURN, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
// Account for massive pressure differences. Done by Polymorph
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
var/pressure = environment.return_pressure()
if(pressure > HAZARD_HIGH_PRESSURE)
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
if(adjusted_pressure > HAZARD_HIGH_PRESSURE)
adjustBruteLoss( min( (adjusted_pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT , MAX_PRESSURE_DAMAGE) )
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
pressure_alert = 2
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
pressure_alert = 1
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
pressure_alert = 0
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure_alert = -1
else
if( !(COLD_RESISTANCE in mutations) )
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
pressure_alert = -2
else
pressure_alert = -1
return
/*
@@ -1029,6 +965,18 @@
heal_overall_damage(1,1)
adjustToxLoss(-1)
adjustOxyLoss(-1)
if(dna && dna.mutantrace == "shadow")
var/light_amount = 0
if(isturf(loc))
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = T.lighting_lumcount
else light_amount = 10
if(light_amount > 2) //if there's enough light, start dying
take_overall_damage(1,1)
else if (light_amount < 2) //heal in the dark
heal_overall_damage(1,1)
/* //The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(FAT in mutations)
@@ -1279,7 +1227,8 @@
damageoverlay.overlays += I
//Fire and Brute damage overlay (BSSR)
var/hurtdamage = src.getBruteLoss() + src.getFireLoss()
var/hurtdamage = src.getBruteLoss() + src.getFireLoss() + damageoverlaytemp
damageoverlaytemp = 0 // We do this so we can detect if someone hits us or not.
if(hurtdamage)
var/image/I
switch(hurtdamage)
@@ -1306,12 +1255,12 @@
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
if(dna)
switch(dna.mutantrace)
if("metroid")
if("lizard","slime")
see_in_dark = 3
see_invisible = SEE_INVISIBLE_LEVEL_ONE
if("lizard")
see_in_dark = 3
if("tajaran")
see_in_dark = 4
if("shadow")
see_in_dark = 8
else
see_in_dark = 2
@@ -1323,7 +1272,7 @@
if(seer)
var/obj/effect/rune/R = locate() in loc
if(R && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin)
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
see_invisible = SEE_INVISIBLE_OBSERVER
else
see_invisible = SEE_INVISIBLE_LIVING
@@ -1379,15 +1328,10 @@
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
else if(istype(glasses, /obj/item/clothing/glasses/hud))
var/obj/item/clothing/glasses/hud/health/O = glasses
if(istype(O, /obj/item/clothing/glasses/hud/health))
O.process_hud(src)
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
else if(istype(O, /obj/item/clothing/glasses/hud/security))
O.process_hud(src)
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
var/obj/item/clothing/glasses/hud/O = glasses
O.process_hud(src)
if(!druggy)
see_invisible = SEE_INVISIBLE_LIVING
else
see_invisible = SEE_INVISIBLE_LIVING
else
@@ -1416,17 +1360,7 @@
else nutrition_icon.icon_state = "nutrition4"
if(pressure)
if(istype(wear_suit, /obj/item/clothing/suit/space)||istype(wear_suit, /obj/item/clothing/suit/armor/captain))
pressure.icon_state = "pressure0"
else
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
switch(environment.return_pressure())
if(HAZARD_HIGH_PRESSURE to INFINITY) pressure.icon_state = "pressure2"
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE) pressure.icon_state = "pressure1"
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE) pressure.icon_state = "pressure0"
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE) pressure.icon_state = "pressure-1"
else pressure.icon_state = "pressure-2"
pressure.icon_state = "pressure[pressure_alert]"
if(pullin)
if(pulling) pullin.icon_state = "pull1"
@@ -1510,7 +1444,6 @@
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
if(!virus2)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2 && get_infection_chance())
@@ -1546,7 +1479,7 @@
del(M)
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
+73 -76
View File
@@ -1,6 +1,6 @@
/mob/living/carbon/human/say(var/message)
if (silent)
if(silent)
return
//Mimes dont speak! Changeling hivemind and emotes are allowed.
@@ -18,12 +18,12 @@
if (copytext(message, 1, 2) != "*")
return
if(src.dna)
/*if(src.dna.mutantrace == "lizard") //Soghun stutterss-s-ss-sss.
/*if(dna)
if(dna.mutantrace == "lizard")
if(copytext(message, 1, 2) != "*")
message = dd_replacetext(message, "s", stutter("ss"))
*/
if(src.dna.mutantrace == "metroid" && prob(5))
message = replacetext(message, "s", stutter("ss"))
if(dna.mutantrace == "slime" && prob(5))
if(copytext(message, 1, 2) != "*")
if(copytext(message, 1, 2) == ";")
message = ";"
@@ -32,11 +32,11 @@
message += "SKR"
var/imax = rand(5,20)
for(var/i = 0,i<imax,i++)
message += "E"
message += "E"*/
if(stat != DEAD)
for(var/datum/disease/pierrot_throat/D in viruses)
var/list/temp_message = dd_text2list(message, " ") //List each word in the message
var/list/temp_message = text2list(message, " ") //List each word in the message
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++) //Create a second list for excluding words down the line
pick_list += i
@@ -48,75 +48,58 @@
pick_list -= H //Make sure that you dont HONK the same word twice
message = dd_list2text(temp_message, " ")
if(istype(src.wear_mask, /obj/item/clothing/mask/luchador))
if(copytext(message, 1, 2) != "*")
message = dd_replacetext(message, "captain", "CAPITÁN")
message = dd_replacetext(message, "station", "ESTACIÓN")
message = dd_replacetext(message, "sir", "SEÑOR")
message = dd_replacetext(message, "the ", "el ")
message = dd_replacetext(message, "my ", "mi ")
message = dd_replacetext(message, "is ", "es ")
message = dd_replacetext(message, "it's", "es")
message = dd_replacetext(message, "friend", "amigo")
message = dd_replacetext(message, "buddy", "amigo")
message = dd_replacetext(message, "hello", "hola")
message = dd_replacetext(message, " hot", " caliente")
message = dd_replacetext(message, " very ", " muy ")
message = dd_replacetext(message, "sword", "espada")
message = dd_replacetext(message, "library", "biblioteca")
message = dd_replacetext(message, "traitor", "traidor")
message = dd_replacetext(message, "wizard", "mago")
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
if(prob(25))
message += " OLE!"
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
if(copytext(message, 1, 2) != "*")
var/list/temp_message = text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
for(var/i=1, i <= abs(temp_message.len/3), i++)
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = dd_list2text(temp_message, " ")
message = replacetext(message, "o", "¤")
message = replacetext(message, "p", "þ")
message = replacetext(message, "l", "£")
message = replacetext(message, "s", "§")
message = replacetext(message, "u", "µ")
message = replacetext(message, "b", "ß")
//Ninja mask obscures text and voice if set to do so.
//Would make it more global but it's sort of ninja specific.
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
else if(istype(wear_mask, /obj/item/clothing/mask/luchador))
if(copytext(message, 1, 2) != "*")
message = replacetext(message, "captain", "CAPITÁN")
message = replacetext(message, "station", "ESTACIÓN")
message = replacetext(message, "sir", "SEÑOR")
message = replacetext(message, "the ", "el ")
message = replacetext(message, "my ", "mi ")
message = replacetext(message, "is ", "es ")
message = replacetext(message, "it's", "es")
message = replacetext(message, "friend", "amigo")
message = replacetext(message, "buddy", "amigo")
message = replacetext(message, "hello", "hola")
message = replacetext(message, " hot", " caliente")
message = replacetext(message, " very ", " muy ")
message = replacetext(message, "sword", "espada")
message = replacetext(message, "library", "biblioteca")
message = replacetext(message, "traitor", "traidor")
message = replacetext(message, "wizard", "mago")
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
if(prob(25))
message += " OLE!"
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
if(hoers.voicechange)
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && (copytext(message, 1, 3) == ":g" || copytext(message, 1, 3) == ":G" || copytext(message, 1, 3) == ":ï"))))
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
if ((HULK in mutations) && health >= 25 && length(message))
if(copytext(message, 1, 2) != "*")
var/list/temp_message = dd_text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
for(var/i=1, i <= abs(temp_message.len/3), i++)
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = dd_list2text(temp_message, " ")
message = dd_replacetext(message, "o", "¤")
message = dd_replacetext(message, "p", "þ")
message = dd_replacetext(message, "l", "£")
message = dd_replacetext(message, "s", "§")
message = dd_replacetext(message, "u", "µ")
message = dd_replacetext(message, "b", "ß")
/*This text is hilarious but also absolutely retarded.
message = dd_replacetext(message, "l", "r")
message = dd_replacetext(message, "rr", "ru")
message = dd_replacetext(message, "v", "b")
message = dd_replacetext(message, "f", "hu")
message = dd_replacetext(message, "'t", "")
message = dd_replacetext(message, "t ", "to ")
message = dd_replacetext(message, " I ", " ai ")
message = dd_replacetext(message, "th", "z")
message = dd_replacetext(message, "ish", "isu")
message = dd_replacetext(message, "is", "izu")
message = dd_replacetext(message, "ziz", "zis")
message = dd_replacetext(message, "se", "su")
message = dd_replacetext(message, "br", "bur")
message = dd_replacetext(message, "ry", "ri")
message = dd_replacetext(message, "you", "yuu")
message = dd_replacetext(message, "ck", "cku")
message = dd_replacetext(message, "eu", "uu")
message = dd_replacetext(message, "ow", "au")
message = dd_replacetext(message, "are", "aa")
message = dd_replacetext(message, "ay", "ayu")
message = dd_replacetext(message, "ea", "ii")
message = dd_replacetext(message, "ch", "chi")
message = dd_replacetext(message, "than", "sen")
message = dd_replacetext(message, ".", "")
message = lowertext(message)
*/
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
if (src.slurring)
message = slur(message)
..(message)
@@ -132,7 +115,7 @@
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/carbon/metroid))
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
@@ -145,5 +128,19 @@
return name
if(mind && mind.changeling && mind.changeling.mimicing)
return mind.changeling.mimicing
if(GetSpecialVoice())
return GetSpecialVoice()
return real_name
/mob/living/carbon/human/proc/SetSpecialVoice(var/new_voice)
if(new_voice)
special_voice = new_voice
return
/mob/living/carbon/human/proc/UnsetSpecialVoice()
special_voice = ""
return
/mob/living/carbon/human/proc/GetSpecialVoice()
return special_voice
@@ -54,7 +54,7 @@ There are several things that need to be remembered:
All of these are named after the variable they update from. They are defined at the mob/ level like
update_clothing was, so you won't cause undefined proc runtimes with usr.update_inv_wear_id() if the usr is a
metroid etc. Instead, it'll just return without doing any work. So no harm in calling it for metroids and such.
slime etc. Instead, it'll just return without doing any work. So no harm in calling it for slimes and such.
> There are also these special cases:
@@ -133,7 +133,7 @@ Please contact me on #coderbus IRC. ~Carn x
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
update_hud() //TODO: remove the need for this
overlays = null
overlays.Cut()
if(lying) //can't be cloaked when lying. (for now)
icon = lying_icon
@@ -448,19 +448,18 @@ proc/get_damage_icon_part(damage_state, body_part)
//BS12 EDIT
if(dna)
switch(dna.mutantrace)
if("golem","metroid")
var/icon/I = new('icons/effects/genetics.dmi',"[dna.mutantrace][fat]_s")
overlays_standing[MUTANTRACE_LAYER] = image(I)
overlays_lying[MUTANTRACE_LAYER] = image(I.MakeLying())
// if("lizard", "tajaran", "skrell")
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[g]_s")
// if("plant")
// if(stat == DEAD) //TODO
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
// else
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
if("lizard","golem","slime","shadow","adamantine")
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
if("lizard","tajaran","skrell")
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s")
if("plant")
if(stat == DEAD) //TODO
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
else
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
else
overlays_lying[MUTANTRACE_LAYER] = null
overlays_standing[MUTANTRACE_LAYER] = null
@@ -667,13 +666,18 @@ proc/get_damage_icon_part(damage_state, body_part)
var/t_state
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
t_state = "armor"
else if( istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat) )
else if( istype(wear_suit, /obj/item/clothing/suit/storage/det_suit || /obj/item/clothing/suit/storage/labcoat) )
t_state = "coat"
else
t_state = "suit"
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
if(wear_suit.blood_DNA)
var/obj/item/clothing/suit/S = wear_suit
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
overlays_lying[SUIT_LAYER] = lying
overlays_standing[SUIT_LAYER] = standing
@@ -1,5 +1,9 @@
//Lallander was here
/mob/living/carbon/human/whisper(message as text)
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
return
message = trim(copytext(strip_html_simple(message), 1, MAX_MESSAGE_LEN))
if (!message || silent || miming)
@@ -8,7 +12,7 @@
log_whisper("[src.name]/[src.key] : [message]")
if (src.client)
if (src.client.muted & MUTE_IC)
if (src.client.prefs.muted & MUTE_IC)
src << "\red You cannot whisper (muted)."
return
@@ -38,7 +42,7 @@
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
if(copytext(message, 1, 2) != "*")
var/list/temp_message = dd_text2list(message, " ")
var/list/temp_message = text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
@@ -48,12 +52,12 @@
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = dd_list2text(temp_message, " ")
message = dd_replacetext(message, "o", "¤")
message = dd_replacetext(message, "p", "þ")
message = dd_replacetext(message, "l", "£")
message = dd_replacetext(message, "s", "§")
message = dd_replacetext(message, "u", "µ")
message = dd_replacetext(message, "b", "ß")
message = replacetext(message, "o", "¤")
message = replacetext(message, "p", "þ")
message = replacetext(message, "l", "£")
message = replacetext(message, "s", "§")
message = replacetext(message, "u", "µ")
message = replacetext(message, "b", "ß")
if (src.stuttering)
message = stutter(message)
@@ -1,12 +1,15 @@
/mob/living/carbon/metroid/death(gibbed)
/mob/living/carbon/slime/death(gibbed)
if(stat == DEAD) return
stat = DEAD
icon_state = "baby roro dead"
icon_state = "[colour] baby slime dead"
if(!gibbed)
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
ghostize()
explosion(loc, -1,-1,3,12)
var/mob/living/carbon/slime/M1 = new primarytype(loc)
M1.rabid = 1
var/mob/living/carbon/slime/M2 = new primarytype(loc)
M2.rabid = 1
if(src) del(src)
else
for(var/mob/O in viewers(src, null))
@@ -1,4 +1,4 @@
/mob/living/carbon/metroid/emote(var/act)
/mob/living/carbon/slime/emote(var/act)
if (findtext(act, "-", 1, null))
@@ -6,6 +6,9 @@
//param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/m_type = 1
var/message
@@ -13,11 +16,6 @@
if("moan")
message = "<B>The [src.name]</B> moans."
m_type = 2
// if("roar")
// if (!muzzled)
// message = "<B>The [src.name]</B> roars." Commenting out since larva shouldn't roar /N
// m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
m_type = 2
@@ -33,17 +31,11 @@
if("light")
message = "<B>The [src.name]</B> lights up for a bit, then stops."
m_type = 1
if("click")
message = "<B>The [src.name]</B> makes a clicking noise!"
if("jiggle")
message = "<B>The [src.name]</B> jiggles!"
m_type = 1
if("chatter")
message = "<B>The [src.name]</B> makes a noisy chattering sound!"
m_type = 1
if("growl")
message = "<B>The [src.name]</B> growls!"
m_type = 1
if("shriek")
message = "<B>The [src.name]</B> makes a high-pitched shriek!"
if("bounce")
message = "<B>The [src.name]</B> bounces in place."
m_type = 1
else
src << text("Invalid Emote: []", act)
@@ -1,4 +1,4 @@
/mob/living/carbon/metroid/examine()
/mob/living/carbon/slime/examine()
set src in oview()
if(!usr || !src) return
@@ -1,4 +1,4 @@
/mob/living/carbon/metroid/proc/regular_hud_updates()
/mob/living/carbon/slime/proc/regular_hud_updates()
return
+414 -374
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/metroid/Life()
/mob/living/carbon/slime/Life()
set invisibility = 0
set background = 1
@@ -11,9 +11,6 @@
//Chemicals in the body
handle_chemicals_in_body()
//Disease Check
//handle_virus_updates() There is no disease that affects metroids
handle_nutrition()
handle_targets()
@@ -44,471 +41,514 @@
/mob/living/carbon/metroid
/mob/living/carbon/slime
var/AIproc = 0 // determines if the AI loop is activated
var/Atkcool = 0 // attack cooldown
var/Tempstun = 0 // temporary temperature stuns
var/Discipline = 0 // if a metroid has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/SStun = 0 // stun variable
proc
AIprocess() // the master AI process
/mob/living/carbon/slime/proc/AIprocess() // the master AI process
if(AIproc || stat == DEAD || client) return
//world << "AI proc started."
if(AIproc || stat == DEAD || client) return
var/hungry = 0
var/starving = 0
if(istype(src, /mob/living/carbon/metroid/adult))
switch(nutrition)
if(400 to 1100) hungry = 1
if(0 to 399)
starving = 1
else
switch(nutrition)
if(150 to 900) hungry = 1
if(0 to 149) starving = 1
AIproc = 1
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
if(Victim) // can't eat AND have this little process at the same time
break
var/hungry = 0
var/starving = 0
if(istype(src, /mob/living/carbon/slime/adult))
switch(nutrition)
if(400 to 1100) hungry = 1
if(0 to 399)
starving = 1
else
switch(nutrition)
if(150 to 900) hungry = 1
if(0 to 149) starving = 1
AIproc = 1
//world << "AIproc [AIproc] && stat != 2 [stat] && (attacked > 0 [attacked] || starving [starving] || hungry [hungry] || rabid [rabid] || Victim [Victim] || Target [Target]"
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
if(Victim) // can't eat AND have this little process at the same time
//world << "break 1"
break
if(!Target || client)
break
if(!Target || client)
//world << "break 2"
break
if(Target.health <= -70 || Target.stat == 2)
if(Target.health <= -70 || Target.stat == 2)
Target = null
AIproc = 0
//world << "break 3"
break
if(Target)
//world << "[Target] Target Found"
for(var/mob/living/carbon/slime/M in view(1,Target))
if(M.Victim == Target)
Target = null
AIproc = 0
//world << "break 4"
break
if(!AIproc)
//world << "break 5"
break
if(Target in view(1,src))
if(istype(Target, /mob/living/silicon))
if(!Atkcool)
spawn()
Atkcool = 1
sleep(15)
Atkcool = 0
if(get_obstacle_ok(Target))
Target.attack_slime(src)
//world << "retrun 1"
return
if(!Target.lying && prob(80))
if(Target.client && Target.health >= 20)
if(!Atkcool)
spawn()
Atkcool = 1
sleep(25)
Atkcool = 0
if(get_obstacle_ok(Target))
Target.attack_slime(src)
if(prob(30))
step_to(src, Target)
else
if(!Atkcool && get_obstacle_ok(Target))
Feedon(Target)
else
if(!Atkcool && get_obstacle_ok(Target))
Feedon(Target)
else
if(Target in view(7, src))
if(get_obstacle_ok(Target))
step_to(src, Target)
else
Target = null
AIproc = 0
//world << "break 6"
break
if(Target)
for(var/mob/living/carbon/metroid/M in view(1,Target))
if(M.Victim == Target)
Target = null
AIproc = 0
break
if(!AIproc)
break
var/sleeptime = movement_delay()
if(sleeptime <= 0) sleeptime = 1
if(Target in view(1,src))
sleep(sleeptime + 2) // this is about as fast as a player slime can go
if(istype(Target, /mob/living/silicon))
if(!Atkcool)
spawn()
Atkcool = 1
sleep(15)
Atkcool = 0
AIproc = 0
//world << "AI proc ended."
if(get_obstacle_ok(Target))
Target.attack_metroid(src)
return
if(!Target.lying && prob(80))
/mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
adjustToxLoss(rand(10,20))
return
if(Target.client && Target.health >= 20)
if(!Atkcool)
spawn()
Atkcool = 1
sleep(25)
Atkcool = 0
//var/environment_heat_capacity = environment.heat_capacity()
var/loc_temp = T0C
if(istype(get_turf(src), /turf/space))
//environment_heat_capacity = loc:heat_capacity
var/turf/heat_turf = get_turf(src)
loc_temp = heat_turf.temperature
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
loc_temp = loc:air_contents.temperature
else
loc_temp = environment.temperature
if(get_obstacle_ok(Target))
Target.attack_metroid(src)
/*
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
transfer_coefficient = 1
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
transfer_coefficient *= wear_mask.heat_transfer_coefficient
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
*/
if(prob(30))
step_to(src, Target)
if(loc_temp < 310.15) // a cold place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
else // a hot place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
else
if(!Atkcool && get_obstacle_ok(Target))
Feedon(Target)
/*
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
else
if(!Atkcool && get_obstacle_ok(Target))
Feedon(Target)
*/
//Account for massive pressure differences
else
if(Target in view(7, src))
if(get_obstacle_ok(Target))
step_to(src, Target)
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
if(bodytemperature <= (T0C - 40)) // stun temperature
Tempstun = 1
else
Target = null
AIproc = 0
break
var/sleeptime = movement_delay()
if(sleeptime <= 0) sleeptime = 1
sleep(sleeptime + 2) // this is about as fast as a player Metroid can go
AIproc = 0
handle_environment(datum/gas_mixture/environment)
if(!environment)
adjustFireLoss(rand(10,20))
return
//var/environment_heat_capacity = environment.heat_capacity()
var/loc_temp = T0C
if(istype(get_turf(src), /turf/space))
//environment_heat_capacity = loc:heat_capacity
var/turf/heat_turf = get_turf(src)
loc_temp = heat_turf.temperature
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
loc_temp = loc:air_contents.temperature
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
adjustToxLoss(200)
else
loc_temp = environment.temperature
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
/*
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
else
Tempstun = 0
transfer_coefficient = 1
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
transfer_coefficient *= wear_mask.heat_transfer_coefficient
updatehealth()
// handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
*/
return //TODO: DEFERRED
if(loc_temp < 310.15) // a cold place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
else // a hot place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
/mob/living/carbon/slime/proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
var/difference = abs(current-loc_temp) //get difference
var/increments// = difference/10 //find how many increments apart they are
if(difference > 50)
increments = difference/5
else
increments = difference/10
var/change = increments*boost // Get the amount to change by (x per increment)
var/temp_change
if(current < loc_temp)
temperature = min(loc_temp, temperature+change)
else if(current > loc_temp)
temperature = max(loc_temp, temperature-change)
temp_change = (temperature - current)
return temp_change
/*
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
/mob/living/carbon/slime/proc/handle_chemicals_in_body()
*/
//Account for massive pressure differences
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
if(bodytemperature <= (T0C - 40)) // stun temperature
Tempstun = 1
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
adjustFireLoss(200)
else
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
else
Tempstun = 0
updatehealth()
return //TODO: DEFERRED
if(reagents) reagents.metabolize(src)
adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
var/difference = abs(current-loc_temp) //get difference
var/increments// = difference/10 //find how many increments apart they are
if(difference > 50)
increments = difference/5
else
increments = difference/10
var/change = increments*boost // Get the amount to change by (x per increment)
var/temp_change
if(current < loc_temp)
temperature = min(loc_temp, temperature+change)
else if(current > loc_temp)
temperature = max(loc_temp, temperature-change)
temp_change = (temperature - current)
return temp_change
src.updatehealth()
handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
return //TODO: DEFERRED
src.updatehealth()
/mob/living/carbon/slime/proc/handle_regular_status_updates()
return //TODO: DEFERRED
handle_regular_status_updates()
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(istype(src, /mob/living/carbon/slime/adult))
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(health < config.health_threshold_dead && stat != 2)
death()
return
if(health < config.health_threshold_dead && stat != 2)
death()
return
else if(src.health < config.health_threshold_crit)
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
else if(src.health < config.health_threshold_crit)
// if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10)
if(src.stat != DEAD) src.stat = UNCONSCIOUS
if(src.stat != DEAD) src.stat = UNCONSCIOUS
if(prob(30))
adjustOxyLoss(-1)
adjustToxLoss(-1)
adjustFireLoss(-1)
adjustCloneLoss(-1)
adjustBruteLoss(-1)
if(prob(30))
adjustOxyLoss(-1)
adjustToxLoss(-1)
adjustFireLoss(-1)
adjustCloneLoss(-1)
adjustBruteLoss(-1)
if (src.stat == DEAD)
if (src.stat == DEAD)
src.lying = 1
src.blinded = 1
src.lying = 1
src.blinded = 1
else
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
if (src.stunned > 0)
AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
AdjustWeakened(-1)
src.lying = 0
src.stat = 0
if (src.paralysis > 0)
AdjustParalysis(-1)
src.blinded = 0
src.lying = 0
src.stat = 0
else
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
if (src.stunned > 0)
AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
AdjustWeakened(-1)
src.lying = 0
src.stat = 0
if (src.paralysis > 0)
AdjustParalysis(-1)
src.blinded = 0
src.lying = 0
src.stat = 0
else
src.lying = 0
src.stat = 0
else
src.lying = 0
src.stat = 0
if (src.stuttering) src.stuttering = 0
if (src.stuttering) src.stuttering = 0
if (src.eye_blind)
src.eye_blind = 0
src.blinded = 1
if (src.eye_blind)
src.eye_blind = 0
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf = 0
if (src.ear_damage < 25)
src.ear_damage = 0
if (src.ear_deaf > 0) src.ear_deaf = 0
if (src.ear_damage < 25)
src.ear_damage = 0
src.density = !( src.lying )
src.density = !( src.lying )
if (src.sdisabilities & BLIND)
src.blinded = 1
if (src.sdisabilities & DEAF)
src.ear_deaf = 1
if (src.sdisabilities & BLIND)
src.blinded = 1
if (src.sdisabilities & DEAF)
src.ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry = 0
if (src.eye_blurry > 0)
src.eye_blurry = 0
if (src.druggy > 0)
src.druggy = 0
if (src.druggy > 0)
src.druggy = 0
return 1
return 1
handle_nutrition()
/mob/living/carbon/slime/proc/handle_nutrition()
if(prob(20))
if(istype(src, /mob/living/carbon/metroid/adult)) nutrition-=rand(4,6)
else nutrition-=rand(2,3)
if(prob(20))
if(istype(src, /mob/living/carbon/slime/adult)) nutrition-=rand(4,6)
else nutrition-=rand(2,3)
if(nutrition <= 0)
nutrition = 0
if(prob(75))
if(nutrition <= 0)
nutrition = 0
if(prob(75))
adjustToxLoss(rand(0,5))
adjustToxLoss(rand(0,5))
else
if(istype(src, /mob/living/carbon/metroid/adult))
if(nutrition >= 1000)
if(prob(40)) amount_grown++
else
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 && 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.powerlevel = max(0, powerlevel-1)
A.Friends = Friends
A.tame = tame
A.rabid = rabid
del(src)
handle_virus_updates()
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
return
handle_targets()
if(Tempstun)
if(!Victim) // not while they're eating!
canmove = 0
else
canmove = 1
if(attacked > 50) attacked = 50
if(attacked > 0)
if(prob(85))
attacked--
if(Discipline > 0)
if(Discipline >= 5 && rabid)
if(prob(60)) rabid = 0
if(prob(10))
Discipline--
else
if(istype(src, /mob/living/carbon/slime/adult))
if(nutrition >= 1000)
if(prob(40)) amount_grown++
else
if(nutrition >= 800)
if(prob(40)) amount_grown++
if(amount_grown >= 10 && !Victim && !Target)
if(istype(src, /mob/living/carbon/slime/adult))
if(!client)
for(var/i=1,i<=4,i++)
if(prob(70))
var/mob/living/carbon/slime/M = new primarytype(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
else
var/mutations = pick("one","two","three","four")
switch(mutations)
if("one")
var/mob/living/carbon/slime/M = new mutationone(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if("two")
var/mob/living/carbon/slime/M = new mutationtwo(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if("three")
var/mob/living/carbon/slime/M = new mutationthree(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if("four")
var/mob/living/carbon/slime/M = new mutationfour(loc)
M.powerlevel = round(powerlevel/4)
M.Friends = Friends
M.tame = tame
M.rabid = rabid
M.Discipline = Discipline
if(i != 1) step_away(M,src)
if(!canmove) return
del(src)
// DO AI STUFF HERE
if(Target)
if(attacked <= 0)
Target = null
if(Victim) return // if it's eating someone already, continue eating!
else
if(!client)
var/mob/living/carbon/slime/adult/A = new adulttype(src.loc)
A.nutrition = nutrition
// A.nutrition += 100
A.powerlevel = max(0, powerlevel-1)
A.Friends = Friends
A.tame = tame
A.rabid = rabid
del(src)
if(prob(5))
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
/mob/living/carbon/slime/proc/handle_targets()
if(Tempstun)
if(!Victim) // not while they're eating!
canmove = 0
else
canmove = 1
if(AIproc && SStun) return
if(attacked > 50) attacked = 50
if(attacked > 0)
if(prob(85))
attacked--
if(Discipline > 0)
if(Discipline >= 5 && rabid)
if(prob(60)) rabid = 0
if(prob(10))
Discipline--
var/hungry = 0 // determines if the metroid is hungry
var/starving = 0 // determines if the metroid is starving-hungry
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
switch(nutrition)
if(601 to 900)
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
if(301 to 600) hungry = 1
if(0 to 300)
starving = 1
if(!client)
else
switch(nutrition) // 1000 max nutrition
if(501 to 700)
if(prob(25)) hungry = 1
if(201 to 500) hungry = 1
if(0 to 200) starving = 1
if(!canmove) return
// DO AI STUFF HERE
if(Target)
if(attacked <= 0)
Target = null
if(Victim) return // if it's eating someone already, continue eating!
if(starving && !client) // if a metroid is starving, it starts losing its friends
if(Friends.len > 0 && prob(1))
var/mob/nofriend = pick(Friends)
Friends -= nofriend
if(prob(1))
emote(pick("bounce","sway","light","vibrate","jiggle"))
if(!Target)
var/list/targets = list()
if(AIproc && SStun) return
if(hungry || starving) //Only add to the list if we need to
for(var/mob/living/L in view(7,src))
//Ignore other metroids, dead mobs and simple_animals
if(ismetroid(L) || L.stat == DEAD || isanimal(L))
var/hungry = 0 // determines if the slime is hungry
var/starving = 0 // determines if the slime is starving-hungry
if(istype(src, /mob/living/carbon/slime/adult)) // 1200 max nutrition
switch(nutrition)
if(601 to 900)
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
if(301 to 600) hungry = 1
if(0 to 300)
starving = 1
else
switch(nutrition) // 1000 max nutrition
if(501 to 700)
if(prob(25)) hungry = 1
if(201 to 500) hungry = 1
if(0 to 200) starving = 1
if(starving && !client) // if a slime is starving, it starts losing its friends
if(Friends.len > 0 && prob(1))
var/mob/nofriend = pick(Friends)
Friends -= nofriend
if(!Target)
var/list/targets = list()
if(hungry || starving) //Only add to the list if we need to
for(var/mob/living/L in view(7,src))
//Ignore other slimes, dead mobs and simple_animals
if(isslime(L) || L.stat != CONSCIOUS || isanimal(L))
continue
if(issilicon(L))
if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things
if(!starving && Discipline > 0)
continue
if(issilicon(L))
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
if(!starving && Discipline > 0)
continue
if(tame) //Tame slimes ignore electronic life
continue
if(tame) //Tame metroids ignore electronic life
targets += L //Possible target found!
else if(iscarbon(L))
if(istype(L, /mob/living/carbon/human)) //Ignore slime(wo)men
var/mob/living/carbon/human/H = L
if(H.dna)
if(H.dna.mutantrace == "slime")
continue
targets += L //Possible target found!
if(!istype(src, /mob/living/carbon/slime/adult)) //Non-starving diciplined adult slimes wont eat things
if(!starving && Discipline > 0)
continue
else if(iscarbon(L))
if(L in Friends) //No eating friends!
continue
if(istype(L, /mob/living/carbon/human)) //Ignore metroid(wo)men
var/mob/living/carbon/human/H = L
if(H.dna)
if(H.dna.mutantrace == "metroid")
continue
if(tame && ishuman(L)) //Tame slimes dont eat people.
continue
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids wont eat things
if(!starving && Discipline > 0)
continue
if(!L.canmove) //Only one slime can latch on at a time.
if(L in Friends) //No eating friends!
continue
var/notarget = 0
for(var/mob/living/carbon/slime/M in view(1,L))
if(M.Victim == L)
notarget = 1
if(notarget)
continue
if(tame && ishuman(L)) //Tame metroids dont eat people.
continue
if(!L.canmove) //Only one metroid can latch on at a time.
var/notarget = 0
for(var/mob/living/carbon/metroid/M in view(1,L))
if(M.Victim == L)
notarget = 1
if(notarget)
continue
targets += L //Possible target found!
targets += L //Possible target found!
if((hungry || starving) && targets.len > 0)
if(!istype(src, /mob/living/carbon/metroid/adult))
if(!starving)
for(var/mob/living/carbon/C in targets)
if(!Discipline && prob(5))
if(ishuman(C))
Target = C
break
if(isalienadult(C))
Target = C
break
if(islarva(C))
Target = C
break
if(ismonkey(C))
Target = C
break
else
Target = targets[1]
else
Target = targets[1] // closest target
if(targets.len > 0)
if(attacked > 0 || rabid)
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
if(!Target)
if(hungry || starving)
if(canmove && isturf(loc) && prob(50))
step(src, pick(cardinal))
if((hungry || starving) && targets.len > 0)
if(!istype(src, /mob/living/carbon/slime/adult))
if(!starving)
for(var/mob/living/carbon/C in targets)
if(!Discipline && prob(5))
if(ishuman(C))
Target = C
break
if(isalienadult(C))
Target = C
break
if(islarva(C))
Target = C
break
if(ismonkey(C))
Target = C
break
else
if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal))
Target = targets[1]
else
if(!AIproc)
spawn() AIprocess()
Target = targets[1] // closest target
if(targets.len > 0)
if(attacked > 0 || rabid)
Target = targets[1] //closest mob probably attacked it, so override Target and attack the nearest!
if(!Target)
if(hungry || starving)
if(canmove && isturf(loc) && prob(50))
step(src, pick(cardinal))
else
if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal))
else
if(!AIproc)
spawn() AIprocess()
@@ -1,4 +1,4 @@
/mob/living/carbon/metroid/Login()
/mob/living/carbon/slime/Login()
..()
update_hud()
return
+455 -178
View File
@@ -1,7 +1,7 @@
/mob/living/carbon/metroid
name = "baby roro"
icon = 'icons/mob/mob.dmi'
icon_state = "baby roro"
/mob/living/carbon/slime
name = "baby slime"
icon = 'icons/mob/slimes.dmi'
icon_state = "grey baby slime"
pass_flags = PASSTABLE
voice_message = "skree!"
say_message = "hums"
@@ -16,34 +16,46 @@
nutrition = 700 // 1000 = max
see_in_dark = 8
update_slimes = 0
// canstun and canweaken don't affect metroids because they ignore stun and weakened variables
// canstun and canweaken don't affect slimes because they ignore stun and weakened variables
// for the sake of cleanliness, though, here they are.
status_flags = CANPARALYSE
status_flags = CANPARALYSE|CANPUSH
var/cores = 3 // the number of /obj/item/metroid_core's the metroid has left inside
var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside
var/powerlevel = 0 // 1-10 controls how much electricity they are generating
var/amount_grown = 0 // controls how long the metroid has been overfed, if 10, grows into an adult
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows into an adult
// if adult: if 10: reproduces
var/mob/living/Victim = null // the person the metroid is currently feeding on
var/mob/living/Target = null // AI variable - tells the Metroid to hunt this down
var/mob/living/Victim = null // the person the slime is currently feeding on
var/mob/living/Target = null // AI variable - tells the slime to hunt this down
var/attacked = 0 // determines if it's been attacked recently. Can be any number, is a cooloff-ish variable
var/tame = 0 // if set to 1, the Metroid will not eat humans ever, or attack them
var/rabid = 0 // if set to 1, the Metroid will attack and eat anything it comes in contact with
var/tame = 0 // if set to 1, the slime will not eat humans ever, or attack them
var/rabid = 0 // if set to 1, the slime will attack and eat anything it comes in contact with
var/list/Friends = list() // A list of potential friends
var/list/FriendsWeight = list() // A list containing values respective to Friends. This determines how many times a Metroid "likes" something. If the Metroid likes it more than 2 times, it becomes a friend
var/list/FriendsWeight = list() // A list containing values respective to Friends. This determines how many times a slime "likes" something. If the slime likes it more than 2 times, it becomes a friend
// Metroids pass on genetic data, so all their offspring have the same "Friends",
// slimes pass on genetic data, so all their offspring have the same "Friends",
/mob/living/carbon/metroid/adult
name = "adult roro"
icon = 'icons/mob/mob.dmi'
icon_state = "adult roro"
///////////TIME FOR SUBSPECIES
var/colour = "grey"
var/primarytype = /mob/living/carbon/slime
var/mutationone = /mob/living/carbon/slime/orange
var/mutationtwo = /mob/living/carbon/slime/metal
var/mutationthree = /mob/living/carbon/slime/blue
var/mutationfour = /mob/living/carbon/slime/purple
var/adulttype = /mob/living/carbon/slime/adult
var/coretype = /obj/item/slime_extract/grey
/mob/living/carbon/slime/adult
name = "adult slime"
icon = 'icons/mob/slimes.dmi'
icon_state = "grey adult slime"
health = 200
gender = NEUTER
@@ -52,25 +64,25 @@
nutrition = 800 // 1200 = max
/mob/living/carbon/metroid/New()
/mob/living/carbon/slime/New()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
if(name == "baby roro")
name = text("baby roro ([rand(1, 1000)])")
if(name == "baby slime")
name = text("[colour] baby slime ([rand(1, 1000)])")
else
name = text("adult roro ([rand(1,1000)])")
name = text("[colour] adult slime ([rand(1,1000)])")
real_name = name
spawn (1)
regenerate_icons()
src << "\blue Your icons have been generated!"
..()
/mob/living/carbon/metroid/adult/New()
verbs.Remove(/mob/living/carbon/metroid/verb/ventcrawl)
/mob/living/carbon/slime/adult/New()
//verbs.Remove(/mob/living/carbon/slime/verb/ventcrawl)
..()
/mob/living/carbon/metroid/movement_delay()
/mob/living/carbon/slime/movement_delay()
var/tally = 0
var/health_deficiency = (100 - health)
@@ -80,22 +92,22 @@
tally += (283.222 - bodytemperature) / 10 * 1.75
if(reagents)
if(reagents.has_reagent("hyperzine")) // hyperzine slows Metroids down
if(reagents.has_reagent("hyperzine")) // hyperzine slows slimes down
tally *= 2 // moves twice as slow
if(reagents.has_reagent("frostoil")) // frostoil also makes them move VEEERRYYYYY slow
tally *= 5
if(health <= 0) // if damaged, the metroid moves twice as slow
if(health <= 0) // if damaged, the slime moves twice as slow
tally *= 2
if (bodytemperature >= 330.23) // 135 F
return -1 // Metroids become supercharged at high temperatures
return -1 // slimes become supercharged at high temperatures
return tally+config.metroid_delay
return tally+config.slime_delay
/mob/living/carbon/metroid/Bump(atom/movable/AM as mob|obj, yes)
/mob/living/carbon/slime/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
@@ -115,9 +127,9 @@
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
if(nutrition <= 600 && !Atkcool)
AM.attack_metroid(src)
AM.attack_slime(src)
spawn()
Atkcool = 1
sleep(15)
@@ -125,7 +137,7 @@
else
if(nutrition <= 500 && !Atkcool)
if(prob(5))
AM.attack_metroid(src)
AM.attack_slime(src)
spawn()
Atkcool = 1
sleep(15)
@@ -134,7 +146,7 @@
if(ismob(AM))
var/mob/tmob = AM
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
if(istype(tmob, /mob/living/carbon/human))
if(prob(90))
now_pushing = 0
@@ -162,22 +174,22 @@
return
return
/mob/living/carbon/metroid/Process_Spacemove()
/mob/living/carbon/slime/Process_Spacemove()
return 2
/mob/living/carbon/metroid/Stat()
/mob/living/carbon/slime/Stat()
..()
statpanel("Status")
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
stat(null, "Health: [round((health / 200) * 100)]%")
else
stat(null, "Health: [round((health / 150) * 100)]%")
if (client.statpanel == "Status")
if(istype(src,/mob/living/carbon/metroid/adult))
if(istype(src,/mob/living/carbon/slime/adult))
stat(null, "Nutrition: [nutrition]/1200")
if(amount_grown >= 10)
stat(null, "You can reproduce!")
@@ -189,17 +201,28 @@
stat(null,"Power Level: [powerlevel]")
/mob/living/carbon/metroid/bullet_act(var/obj/item/projectile/Proj)
/mob/living/carbon/slime/adjustFireLoss(amount)
..(-abs(amount)) // Heals them
return
/mob/living/carbon/slime/bullet_act(var/obj/item/projectile/Proj)
attacked += 10
..(Proj)
return 0
/mob/living/carbon/metroid/emp_act(severity)
/mob/living/carbon/slime/emp_act(severity)
powerlevel = 0 // oh no, the power!
..()
/mob/living/carbon/metroid/ex_act(severity)
/mob/living/carbon/slime/ex_act(severity)
if (stat == 2 && client)
return
else if (stat == 2 && !client)
del(src)
return
var/b_loss = null
var/f_loss = null
@@ -223,7 +246,7 @@
updatehealth()
/mob/living/carbon/metroid/blob_act()
/mob/living/carbon/slime/blob_act()
if (stat == 2)
return
var/shielded = 0
@@ -245,14 +268,14 @@
return
/mob/living/carbon/metroid/u_equip(obj/item/W as obj)
/mob/living/carbon/slime/u_equip(obj/item/W as obj)
return
/mob/living/carbon/metroid/attack_ui(slot)
/mob/living/carbon/slime/attack_ui(slot)
return
/mob/living/carbon/metroid/meteorhit(O as obj)
/mob/living/carbon/slime/meteorhit(O as obj)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
@@ -264,69 +287,7 @@
return
/mob/living/carbon/metroid/Move(a, b, flag)
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
else
if(Debug)
diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
stop_pulling()
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
return
/mob/living/carbon/metroid/attack_metroid(mob/living/carbon/metroid/M as mob)
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -337,12 +298,12 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has bit []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] has glomped []!</B>", src), 1)
var/damage = rand(1, 3)
attacked += 5
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
damage = rand(1, 6)
else
damage = rand(1, 3)
@@ -355,7 +316,7 @@
return
/mob/living/carbon/metroid/attack_animal(mob/living/simple_animal/M as mob)
/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
else
@@ -369,7 +330,7 @@
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/metroid/attack_paw(mob/living/carbon/monkey/M as mob)
/mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob)
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
if (!ticker)
@@ -390,16 +351,16 @@
return
if (health > 0)
attacked += 10
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
//playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
O.show_message(text("\red <B>[M.name] has attacked [src]!</B>"), 1)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
/mob/living/carbon/metroid/attack_hand(mob/living/carbon/human/M as mob)
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -455,7 +416,7 @@
if(prob(80) && !client)
Discipline++
if(!istype(src, /mob/living/carbon/metroid/adult))
if(!istype(src, /mob/living/carbon/slime/adult))
if(Discipline == 1)
attacked = 0
@@ -511,21 +472,12 @@
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
else
if(ELECTRICHANDS in M.augmentations)
var/gendertxt = "their"
if(M.gender == MALE)
gendertxt = "his"
if(M.gender == FEMALE)
gendertxt = "her"
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
return
var/damage = rand(1, 9)
attacked += 10
if (prob(90))
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
if (HULK in M.mutations)
damage += 5
if(Victim)
Victim = null
@@ -555,7 +507,7 @@
/mob/living/carbon/metroid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -580,7 +532,7 @@
damage = rand(20, 40)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed [name]!</B>", M), 1)
O.show_message(text("\red <B>[] has attacked [name]!</B>", M), 1)
else
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -624,7 +576,7 @@
anchored = 0
if(prob(80) && !client)
Discipline++
if(!istype(src, /mob/living/carbon/metroid))
if(!istype(src, /mob/living/carbon/slime))
if(Discipline == 1)
attacked = 0
@@ -649,17 +601,17 @@
return
/mob/living/carbon/metroid/restrained()
/mob/living/carbon/slime/restrained()
return 0
mob/living/carbon/metroid/var/co2overloadtime = null
mob/living/carbon/metroid/var/temperature_resistance = T0C+75
mob/living/carbon/slime/var/co2overloadtime = null
mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/metroid/show_inv(mob/user as mob)
/mob/living/carbon/slime/show_inv(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"
<B><HR><FONT size=3>[name]</FONT></B>
<BR><HR><BR>
@@ -669,22 +621,22 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
onclose(user, "mob[name]")
return
/mob/living/carbon/metroid/updatehealth()
if (nodamage == 0)
// metroids can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
if(istype(src, /mob/living/carbon/metroid/adult))
/mob/living/carbon/slime/updatehealth()
if(status_flags & GODMODE)
if(istype(src, /mob/living/carbon/slime/adult))
health = 200
else
health = 150
stat = 0
stat = CONSCIOUS
else
// slimes can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/slime/adult))
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
/mob/living/carbon/metroid/proc/get_obstacle_ok(atom/A)
/mob/living/carbon/slime/proc/get_obstacle_ok(atom/A)
var/direct = get_dir(src, A)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
var/ok = 0
@@ -766,12 +718,328 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
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"
/obj/item/slime_extract
name = "slime extract"
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi'
icon_state = "grey slime extract"
flags = TABLEPASS
force = 1.0
w_class = 1.0
throwforce = 1.0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
var/Uses = 1 // uses before it goes inert
/obj/item/slime_extract/New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
/obj/item/slime_extract/grey
name = "grey slime extract"
icon_state = "grey slime extract"
/obj/item/slime_extract/gold
name = "gold slime extract"
icon_state = "gold slime extract"
/obj/item/slime_extract/silver
name = "silver slime extract"
icon_state = "silver slime extract"
/obj/item/slime_extract/metal
name = "metal slime extract"
icon_state = "metal slime extract"
/obj/item/slime_extract/purple
name = "purple slime extract"
icon_state = "purple slime extract"
/obj/item/slime_extract/darkpurple
name = "dark purple slime extract"
icon_state = "dark purple slime extract"
/obj/item/slime_extract/orange
name = "orange slime extract"
icon_state = "orange slime extract"
/obj/item/slime_extract/yellow
name = "yellow slime extract"
icon_state = "yellow slime extract"
/obj/item/slime_extract/red
name = "red slime extract"
icon_state = "red slime extract"
/obj/item/slime_extract/blue
name = "blue slime extract"
icon_state = "blue slime extract"
/obj/item/slime_extract/darkblue
name = "dark blue slime extract"
icon_state = "dark blue slime extract"
/obj/item/slime_extract/pink
name = "pink slime extract"
icon_state = "pink slime extract"
/obj/item/slime_extract/green
name = "green slime extract"
icon_state = "green slime extract"
/obj/item/slime_extract/lightpink
name = "light pink slime extract"
icon_state = "light pink slime extract"
/obj/item/slime_extract/black
name = "black slime extract"
icon_state = "black slime extract"
/obj/item/slime_extract/oil
name = "oil slime extract"
icon_state = "oil slime extract"
/obj/item/slime_extract/adamantine
name = "adamantine slime extract"
icon_state = "adamantine slime extract"
////Pet Slime Creation///
/obj/item/weapon/slimepotion
name = "docility potion"
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
user << "\red The potion only works on baby slimes!"
return ..()
if(istype(M, /mob/living/carbon/slime/adult)) //Can't tame adults
user << "\red Only baby slimes can be tamed!"
return..()
if(M.stat)
user << "\red The slime is dead!"
return..()
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
pet.icon_state = "[M.colour] baby slime"
pet.icon_living = "[M.colour] baby slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
del (M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
del (src)
/obj/item/weapon/slimepotion2
name = "advanced docility potion"
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
attack(mob/living/carbon/slime/adult/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/adult))//If target is not a slime.
user << "\red The potion only works on adult slimes!"
return ..()
if(M.stat)
user << "\red The slime is dead!"
return..()
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
del (M)
var/newname = copytext(sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text),1,MAX_NAME_LEN)
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
del (src)
/obj/item/weapon/slimesteroid
name = "slime steroid"
desc = "A potent chemical mix that will cause a slime to generate more extract."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
user << "\red The steroid only works on baby slimes!"
return ..()
if(istype(M, /mob/living/carbon/slime/adult)) //Can't tame adults
user << "\red Only baby slimes can use the steroid!"
return..()
if(M.stat)
user << "\red The slime is dead!"
return..()
if(M.cores == 3)
user <<"\red The slime already has the maximum amount of extract!"
return..()
user <<"You feed the slime the steroid. It now has triple the amount of extract."
M.cores = 3
del (src)
////////Adamantine Golem stuff I dunno where else to put it
/obj/item/clothing/under/golem
name = "adamantine skin"
desc = "a golem's skin"
icon_state = "golem"
item_state = "golem"
color = "golem"
has_sensor = 0
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
canremove = 0
/obj/item/clothing/suit/golem
name = "adamantine shell"
desc = "a golem's thick outter shell"
icon_state = "golem"
item_state = "golem"
w_class = 4//bulky item
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.50
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD
slowdown = 1.0
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
flags = FPRINT | TABLEPASS | ONESIZEFITSALL | STOPSPRESSUREDMAGE
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECITON_TEMPERATURE
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
canremove = 0
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/shoes/golem
name = "golem's feet"
desc = "sturdy adamantine feet"
icon_state = "golem"
item_state = null
canremove = 0
flags = NOSLIP
slowdown = SHOES_SLOWDOWN+1
/obj/item/clothing/mask/gas/golem
name = "golem's face"
desc = "the imposing face of an adamantine golem"
icon_state = "golem"
item_state = "golem"
canremove = 0
siemens_coefficient = 0
unacidable = 1
/obj/item/clothing/mask/gas/golem
name = "golem's face"
desc = "the imposing face of an adamantine golem"
icon_state = "golem"
item_state = "golem"
canremove = 0
siemens_coefficient = 0
unacidable = 1
/obj/item/clothing/gloves/golem
name = "golem's hands"
desc = "strong adamantine hands"
icon_state = "golem"
item_state = null
siemens_coefficient = 0
canremove = 0
/obj/item/clothing/head/space/golem
icon_state = "golem"
item_state = "dermal"
color = "dermal"
name = "golem's head"
desc = "a golem's head"
canremove = 0
unacidable = 1
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE
heat_protection = HEAD
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECITON_TEMPERATURE
armor = list(melee = 80, bullet = 20, laser = 20, energy = 10, bomb = 0, bio = 0, rad = 0)
/obj/effect/golemrune
anchored = 1
desc = "a strange rune used to create golems. It glows when spirits are nearby."
name = "rune"
icon = 'icons/obj/rune.dmi'
icon_state = "golem"
unacidable = 1
layer = TURF_LAYER
New()
..()
processing_objects.Add(src)
process()
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!O.client) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O
break
if(ghost)
icon_state = "golem2"
else
icon_state = "golem"
attack_hand(mob/living/user as mob)
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!O.client) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O
break
if(!ghost)
user << "The rune fizzles uselessly. There is no spirit nearby."
return
var/mob/living/carbon/human/G = new /mob/living/carbon/human
G.dna.mutantrace = "adamantine"
G.real_name = text("Adamantine Golem ([rand(1, 1000)])")
G.equip_to_slot_or_del(new /obj/item/clothing/under/golem(G), slot_w_uniform)
G.equip_to_slot_or_del(new /obj/item/clothing/suit/golem(G), slot_wear_suit)
G.equip_to_slot_or_del(new /obj/item/clothing/shoes/golem(G), slot_shoes)
G.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/golem(G), slot_wear_mask)
G.equip_to_slot_or_del(new /obj/item/clothing/gloves/golem(G), slot_gloves)
//G.equip_to_slot_or_del(new /obj/item/clothing/head/space/golem(G), slot_head)
G.loc = src.loc
G.key = ghost.key
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
del (src)
proc/announce_to_ghosts()
for(var/mob/dead/observer/G in player_list)
if(G.client)
var/area/A = get_area(src)
if(A)
G << "Golem rune created in [A.name]."
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
/*
// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere
/obj/item/slime_core
name = "slime extract"
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi'
icon_state = "slime extract"
flags = TABLEPASS
force = 1.0
w_class = 1.0
@@ -783,7 +1051,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
var/Flush = 30
var/Uses = 5 // uses before it goes inert
New()
/obj/item/slime_core/New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
@@ -791,7 +1059,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
POWERFLAG = rand(1,10)
Uses = rand(7, 25)
//flags |= NOREACT
/*
spawn()
Life()
@@ -802,42 +1070,51 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
if(Flush <= 0)
reagents.clear_reagents()
Flush = 30
*/
/obj/item/weapon/reagent_containers/food/snacks/roro_egg
name = "roro egg"
/obj/item/weapon/reagent_containers/food/snacks/egg/slime
name = "slime egg"
desc = "A small, gelatinous egg."
icon = 'icons/mob/mob.dmi'
icon_state = "roro egg-growing"
icon_state = "slime 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()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("slimejelly", 1)
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
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow()
grown = 1
icon_state = "slime 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/egg/slime/proc/Hatch()
processing_objects.Remove(src)
var/turf/T = get_turf(src)
src.visible_message("\blue The [name] pulsates and quivers!")
spawn(rand(50,100))
src.visible_message("\blue The [name] bursts open!")
new/mob/living/carbon/slime(T)
del(src)
/obj/item/weapon/reagent_containers/food/snacks/roro_egg/process()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/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()
src.Hatch()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype( W, /obj/item/toy/crayon ))
return
else
..()
*/
+106 -58
View File
@@ -1,5 +1,5 @@
/mob/living/carbon/metroid/verb/Feed()
set category = "Roro"
/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()
@@ -11,7 +11,7 @@
var/list/choices = list()
for(var/mob/living/C in view(1,src))
if(C!=src && !istype(C,/mob/living/carbon/metroid))
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
@@ -19,11 +19,11 @@
if(M in view(1, src))
if(!istype(src, /mob/living/carbon/brain))
if(!istype(M, /mob/living/carbon/metroid))
if(!istype(M, /mob/living/carbon/slime))
if(stat != 2)
if(health > -70)
for(var/mob/living/carbon/metroid/met in view())
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
@@ -42,17 +42,17 @@
/mob/living/carbon/metroid/proc/Feedon(var/mob/living/carbon/M)
/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/metroid/adult))
icon_state = "adult roro eat"
if(istype(src, /mob/living/carbon/slime/adult))
icon_state = "[colour] adult slime eat"
else
icon_state = "baby roro eat"
icon_state = "[colour] baby slime eat"
while(Victim && M.health > -70 && stat != 2)
// M.canmove = 0
@@ -84,9 +84,9 @@
adjustCloneLoss(-10)
if(Victim)
for(var/mob/living/carbon/metroid/Metroid in view(1,M))
if(Metroid.Victim == M && Metroid != src)
Metroid.Feedstop()
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)
@@ -96,7 +96,7 @@
if(powerlevel > 10)
powerlevel = 10
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
if(nutrition > 1200)
nutrition = 1200
else
@@ -119,97 +119,145 @@
break
if(stat == 2)
if(!istype(src, /mob/living/carbon/metroid/adult))
icon_state = "baby roro dead"
if(!istype(src, /mob/living/carbon/slime/adult))
icon_state = "[colour] baby slime dead"
else
if(istype(src, /mob/living/carbon/metroid/adult))
icon_state = "adult roro"
if(istype(src, /mob/living/carbon/slime/adult))
icon_state = "[colour] adult slime"
else
icon_state = "baby roro"
icon_state = "[colour] baby slime"
canmove = 1
anchored = 0
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)
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(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>"
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
M.canmove = 1
if(client) src << "<i>I have stopped feeding...</i>"
Victim = null
/mob/living/carbon/metroid/proc/Feedstop()
/mob/living/carbon/slime/proc/Feedstop()
if(Victim)
if(Victim.client) Victim << "[src] has let go of your head!"
Victim = null
/mob/living/carbon/metroid/proc/UpdateFeed(var/mob/M)
/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/metroid/verb/Evolve()
set category = "Roro"
set desc = "This will let you evolve from baby to adult metroid."
/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/metroid/adult))
if(!istype(src, /mob/living/carbon/slime/adult))
if(amount_grown >= 10)
var/mob/living/carbon/metroid/adult/new_metroid = new /mob/living/carbon/metroid/adult(loc)
new_metroid.nutrition = nutrition
new_metroid.powerlevel = max(0, powerlevel-1)
new_metroid.a_intent = "hurt"
new_metroid.key = key
new_metroid << "<B>You are now an adult Metroid.</B>"
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/metroid/verb/Reproduce()
set category = "Roro"
set desc = "This will make you lay an egg. NOTE: This decreases your nutrition."
/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/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
if(amount_grown >= 10)
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>"
//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(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>"
del(src)
else
src << "<i>I am not ready to reproduce yet...</i>"
else
src << "<i>I am not old enough to lay eggs yet...</i>"
src << "<i>I am not old enough to reproduce yet...</i>"
/mob/living/carbon/metroid/verb/ventcrawl()
/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 = "Roro"
set category = "Slime"
if(Victim) return
handle_ventcrawl()
handle_ventcrawl()
@@ -1,10 +1,10 @@
/mob/living/carbon/metroid/say(var/message)
/mob/living/carbon/slime/say(var/message)
if (silent)
return
else
return ..()
/mob/living/carbon/metroid/say_quote(var/text)
/mob/living/carbon/slime/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
@@ -14,8 +14,8 @@
return "telepathically chirps, \"[text]\"";
/mob/living/carbon/metroid/say_understands(var/other)
if (istype(other, /mob/living/carbon/metroid))
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
@@ -0,0 +1,372 @@
////////////////Tier 2
/mob/living/carbon/slime/purple
colour = "purple"
icon_state = "purple baby slime"
primarytype = /mob/living/carbon/slime/purple
mutationone = /mob/living/carbon/slime/darkpurple
mutationtwo = /mob/living/carbon/slime/darkblue
mutationthree = /mob/living/carbon/slime/green
mutationfour = /mob/living/carbon/slime/green
adulttype = /mob/living/carbon/slime/adult/purple
coretype = /obj/item/slime_extract/purple
/mob/living/carbon/slime/adult/purple
icon_state = "purple adult slime"
colour = "purple"
primarytype = /mob/living/carbon/slime/purple
mutationone = /mob/living/carbon/slime/darkpurple
mutationtwo = /mob/living/carbon/slime/darkblue
mutationthree = /mob/living/carbon/slime/green
mutationfour = /mob/living/carbon/slime/green
adulttype = /mob/living/carbon/slime/adult/purple
coretype = /obj/item/slime_extract/purple
/mob/living/carbon/slime/metal
colour = "metal"
icon_state = "metal baby slime"
primarytype = /mob/living/carbon/slime/metal
mutationone = /mob/living/carbon/slime/silver
mutationtwo = /mob/living/carbon/slime/yellow
mutationthree = /mob/living/carbon/slime/gold
mutationfour = /mob/living/carbon/slime/gold
adulttype = /mob/living/carbon/slime/adult/metal
coretype = /obj/item/slime_extract/metal
/mob/living/carbon/slime/adult/metal
icon_state = "metal adult slime"
colour = "metal"
primarytype = /mob/living/carbon/slime/metal
mutationone = /mob/living/carbon/slime/silver
mutationtwo = /mob/living/carbon/slime/yellow
mutationthree = /mob/living/carbon/slime/gold
mutationfour = /mob/living/carbon/slime/gold
adulttype = /mob/living/carbon/slime/adult/metal
coretype = /obj/item/slime_extract/metal
/mob/living/carbon/slime/orange
colour = "orange"
icon_state = "orange baby slime"
primarytype = /mob/living/carbon/slime/orange
mutationone = /mob/living/carbon/slime/red
mutationtwo = /mob/living/carbon/slime/red
mutationthree = /mob/living/carbon/slime/darkpurple
mutationfour = /mob/living/carbon/slime/yellow
adulttype = /mob/living/carbon/slime/adult/orange
coretype = /obj/item/slime_extract/orange
/mob/living/carbon/slime/adult/orange
colour = "orange"
icon_state = "orange adult slime"
primarytype = /mob/living/carbon/slime/orange
mutationone = /mob/living/carbon/slime/red
mutationtwo = /mob/living/carbon/slime/red
mutationthree = /mob/living/carbon/slime/darkpurple
mutationfour = /mob/living/carbon/slime/yellow
adulttype = /mob/living/carbon/slime/adult/orange
coretype = /obj/item/slime_extract/orange
/mob/living/carbon/slime/blue
colour = "blue"
icon_state = "blue baby slime"
primarytype = /mob/living/carbon/slime/blue
mutationone = /mob/living/carbon/slime/darkblue
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/pink
mutationfour = /mob/living/carbon/slime/silver
adulttype = /mob/living/carbon/slime/adult/blue
coretype = /obj/item/slime_extract/blue
/mob/living/carbon/slime/adult/blue
icon_state = "blue adult slime"
colour = "blue"
primarytype = /mob/living/carbon/slime/blue
mutationone = /mob/living/carbon/slime/darkblue
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/silver
mutationfour = /mob/living/carbon/slime/pink
adulttype = /mob/living/carbon/slime/adult/blue
coretype = /obj/item/slime_extract/blue
//Tier 3
/mob/living/carbon/slime/darkblue
colour = "dark blue"
icon_state = "dark blue baby slime"
primarytype = /mob/living/carbon/slime/darkblue
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/darkblue
coretype = /obj/item/slime_extract/darkblue
/mob/living/carbon/slime/adult/darkblue
icon_state = "dark blue adult slime"
colour = "dark blue"
primarytype = /mob/living/carbon/slime/darkblue
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/darkblue
coretype = /obj/item/slime_extract/darkblue
/mob/living/carbon/slime/darkpurple
colour = "dark purple"
icon_state = "dark purple baby slime"
primarytype = /mob/living/carbon/slime/darkpurple
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/darkpurple
coretype = /obj/item/slime_extract/darkpurple
/mob/living/carbon/slime/adult/darkpurple
icon_state = "dark purple adult slime"
colour = "dark purple"
primarytype = /mob/living/carbon/slime/darkpurple
mutationone = /mob/living/carbon/slime/purple
mutationtwo = /mob/living/carbon/slime/purple
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/darkpurple
coretype = /obj/item/slime_extract/darkpurple
/mob/living/carbon/slime/yellow
icon_state = "yellow baby slime"
colour = "yellow"
primarytype = /mob/living/carbon/slime/yellow
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/yellow
coretype = /obj/item/slime_extract/yellow
/mob/living/carbon/slime/adult/yellow
icon_state = "yellow adult slime"
colour = "yellow"
primarytype = /mob/living/carbon/slime/yellow
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/orange
mutationfour = /mob/living/carbon/slime/orange
adulttype = /mob/living/carbon/slime/adult/yellow
coretype = /obj/item/slime_extract/yellow
/mob/living/carbon/slime/silver
colour = "silver"
icon_state = "silver baby slime"
primarytype = /mob/living/carbon/slime/silver
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/silver
coretype = /obj/item/slime_extract/silver
/mob/living/carbon/slime/adult/silver
icon_state = "silver adult slime"
colour = "silver"
primarytype = /mob/living/carbon/slime/silver
mutationone = /mob/living/carbon/slime/metal
mutationtwo = /mob/living/carbon/slime/metal
mutationthree = /mob/living/carbon/slime/blue
mutationfour = /mob/living/carbon/slime/blue
adulttype = /mob/living/carbon/slime/adult/silver
coretype = /obj/item/slime_extract/silver
/////////////Tier 4
/mob/living/carbon/slime/pink
colour = "pink"
icon_state = "pink baby slime"
primarytype = /mob/living/carbon/slime/pink
mutationone = /mob/living/carbon/slime/pink
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/pink
coretype = /obj/item/slime_extract/pink
/mob/living/carbon/slime/adult/pink
icon_state = "pink adult slime"
colour = "pink"
primarytype = /mob/living/carbon/slime/pink
mutationone = /mob/living/carbon/slime/pink
mutationtwo = /mob/living/carbon/slime/pink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/pink
coretype = /obj/item/slime_extract/pink
/mob/living/carbon/slime/red
colour = "red"
icon_state = "red baby slime"
primarytype = /mob/living/carbon/slime/red
mutationone = /mob/living/carbon/slime/red
mutationtwo = /mob/living/carbon/slime/red
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/red
coretype = /obj/item/slime_extract/red
/mob/living/carbon/slime/adult/red
icon_state = "red adult slime"
colour = "red"
primarytype = /mob/living/carbon/slime/red
mutationone = /mob/living/carbon/slime/red
mutationtwo = /mob/living/carbon/slime/red
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/red
coretype = /obj/item/slime_extract/red
/mob/living/carbon/slime/gold
colour = "gold"
icon_state = "gold baby slime"
primarytype = /mob/living/carbon/slime/gold
mutationone = /mob/living/carbon/slime/gold
mutationtwo = /mob/living/carbon/slime/gold
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/gold
coretype = /obj/item/slime_extract/gold
/mob/living/carbon/slime/adult/gold
icon_state = "gold adult slime"
colour = "gold"
primarytype = /mob/living/carbon/slime/gold
mutationone = /mob/living/carbon/slime/gold
mutationtwo = /mob/living/carbon/slime/gold
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/gold
coretype = /obj/item/slime_extract/gold
/mob/living/carbon/slime/green
colour = "green"
icon_state = "green baby slime"
primarytype = /mob/living/carbon/slime/green
mutationone = /mob/living/carbon/slime/green
mutationtwo = /mob/living/carbon/slime/green
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/green
coretype = /obj/item/slime_extract/green
/mob/living/carbon/slime/adult/green
icon_state = "green adult slime"
colour = "green"
primarytype = /mob/living/carbon/slime/green
mutationone = /mob/living/carbon/slime/green
mutationtwo = /mob/living/carbon/slime/green
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/green
coretype = /obj/item/slime_extract/green
// Tier 5
/mob/living/carbon/slime/lightpink
colour = "light pink"
icon_state = "light pink baby slime"
primarytype = /mob/living/carbon/slime/lightpink
mutationone = /mob/living/carbon/slime/lightpink
mutationtwo = /mob/living/carbon/slime/lightpink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/lightpink
coretype = /obj/item/slime_extract/lightpink
/mob/living/carbon/slime/adult/lightpink
icon_state = "light pink adult slime"
colour = "light pink"
primarytype = /mob/living/carbon/slime/lightpink
mutationone = /mob/living/carbon/slime/lightpink
mutationtwo = /mob/living/carbon/slime/lightpink
mutationthree = /mob/living/carbon/slime/lightpink
mutationfour = /mob/living/carbon/slime/lightpink
adulttype = /mob/living/carbon/slime/adult/lightpink
coretype = /obj/item/slime_extract/lightpink
/mob/living/carbon/slime/oil
icon_state = "oil baby slime"
colour = "oil"
primarytype = /mob/living/carbon/slime/oil
mutationone = /mob/living/carbon/slime/oil
mutationtwo = /mob/living/carbon/slime/oil
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/oil
coretype = /obj/item/slime_extract/oil
/mob/living/carbon/slime/adult/oil
icon_state = "oil adult slime"
colour = "oil"
primarytype = /mob/living/carbon/slime/oil
mutationone = /mob/living/carbon/slime/oil
mutationtwo = /mob/living/carbon/slime/oil
mutationthree = /mob/living/carbon/slime/oil
mutationfour = /mob/living/carbon/slime/oil
adulttype = /mob/living/carbon/slime/adult/oil
coretype = /obj/item/slime_extract/oil
/mob/living/carbon/slime/black
icon_state = "black baby slime"
colour = "black"
primarytype = /mob/living/carbon/slime/black
mutationone = /mob/living/carbon/slime/black
mutationtwo = /mob/living/carbon/slime/black
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/black
coretype = /obj/item/slime_extract/black
/mob/living/carbon/slime/adult/black
icon_state = "black adult slime"
colour = "black"
primarytype = /mob/living/carbon/slime/black
mutationone = /mob/living/carbon/slime/black
mutationtwo = /mob/living/carbon/slime/black
mutationthree = /mob/living/carbon/slime/black
mutationfour = /mob/living/carbon/slime/black
adulttype = /mob/living/carbon/slime/adult/black
coretype = /obj/item/slime_extract/black
/mob/living/carbon/slime/adamantine
icon_state = "adamantine baby slime"
colour = "adamantine"
primarytype = /mob/living/carbon/slime/adamantine
mutationone = /mob/living/carbon/slime/adamantine
mutationtwo = /mob/living/carbon/slime/adamantine
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/adamantine
coretype = /obj/item/slime_extract/adamantine
/mob/living/carbon/slime/adult/adamantine
icon_state = "adamantine adult slime"
colour = "adamantine"
primarytype = /mob/living/carbon/slime/adamantine
mutationone = /mob/living/carbon/slime/adamantine
mutationtwo = /mob/living/carbon/slime/adamantine
mutationthree = /mob/living/carbon/slime/adamantine
mutationfour = /mob/living/carbon/slime/adamantine
adulttype = /mob/living/carbon/slime/adult/adamantine
coretype = /obj/item/slime_extract/adamantine
@@ -5,6 +5,10 @@
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
var/message
+1 -1
View File
@@ -217,7 +217,7 @@
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
@@ -102,8 +102,8 @@
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.dropped(target)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
@@ -112,6 +112,8 @@
item.layer = 20
target.l_hand = item
item.loc = target
item.dropped(source)
item.equipped(target,target.l_hand)
if("r_hand")
if (target.r_hand)
var/obj/item/W = target.r_hand
@@ -120,8 +122,8 @@
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.dropped(target)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
@@ -130,6 +132,8 @@
item.layer = 20
target.r_hand = item
item.loc = target
item.dropped(source)
item.equipped(target,target.r_hand)
if("back")
if (target.back)
var/obj/item/W = target.back
+32 -33
View File
@@ -4,6 +4,7 @@
var/oxygen_alert = 0
var/toxins_alert = 0
var/fire_alert = 0
var/pressure_alert = 0
var/temperature_alert = 0
@@ -28,8 +29,6 @@
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Disease Check
handle_virus_updates()
//Updates the number of stored chemicals for powers
handle_changeling()
@@ -64,7 +63,7 @@
for(var/obj/item/weapon/grab/G in src)
G.process()
if(!client && !stat)
if(!client && stat == CONSCIOUS)
if(prob(33) && canmove && isturf(loc))
step(src, pick(cardinal))
if(prob(1))
@@ -158,7 +157,8 @@
var/datum/gas_mixture/environment = loc.return_air()
var/datum/gas_mixture/breath
if(health < 0)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
losebreath--
if (prob(75)) //High chance of gasping for air
@@ -223,7 +223,7 @@
return null
proc/handle_breath(datum/gas_mixture/breath)
if(nodamage)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles == 0))
@@ -287,8 +287,10 @@
co2overloadtime = 0
if(Toxins_pp > safe_toxins_max) // Too much toxins
var/ratio = breath.toxins/safe_toxins_max
adjustToxLoss(min(ratio, MIN_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
var/ratio = (breath.toxins/safe_toxins_max) * 10
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
if(reagents)
reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
toxins_alert = max(toxins_alert, 1)
else
toxins_alert = 0
@@ -334,16 +336,30 @@
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
//Account for massive pressure differences
var/pressure = environment.return_pressure()
if(pressure > HAZARD_HIGH_PRESSURE)
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
if(adjusted_pressure > HAZARD_HIGH_PRESSURE)
adjustBruteLoss( min( (adjusted_pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT , MAX_PRESSURE_DAMAGE) )
return //TODO: DEFERRED
var/pressure = environment.return_pressure()
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) )
pressure_alert = 2
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
pressure_alert = 1
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
pressure_alert = 0
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure_alert = -1
else
if( !(COLD_RESISTANCE in mutations) )
adjustBruteLoss( LOW_PRESSURE_DAMAGE )
pressure_alert = -2
else
pressure_alert = -1
return
proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(nodamage) return
if(status_flags & GODMODE) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
@@ -483,21 +499,9 @@
else
healths.icon_state = "health7"
if (pressure)
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
switch(environment.return_pressure())
if(HAZARD_HIGH_PRESSURE to INFINITY)
pressure.icon_state = "pressure2"
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
pressure.icon_state = "pressure1"
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
pressure.icon_state = "pressure0"
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
pressure.icon_state = "pressure-1"
else
pressure.icon_state = "pressure-2"
if(pressure)
pressure.icon_state = "pressure[pressure_alert]"
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
@@ -562,11 +566,6 @@
emote("scratch")
return
proc/handle_virus_updates()
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
return
proc/handle_changeling()
if(mind && mind.changeling)
@@ -66,7 +66,7 @@
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
@@ -93,7 +93,7 @@
..()
if (href_list["mach_close"])
var/t1 = text("window=[]", href_list["mach_close"])
machine = null
unset_machine()
src << browse(null, t1)
if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) ))
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
@@ -309,7 +309,7 @@
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))
Weaken(rand(10,15))
Weaken(15)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down [name]!</B>", M), 1)
@@ -337,7 +337,7 @@
updatehealth()
/mob/living/carbon/monkey/attack_metroid(mob/living/carbon/metroid/M as mob)
/mob/living/carbon/monkey/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -348,11 +348,11 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
damage = rand(20, 40)
else
damage = rand(5, 35)
@@ -410,57 +410,6 @@
return
/mob/living/carbon/monkey/Move()
if ((!( buckled ) || buckled.loc != loc))
buckled = null
if (buckled)
return
if (restrained())
stop_pulling()
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if (t7 && (pulling && get_dist(src, pulling) <= 1))
if (pulling.anchored)
stop_pulling()
var/T = loc
. = ..()
if (!( isturf(pulling.loc) ))
stop_pulling()
return
if (!buckled)
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((ismob(pulling) && (get_dist(src, pulling) > 1 || diag)))
if (istype(pulling, type))
var/mob/M = pulling
var/atom/movable/t = M.pulling
M.stop_pulling()
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
stop_pulling()
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( contents.Find(s_active) )))
s_active.close(src)
for(var/mob/living/carbon/metroid/M in view(1,src))
M.UpdateFeed(src)
return
/mob/living/carbon/monkey/verb/removeinternal()
set name = "Remove Internals"
set category = "IC"
@@ -26,7 +26,7 @@
/mob/living/carbon/monkey/update_icons()
update_hud()
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
overlays = null
overlays.Cut()
if(lying)
icon_state = "monkey0"
for(var/image/I in overlays_lying)
+2 -3
View File
@@ -8,7 +8,7 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0)
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null)
if(!damage || (blocked >= 2)) return 0
switch(damagetype)
if(BRUTE)
@@ -24,7 +24,6 @@
adjustCloneLoss(damage/(blocked+1))
if(HALLOSS)
adjustHalLoss(damage/(blocked+1))
UpdateDamageIcon()
updatehealth()
return 1
@@ -72,4 +71,4 @@
if(stutter) apply_effect(stutter, STUTTER, blocked)
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
return 1
return 1
+110 -43
View File
@@ -1,18 +1,3 @@
/mob/living/Life()
..()
// While I'm doing a terriblly lazy way of initalizing things, why don't I make it so people's preferences tag along with them. This could be useful in fixing the fucking cloned-as-unknown thing, making me not have to dynamically load them during tensioner, and of course, storing metadata.
if(!src.storedpreferences)
src.storedpreferences = new
storedpreferences.savefile_load(src, 0)
return
/mob/living/verb/succumb()
set hidden = 1
@@ -23,11 +8,11 @@
/mob/living/proc/updatehealth()
if(nodamage)
src.health = 100
src.stat = 0
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
else
src.health = src.maxHealth - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() - src.halloss
health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss
//This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually
@@ -92,69 +77,69 @@
return bruteloss
/mob/living/proc/adjustBruteLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2))
/mob/living/proc/getOxyLoss()
return oxyloss
/mob/living/proc/adjustOxyLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2))
/mob/living/proc/setOxyLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
oxyloss = amount
/mob/living/proc/getToxLoss()
return toxloss
/mob/living/proc/adjustToxLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
toxloss = min(max(toxloss + amount, 0),(maxHealth*2))
/mob/living/proc/setToxLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
toxloss = amount
/mob/living/proc/getFireLoss()
return fireloss
/mob/living/proc/adjustFireLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
fireloss = min(max(fireloss + amount, 0),(maxHealth*2))
/mob/living/proc/getCloneLoss()
return cloneloss
/mob/living/proc/adjustCloneLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2))
/mob/living/proc/setCloneLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
cloneloss = amount
/mob/living/proc/getBrainLoss()
return brainloss
/mob/living/proc/adjustBrainLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
brainloss = min(max(brainloss + amount, 0),(maxHealth*2))
/mob/living/proc/setBrainLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
brainloss = amount
/mob/living/proc/getHalLoss()
return halloss
/mob/living/proc/adjustHalLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
halloss = min(max(halloss + amount, 0),(maxHealth*2))
/mob/living/proc/setHalLoss(var/amount)
if(src.nodamage) return 0 //godmode
if(status_flags & GODMODE) return 0 //godmode
halloss = amount
/mob/living/proc/getMaxHealth()
@@ -262,6 +247,8 @@
/mob/living/proc/revive()
setToxLoss(0)
setOxyLoss(0)
setCloneLoss(0)
setBrainLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
@@ -277,7 +264,11 @@
ear_damage = 0
heal_overall_damage(1000, 1000)
buckled = initial(src.buckled)
handcuffed = initial(src.handcuffed)
if(iscarbon(src))
var/mob/living/carbon/C = src
C.handcuffed = initial(C.handcuffed)
for(var/datum/disease/D in viruses)
D.cure(0)
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
@@ -287,11 +278,8 @@
return
/mob/living/proc/UpdateDamageIcon()
return
return
/*CARN: Deprecated. Please use update_canmove()
/mob/living/proc/check_if_buckled()
*/
/mob/living/proc/Examine_OOC()
set name = "Examine Meta-Info (OOC)"
@@ -299,15 +287,94 @@
set src in view()
if(config.allow_Metadata)
usr << "[src]'s Metainfo:"
if(src.storedpreferences)
usr << "[src]'s OOC Notes: [src.storedpreferences.metadata]"
if(client)
usr << "[src]'s Metainfo:<br>[client.prefs.metadata]"
else
usr << "[src] does not have any stored infomation!"
else
usr << "OOC Metadata is not supported by this server!"
return
return
/mob/living/Move(a, b, flag)
if (buckled)
return
if (restrained())
stop_pulling()
var/t7 = 1
if (restrained())
for(var/mob/living/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
else
if(Debug)
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
stop_pulling()
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (isliving(pulling))
var/mob/living/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
//this is the gay blood on floor shit -- Added back -- Skie
if (M.lying && (prob(M.getBruteLoss() / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
stop_pulling()
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
if(update_slimes)
for(var/mob/living/carbon/slime/M in view(1,src))
M.UpdateFeed(src)
+21
View File
@@ -60,3 +60,24 @@
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
P.on_hit(src, absorb)
return absorb
/mob/living/hitby(atom/movable/AM as mob|obj)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
var/zone = ran_zone("chest",75)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
if(armor < 2)
apply_damage(O.throwforce, dtype, zone, armor, O)
if(!O.fingerprintslast)
return
var/client/assailant = directory[ckey(O.fingerprintslast)]
if(assailant && assailant.mob && istype(assailant.mob,/mob))
var/mob/M = assailant.mob
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with [O], last touched by [M.name] ([assailant.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with [O]</font>")
log_attack("<font color='red'>[src.name] ([src.ckey]) was hit by [O], last touched by [M.name] ([assailant.ckey])</font>")
+3 -2
View File
@@ -10,7 +10,7 @@
var/oxyloss = 0.0 //Oxygen depravation damage (no air in lungs)
var/toxloss = 0.0 //Toxic damage caused by being poisoned or radiated
var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt.
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. Metroids also deal cloneloss damage to victims
var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
@@ -35,4 +35,5 @@
var/cameraFollow = null
var/tod = null // Time of death
var/tod = null // Time of death
var/update_slimes = 1
-596
View File
@@ -1,596 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
// === MEMETIC ANOMALY ===
// =======================
/**
This life form is a form of parasite that can gain a certain level of control
over its host. Its player will share vision and hearing with the host, and it'll
be able to influence the host through various commands.
**/
// The maximum amount of points a meme can gather.
var/global/const/MAXIMUM_MEME_POINTS = 750
// === PARASITE ===
// ================
// a list of all the parasites in the mob
mob/living/carbon/var/list/parasites = list()
mob/living/parasite
var/mob/living/carbon/host // the host that this parasite occupies
Login()
..()
// make the client see through the host instead
client.eye = host
client.perspective = EYE_PERSPECTIVE
mob/living/parasite/proc/enter_host(mob/living/carbon/host)
// by default, parasites can't share a body with other life forms
if(host.parasites.len > 0)
return 0
src.host = host
src.loc = host
host.parasites.Add(src)
if(client) client.eye = host
return 1
mob/living/parasite/proc/exit_host()
src.host.parasites.Remove(src)
src.host = null
src.loc = null
return 1
// === MEME ===
// ============
// Memes use points for many actions
mob/living/parasite/meme/var/meme_points = 100
mob/living/parasite/meme/var/dormant = 0
// Memes have a list of indoctrinated hosts
mob/living/parasite/meme/var/list/indoctrinated = list()
mob/living/parasite/meme/Life()
..()
if(client)
if(blinded) client.eye = null
else client.eye = host
if(!host) return
// recover meme points slowly
var/gain = 3
if(dormant) gain = 9 // dormant recovers points faster
meme_points = min(meme_points + gain, MAXIMUM_MEME_POINTS)
// if there are sleep toxins in the host's body, that's bad
if(host.reagents.has_reagent("stoxin"))
src << "\red <b>Something in your host's blood makes you lose consciousness.. you fade away..</b>"
src.death()
return
// a host without brain is no good
if(!host.mind)
src << "\red <b>Your host has no mind.. you fade away..</b>"
src.death()
return
if(host.stat == 2)
src << "\red <b>Your host has died.. you fade away..</b>"
src.death()
return
if(host.blinded && host.stat != 1) src.blinded = 1
else src.blinded = 0
mob/living/parasite/meme/death()
// make sure the mob is on the actual map before gibbing
if(host) src.loc = host.loc
src.stat = 2
..()
del src
// When a meme speaks, it speaks through its host
mob/living/parasite/meme/say(message as text)
if(dormant)
usr << "\red You're dormant!"
return
if(!host)
usr << "\red You can't speak without host!"
return
return host.say(message)
// Same as speak, just with whisper
mob/living/parasite/meme/whisper(message as text)
if(dormant)
usr << "\red You're dormant!"
return
if(!host)
usr << "\red You can't speak without host!"
return
return host.whisper(message)
// Make the host do things
mob/living/parasite/meme/me_verb(message as text)
set name = "Me"
if(dormant)
usr << "\red You're dormant!"
return
if(!host)
usr << "\red You can't emote without host!"
return
return host.me_verb(message)
// A meme understands everything their host understands
mob/living/parasite/meme/say_understands(mob/other)
if(!host) return 0
return host.say_understands(other)
// Try to use amount points, return 1 if successful
mob/living/parasite/meme/proc/use_points(amount)
if(dormant)
usr << "\red You're dormant!"
return
if(src.meme_points < amount)
src << "<b>* You don't have enough meme points(need [amount]).</b>"
return 0
src.meme_points -= round(amount)
return 1
// Let the meme choose one of his indoctrinated mobs as target
mob/living/parasite/meme/proc/select_indoctrinated(var/title, var/message)
var/list/candidates
// Can only affect other mobs thant he host if not blinded
if(blinded)
candidates = list()
src << "\red You are blinded, so you can not affect mobs other than your host."
else
candidates = indoctrinated.Copy()
candidates.Add(src.host)
var/mob/target = null
if(candidates.len == 1)
target = candidates[1]
else
var/selected
var/list/text_candidates = list()
var/list/map_text_to_mob = list()
for(var/mob/living/carbon/human/M in candidates)
text_candidates += M.real_name
map_text_to_mob[M.real_name] = M
selected = input(message,title) as null|anything in text_candidates
if(!selected) return null
target = map_text_to_mob[selected]
return target
// A meme can make people hear things with the thought ability
mob/living/parasite/meme/verb/Thought()
set category = "Meme"
set name = "Thought(50)"
set desc = "Implants a thought into the target, making them think they heard someone talk."
if(meme_points < 50)
// just call use_points() to give the standard failure message
use_points(50)
return
var/list/candidates = indoctrinated.Copy()
if(!(src.host in candidates))
candidates.Add(src.host)
var/mob/target = select_indoctrinated("Thought", "Select a target which will hear your thought.")
if(!target) return
var/speaker = input("Select the voice in which you would like to make yourself heard.", "Voice") as null|text
if(!speaker) return
var/message = input("What would you like to say?", "Message") as null
if(!message) return
// Use the points at the end rather than the beginning, because the user might cancel
if(!use_points(50)) return
message = say_quote(message)
var/rendered = "<span class='game say'><span class='name'>[speaker]</span> <span class='message'>[message]</span></span>"
target.show_message(rendered)
usr << "<i>You make [target] hear:</i> [rendered]"
// Mutes the host
mob/living/parasite/meme/verb/Mute()
set category = "Meme"
set name = "Mute(250)"
set desc = "Prevents your host from talking for a while."
if(!src.host) return
if(!host.speech_allowed)
usr << "\red Your host already can't speak.."
return
if(!use_points(250)) return
spawn
// backup the host incase we switch hosts after using the verb
var/mob/host = src.host
host << "\red Your tongue feels numb.. You lose your ability to speak."
usr << "\red Your host can't speak anymore."
host.speech_allowed = 0
sleep(1200)
host.speech_allowed = 1
host << "\red Your tongue has feeling again.."
usr << "\red [host] can speak again."
// Makes the host unable to emote
mob/living/parasite/meme/verb/Paralyze()
set category = "Meme"
set name = "Paralyze(250)"
set desc = "Prevents your host from using emote for a while."
if(!src.host) return
if(!host.emote_allowed)
usr << "\red Your host already can't use body language.."
return
if(!use_points(250)) return
spawn
// backup the host incase we switch hosts after using the verb
var/mob/host = src.host
host << "\red Your body feels numb.. You lose your ability to use body language."
usr << "\red Your host can't use body language anymore."
host.emote_allowed = 0
sleep(1200)
host.emote_allowed = 1
host << "\red Your body has feeling again.."
usr << "\red [host] can use body language again."
// Cause great agony with the host, used for conditioning the host
mob/living/parasite/meme/verb/Agony()
set category = "Meme"
set name = "Agony(200)"
set desc = "Causes significant pain in your host."
if(!src.host) return
if(!use_points(200)) return
spawn
// backup the host incase we switch hosts after using the verb
var/mob/host = src.host
host.paralysis = max(host.paralysis, 2)
host.flash_weak_pain()
host << "\red <font size=5>You feel excrutiating pain all over your body! It is so bad you can't think or articulate yourself properly..</font>"
usr << "<b>You send a jolt of agonizing pain through [host], they should be unable to concentrate on anything else for half a minute.</b>"
host.emote("scream")
for(var/i=0, i<10, i++)
host.stuttering = 2
sleep(50)
if(prob(80)) host.flash_weak_pain()
if(prob(10)) host.paralysis = max(host.paralysis, 2)
if(prob(15)) host.emote("twitch")
else if(prob(15)) host.emote("scream")
else if(prob(10)) host.emote("collapse")
if(i == 10)
host << "\red THE PAIN! AGHH, THE PAIN! MAKE IT STOP! ANYTHING TO MAKE IT STOP!"
host << "\red The pain subsides.."
// Cause great joy with the host, used for conditioning the host
mob/living/parasite/meme/verb/Joy()
set category = "Meme"
set name = "Joy(200)"
set desc = "Causes significant joy in your host."
if(!src.host) return
if(!use_points(200)) return
spawn
var/mob/host = src.host
host.druggy = max(host.druggy, 50)
host.slurring = max(host.slurring, 10)
usr << "<b>You stimulate [host.name]'s brain, injecting waves of endorphines and dopamine into the tissue. They should now forget all their worries, particularly relating to you, for around a minute."
host << "\red You are feeling wonderful! Your head is numb and drowsy, and you can't help forgetting all the worries in the world."
while(host.druggy > 0)
sleep(10)
host << "\red You are feeling clear-headed again.."
// Cause the target to hallucinate.
mob/living/parasite/meme/verb/Hallucinate()
set category = "Meme"
set name = "Hallucinate(300)"
set desc = "Makes your host hallucinate, has a short delay."
var/mob/target = select_indoctrinated("Hallucination", "Who should hallucinate?")
if(!target) return
if(!use_points(300)) return
target.hallucination += 100
usr << "<b>You make [target] hallucinate.</b>"
// Jump to a closeby target through a whisper
mob/living/parasite/meme/verb/SubtleJump(mob/living/carbon/human/target as mob in world)
set category = "Meme"
set name = "Subtle Jump(350)"
set desc = "Move to a closeby human through a whisper."
if(!istype(target, /mob/living/carbon/human) || !target.mind)
src << "<b>You can't jump to this creature..</b>"
return
if(!(target in view(1, host)+src))
src << "<b>The target is not close enough.</b>"
return
// Find out whether we can speak
if (host.silent || (host.disabilities & 64))
src << "<b>Your host can't speak..</b>"
return
if(!use_points(350)) return
for(var/mob/M in view(1, host))
M.show_message("<B>[host]</B> whispers something incoherent.",2) // 2 stands for hearable message
// Find out whether the target can hear
if(target.disabilities & 32 || target.ear_deaf)
src << "<b>Your target doesn't seem to hear you..</b>"
return
if(target.parasites.len > 0)
src << "<b>Your target already is possessed by something..</b>"
return
src.exit_host()
src.enter_host(target)
usr << "<b>You successfully jumped to [target]."
log_admin("[src.key] has jumped to [target]")
message_admins("[src.key] has jumped to [target]")
// Jump to a distant target through a shout
mob/living/parasite/meme/verb/ObviousJump(mob/living/carbon/human/target as mob in world)
set category = "Meme"
set name = "Obvious Jump(750)"
set desc = "Move to any mob in view through a shout."
if(!istype(target, /mob/living/carbon/human) || !target.mind)
src << "<b>You can't jump to this creature..</b>"
return
if(!(target in view(host)))
src << "<b>The target is not close enough.</b>"
return
// Find out whether we can speak
if (host.silent || (host.disabilities & 64))
src << "<b>Your host can't speak..</b>"
return
if(!use_points(750)) return
for(var/mob/M in view(host)+src)
M.show_message("<B>[host]</B> screams something incoherent!",2) // 2 stands for hearable message
// Find out whether the target can hear
if(target.disabilities & 32 || target.ear_deaf)
src << "<b>Your target doesn't seem to hear you..</b>"
return
if(target.parasites.len > 0)
src << "<b>Your target already is possessed by something..</b>"
return
src.exit_host()
src.enter_host(target)
usr << "<b>You successfully jumped to [target]."
log_admin("[src.key] has jumped to [target]")
message_admins("[src.key] has jumped to [target]")
// Jump to an attuned mob for free
mob/living/parasite/meme/verb/AttunedJump(mob/living/carbon/human/target as mob in world)
set category = "Meme"
set name = "Attuned Jump(0)"
set desc = "Move to a mob in sight that you have already attuned."
if(!istype(target, /mob/living/carbon/human) || !target.mind)
src << "<b>You can't jump to this creature..</b>"
return
if(!(target in view(host)))
src << "<b>You need to make eye-contact with the target.</b>"
return
if(!(target in indoctrinated))
src << "<b>You need to attune the target first.</b>"
return
src.exit_host()
src.enter_host(target)
usr << "<b>You successfully jumped to [target]."
log_admin("[src.key] has jumped to [target]")
message_admins("[src.key] has jumped to [target]")
// ATTUNE a mob, adding it to the indoctrinated list
mob/living/parasite/meme/verb/Attune()
set category = "Meme"
set name = "Attune(400)"
set desc = "Change the host's brain structure, making it easier for you to manipulate him."
if(host in src.indoctrinated)
usr << "<b>You have already attuned this host.</b>"
return
if(!host) return
if(!use_points(400)) return
src.indoctrinated.Add(host)
usr << "<b>You successfully indoctrinated [host]."
host << "\red Your head feels a bit roomier.."
log_admin("[src.key] has attuned [host]")
message_admins("[src.key] has attuned [host]")
// Enables the mob to take a lot more damage
mob/living/parasite/meme/verb/Analgesic()
set category = "Meme"
set name = "Analgesic(500)"
set desc = "Combat drug that the host to move normally, even under life-threatening pain."
if(!host) return
if(!(host in indoctrinated))
usr << "\red You need to attune the host first."
return
if(!use_points(500)) return
usr << "<b>You inject drugs into [host]."
host << "\red You feel your body strengthen and your pain subside.."
host.analgesic = 60
while(host.analgesic > 0)
sleep(10)
host << "\red The dizziness wears off, and you can feel pain again.."
mob/proc/clearHUD()
if(client) client.screen.Cut()
// Take control of the mob
mob/living/parasite/meme/verb/Possession()
set category = "Meme"
set name = "Possession(500)"
set desc = "Take direct control of the host for a while."
if(!host) return
if(!(host in indoctrinated))
usr << "\red You need to attune the host first."
return
if(!use_points(500)) return
usr << "<b>You take control of [host]!</b>"
host << "\red Everything goes black.."
spawn
var/mob/dummy = new()
dummy.loc = 0
dummy.sight = BLIND
var/datum/mind/host_mind = host.mind
var/datum/mind/meme_mind = src.mind
host_mind.transfer_to(dummy)
meme_mind.transfer_to(host)
host_mind.current.clearHUD()
host.update_clothing()
dummy << "\blue You feel very drowsy.. Your eyelids become heavy..."
log_admin("[meme_mind.key] has taken possession of [host]([host_mind.key])")
message_admins("[meme_mind.key] has taken possession of [host]([host_mind.key])")
sleep(600)
log_admin("[meme_mind.key] has lost possession of [host]([host_mind.key])")
message_admins("[meme_mind.key] has lost possession of [host]([host_mind.key])")
meme_mind.transfer_to(src)
host_mind.transfer_to(host)
meme_mind.current.clearHUD()
host.update_clothing()
src << "\red You lose control.."
del dummy
// Enter dormant mode, increases meme point gain
mob/living/parasite/meme/verb/Dormant()
set category = "Meme"
set name = "Dormant(100)"
set desc = "Speed up point recharging, will force you to cease all actions until all points are recharged."
if(!host) return
if(!use_points(100)) return
usr << "<b>You enter dormant mode.. You won't be able to take action until all your points have recharged.</b>"
dormant = 1
while(meme_points < MAXIMUM_MEME_POINTS)
sleep(10)
dormant = 0
usr << "\red You have regained all points and exited dormant mode!"
mob/living/parasite/meme/verb/Show_Points()
set category = "Meme"
usr << "<b>Meme Points: [src.meme_points]/[MAXIMUM_MEME_POINTS]</b>"
// Stat panel to show meme points, copypasted from alien
/mob/living/parasite/meme/Stat()
..()
statpanel("Status")
if (client && client.holder)
stat(null, "([x], [y], [z])")
if (client && client.statpanel == "Status")
stat(null, "Meme Points: [src.meme_points]")
// Game mode helpers, used for theft objectives
// --------------------------------------------
mob/living/parasite/check_contents_for(t)
if(!host) return 0
return host.check_contents_for(t)
mob/living/parasite/check_contents_for_reagent(t)
if(!host) return 0
return host.check_contents_for_reagent(t)
+74 -63
View File
@@ -1,57 +1,54 @@
#define SAY_MINIMUM_PRESSURE 10
var/list/department_radio_keys = list(
":r" = "right hand",
":l" = "left hand",
":i" = "intercom",
":h" = "department",
":c" = "Command",
":n" = "Science",
":m" = "Medical",
":e" = "Engineering",
":s" = "Security",
":w" = "whisper",
":b" = "binary",
":a" = "alientalk",
":t" = "Syndicate",
":d" = "Mining",
":q" = "Cargo",
":g" = "changeling",
":r" = "right hand", "#r" = "right hand", ".r" = "right hand",
":l" = "left hand", "#l" = "left hand", ".l" = "left hand",
":i" = "intercom", "#i" = "intercom", ".i" = "intercom",
":h" = "department", "#h" = "department", ".h" = "department",
":c" = "Command", "#c" = "Command", ".c" = "Command",
":n" = "Science", "#n" = "Science", ".n" = "Science",
":m" = "Medical", "#m" = "Medical", ".m" = "Medical",
":e" = "Engineering", "#e" = "Engineering", ".e" = "Engineering",
":s" = "Security", "#s" = "Security", ".s" = "Security",
":w" = "whisper", "#w" = "whisper", ".w" = "whisper",
":b" = "binary", "#b" = "binary", ".b" = "binary",
":a" = "alientalk", "#a" = "alientalk", ".a" = "alientalk",
":t" = "Syndicate", "#t" = "Syndicate", ".t" = "Syndicate",
":u" = "Supply", "#u" = "Supply", ".u" = "Supply",
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
":R" = "right hand",
":L" = "left hand",
":I" = "intercom",
":H" = "department",
":C" = "Command",
":N" = "Science",
":M" = "Medical",
":E" = "Engineering",
":S" = "Security",
":W" = "whisper",
":B" = "binary",
":A" = "alientalk",
":T" = "Syndicate",
":D" = "Mining",
":Q" = "Cargo",
":G" = "changeling",
":R" = "right hand", "#R" = "right hand", ".R" = "right hand",
":L" = "left hand", "#L" = "left hand", ".L" = "left hand",
":I" = "intercom", "#I" = "intercom", ".I" = "intercom",
":H" = "department", "#H" = "department", ".H" = "department",
":C" = "Command", "#C" = "Command", ".C" = "Command",
":N" = "Science", "#N" = "Science", ".N" = "Science",
":M" = "Medical", "#M" = "Medical", ".M" = "Medical",
":E" = "Engineering", "#E" = "Engineering", ".E" = "Engineering",
":S" = "Security", "#S" = "Security", ".S" = "Security",
":W" = "whisper", "#W" = "whisper", ".W" = "whisper",
":B" = "binary", "#B" = "binary", ".B" = "binary",
":A" = "alientalk", "#A" = "alientalk", ".A" = "alientalk",
":T" = "Syndicate", "#T" = "Syndicate", ".T" = "Syndicate",
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
":G" = "changeling", "#G" = "changeling", ".G" = "changeling",
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
":ê" = "right hand",
":ä" = "left hand",
":ø" = "intercom",
":ð" = "department",
":ñ" = "Command",
":ò" = "Science",
":ü" = "Medical",
":ó" = "Engineering",
":û" = "Security",
":ö" = "whisper",
":è" = "binary",
":ô" = "alientalk",
":å" = "Syndicate",
":â" = "Mining",
":é" = "Cargo",
":ï" = "changeling"
":ê" = "right hand", "#ê" = "right hand", ".ê" = "right hand",
":ä" = "left hand", "#ä" = "left hand", ".ä" = "left hand",
":ø" = "intercom", "#ø" = "intercom", ".ø" = "intercom",
":ð" = "department", "#ð" = "department", ".ð" = "department",
":ñ" = "Command", "#ñ" = "Command", ".ñ" = "Command",
":ò" = "Science", "#ò" = "Science", ".ò" = "Science",
":ü" = "Medical", "#ü" = "Medical", ".ü" = "Medical",
":ó" = "Engineering", "#ó" = "Engineering", ".ó" = "Engineering",
":û" = "Security", "#û" = "Security", ".û" = "Security",
":ö" = "whisper", "#ö" = "whisper", ".ö" = "whisper",
":è" = "binary", "#è" = "binary", ".è" = "binary",
":ô" = "alientalk", "#ô" = "alientalk", ".ô" = "alientalk",
":å" = "Syndicate", "#å" = "Syndicate", ".å" = "Syndicate",
":é" = "Supply", "#é" = "Supply", ".é" = "Supply",
":ï" = "changeling", "#ï" = "changeling", ".ï" = "changeling"
)
/mob/living/proc/binarycheck()
@@ -87,7 +84,7 @@ var/list/department_radio_keys = list(
return say_dead(message)
if (src.client)
if(client.muted & MUTE_IC)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
@@ -134,9 +131,9 @@ var/list/department_radio_keys = list(
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
if (message_mode)
message = trim(copytext(message, 3))
if (!(ishuman(src) || isanimal(src) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
message_mode = null //only humans can use headsets
// Check removed so parrots can use headsets!
// Check changed so that parrots can use headsets. Other simple animals do not have ears and will cause runtimes.
// And borgs -Sieve
if (!message)
@@ -165,15 +162,15 @@ var/list/department_radio_keys = list(
// :downs:
if (getBrainLoss() >= 60)
message = dd_replacetext(message, " am ", " ")
message = dd_replacetext(message, " is ", " ")
message = dd_replacetext(message, " are ", " ")
message = dd_replacetext(message, "you", "u")
message = dd_replacetext(message, "help", "halp")
message = dd_replacetext(message, "grief", "grife")
message = dd_replacetext(message, "space", "spess")
message = dd_replacetext(message, "carp", "crap")
message = dd_replacetext(message, "reason", "raisin")
message = replacetext(message, " am ", " ")
message = replacetext(message, " is ", " ")
message = replacetext(message, " are ", " ")
message = replacetext(message, "you", "u")
message = replacetext(message, "help", "halp")
message = replacetext(message, "grief", "grife")
message = replacetext(message, "space", "spess")
message = replacetext(message, "carp", "crap")
message = replacetext(message, "reason", "raisin")
if(prob(50))
message = uppertext(message)
message += "[stutter(pick("!", "!!", "!!!"))]"
@@ -295,6 +292,13 @@ var/list/department_radio_keys = list(
italics = 1
/////SPECIAL HEADSETS END
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
var/pressure = environment.return_pressure()
if (pressure < SAY_MINIMUM_PRESSURE) //in space no one can hear you scream
italics = 1
message_range = 1
var/list/listening
listening = get_mobs_in_view(message_range, src)
@@ -303,7 +307,7 @@ var/list/department_radio_keys = list(
continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
continue
if(M.stat == 2 && M.client.ghost_ears)
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && src.client) // src.client is so that ghosts don't have to listen to mice
listening|=M
var/turf/T = get_turf(src)
@@ -381,7 +385,14 @@ var/list/department_radio_keys = list(
for (var/M in heard_a)
if(hascall(M,"show_message"))
M:show_message(rendered, 2)
var/deaf_message = ""
var/deaf_type = 1
if(M != src)
deaf_message = "<span class='name'>[name][alt_name]</span> talks but you cannot hear them."
else
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
deaf_type = 2 // Since you should be able to hear yourself without looking
M:show_message(rendered, 2, deaf_message, deaf_type)
M << speech_bubble
if (length(heard_b))
+44 -30
View File
@@ -1,9 +1,15 @@
var/list/ai_list = list()
//Not sure why this is necessary...
/proc/AutoUpdateAI(obj/subject)
var/is_in_use = 0
if (subject!=null)
for(var/mob/living/silicon/ai/M in player_list)
for(var/A in ai_list)
var/mob/living/silicon/ai/M = A
if ((M.client && M.machine == subject))
is_in_use = 1
subject.attack_ai(M)
return is_in_use
/mob/living/silicon/ai
@@ -13,7 +19,7 @@
anchored = 1 // -- TLE
density = 1
status_flags = CANSTUN|CANPARALYSE
var/network = "SS13"
var/list/network = list("SS13")
var/obj/machinery/camera/current = null
var/list/connected_robots = list()
var/aiRestorePowerRoutine = 0
@@ -105,10 +111,14 @@
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
job = "AI"
add_to_mob_list(src)
ai_list += src
..()
return
/mob/living/silicon/ai/Del()
ai_list -= src
..()
/mob/living/silicon/ai/verb/pick_icon()
set category = "AI Commands"
@@ -118,20 +128,15 @@
//if(icon_state == initial(icon_state))
var/icontype = ""
var/list/icons = list("Monochrome", "Blue", "Inverted", "Firewall", "Green", "Red", "Static")
if (src.name == "B.A.N.N.E.D." && src.ckey == "spaceman96")
icons += "B.A.N.N.E.D."
var/list/icons = list("Monochrome", "Blue", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static")
if (src.name == "M00X-BC" && src.ckey == "searif")
icons += "M00X-BC"
if (src.name == "TRIBUNAL" && src.ckey == "serithi")
icons += "Tribunal"
icons += "Tribunal Malfunctioning"
if (src.name == "Skuld" && src.ckey == "ravensdale")
icons += "Skuld"
/* if(icontype == "Clown")
icon_state = "ai-clown2"*/
icontype = input("Please, select a display!", "AI", null/*, null*/) in icons
if(icontype == "Monochrome")
if(icontype == "Clown")
icon_state = "ai-clown2"
else if(icontype == "Monochrome")
icon_state = "ai-mono"
else if(icontype == "Blue")
icon_state = "ai"
@@ -145,12 +150,24 @@
icon_state = "ai-malf"
else if(icontype == "Static")
icon_state = "ai-static"
else if(icontype == "Text")
icon_state = "ai-text"
else if(icontype == "Smiley")
icon_state = "ai-smiley"
else if(icontype == "Matrix")
icon_state = "ai-matrix"
else if(icontype == "Angry")
icon_state = "ai-angryface"
else if(icontype == "Dorf")
icon_state = "ai-dorf"
else if(icontype == "Bliss")
icon_state = "ai-bliss"
else if(icontype == "M00X-BC")
icon_state = "ai-searif"
else if(icontype == "Tribunal")
icon_state = "ai-tribunal"
else if(icontype == "Tribunal Malfunctioning")
icon_state = "ai-tribunal-malf"
else if(icontype == "Triumvirate")
icon_state = "ai-triumvirate"
else if(icontype == "Triumvirate Static")
icon_state = "ai-triumvirate-malf"
else if(icontype == "Skuld")
icon_state = "ai-ravensdale"
//else
@@ -321,7 +338,7 @@
if (href_list["mach_close"] == "aialerts")
viewalerts = 0
var/t1 = text("window=[]", href_list["mach_close"])
machine = null
unset_machine()
src << browse(null, t1)
if (href_list["switchcamera"])
switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras
@@ -550,7 +567,7 @@
/mob/living/silicon/ai/proc/ai_network_change()
set category = "AI Commands"
set name = "Jump To Network"
machine = null
unset_machine()
src.cameraFollow = null
var/cameralist[0]
@@ -563,15 +580,12 @@
for (var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
if(C.network == "AI Satellite")
if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/M in malf.malf_ai)
if (mind == M)
cameralist[C.network] = C.network
else
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
cameralist[C.network] = C.network
var/list/tempnetwork = C.network
tempnetwork.Remove("CREED", "thunder", "RD", "toxins", "Prison")
if(tempnetwork.len)
for(var/i in C.network)
cameralist[i] = i
var/old_network = network
network = input(U, "Which network would you like to view?") as null|anything in cameralist
@@ -585,7 +599,7 @@
for(var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
if(C.network == network)
if(network in C.network)
U.eyeobj.setLoc(get_turf(C))
break
src << "\blue Switched to [network] camera network."
@@ -729,4 +743,4 @@
anchored = 1
return
else
return ..()
return ..()
@@ -16,7 +16,7 @@ var/datum/cameranet/cameranet = new()
x &= ~0xf
y &= ~0xf
var/key = "[x],[y],[z]"
return key in chunks
return (chunks[key])
// Returns the chunk in the x, y, z.
// If there is no chunk, it creates a new chunk and returns that.
@@ -24,7 +24,7 @@ var/datum/cameranet/cameranet = new()
x &= ~0xf
y &= ~0xf
var/key = "[x],[y],[z]"
if(!(key in chunks))
if(!chunks[key])
chunks[key] = new /datum/camerachunk(null, x, y, z)
return chunks[key]
@@ -103,10 +103,12 @@ var/datum/cameranet/cameranet = new()
var/turf/T = get_turf(c)
if(T)
var/x1 = max(0, T.x - 16) & ~0xf
var/y1 = max(0, T.y - 16) & ~0xf
var/x2 = min(world.maxx, T.x + 16) & ~0xf
var/y2 = min(world.maxy, T.y + 16) & ~0xf
var/x1 = max(0, T.x - 8) & ~0xf
var/y1 = max(0, T.y - 8) & ~0xf
var/x2 = min(world.maxx, T.x + 8) & ~0xf
var/y2 = min(world.maxy, T.y + 8) & ~0xf
//world << "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]"
for(var/x = x1; x <= x2; x += 16)
for(var/y = y1; y <= y2; y += 16)
@@ -130,6 +132,17 @@ var/datum/cameranet/cameranet = new()
if(chunk)
if(chunk.changed)
chunk.hasChanged(1) // Update now, no matter if it's visible or not.
if(position in chunk.visibleTurfs)
if(chunk.visibleTurfs[position])
return 1
return 0
return 0
// Debug verb for VVing the chunk that the turf is in.
/*
/turf/verb/view_chunk()
set src in world
if(cameranet.chunkGenerated(x, y, z))
var/datum/camerachunk/chunk = cameranet.getCameraChunk(x, y, z)
usr.client.debug_variables(chunk)
*/
@@ -1,4 +1,4 @@
#define UPDATE_BUFFER 20 // 2 seconds
#define UPDATE_BUFFER 25 // 2.5 seconds
// CAMERA CHUNK
//
@@ -47,7 +47,7 @@
// Called when a chunk has changed. I.E: A wall was deleted.
/datum/camerachunk/proc/visibilityChanged(turf/loc)
if(!(loc in visibleTurfs))
if(!visibleTurfs[loc])
return
hasChanged()
@@ -86,7 +86,7 @@
continue
for(var/turf/t in c.can_see())
newVisibleTurfs += t
newVisibleTurfs[t] = t
// Removes turf that isn't in turfs.
newVisibleTurfs &= turfs
@@ -110,7 +110,7 @@
for(var/turf in visRemoved)
var/turf/t = turf
if(t in obscuredTurfs)
if(obscuredTurfs[t])
if(!t.obscured)
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
@@ -141,7 +141,7 @@
for(var/turf/t in range(10, locate(x + 8, y + 8, z)))
if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16)
turfs += t
turfs[t] = t
for(var/camera in cameras)
var/obj/machinery/camera/c = camera
@@ -152,7 +152,7 @@
continue
for(var/turf/t in c.can_see())
visibleTurfs += t
visibleTurfs[t] = t
// Removes turf that isn't in turfs.
visibleTurfs &= turfs
@@ -9,8 +9,9 @@
var/list/visibleCameraChunks = list()
var/mob/living/silicon/ai/ai = null
density = 0
nodamage = 1 // You can't damage it.
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
see_in_dark = 7
// Movement code. Returns 0 to stop air movement from moving it.
/mob/aiEye/Move()
@@ -36,10 +37,13 @@
// It will also stream the chunk that the new loc is in.
/mob/aiEye/proc/setLoc(var/T)
T = get_turf(T)
loc = T
cameranet.visibility(src)
if(ai)
if(!isturf(ai.loc))
return
T = get_turf(T)
loc = T
cameranet.visibility(src)
if(ai.client)
ai.client.eye = src
//Holopad
@@ -114,10 +118,9 @@
user.sprint = initial
user.cameraFollow = null
src.eye = user.eyeobj
//user.machine = null //Uncomment this if it causes problems.
user.lightNearbyCamera()
//user.unset_machine() //Uncomment this if it causes problems.
//user.lightNearbyCamera()
// Return to the Core.
@@ -133,13 +136,15 @@
current = null
cameraFollow = null
machine = null
unset_machine()
if(src.eyeobj && src.loc)
src.eyeobj.loc = src.loc
else
src << "ERROR: Eyeobj not found. Please report this to Giacom. Creating new eye..."
src << "ERROR: Eyeobj not found. Creating new eye..."
src.eyeobj = new(src.loc)
src.eyeobj.ai = src
src.eyeobj.name = "[src.name] (AI Eye)" // Give it a name
if(client && client.eye)
client.eye = src
+130 -140
View File
@@ -8,7 +8,7 @@
if (src.stat!=0)
src.cameraFollow = null
src.reset_view(null)
src.machine = null
src.unset_machine()
src.updatehealth()
@@ -17,8 +17,6 @@
src << "\red ERROR: APC access disabled, hack attempt canceled."
src.malfhacking = 0
src.malfhack = null
else
if (src.health <= config.health_threshold_dead)
@@ -29,153 +27,145 @@
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
//var/stage = 0
if (src.client)
//stage = 1
if (istype(src, /mob/living/silicon/ai))
var/blind = 0
//stage = 2
var/area/loc = null
if (istype(T, /turf))
//stage = 3
loc = T.loc
if (istype(loc, /area))
//stage = 4
if (!loc.master.power_equip && !istype(src.loc,/obj/item))
//stage = 5
blind = 1
// Handle power damage (oxy)
if(src:aiRestorePowerRoutine != 0)
// Lost power
adjustOxyLoss(1)
else
// Gain Power
adjustOxyLoss(-1)
if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P
//I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t
//stage = 4.5
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
//stage = 1
//if (istype(src, /mob/living/silicon/ai)) // Are we not sure what we are?
var/blind = 0
//stage = 2
var/area/loc = null
if (istype(T, /turf))
//stage = 3
loc = T.loc
if (istype(loc, /area))
//stage = 4
if (!loc.master.power_equip && !istype(src.loc,/obj/item))
//stage = 5
blind = 1
var/area/home = get_area(src)
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
if(home.powered(EQUIP))
home.use_power(1000, EQUIP)
if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P
//I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t
//stage = 4.5
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if (src:aiRestorePowerRoutine==2)
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
spawn(1)
while (src.getOxyLoss()>0 && stat!=2)
sleep(50)
src.adjustOxyLoss(-1)
src.oxyloss = 0
return
else if (src:aiRestorePowerRoutine==3)
src << "Alert cancelled. Power has been restored."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
spawn(1)
while (src.getOxyLoss()>0 && stat!=2)
sleep(50)
src.adjustOxyLoss(-1)
return
else
var/area/home = get_area(src)
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
if(home.powered(EQUIP))
home.use_power(1000, EQUIP)
//stage = 6
src.blind.screen_loc = "1,1 to 15,15"
if (src.blind.layer!=18)
src.blind.layer = 18
src.sight = src.sight&~SEE_TURFS
src.sight = src.sight&~SEE_MOBS
src.sight = src.sight&~SEE_OBJS
src.see_in_dark = 0
src.see_invisible = SEE_INVISIBLE_LIVING
if (src:aiRestorePowerRoutine==2)
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
return
else if (src:aiRestorePowerRoutine==3)
src << "Alert cancelled. Power has been restored."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
return
else
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item) && !istype(get_area(src), /area/shuttle))
if (src:aiRestorePowerRoutine==0)
src:aiRestorePowerRoutine = 1
//stage = 6
src.blind.screen_loc = "1,1 to 15,15"
if (src.blind.layer!=18)
src.blind.layer = 18
src.sight = src.sight&~SEE_TURFS
src.sight = src.sight&~SEE_MOBS
src.sight = src.sight&~SEE_OBJS
src.see_in_dark = 0
src.see_invisible = SEE_INVISIBLE_LIVING
src << "You've lost power!"
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
if (src:aiRestorePowerRoutine==0)
src:aiRestorePowerRoutine = 1
src << "You've lost power!"
// world << "DEBUG CODE TIME! [loc] is the area the AI is sucking power from"
if (!is_special_character(src))
src.set_zeroth_law("")
//src.clear_supplied_laws() // Don't reset our laws.
//var/time = time2text(world.realtime,"hh:mm:ss")
//lawchanges.Add("[time] <b>:</b> [src.name]'s noncore laws have been reset due to power failure")
spawn(50)
while ((src:aiRestorePowerRoutine!=0) && stat!=2)
src.oxyloss += 2
sleep(50)
spawn(20)
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
sleep(50)
if (loc.master.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
sleep(20)
src << "Emergency control system online. Verifying connection to power network."
sleep(50)
if (istype(T, /turf/space))
src << "Unable to verify! No power connection detected!"
src:aiRestorePowerRoutine = 2
return
src << "Connection verified. Searching for APC in power network."
sleep(50)
var/obj/machinery/power/apc/theAPC = null
if (!is_special_character(src))
src.set_zeroth_law("")
//src.clear_supplied_laws() // Don't reset our laws.
//var/time = time2text(world.realtime,"hh:mm:ss")
//lawchanges.Add("[time] <b>:</b> [src.name]'s noncore laws have been reset due to power failure")
spawn(20)
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
sleep(50)
if (loc.master.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
sleep(20)
src << "Emergency control system online. Verifying connection to power network."
sleep(50)
if (istype(T, /turf/space))
src << "Unable to verify! No power connection detected!"
src:aiRestorePowerRoutine = 2
return
src << "Connection verified. Searching for APC in power network."
sleep(50)
var/obj/machinery/power/apc/theAPC = null
/*
for (var/something in loc)
if (istype(something, /obj/machinery/power/apc))
if (!(something:stat & BROKEN))
theAPC = something
break
for (var/something in loc)
if (istype(something, /obj/machinery/power/apc))
if (!(something:stat & BROKEN))
theAPC = something
break
*/
var/PRP //like ERP with the code, at least this stuff is no more 4x sametext
for (PRP=1, PRP<=4, PRP++)
var/area/AIarea = get_area(src)
for(var/area/A in AIarea.master.related)
for (var/obj/machinery/power/apc/APC in A)
if (!(APC.stat & BROKEN))
theAPC = APC
break
if (!theAPC)
switch(PRP)
if (1) src << "Unable to locate APC!"
else src << "Lost connection with the APC!"
src:aiRestorePowerRoutine = 2
return
if (loc.master.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0 //This, too, is a fix to issue 603
return
switch(PRP)
if (1) src << "APC located. Optimizing route to APC to avoid needless power waste."
if (2) src << "Best route identified. Hacking offline APC power port."
if (3) src << "Power port upload access confirmed. Loading control program into APC power port software."
if (4)
src << "Transfer complete. Forcing APC to execute program."
sleep(50)
src << "Receiving control information from APC."
sleep(2)
//bring up APC dialog
theAPC.attack_ai(src)
src:aiRestorePowerRoutine = 3
src << "Here are your current laws:"
src.show_laws()
var/PRP //like ERP with the code, at least this stuff is no more 4x sametext
for (PRP=1, PRP<=4, PRP++)
var/area/AIarea = get_area(src)
for(var/area/A in AIarea.master.related)
for (var/obj/machinery/power/apc/APC in A)
if (!(APC.stat & BROKEN))
theAPC = APC
break
if (!theAPC)
switch(PRP)
if (1) src << "Unable to locate APC!"
else src << "Lost connection with the APC!"
src:aiRestorePowerRoutine = 2
return
if (loc.master.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0 //This, too, is a fix to issue 603
return
switch(PRP)
if (1) src << "APC located. Optimizing route to APC to avoid needless power waste."
if (2) src << "Best route identified. Hacking offline APC power port."
if (3) src << "Power port upload access confirmed. Loading control program into APC power port software."
if (4)
src << "Transfer complete. Forcing APC to execute program."
sleep(50)
theAPC = null
src << "Receiving control information from APC."
sleep(2)
//bring up APC dialog
theAPC.attack_ai(src)
src:aiRestorePowerRoutine = 3
src << "Here are your current laws:"
src.show_laws()
sleep(50)
theAPC = null
/mob/living/silicon/ai/updatehealth()
if (src.nodamage == 0)
if(src.fire_res_on_core)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getBruteLoss()
else
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
else
src.health = 100
src.stat = 0
if(fire_res_on_core)
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
else
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
@@ -8,8 +8,8 @@
/mob/living/silicon/decoy/updatehealth()
if (src.nodamage == 0)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
else
src.health = 100
src.stat = 0
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
+1 -1
View File
@@ -10,7 +10,7 @@
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(perp.wear_id)
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobRealName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered_name
+5 -4
View File
@@ -19,8 +19,9 @@
src << "<font color=green>Communication circuit reinitialized. Speech and messaging functionality restored.</font>"
/mob/living/silicon/pai/updatehealth()
if(src.nodamage)
src.health = 100
src.stat = 0
if(status_flags & GODMODE)
health = 100
stat = CONSCIOUS
else
src.health = 100 - src.getBruteLoss() - src.getFireLoss()
health = 100 - getBruteLoss() - getFireLoss()
+7 -7
View File
@@ -35,7 +35,7 @@
var/screen // Which screen our main window displays
var/subscreen // Which specific function of the main screen is being displayed
var/obj/item/device/pda/pai/pda = null
var/obj/item/device/pda/ai/pai/pda = null
var/secHUD = 0 // Toggles whether the Security HUD is active or not
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
@@ -216,14 +216,14 @@
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null
if (!C)
src.machine = null
src.unset_machine()
src.reset_view(null)
return 0
if (stat == 2 || !C.status || C.network != src.network) return 0
if (stat == 2 || !C.status || !(src.network in C.network)) return 0
// ok, we're alive, camera is good and in our network...
src.machine = src
src.set_machine(src)
src:current = C
src.reset_view(C)
return 1
@@ -233,7 +233,7 @@
set category = "pAI Commands"
set name = "Cancel Camera View"
src.reset_view(null)
src.machine = null
src.unset_machine()
src:cameraFollow = null
//Addition by Mord_Sith to define AI's network change ability
@@ -242,7 +242,7 @@
set category = "pAI Commands"
set name = "Change Camera Network"
src.reset_view(null)
src.machine = null
src.unset_machine()
src:cameraFollow = null
var/cameralist[0]
@@ -254,7 +254,7 @@
if(!C.status)
continue
else
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison") COMPILE ERROR! This will have to be updated as camera.network is no longer a string, but a list instead
cameralist[C.network] = C.network
src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist
@@ -11,7 +11,7 @@
return "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/pai.sav"
/datum/paiCandidate/proc/savefile_save(mob/user)
if (IsGuestKey(user.key))
if(IsGuestKey(user.key))
return 0
var/savefile/F = new /savefile(src.savefile_path(user))
@@ -201,7 +201,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
for(var/datum/paiCandidate/c in paiController.pai_candidates)
if(c.key == O.key)
hasSubmitted = 1
if(!hasSubmitted && O.client.be_pai)
if(!hasSubmitted && (O.client.prefs.be_special & BE_PAI))
question(O.client)
proc/question(var/client/C)
@@ -214,4 +214,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
C.be_pai = 0
var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No")
if(warning == "Yes")
asked[C.key] = INFINITY
else
question(C)
@@ -28,7 +28,7 @@
var/dat = ""
var/left_part = ""
var/right_part = softwareMenu()
src.machine = src
src.set_machine(src)
if(temp)
left_part = temp
@@ -461,7 +461,7 @@
else
dat += "<pre>Requested security record not found,</pre><BR>"
if ((istype(src.securityActive2, /datum/data/record) && data_core.security.Find(src.securityActive2)))
dat += text("<BR>\nSecurity Data<BR>\nCriminal Status: <A href='?src=\ref[];field=criminal'>[]</A><BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src, src.securityActive2.fields["criminal"], src, src.securityActive2.fields["mi_crim"], src, src.securityActive2.fields["mi_crim_d"], src, src.securityActive2.fields["ma_crim"], src, src.securityActive2.fields["ma_crim_d"], src, src.securityActive2.fields["notes"])
dat += text("<BR>\nSecurity Data<BR>\nCriminal Status: []<BR>\n<BR>\nMinor Crimes: <A href='?src=\ref[];field=mi_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=mi_crim_d'>[]</A><BR>\n<BR>\nMajor Crimes: <A href='?src=\ref[];field=ma_crim'>[]</A><BR>\nDetails: <A href='?src=\ref[];field=ma_crim_d'>[]</A><BR>\n<BR>\nImportant Notes:<BR>\n\t<A href='?src=\ref[];field=notes'>[]</A><BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>", src.securityActive2.fields["criminal"], src, src.securityActive2.fields["mi_crim"], src, src.securityActive2.fields["mi_crim_d"], src, src.securityActive2.fields["ma_crim"], src, src.securityActive2.fields["ma_crim_d"], src, src.securityActive2.fields["notes"])
else
dat += "<pre>Requested security record not found,</pre><BR>"
dat += text("<BR>\n<A href='?src=\ref[];software=securityrecord;sub=0'>Back</A><BR>", src)
+11 -7
View File
@@ -5,6 +5,9 @@
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
switch(act)
if ("salute")
if (!src.buckled)
@@ -69,7 +72,7 @@
if ("me")
if (src.client)
if(client.muted & MUTE_IC)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
@@ -143,6 +146,7 @@
else
message = "<B>[src]</B> looks."
m_type = 1
if("beep")
var/M = null
if(param)
@@ -157,8 +161,8 @@
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
playsound(src.loc, 'twobeep.ogg', 50, 0)
m_type = 2
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 1
if("ping")
var/M = null
@@ -174,8 +178,8 @@
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'ping.ogg', 50, 0)
m_type = 2
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 1
if("buzz")
var/M = null
@@ -191,8 +195,8 @@
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'buzz-sigh.ogg', 50, 0)
m_type = 2
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 1
if("law")
if (istype(module,/obj/item/weapon/robot_module/security))
+1 -1
View File
@@ -140,7 +140,7 @@
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
mymob.zone_sel.overlays = null
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
@@ -42,10 +42,7 @@
uneq_all()
src.stat = 1
else if (src.cell.charge <= 100)
src.module_active = null
src.module_state_1 = null
src.module_state_2 = null
src.module_state_3 = null
uneq_all()
src.sight_mode = 0
src.cell.use(1)
else
@@ -145,11 +142,11 @@
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_MINIMUM
see_invisible = SEE_INVISIBLE_MINIMUM
else if (src.sight_mode & BORGMESON)
src.sight |= SEE_TURFS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_MINIMUM
see_invisible = SEE_INVISIBLE_MINIMUM
else if (src.sight_mode & BORGTHERM)
src.sight |= SEE_MOBS
src.see_in_dark = 8
@@ -161,6 +158,10 @@
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
for(var/image/hud in client.images) //COPIED FROM the human handle_regular_hud_updates() proc
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
del(hud)
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
if(hud && hud.hud) hud.hud.process_hud(src)
+43 -89
View File
@@ -53,7 +53,7 @@
var/lockcharge //Used when locking down a borg to preserve cell charge
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
var/braintype = "Cyborg"
/mob/living/silicon/robot/New(loc,var/syndie = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
@@ -94,7 +94,7 @@
if(!scrambledcodes && !camera)
camera = new /obj/machinery/camera(src)
camera.c_tag = real_name
camera.network = "SS13"
camera.network = list("SS13")
if(isWireCut(5)) // 5 = BORG CAMERA
camera.status = 0
..()
@@ -106,7 +106,6 @@
//Improved /N
/mob/living/silicon/robot/Del()
if(mmi)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside.
add_to_mob_list(mmi.brainmob)
var/turf/T = get_turf(loc)//To hopefully prevent run time errors.
if(T) mmi.loc = T
if(mind) mind.transfer_to(mmi.brainmob)
@@ -158,7 +157,7 @@
hands.icon_state = "medical"
icon_state = "surgeon"
modtype = "Med"
nopush = 1
status_flags &= ~CANPUSH
feedback_inc("cyborg_medical",1)
channels = list("Medical" = 1)
@@ -169,7 +168,7 @@
icon_state = "bloodhound"
modtype = "Sec"
//speed = -1 Secborgs have nerfed tasers now, so the speed boost is not necessary
nopush = 1
status_flags &= ~CANPUSH
feedback_inc("cyborg_security",1)
channels = list("Security" = 1)
@@ -196,11 +195,16 @@
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(istype(mmi, /obj/item/device/posibrain))
braintype = "Android"
else
braintype = "Cyborg"
var/changed_name = ""
if(custom_name)
changed_name = custom_name
else
changed_name = "[(prefix ? "[prefix] " : "")]Cyborg-[num2text(ident)]"
changed_name = "[(prefix ? "[prefix] " : "")][braintype]-[num2text(ident)]"
real_name = changed_name
name = real_name
@@ -326,7 +330,7 @@
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
now_pushing = 0
@@ -621,7 +625,7 @@
if ("disarm")
if(!(lying))
if (rand(1,100) <= 85)
Stun(10)
Stun(7)
step(src,get_dir(M,src))
spawn(5) step(src,get_dir(M,src))
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
@@ -637,7 +641,7 @@
/mob/living/silicon/robot/attack_metroid(mob/living/carbon/metroid/M as mob)
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
return
@@ -648,11 +652,11 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has [pick("bit","slashed")] []!</B>", src), 1)
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
var/damage = rand(1, 3)
if(istype(src, /mob/living/carbon/metroid/adult))
if(istype(src, /mob/living/carbon/slime/adult))
damage = rand(20, 40)
else
damage = rand(5, 35)
@@ -760,24 +764,27 @@
/mob/living/silicon/robot/proc/updateicon()
overlays = null
overlays.Cut()
if(stat == 0)
overlays += "eyes"
if(icon_state == "robot")
overlays = null
overlays.Cut()
overlays += "eyes-standard"
if(icon_state == "toiletbot")
overlays = null
overlays.Cut()
overlays += "eyes-toiletbot"
if(icon_state == "bloodhound")
overlays = null
overlays.Cut()
overlays += "eyes-bloodhound"
if(icon_state =="landmate")
overlays = null
overlays.Cut()
overlays += "eyes-landmate"
if(icon_state =="mopgearrex")
overlays = null
overlays.Cut()
overlays += "eyes-mopgearrex"
if(icon_state =="Miner" || icon_state =="Miner+j")
overlays.Cut()
overlays += "eyes-Miner"
else
overlays -= "eyes"
@@ -838,7 +845,7 @@
..()
if (href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
machine = null
unset_machine()
src << browse(null, t1)
return
@@ -848,7 +855,8 @@
if (href_list["mod"])
var/obj/item/O = locate(href_list["mod"])
O.attack_self(src)
if (O)
O.attack_self(src)
if (href_list["act"])
var/obj/item/O = locate(href_list["act"])
@@ -902,76 +910,10 @@
/mob/living/silicon/robot/Move(a, b, flag)
if (buckled)
return
if (restrained())
stop_pulling()
var/t7 = 1
if (restrained())
for(var/mob/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving)))))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
else
if(Debug)
diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
diary <<"REPORT THIS"
/////
if(pulling && pulling.anchored)
stop_pulling()
return
if (!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (ismob(pulling))
var/mob/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [G.affecting] has been pulled from [G.assailant]'s grip by [src]"), 1)
del(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
step(pulling, get_dir(pulling.loc, T))
M.start_pulling(t)
else
if (pulling)
if (istype(pulling, /obj/structure/window))
if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T)))
stop_pulling()
if (pulling)
step(pulling, get_dir(pulling.loc, T))
else
stop_pulling()
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
. = ..()
if(module)
if(module.type == /obj/item/weapon/robot_module/janitor) //you'd think checking the module would work
if(module.type == /obj/item/weapon/robot_module/janitor)
var/turf/tile = loc
if(isturf(tile))
tile.clean_blood()
@@ -1027,9 +969,21 @@
set name = "Reset Identity Codes"
set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and but permenantly severs you from your AI and the robotics console and will deactivate your camera system."
var/mob/living/silicon/robot/R = usr
var/mob/living/silicon/robot/R = src
if(R)
R.UnlinkSelf()
R << "Buffers flushed and reset. Camera system shutdown. All systems operational."
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
/mob/living/silicon/robot/mode()
set name = "Activate Held Object"
set category = "IC"
set src = usr
var/obj/item/W = get_active_hand()
if (W)
W.attack_self(src)
return
@@ -0,0 +1,122 @@
// A special tray for the service droid. Allow droid to pick up and drop items as if they were using the tray normally
// Click on table to unload, click on item to load. Otherwise works identically to a tray.
// Unlike the base item "tray", robotrays ONLY pick up food, drinks and condiments.
/obj/item/weapon/tray/robotray
name = "RoboTray"
desc = "An autoloading tray specialized for carrying refreshments."
/obj/item/weapon/tray/robotray/afterattack(atom/target, mob/user as mob)
if ( !target )
return
// pick up items, mostly copied from base tray pickup proc
// see code\game\objects\items\weapons\kitchen.dm line 241
if ( istype(target,/obj/item))
if ( !isturf(target.loc) ) // Don't load up stuff if it's inside a container or mob!
return
var turf/pickup = target.loc
var addedSomething = 0
for(var/obj/item/weapon/reagent_containers/food/I in pickup)
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
var/add = 0
if(I.w_class == 1.0)
add = 1
else if(I.w_class == 2.0)
add = 3
else
add = 5
if(calc_carry() + add >= max_carry)
break
I.loc = src
carrying.Add(I)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
addedSomething = 1
if ( addedSomething )
user.visible_message("\blue [user] load some items onto their service tray.")
return
// Unloads the tray, copied from base item's proc dropped() and altered
// see code\game\objects\items\weapons\kitchen.dm line 263
if ( isturf(target) || istype(target,/obj/structure/table) )
var foundtable = istype(target,/obj/structure/table/)
if ( !foundtable ) //it must be a turf!
for(var/obj/structure/table/T in target)
foundtable = 1
break
var turf/dropspot
if ( !foundtable ) // don't unload things onto walls or other silly places.
dropspot = user.loc
else if ( isturf(target) ) // they clicked on a turf with a table in it
dropspot = target
else // they clicked on a table
dropspot = target.loc
overlays = null
var droppedSomething = 0
for(var/obj/item/I in carrying)
I.loc = dropspot
carrying.Remove(I)
droppedSomething = 1
if(!foundtable && isturf(dropspot))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if ( droppedSomething )
if ( foundtable )
user.visible_message("\blue [user] unloads their service tray.")
else
user.visible_message("\blue [user] drops all the items on their tray.")
return ..()
// A special pen for service droids. Can be toggled to switch between normal writting mode, and paper rename mode
// Allows service droids to rename paper items.
/obj/item/weapon/pen/robopen
desc = "A black ink printing attachment with a paper naming mode."
name = "Printing Pen"
var/mode = 1
/obj/item/weapon/pen/robopen/attack_self(mob/user as mob)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if (mode == 1)
mode = 2
user << "Changed printing mode to 'Rename Paper'"
return
if (mode == 2)
mode = 1
user << "Changed printing mode to 'Write Paper'"
// Copied over from paper's rename verb
// see code\modules\paperwork\paper.dm line 62
/obj/item/weapon/pen/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
if ( !user || !paper )
return
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
if ( !user || !paper )
return
n_name = copytext(n_name, 1, 32)
if(( get_dist(user,paper) <= 1 && user.stat == 0))
paper.name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(user)
return
@@ -151,7 +151,7 @@
New()
..()
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/trashbag(src)
src.modules += new /obj/item/weapon/storage/bag/trash(src)
src.modules += new /obj/item/weapon/mop(src)
src.modules += new /obj/item/device/lightreplacer(src)
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
@@ -170,7 +170,7 @@
..()
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
src.modules += new /obj/item/weapon/pen(src)
src.modules += new /obj/item/weapon/pen/robopen(src)
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
@@ -182,7 +182,7 @@
L.lit = 1
src.modules += L
src.modules += new /obj/item/weapon/tray(src)
src.modules += new /obj/item/weapon/tray/robotray(src)
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
@@ -203,9 +203,9 @@
..()
src.modules += new /obj/item/borg/sight/meson(src)
src.emag = new /obj/item/borg/stun(src)
src.modules += new /obj/item/weapon/storage/satchel(src)
src.modules += new /obj/item/weapon/storage/bag/ore(src)
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
src.modules += new /obj/item/weapon/sheetsnatcher/borg(src)
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
// src.modules += new /obj/item/weapon/shovel(src) Uneeded due to buffed drill
return
@@ -89,7 +89,7 @@
/mob/living/silicon/robot/proc/interact(mob/user)
if(wiresexposed && (!istype(user, /mob/living/silicon)))
user.machine = src
user.set_machine(src)
var/t1 = text("<B>Access Panel</B><br>\n")
var/list/Borgwires = list(
"Orange" = 1,
@@ -116,7 +116,7 @@
/mob/living/silicon/robot/Topic(href, href_list)
..()
if (((in_range(src, usr) && istype(src.loc, /turf))) && !istype(usr, /mob/living/silicon))
usr.machine = src
usr.set_machine(src)
if (href_list["borgwires"])
var/t1 = text2num(href_list["borgwires"])
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
@@ -138,7 +138,7 @@
src.pulse(t1)
else if (href_list["close2"])
usr << browse(null, "window=borgwires")
usr.machine = null
usr.unset_machine()
return
#undef BORG_WIRE_LAWCHECK
+7 -3
View File
@@ -3,7 +3,7 @@
return
if (src.client)
if(client.muted & MUTE_IC)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
@@ -18,13 +18,17 @@
return
if (length(message) >= 2)
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B"))
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") || \
(copytext(message, 1, 3) == "#b") || (copytext(message, 1, 3) == "#B") || \
(copytext(message, 1, 3) == ".b") || (copytext(message, 1, 3) == ".B"))
if(istype(src, /mob/living/silicon/pai))
return ..(message)
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)
else if (isAI(src) && ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H")))
else if ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H") || \
(copytext(message, 1, 3) == "#h") || (copytext(message, 1, 3) == "#H") || \
(copytext(message, 1, 3) == ".h") || (copytext(message, 1, 3) == ".H"))
if(isAI(src)&&client)//For patching directly into AI holopads.
var/mob/living/silicon/ai/U = src
message = copytext(message, 3)
@@ -1,209 +0,0 @@
#define CLOWN_STANCE_IDLE 1
#define CLOWN_STANCE_ATTACK 2
#define CLOWN_STANCE_ATTACKING 3
/mob/living/simple_animal/clown
name = "Clown"
desc = "A denizen of clown planet"
icon_state = "clown"
icon_living = "clown"
icon_dead = "clown_dead"
icon_gib = "clown_gib"
speak_chance = 0
turns_per_move = 5
response_help = "pokes the"
response_disarm = "gently pushes aside the"
response_harm = "hits the"
speak = list("HONK", "Honk!", "Welcome to clown planet!")
emote_see = list("honks")
speak_chance = 1
a_intent = "harm"
stop_automated_movement_when_pulled = 0
maxHealth = 75
health = 75
speed = -1
harm_intent_damage = 8
melee_damage_lower = 10
melee_damage_upper = 10
attacktext = "attacks"
attack_sound = 'sound/items/bikehorn.ogg'
min_oxy = 5
max_oxy = 0
min_tox = 0
max_tox = 1
min_co2 = 0
max_co2 = 5
min_n2 = 0
max_n2 = 0
minbodytemp = 270
maxbodytemp = 370
heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp
cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
unsuitable_atoms_damage = 10
var/hostile = 0
var/stance = CLOWN_STANCE_IDLE //Used to determine behavior
var/mob/living/target_mob
/mob/living/simple_animal/clown/Life()
..()
if(stat == 2)
new /obj/effect/landmark/corpse/clown (src.loc)
del src
return
if(health > maxHealth)
health = maxHealth
if(!ckey && !stop_automated_movement)
if(isturf(src.loc) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
if(!(stop_automated_movement_when_pulled && pulledby)) //Soma animals don't move when pulled
Move(get_step(src,pick(cardinal)))
turns_since_move = 0
if(!stat)
switch(stance)
if(CLOWN_STANCE_IDLE)
if (src.hostile == 0) return
for(var/atom/A in view(7,src))
if(isclown(A))
continue
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = CLOWN_STANCE_ATTACK
target_mob = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = CLOWN_STANCE_ATTACK
target_mob = M
break
if (target_mob)
emote("honks menacingly at [target_mob]")
if(CLOWN_STANCE_ATTACK) //This one should only be active for one tick
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = CLOWN_STANCE_IDLE
if(target_mob in view(7,src))
walk_to(src, target_mob, 1, 3)
stance = CLOWN_STANCE_ATTACKING
if(CLOWN_STANCE_ATTACKING)
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = CLOWN_STANCE_IDLE
target_mob = null
return
if(!(target_mob in view(7,src)))
stance = CLOWN_STANCE_IDLE
target_mob = null
return
if(get_dist(src, target_mob) <= 1) //Attacking
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_animal(src)
if(prob(10))
L.Weaken(5)
L.visible_message("<span class='danger'>\the [src] slips \the [L]!</span>")
for(var/mob/H in viewers(src, null))
if(istype(H, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = H
C.hostile = 1
if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_animal(src)
for(var/mob/H in viewers(src, null))
if(istype(H, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = H
C.hostile = 1
/mob/living/simple_animal/clown/bullet_act(var/obj/item/projectile/Proj)
..()
hostile = 1
for(var/mob/M in viewers(src, null))
if(istype(M, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = M
C.hostile = 1
return 0
/mob/living/simple_animal/clown/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
hostile = 1
for(var/mob/Z in viewers(src, null))
if(istype(Z, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = Z
C.hostile = 1
return 0
/mob/living/simple_animal/clown/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
..()
hostile = 1
for(var/mob/Z in viewers(src, null))
if(istype(Z, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = Z
C.hostile = 1
return 0
/mob/living/simple_animal/clown/attack_hand(mob/living/carbon/human/M as mob)
..()
hostile = 1
for(var/mob/Z in viewers(src, null))
if(istype(Z, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = Z
C.hostile = 1
return 0
/mob/living/simple_animal/clown/attack_animal(mob/living/simple_animal/M as mob)
..()
hostile = 1
for(var/mob/Z in viewers(src, null))
if(istype(Z, /mob/living/simple_animal/clown))
var/mob/living/simple_animal/clown/C = Z
C.hostile = 1
return 0
/mob/living/simple_animal/clown/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(50))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.nopush)
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return

Some files were not shown because too many files have changed in this diff Show More