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

This commit is contained in:
Chinsky
2013-01-02 17:54:12 +04:00
488 changed files with 22499 additions and 19251 deletions
+1 -4
View File
@@ -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
@@ -9,6 +9,7 @@
say_message = "hisses"
icon = 'icons/mob/alien.dmi'
gender = NEUTER
dna = null
var/storedPlasma = 250
var/max_plasma = 500
@@ -36,7 +37,7 @@
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
if(amount > 0)
..(amount * 1.5)
..(amount * 2)
else
..(amount)
return
@@ -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()
@@ -197,6 +203,7 @@ Des: Removes all infected images from the alien.
del(I)
return
#undef HEAT_DAMAGE_LEVEL_1
#undef HEAT_DAMAGE_LEVEL_2
#undef HEAT_DAMAGE_LEVEL_3
@@ -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
@@ -143,14 +151,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 +172,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
@@ -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
@@ -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
@@ -500,7 +500,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>
@@ -6,7 +6,7 @@
health = 250
icon_state = "alienq_s"
nopush = 1
heal_rate = 10 // Let's regenerate more than our average underling.
heal_rate = 5
plasma_rate = 20
@@ -26,7 +26,7 @@
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,8 +64,8 @@
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)
@@ -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
@@ -442,7 +442,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>
@@ -16,6 +16,7 @@ var/const/MAX_ACTIVE_TIME = 400
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
throw_range = 5
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
@@ -83,6 +84,10 @@ var/const/MAX_ACTIVE_TIME = 400
HasProximity(target)
return
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
HasProximity(finder)
return 1
/obj/item/clothing/mask/facehugger/dropped()
..()
GoActive()
@@ -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)
+3 -2
View File
@@ -329,6 +329,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,8 +419,6 @@
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
+178 -77
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,17 +53,27 @@
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)
@@ -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"
@@ -547,7 +547,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 +671,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
@@ -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")
@@ -112,9 +109,6 @@
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")
@@ -137,9 +131,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
@@ -409,6 +409,9 @@
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>"
else
@@ -416,19 +419,8 @@
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")
+28 -28
View File
@@ -8,18 +8,18 @@
#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
@@ -30,6 +30,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
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
@@ -252,7 +253,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
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#"))
@@ -766,12 +767,12 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
//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)
@@ -806,14 +807,23 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
// 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) )
else if(pressure <= 50)
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
if(adjusted_pressure < 50)
adjustBruteLoss( (50 - adjusted_pressure) / 50 )
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
/*
@@ -1431,17 +1441,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
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"
+53 -50
View File
@@ -21,8 +21,7 @@
if(src.dna)
/*if(src.dna.mutantrace == "lizard") //Soghun stutterss-s-ss-sss.
if(copytext(message, 1, 2) != "*")
message = dd_replacetext(message, "s", stutter("ss"))
*/
message = replacetext(message, "s", stutter("ss"))*/
if(src.dna.mutantrace == "metroid" && prob(5))
if(copytext(message, 1, 2) != "*")
if(copytext(message, 1, 2) == ";")
@@ -36,7 +35,7 @@
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
@@ -50,31 +49,35 @@
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 = 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!"
if ((HULK in mutations) && health >= 25)
if(copytext(message, 1, 2) != "*")
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
//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")
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
@@ -84,37 +87,37 @@
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", "ß")
/*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 = replacetext(message, "l", "r")
message = replacetext(message, "rr", "ru")
message = replacetext(message, "v", "b")
message = replacetext(message, "f", "hu")
message = replacetext(message, "'t", "")
message = replacetext(message, "t ", "to ")
message = replacetext(message, " I ", " ai ")
message = replacetext(message, "th", "z")
message = replacetext(message, "ish", "isu")
message = replacetext(message, "is", "izu")
message = replacetext(message, "ziz", "zis")
message = replacetext(message, "se", "su")
message = replacetext(message, "br", "bur")
message = replacetext(message, "ry", "ri")
message = replacetext(message, "you", "yuu")
message = replacetext(message, "ck", "cku")
message = replacetext(message, "eu", "uu")
message = replacetext(message, "ow", "au")
message = replacetext(message, "are", "aa")
message = replacetext(message, "ay", "ayu")
message = replacetext(message, "ea", "ii")
message = replacetext(message, "ch", "chi")
message = replacetext(message, "than", "sen")
message = replacetext(message, ".", "")
message = lowertext(message)
*/
if (src.slurring)
@@ -674,6 +674,11 @@ proc/get_damage_icon_part(damage_state, body_part)
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
@@ -38,7 +38,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 +48,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)
@@ -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
+374 -365
View File
@@ -50,465 +50,474 @@
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/SStun = 0 // stun variable
proc
AIprocess() // the master AI process
/mob/living/carbon/metroid/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/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
//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/metroid/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_metroid(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_metroid(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 Metroid 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/metroid/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/metroid/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/metroid/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/metroid/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/metroid/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/metroid/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/metroid/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(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(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/egg/roro/E
for(var/i=1,i<=number,i++)
E = new(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)
if(!canmove) return
/mob/living/carbon/metroid/proc/handle_virus_updates()
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
return
// DO AI STUFF HERE
/mob/living/carbon/metroid/proc/handle_targets()
if(Tempstun)
if(!Victim) // not while they're eating!
canmove = 0
else
canmove = 1
if(Target)
if(attacked <= 0)
Target = null
if(attacked > 50) attacked = 50
if(Victim) return // if it's eating someone already, continue eating!
if(attacked > 0)
if(prob(85))
attacked--
if(Discipline > 0)
if(Discipline >= 5 && rabid)
if(prob(60)) rabid = 0
if(prob(10))
Discipline--
if(prob(5))
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
if(!client)
if(AIproc && SStun) return
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!
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(prob(5))
emote(pick("click","chatter","sway","light","vibrate","chatter","shriek"))
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(AIproc && SStun) return
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
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(!Target)
var/list/targets = list()
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(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))
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(!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 metroids, dead mobs and simple_animals
if(ismetroid(L) || L.stat != CONSCIOUS || isanimal(L))
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(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 metroids 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 metroid(wo)men
var/mob/living/carbon/human/H = L
if(H.dna)
if(H.dna.mutantrace == "metroid")
continue
targets += L //Possible target found!
if(!istype(src, /mob/living/carbon/metroid/adult)) //Non-starving diciplined adult metroids 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 metroids 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 metroid can latch on at a time.
if(L in Friends) //No eating friends!
continue
var/notarget = 0
for(var/mob/living/carbon/metroid/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/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
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()
@@ -189,6 +189,10 @@
stat(null,"Power Level: [powerlevel]")
/mob/living/carbon/metroid/adjustFireLoss(amount)
..(-abs(amount)) // Heals them
return
/mob/living/carbon/metroid/bullet_act(var/obj/item/projectile/Proj)
attacked += 10
..(Proj)
@@ -659,7 +663,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
/mob/living/carbon/metroid/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>
@@ -783,7 +787,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
var/Flush = 30
var/Uses = 5 // uses before it goes inert
New()
/obj/item/metroid_core/New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
@@ -791,7 +795,7 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
POWERFLAG = rand(1,10)
Uses = rand(7, 25)
//flags |= NOREACT
/*
spawn()
Life()
@@ -802,8 +806,9 @@ 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
/obj/item/weapon/reagent_containers/food/snacks/egg/roro
name = "roro egg"
desc = "A small, gelatinous egg."
icon = 'icons/mob/mob.dmi'
@@ -812,32 +817,37 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
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/roro/New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("rorojelly", 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/roro/proc/Grow()
grown = 1
icon_state = "roro egg-grown"
processing_objects.Add(src)
return
proc/Hatch()
processing_objects.Remove(src)
var/turf/T = get_turf(src)
for(var/mob/O in hearers(T))
O.show_message("\blue The [name] pulsates and quivers!")
spawn(rand(50,100))
for(var/mob/O in hearers(T))
O.show_message("\blue The [name] bursts open!")
new/mob/living/carbon/metroid(T)
del(src)
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/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/metroid(T)
del(src)
/obj/item/weapon/reagent_containers/food/snacks/roro_egg/process()
/obj/item/weapon/reagent_containers/food/snacks/egg/roro/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/roro/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype( W, /obj/item/toy/crayon ))
return
else
..()
@@ -196,7 +196,7 @@
if(istype(src, /mob/living/carbon/metroid/adult))
if(amount_grown >= 10)
if(src.nutrition >= 300)
new/obj/item/weapon/reagent_containers/food/snacks/roro_egg(loc)
new/obj/item/weapon/reagent_containers/food/snacks/egg/roro(loc)
src.nutrition -= 200
else
src << "<i>I have not fed enough...</i>"
@@ -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
+26 -22
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
@@ -64,7 +65,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 +159,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
@@ -334,13 +336,27 @@
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
@@ -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]"
@@ -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)
+4
View File
@@ -262,6 +262,8 @@
/mob/living/proc/revive()
setToxLoss(0)
setOxyLoss(0)
setCloneLoss(0)
setBrainLoss(0)
SetParalysis(0)
SetStunned(0)
SetWeakened(0)
@@ -278,6 +280,8 @@
heal_overall_damage(1000, 1000)
buckled = initial(src.buckled)
handcuffed = initial(src.handcuffed)
for(var/datum/disease/D in viruses)
D.cure(0)
if(stat == 2)
dead_mob_list -= src
living_mob_list += src
+21
View File
@@ -60,3 +60,24 @@
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone)
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.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>")
+9 -9
View File
@@ -165,15 +165,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("!", "!!", "!!!"))]"
+16 -6
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
@@ -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"
@@ -328,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
@@ -557,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]
@@ -736,4 +746,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]
@@ -130,6 +130,6 @@ 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
@@ -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
@@ -116,8 +116,8 @@
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,7 +133,7 @@
current = null
cameraFollow = null
machine = null
unset_machine()
if(src.eyeobj && src.loc)
src.eyeobj.loc = src.loc
+1 -1
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()
+4 -4
View File
@@ -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
// 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]
@@ -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)
+10 -6
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)
@@ -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))
@@ -142,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
@@ -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)
@@ -621,7 +620,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)
@@ -838,7 +837,7 @@
..()
if (href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
machine = null
unset_machine()
src << browse(null, t1)
return
@@ -971,7 +970,7 @@
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()
@@ -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
@@ -27,7 +27,7 @@
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
/*
user.machine = src
user.set_machine(src)
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
@@ -406,4 +406,59 @@
if(href_list["remove_inv"] || href_list["add_inv"])
usr << "\red You can't fit this on [src]"
return
..()
..()
//LISA! SQUEEEEEEEEE~
/mob/living/simple_animal/corgi/Lisa
name = "Lisa"
real_name = "Lisa"
gender = FEMALE
desc = "It's a corgi with a cute pink bow."
icon_state = "lisa"
icon_living = "lisa"
icon_dead = "lisa_dead"
response_help = "pets"
response_disarm = "bops"
response_harm = "kicks"
var/turns_since_scan = 0
var/puppies = 0
//Lisa already has a cute bow!
/mob/living/simple_animal/corgi/Lisa/Topic(href, href_list)
if(href_list["remove_inv"] || href_list["add_inv"])
usr << "\red [src] already has a cute bow!"
return
..()
/mob/living/simple_animal/corgi/Lisa/Life()
..()
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 15)
turns_since_scan = 0
var/alone = 1
var/ian = 0
for(var/mob/M in oviewers(7, src))
if(istype(M, /mob/living/simple_animal/corgi/Ian))
if(M.client)
alone = 0
break
else
ian = M
else
alone = 0
break
if(alone && ian && puppies < 4)
if(near_camera(src) || near_camera(ian))
return
new /mob/living/simple_animal/corgi/puppy(loc)
if(prob(1))
emote(pick("dances around","chases her tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
sleep(1)
@@ -33,7 +33,7 @@
min_n2 = 0
max_n2 = 0
minbodytemp = 0
var/stance_step = 0
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/hostile/bear/Hudson
name = "Hudson"
@@ -36,7 +36,7 @@
minbodytemp = 0
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0)
return //No drifting in space for space carp! //original comments do not steal
return 1 //No drifting in space for space carp! //original comments do not steal
/mob/living/simple_animal/hostile/carp/FindTarget()
. = ..()
@@ -1,7 +1,6 @@
/mob/living/simple_animal/hostile
var/stance = HOSTILE_STANCE_IDLE //Used to determine behavior
var/stance_step = 0 //Used to delay checks depending on what stance the hostile
var/mob/living/target_mob //Once the bear enters attack stance, it will try to chase this mob. This it to prevent it changing it's mind between multiple mobs.
var/attack_same = 0
@@ -9,42 +8,36 @@
var/atom/T = null
stop_automated_movement = 0
stance_step++
if(stance_step > 5)
stance_step = 0
for(var/atom/A in ListTargets())
for(var/atom/A in ListTargets())
if(!attack_same && istype(A, src.type))
continue
if(!attack_same && istype(A, src.type))
continue
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = HOSTILE_STANCE_ATTACK
T = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = HOSTILE_STANCE_ATTACK
T = M
break
return T
if(isliving(A))
var/mob/living/L = A
if(!L.stat)
stance = HOSTILE_STANCE_ATTACK
T = L
break
if(istype(A, /obj/mecha))
var/obj/mecha/M = A
if (M.occupant)
stance = HOSTILE_STANCE_ATTACK
T = M
break
return T
/mob/living/simple_animal/hostile/proc/MoveToTarget(var/step = 5)
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = HOSTILE_STANCE_IDLE
stance_step = step //Make it very alert, so it quickly attacks again if a mob returns
if(target_mob in ListTargets())
walk_to(src, target_mob, 1, 3)
walk_to(src, target_mob, 1, 2)
stance = HOSTILE_STANCE_ATTACKING
stance_step = 0
/mob/living/simple_animal/hostile/proc/AttackTarget()
stop_automated_movement = 1
stance_step++
if(!target_mob || SA_attackable(target_mob))
LoseTarget()
return
@@ -64,20 +57,18 @@
M.attack_animal(src)
return M
/mob/living/simple_animal/hostile/proc/LoseTarget(var/step = 3)
/mob/living/simple_animal/hostile/proc/LoseTarget()
stance = HOSTILE_STANCE_IDLE
stance_step = step
target_mob = null
walk(src, 0)
/mob/living/simple_animal/hostile/proc/LostTarget(var/step = 1)
/mob/living/simple_animal/hostile/proc/LostTarget()
stance = HOSTILE_STANCE_IDLE
stance_step = step
walk(src, 0)
/mob/living/simple_animal/hostile/proc/ListTargets()
return view(src, 7)
return view(src, 10)
/mob/living/simple_animal/hostile/Die()
..()
+57 -55
View File
@@ -27,7 +27,7 @@
/mob/living/simple_animal/parrot
name = "\improper Parrot"
desc = "The parrot squacks, \"It's a Parrot! BAWWK!\""
desc = "The parrot squaks, \"It's a Parrot! BAWWK!\""
icon = 'icons/mob/animal.dmi'
icon_state = "parrot_fly"
icon_living = "parrot_fly"
@@ -39,7 +39,7 @@
emote_hear = list("squawks","bawks")
emote_see = list("flutters its wings")
speak_chance = 8//4% (1 in 25) chance every tick
speak_chance = 1//1% (1 in 100) chance every tick; So about once per 150 seconds, assuming an average tick is 1.5s
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
@@ -78,39 +78,40 @@
/obj/machinery/suit_storage_unit, /obj/machinery/telecomms, \
/obj/machinery/teleport)
//Parrots are kleptomaniacs. These vars a used for just that.. holding items and storing a list of items the parrot wants to steal.
//Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding.
var/obj/item/held_item = null
var/list/desired_items = list(/obj/item/weapon/reagent_containers/food/snacks/cracker/, \
/obj/item/smallDelivery, /obj/item/weapon/gift, \
/obj/item/weapon/soap, /obj/item/toy, \
/obj/item/weapon/coin, /obj/item/weapon/stamp, \
/obj/item/weapon/grenade, /obj/item/device/radio/headset, \
/obj/item/device/flash, /obj/item/device/soulstone, \
/obj/item/device/assembly, /obj/item/weapon/bananapeel, \
/obj/item/weapon/book, /obj/item/weapon/caution, \
/obj/item/weapon/cigpacket, /obj/item/weapon/handcuffs,\
/obj/item/weapon/pen, /obj/item/weapon/pinpointer)
/mob/living/simple_animal/parrot/New()
..()
if(!ears)
var/headset = pick(/obj/item/device/radio/headset/headset_sec, \
/obj/item/device/radio/headset/headset_eng, \
/obj/item/device/radio/headset/headset_med, \
/obj/item/device/radio/headset/headset_sci, \
/obj/item/device/radio/headset/heads/qm)
ears = new headset(src)
parrot_sleep_dur = parrot_sleep_max //In case someone decides to change the max without changing the duration var
verbs.Add(/mob/living/simple_animal/parrot/proc/steal_from_ground, \
/mob/living/simple_animal/parrot/proc/steal_from_mob, \
/mob/living/simple_animal/parrot/verb/drop_held_item_player, \
/mob/living/simple_animal/parrot/proc/perch_player)
/mob/living/simple_animal/parrot/Die()
if(held_item)
held_item.loc = src.loc
held_item = null
walk(src,0)
..()
/*
* Inventory
*/
/mob/living/simple_animal/parrot/show_inv(mob/user as mob)
user.machine = src
user.set_machine(src)
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
@@ -307,7 +308,6 @@
clearlist(speech_buffer)
//-----SLEEPING
if(parrot_state == PARROT_PERCH)
if(parrot_perch.loc != src.loc) //Make sure someone hasnt moved our perch on us
@@ -512,23 +512,25 @@
*/
/mob/living/simple_animal/parrot/movement_delay()
if(client && parrot_state != "parrot_fly")
if(client && stat == CONSCIOUS && parrot_state != "parrot_fly")
icon_state = "parrot_fly"
..()
/mob/living/simple_animal/parrot/proc/search_for_item()
for(var/atom/movable/AM in view(src))
for(var/path in desired_items)
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src) //Skip items we already stole or are wearing
continue
//Skip items we already stole or are wearing or are too big
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src)
continue
if(istype(AM, path))
return AM
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.w_class < 2)
return I
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if(istype(C.l_hand, path) || istype(C.r_hand, path))
return C
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if((C.l_hand && C.l_hand.w_class <= 2) || (C.r_hand && C.r_hand.w_class <= 2))
return C
return null
/mob/living/simple_animal/parrot/proc/search_for_perch()
@@ -545,17 +547,19 @@
if(istype(AM, perch_path))
return AM
for(var/item_path in desired_items)
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src) //Skip items we already stole or are wearing
continue
//Skip items we already stole or are wearing or are too big
if(parrot_perch && AM.loc == parrot_perch.loc || AM.loc == src)
continue
if(istype(AM, item_path))
return AM
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.w_class <= 2)
return I
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if(istype(C.l_hand, item_path) || istype(C.r_hand, item_path))
return AM
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if(C.l_hand && C.l_hand.w_class <= 2 || C.r_hand && C.r_hand.w_class <= 2)
return C
return null
@@ -575,18 +579,17 @@
return 1
for(var/obj/item/I in view(1,src))
for(var/path in desired_items)
//Make sure it's the proper item and we're not holding it
if(istype(I, path) && I.loc != src)
//Make sure we're not already holding it and it's small enough
if(I.loc != src && I.w_class <= 2)
//If we have a perch and the item is sitting on it, continue
if(!client && parrot_perch && I.loc == parrot_perch)
continue
//If we have a perch and the item is sitting on it, continue
if(!client && parrot_perch && I.loc == parrot_perch)
continue
held_item = I
I.loc = src
visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.")
return held_item
held_item = I
I.loc = src
visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.")
return held_item
src << "\red There is nothing of interest to take."
return 0
@@ -606,19 +609,18 @@
var/obj/item/stolen_item = null
for(var/mob/living/carbon/C in view(1,src))
for(var/path in desired_items)
if(istype(C.l_hand, path))
stolen_item = C.l_hand
if(C.l_hand && C.l_hand.w_class <= 2)
stolen_item = C.l_hand
if(istype(C.r_hand, path))
stolen_item = C.r_hand
if(C.r_hand && C.r_hand.w_class <= 2)
stolen_item = C.r_hand
if(stolen_item)
C.u_equip(stolen_item)
held_item = stolen_item
stolen_item.loc = src
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
return held_item
if(stolen_item)
C.u_equip(stolen_item)
held_item = stolen_item
stolen_item.loc = src
visible_message("[src] grabs the [held_item] out of [C]'s hand!", "\blue You snag the [held_item] out of [C]'s hand!", "You hear the sounds of wings flapping furiously.")
return held_item
src << "\red There is nothing of interest to take."
return 0
@@ -101,7 +101,7 @@
stop_automated_movement = 1
if(!target_mob || SA_attackable(target_mob))
stance = SYNDICATE_STANCE_IDLE
if(target_mob in view(7, src))
if(target_mob in view(10, src))
if(ranged)
if(get_dist(src, target_mob) <= 6)
OpenFire(target_mob)
@@ -117,7 +117,7 @@
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
if(!(target_mob in view(7, src)))
if(!(target_mob in view(10, src)))
stance = SYNDICATE_STANCE_IDLE
target_mob = null
return
@@ -187,7 +187,7 @@
/mob/living/simple_animal/syndicate/melee/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(prob(80))
if(prob(65))
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
@@ -137,7 +137,7 @@
if(istype(target,/turf/simulated/wall))
if((!istype(target,/turf/simulated/wall/r_wall) && eatingDuration >= 100) || eatingDuration >= 200) //need 20 ticks to eat an rwall, 10 for a regular one
var/turf/simulated/wall/wall = target
wall.ReplaceWithFloor()
wall.ChangeTurf(/turf/simulated/floor)
new /obj/item/stack/sheet/metal(src, flatPlasmaValue)
return 1
else if(istype(target,/atom/movable))
-9
View File
@@ -1,9 +1,5 @@
//handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying
/mob/proc/update_Login_details()
//trigger admin holder updates. This is hear as all Login() calls this proc.
if(client.holder)
client.update_admins(client.holder.rank)
//Multikey checks and logging
lastKnownIP = client.address
computer_id = client.computer_id
@@ -37,11 +33,6 @@
if(hud_used) del(hud_used) //remove the hud objects
hud_used = new /datum/hud(src)
if(!dna)
dna = new /datum/dna(null)
if(dna)
dna.real_name = real_name
next_move = 1
sight |= SEE_SELF
..()
+2 -2
View File
@@ -1,9 +1,9 @@
/mob/Logout()
player_list -= src
log_access("Logout: [key_name(src)]")
if(admins[src.ckey])
if(admin_datums[src.ckey])
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = admin_list.len
var/admins_number = admins.len
message_admins("Admin logout: [key_name(src)]")
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
+28 -31
View File
@@ -1,10 +1,16 @@
/mob/Del()//This makes sure that mobs with clients/keys are not just deleted from the game.
mob_list -= src
dead_mob_list -= src
living_mob_list -= src
ghostize()
remove_from_mob_list(src)
..()
/mob/New()
add_to_mob_list(src)
mob_list += src
if(stat == DEAD)
dead_mob_list += src
else
living_mob_list += src
..()
/mob/proc/Cell()
@@ -213,7 +219,7 @@ var/list/slot_equipment_priority = list( \
/mob/proc/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>
@@ -346,7 +352,7 @@ var/list/slot_equipment_priority = list( \
/mob/proc/print_flavor_text()
if (flavor_text && flavor_text != "")
var/msg = dd_replacetext(flavor_text, "\n", " ")
var/msg = replacetext(flavor_text, "\n", " ")
if(lentext(msg) <= 40)
return "\blue [msg]"
else
@@ -468,20 +474,20 @@ var/list/slot_equipment_priority = list( \
set category = "OOC"
var/is_admin = 0
if (client.holder && client.holder.level >= 1 && ( client.holder.state == 2 || client.holder.level > 3 ))
if(client.holder && (client.holder.rights & R_ADMIN))
is_admin = 1
else if (istype(src, /mob/new_player) || stat != 2)
else if(stat != DEAD || istype(src, /mob/new_player))
usr << "\blue You must be observing to use this!"
return
if (is_admin && stat == 2)
if(is_admin && stat == DEAD)
is_admin = 0
var/list/names = list()
var/list/namecounts = list()
var/list/creatures = list()
for(var/obj/O in world)
for(var/obj/O in world) //EWWWWWWWWWWWWWWWWWWWWWWWW ~needs to be optimised
if(!O.loc)
continue
if(istype(O, /obj/item/weapon/disk/nuclear))
@@ -550,7 +556,7 @@ var/list/slot_equipment_priority = list( \
set name = "Cancel Camera View"
set category = "OOC"
reset_view(null)
machine = null
unset_machine()
if(istype(src, /mob/living))
if(src:cameraFollow)
src:cameraFollow = null
@@ -558,11 +564,11 @@ var/list/slot_equipment_priority = list( \
/mob/Topic(href, href_list)
if(href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
machine = null
unset_machine()
src << browse(null, t1)
if(href_list["flavor_more"])
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, dd_replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
onclose(usr, "[name]")
if(href_list["flavor_change"])
update_flavor_text()
@@ -713,18 +719,19 @@ note dizziness decrements automatically in the mob's Life() proc.
if(statpanel("Status")) //not looking at that panel
if(client && client.holder)
stat(null,"Location: \t ([x], [y], [z])")
stat(null,"CPU: \t [world.cpu]")
stat(null,"Location:\t([x], [y], [z])")
stat(null,"CPU:\t[world.cpu]")
stat(null,"Instances:\t[world.contents.len]")
if(master_controller)
stat(null,"MasterController-[last_tick_duration] ([master_controller.processing?"On":"Off"]-[controller_iteration])")
stat(null,"Air-[master_controller.air_cost]\t Sun-[master_controller.sun_cost]")
stat(null,"Mob-[master_controller.mobs_cost]\t #[mob_list.len]")
stat(null,"Dis-[master_controller.diseases_cost]\t #[active_diseases.len]")
stat(null,"Mch-[master_controller.machines_cost]\t #[machines.len]")
stat(null,"Obj-[master_controller.objects_cost]\t #[processing_objects.len]")
stat(null,"Net-[master_controller.networks_cost]\t Pnet-[master_controller.powernets_cost]")
stat(null,"Tick-[master_controller.ticker_cost]\t ALL-[master_controller.total_cost]")
stat(null,"Air-[master_controller.air_cost]\tSun-[master_controller.sun_cost]")
stat(null,"Mob-[master_controller.mobs_cost]\t#[mob_list.len]")
stat(null,"Dis-[master_controller.diseases_cost]\t#[active_diseases.len]")
stat(null,"Mch-[master_controller.machines_cost]\t#[machines.len]")
stat(null,"Obj-[master_controller.objects_cost]\t#[processing_objects.len]")
stat(null,"Net-[master_controller.networks_cost]\tPnet-[master_controller.powernets_cost]")
stat(null,"Tick-[master_controller.ticker_cost]\tALL-[master_controller.total_cost]")
else
stat(null,"MasterController-ERROR")
@@ -898,18 +905,8 @@ note dizziness decrements automatically in the mob's Life() proc.
resting = max(resting + amount,0)
return
/*
* Sends resource files to client cache
*/
/mob/proc/getFiles()
if(!isemptylist(args))
for(var/file in args)
src << browse_rsc(file)
return 1
return 0
/mob/proc/get_species()
return ""
/mob/proc/flash_weak_pain()
flick("weak_pain",pain)
flick("weak_pain",pain)
+31 -20
View File
@@ -3,25 +3,32 @@
Put (mob/proc)s here that are in dire need of a code cleanup.
*/
/mob/living/proc/has_disease(var/datum/disease/virus)
/mob/proc/has_disease(var/datum/disease/virus)
for(var/datum/disease/D in viruses)
if(istype(D, virus))
if(D.IsSame(virus))
//error("[D.name]/[D.type] is the same as [virus.name]/[virus.type]")
return 1
return 0
// This proc has some procs that should be extracted from it. I believe we can develop some helper procs from it - Rockdtben
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
// world << "Contract_disease called by [src] with virus [virus]"
if(stat >=2 || src.resistances.Find(virus.type)) return
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1, var/spread_type = -5)
//world << "Contract_disease called by [src] with virus [virus]"
if(stat >=2)
//world << "He's dead jim."
return
if(istype(virus, /datum/disease/advance))
//world << "It's an advance virus."
var/datum/disease/advance/A = virus
if(A.GetDiseaseID() in resistances)
//world << "It resisted us!"
return
else
if(src.resistances.Find(virus.type))
//world << "Normal virus and resisted"
return
//This gives a chance to re-infect cured/vaccinated mobs
// if(virus.type in resistances)
// if(prob(99.9)) return
// resistances.Remove(virus.type)//the resistance is futile
for(var/datum/disease/D in viruses)
if(istype(D, virus.type))
return // two viruses of the same kind can't infect a body at once!!
if(has_disease(virus))
return
if(force_species_check)
@@ -34,10 +41,10 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
if(fail) return
if(skip_this == 1)
//world << "infectin"
//if(src.virus) < -- this used to replace the current disease. Not anymore!
//src.virus.cure(0)
var/datum/disease/v = new virus.type
var/datum/disease/v = new virus.type(1, virus, 0)
src.viruses += v
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
@@ -45,7 +52,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
if(v.can_carry && prob(5))
v.carrier = 1
return
//world << "Not skipping."
//if(src.virus) //
//return //
@@ -64,7 +71,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
*/
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease! but then you forgot resistances
//world << "past prob()"
var/obj/item/clothing/Cl = null
var/passed = 1
@@ -74,7 +81,10 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
var/hands_ch
var/feet_ch
switch(virus.spread_type)
if(spread_type == -5)
spread_type = virus.spread_type
switch(spread_type)
if(CONTACT_HANDS)
head_ch = 0
body_ch = 0
@@ -155,7 +165,7 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
//world << "Mask pass [passed]"
if(passed && virus.spread_type == AIRBORNE && internals)
if(passed && spread_type == AIRBORNE && internals)
passed = (prob(50*virus.permeability_mod))
if(passed)
@@ -189,7 +199,8 @@ Put (mob/proc)s here that are in dire need of a code cleanup.
else if(prob(15))
return
else*/
var/datum/disease/v = new virus.type
var/datum/disease/v = new virus.type(1, virus, 0)
src.viruses += v
v.affected_mob = src
v.strain_data = v.strain_data.Copy()
+15 -26
View File
@@ -107,17 +107,16 @@
affecting.loc = assailant.loc
if ((killing == 2 && state == 3))
if(assailant.loc != kill_loc)
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] lost \his tightened grip on []'s neck!", assailant, affecting), 1)
visible_message("\red [assailant] lost \his tightened grip on [affecting]'s neck!")
killing = 0
hud1.icon_state = "disarm/kill"
return
if(ishuman(affecting))
var/mob/living/carbon/human/H = affecting
var/datum/organ/external/head = H.get_organ("head")
head.add_autopsy_data("Strangulation", 0)
affecting.Weaken(5) // Should keep you down unless you get help.
affecting.Stun(5) // It will hamper your voice, being choked and all.
affecting.losebreath = min(affecting.losebreath + 2, 3)
@@ -139,8 +138,7 @@
if(1.0)
if (state >= 3)
if (!( killing ))
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has temporarily tightened \his grip on []!", assailant, affecting), 1)
visible_message("\red [assailant] has temporarily tightened \his grip on [affecting]!")
//Foreach goto(97)
assailant.next_move = world.time + 10
//affecting.stunned = max(2, affecting.stunned)
@@ -169,7 +167,10 @@
if (state < 2)
if (!( allow_upgrade ))
return
if (prob(75))
visible_message("\red [assailant] has grabbed [affecting] aggressively (now hands)!")
state = 2
icon_state = "grabbed1"
/*if (prob(75))
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has grabbed [] aggressively (now hands)!", assailant, affecting), 1)
state = 2
@@ -178,7 +179,7 @@
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has failed to grab [] aggressively!", assailant, affecting), 1)
del(src)
return
return*/
else
if (state < 3)
if(istype(affecting, /mob/living/carbon/human))
@@ -203,9 +204,7 @@
assailant << "\blue You squeeze [affecting], but nothing interesting happens."
return
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has reinforced \his grip on [] (now neck)!", assailant, affecting), 1)
visible_message("\red [assailant] has reinforced \his grip on [affecting] (now neck)!")
state = 3
icon_state = "grabbed+1"
if (!( affecting.buckled ))
@@ -217,8 +216,7 @@
hud1.name = "disarm/kill"
else
if (state >= 3 && !killing)
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] starts to tighten \his grip on []'s neck!", assailant, affecting), 1)
visible_message("\red [assailant] starts to tighten \his grip on [affecting]'s neck!")
hud1.icon_state = "disarm/kill1"
killing = 1
if(do_after(assailant, 50))
@@ -232,20 +230,15 @@
return
killing = 2
kill_loc = assailant.loc
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] has tightened \his grip on []'s neck!", assailant, affecting), 1)
visible_message("\red [assailant] has tightened \his grip on [affecting]'s neck!")
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
log_admin("ATTACK: [assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])")
msg_admin_attack("ATTACK: [assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])")
assailant.next_move = world.time + 10
affecting.losebreath += 1
else
for(var/mob/O in viewers(assailant, null))
O.show_message(text("\red [] was unable to tighten \his grip on []'s neck!", assailant, affecting), 1)
visible_message("\red [assailant] was unable to tighten \his grip on [affecting]'s neck!")
killing = 0
hud1.icon_state = "disarm/kill"
return
@@ -276,16 +269,12 @@
if(M == assailant && state >= 2)
if( ( ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
var/mob/living/carbon/attacker = user
for(var/mob/N in viewers(user, null))
if(N.client)
N.show_message(text("\red <B>[user] is attempting to devour [affecting]!</B>"), 1)
visible_message("\red <B>[user] is attempting to devour [affecting]!</B>")
if(istype(user, /mob/living/carbon/alien/humanoid/hunter))
if(!do_mob(user, affecting)||!do_after(user, 30)) return
else
if(!do_mob(user, affecting)||!do_after(user, 100)) return
for(var/mob/N in viewers(user, null))
if(N.client)
N.show_message(text("\red <B>[user] devours [affecting]!</B>"), 1)
visible_message("\red <B>[user] devours [affecting]!</B>")
affecting.loc = user
attacker.stomach_contents.Add(affecting)
del(src)
+6 -26
View File
@@ -16,19 +16,15 @@
anchored = 1 // don't get pushed around
New()
mob_list += src
verb/new_player_panel()
set src = usr
new_player_panel_proc()
proc/new_player_panel_proc()
//no db for now
/*var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport*/
var/output = "<B>New Player Options</B>"
output +="<hr>"
output += "<br><a href='byond://?src=\ref[src];show_preferences=1'>Setup Character</A><br><br>"
@@ -46,9 +42,8 @@
output += "<a href='byond://?src=\ref[src];observe=1'>Observe</A><br><br>"
output += "<a href='byond://?src=\ref[src];pregame_music=1'>Lobby Music</A>"
/*if(!IsGuestKey(src.key))
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
if(!IsGuestKey(src.key))
establish_db_connection()
if(dbcon.IsConnected())
var/isadmin = 0
@@ -65,8 +60,6 @@
output += "<p><b><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
else
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
dbcon.Disconnect()*/
src << browse(output,"window=playersetup;size=250x258;can_close=0")
return
@@ -216,18 +209,7 @@
F["pregame_music"] << preferences.pregame_music
if(href_list["privacy_poll"])
usr << "\red DB usage has been disabled and that option should not have been available."
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(!dbcon.IsConnected())
return
var/voted = 0
@@ -264,8 +246,6 @@
usr << "<b>Thank you for your vote!</b>"
usr << browse(null,"window=privacypoll")
dbcon.Disconnect()
if(!ready && href_list["preference"])
preferences.process_link(src, href_list)
else if(!href_list["late_join"])
+9 -62
View File
@@ -1,14 +1,6 @@
/mob/new_player/proc/handle_privacy_poll()
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(!dbcon.IsConnected())
return
var/voted = 0
@@ -22,8 +14,6 @@
if(!voted)
privacy_poll()
dbcon.Disconnect()
/mob/new_player/proc/privacy_poll()
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
@@ -57,15 +47,7 @@
var/optiontext
/mob/new_player/proc/handle_player_polling()
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(dbcon.IsConnected())
var/isadmin = 0
if(src.client && src.client.holder)
@@ -95,20 +77,11 @@
src << browse(output,"window=playerpolllist;size=500x300")
dbcon.Disconnect()
/mob/new_player/proc/poll_player(var/pollid = -1)
if(pollid == -1) return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid]")
@@ -155,8 +128,6 @@
PO.optiontext = options_query.item[2]
options += PO
dbcon.Disconnect()
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
@@ -308,15 +279,7 @@
if(!isnum(pollid) || !isnum(optionid))
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
@@ -378,15 +341,7 @@
if(!isnum(pollid) || !istext(replytext))
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
@@ -422,10 +377,10 @@
adminrank = usr.client.holder.rank
replytext = dd_replacetext(replytext, "%BR%", "")
replytext = dd_replacetext(replytext, "\n", "%BR%")
replytext = replacetext(replytext, "%BR%", "")
replytext = replacetext(replytext, "\n", "%BR%")
var/text_pass = reject_bad_text(replytext,8000)
replytext = dd_replacetext(replytext, "%BR%", "<BR>")
replytext = replacetext(replytext, "%BR%", "<BR>")
if(!text_pass)
usr << "The text you entered was blank, contained illegal characters or was too long. Please correct the text and submit again."
@@ -444,15 +399,7 @@
if(!isnum(pollid) || !isnum(optionid))
return
var/user = sqlfdbklogin
var/pass = sqlfdbkpass
var/db = sqlfdbkdb
var/address = sqladdress
var/port = sqlport
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
+3 -3
View File
@@ -260,11 +260,11 @@ datum/preferences
if(config.allow_Metadata)
dat += "<b>OOC Notes:</b> <a href='byond://?src=\ref[user];preference=metadata;task=input'> Edit </a><br>"
if((user.client) && (user.client.holder) && (user.client.holder.rank))
if(user.client && user.client.holder)
dat += "<b>Adminhelp sound</b>: "
dat += "[(sound_adminhelp)?"On":"Off"] <a href='byond://?src=\ref[user];preference=hear_adminhelps'>toggle</a><br>"
if(user.client.holder.level >= 5)
if(config.allow_admin_ooccolor && check_rights(R_FUN,0))
dat += "<br><a href='byond://?src=\ref[user];preference=ooccolor;task=input'><b>OOC color</b></a> <font face=\"fixedsys\" size=\"3\" color=\"[ooccolor]\"><table style='display:inline;' bgcolor=\"[ooccolor]\"><tr><td>__</td></tr></table></font><br>"
dat += "\t<a href=\"byond://?src=\ref[user];preference=job;task=menu\"><b>Occupation Preferences</b></a><br>"
@@ -767,7 +767,7 @@ datum/preferences
if("all")
gender = pick(MALE,FEMALE)
randomize_name()
age = rand(17,45)
age = rand(17,85)
underwear = rand(1,12)
backbag = rand(1,4)
randomize_hair_color("hair")
@@ -644,3 +644,44 @@ datum/preferences
del(clothes_s)
proc/skintone2racedescription(var/tone)
switch (tone)
if(30 to INFINITY)
return "albino"
if(20 to 30)
return "pale"
if(5 to 15)
return "light skinned"
if(-10 to 5)
return "white"
if(-25 to -10)
return "tan"
if(-45 to -25)
return "darker skinned"
if(-65 to -45)
return "brown"
if(-INFINITY to -65)
return "black"
proc/age2agedescription(var/age)
switch (age)
if(0 to 1)
return "infant"
if(1 to 3)
return "toddler"
if(3 to 13)
return "child"
if(13 to 19)
return "teenager"
if(19 to 30)
return "young adult"
if(30 to 45)
return "adult"
if(45 to 60)
return "middle-aged"
if(60 to 70)
return "aging"
if(70 to INFINITY)
return "elderly"
@@ -112,6 +112,20 @@
name = "Ponytail 3"
icon_state = "hair_ponytail3"
parted
name = "Parted"
icon_state = "hair_parted"
pompadour
name = "Pompadour"
icon_state = "hair_pompadour"
choose_female = 0
quiff
name = "Quiff"
icon_state = "hair_quiff"
choose_female = 0
bedhead
name = "Bedhead"
icon_state = "hair_bedhead"
@@ -124,6 +138,45 @@
name = "Bedhead 3"
icon_state = "hair_bedheadv3"
beehive
name = "Beehive"
icon_state = "hair_beehive"
choose_male = 0
bobcurl
name = "Bobcurl"
icon_state = "hair_bobcurl"
choose_male = 0
bob
name = "Bob"
icon_state = "hair_bobcut"
choose_male = 0
bowl
name = "Bowl"
icon_state = "hair_bowlcut"
choose_female = 0
buzz
name = "Buzzcut"
icon_state = "hair_buzzcut"
choose_female = 0
crew
name = "Crewcut"
icon_state = "hair_crewcut"
choose_female = 0
combover
name = "Combover"
icon_state = "hair_combover"
choose_female = 0
devillock
name = "Devil Lock"
icon_state = "hair_devilock"
dreadlocks
name = "Dreadlocks"
icon_state = "hair_dreads"
@@ -137,6 +190,10 @@
name = "Afro"
icon_state = "hair_afro"
afro2
name = "Afro 2"
icon_state = "hair_afro2"
afro_large
name = "Big Afro"
icon_state = "hair_bigafro"
@@ -147,10 +204,23 @@
icon_state = "hair_sargeant"
choose_female = 0
emo
name = "Emo"
icon_state = "hair_emo"
fag
name = "Flow Hair"
icon_state = "hair_f"
feather
name = "Feather"
icon_state = "hair_feather"
hitop
name = "Hitop"
icon_state = "hair_hitop"
choose_female = 0
mohawk
name = "Mohawk"
icon_state = "hair_d"
@@ -190,6 +260,21 @@
icon_state = "hair_braid"
choose_male = 0
odango
name = "Odango"
icon_state = "hair_odango"
choose_male = 0
ombre
name = "Ombre"
icon_state = "hair_ombre"
choose_male = 0
updo
name = "Updo"
icon_state = "hair_updo"
choose_male = 0
skinhead
name = "Skinhead"
icon_state = "hair_skinhead"
+3 -1
View File
@@ -317,7 +317,7 @@
usr.m_intent = "run"
usr.m_int = "13,14"
if("Reset Machine")
usr.machine = null
usr.unset_machine()
if("internal")
if (( !usr.stat && !usr.stunned && !usr.paralysis && !usr.restrained() ))
if (usr.internal)
@@ -645,6 +645,7 @@
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
CM << "\green You successfully break your handcuffs."
CM.say(pick("RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.handcuffed)
CM.handcuffed = null
CM.update_inv_handcuffed()
@@ -682,6 +683,7 @@
for(var/mob/O in viewers(CM))
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
CM << "\green You successfully break your legcuffs."
CM.say(pick("RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.legcuffed)
CM.legcuffed = null
CM.update_inv_legcuffed()