Merge branch 'incremental_tg' r4967 (27/10/2012) into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/__HELPERS/game.dm
	code/__HELPERS/type2type.dm
	code/datums/helper_datums/getrev.dm
	code/game/atoms.dm
	code/game/gamemodes/events.dm
	code/game/machinery/atmo_control.dm
	code/game/machinery/atmoalter/area_atmos_computer.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/machinery/computer/atmos_alert.dm
	code/game/machinery/computer/card.dm
	code/game/machinery/computer/cloning.dm
	code/game/machinery/computer/computer.dm
	code/game/machinery/computer/pod.dm
	code/game/machinery/computer/prisoner.dm
	code/game/machinery/computer/syndicate_shuttle.dm
	code/game/machinery/newscaster.dm
	code/game/machinery/spaceheater.dm
	code/game/machinery/telecomms/broadcaster.dm
	code/game/machinery/telecomms/logbrowser.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/machinery/telecomms/telemonitor.dm
	code/game/machinery/telecomms/traffic_control.dm
	code/game/machinery/wishgranter.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/stacks/stack.dm
	code/game/objects/objs.dm
	code/modules/DetectiveWork/detective_work.dm
	code/modules/admin/IsBanned.dm
	code/modules/admin/admin.dm
	code/modules/admin/verbs/adminsay.dm
	code/modules/admin/verbs/getlogs.dm
	code/modules/awaymissions/zlevel.dm
	code/modules/client/client procs.dm
	code/modules/clothing/masks/miscellaneous.dm
	code/modules/clothing/spacesuits/miscellaneous.dm
	code/modules/flufftext/TextFilters.dm
	code/modules/mining/machine_processing.dm
	code/modules/mining/machine_stacking.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mint.dm
	code/modules/mining/satchel_ore_boxdm.dm
	code/modules/mob/living/carbon/monkey/life.dm
	code/modules/mob/living/living_defense.dm
	code/modules/mob/living/simple_animal/friendly/corgi.dm
	code/modules/mob/mob.dm
	code/modules/paperwork/filingcabinet.dm
	code/modules/paperwork/photocopier.dm
	code/modules/power/gravitygenerator.dm
	html/changelog.html
	icons/mob/head.dmi
	icons/mob/human_face.dmi
	icons/mob/mask.dmi
	icons/mob/suit.dmi
	icons/obj/clothing/hats.dmi
	icons/obj/clothing/masks.dmi
	icons/obj/clothing/suits.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-12-28 01:03:14 +10:00
250 changed files with 9936 additions and 10091 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
@@ -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
@@ -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>
@@ -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)
@@ -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
@@ -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
@@ -49,7 +49,7 @@
var/randn = rand(1, 100)
if (randn <= 90)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
Weaken(rand(10,15))
Weaken(10)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has tackled down []!</B>", M, src), 1)
+2 -2
View File
@@ -36,7 +36,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
@@ -74,7 +74,7 @@
//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
@@ -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
+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)
adjustFireLoss(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
adjustFireLoss(200)
else
loc_temp = environment.temperature
adjustFireLoss(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>"
@@ -64,7 +64,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 +158,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
@@ -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)
+23
View File
@@ -60,3 +60,26 @@
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, used_weapon = "Projectile([P.name])")
P.on_hit(src, absorb)
return absorb
/mob/living/hitby(atom/movable/AM as mob|obj)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
var/zone = ran_zone("chest",75)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [zone].", "Your armor has softened hit to your [zone].")
if(armor < 2)
apply_damage(O.throwforce, dtype, zone, armor, O)
if(!O.fingerprintslast)
return
var/mob/assailant = null
for(var/mob/living/M in player_list)//Finds the name of whoever threw it (This is required unless thrown objects are COMPLETELY reworked
if(M.key == O.fingerprintslast)
assailant = M
continue
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with [O], last touched by [assailant.name] ([assailant.ckey])</font>")
assailant.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 [assailant.name] ([assailant.ckey])</font>")
+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"
@@ -321,7 +331,7 @@
if (href_list["mach_close"] == "aialerts")
viewalerts = 0
var/t1 = text("window=[]", href_list["mach_close"])
machine = null
unset_machine()
src << browse(null, t1)
if (href_list["switchcamera"])
switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras
@@ -550,7 +560,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]
@@ -729,4 +739,4 @@
anchored = 1
return
else
return ..()
return ..()
@@ -1,4 +1,4 @@
#define UPDATE_BUFFER 20 // 2 seconds
#define UPDATE_BUFFER 25 // 2.5 seconds
// CAMERA CHUNK
//
@@ -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
@@ -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
@@ -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,4 @@
if(href_list["remove_inv"] || href_list["add_inv"])
usr << "\red You can't fit this on [src]"
return
..()
..()
@@ -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()
. = ..()
+54 -52
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"
@@ -78,28 +78,28 @@
/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
@@ -110,7 +110,7 @@
* 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>"
@@ -518,17 +518,19 @@
/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.w_class <= 2 || 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.w_class <= 2 || 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.w_class <= 2)
stolen_item = C.l_hand
if(istype(C.r_hand, path))
stolen_item = C.r_hand
if(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
+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.
+22 -25
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>
@@ -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,7 +564,7 @@ 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"])
@@ -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)
@@ -16,6 +16,9 @@
anchored = 1 // don't get pushed around
New()
mob_list += src
verb/new_player_panel()
set src = usr
new_player_panel_proc()
@@ -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"
+1 -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)