Just some general cleanup

Moved the spacecraft folder into the unused section, moved syndiebeacon into machinery.
Research moved into Modules.
Virus2 moved into WIP - is anyone even working on this, it looks almost done?
Computer2,optics,pda2,experimental moved unto unused.
WIP Chemistry things moved into Chemical Module
Cameras.dm moved into weapons
GameKit.dm moved into unused
BrokenInHands.dm moved into unused
Removed Grillify.dm
Moved all of the files listed as unused in the mining module to unused
Removed several empty folders in modules
Moved cloning.dm into machinery
Moved NewBan.dm into admin
Changed humanoid aliens new_life.dm into life.dm
Moved beast mob into unused
Moved hivebot into unused
Moved carpedexplosion.dm into unused
Moved ai_lockdown.dm verb into unused and removed it from the AIs verb list as it didn't actually do anything.
Removed mastercontroler2.dm
Moved savefile.dm from human to new_player

Bugfix
People spawning on the starting screen on rev/cult should be fixed.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1964 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-07-31 21:31:00 +00:00
parent ce470a81ba
commit 2224916ab9
94 changed files with 608 additions and 1126 deletions
+2 -2
View File
@@ -1032,8 +1032,8 @@
// for broken pipe, remove and turn into scrap
welded()
var/obj/item/scrap/S = new(src.loc)
S.set_components(200,0,0)
// var/obj/item/scrap/S = new(src.loc)
// S.set_components(200,0,0)
del(src)
// the disposal outlet machine
+4 -4
View File
@@ -807,10 +807,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
mob_list.Add(M)
for(var/mob/living/carbon/monkey/M in world)
mob_list.Add(M)
for(var/mob/living/silicon/hivebot/M in world)
mob_list.Add(M)
for(var/mob/living/silicon/hive_mainframe/M in world)
mob_list.Add(M)
// for(var/mob/living/silicon/hivebot/M in world)
// mob_list.Add(M)
// for(var/mob/living/silicon/hive_mainframe/M in world)
// mob_list.Add(M)
return mob_list
/proc/convert2energy(var/M)
+19 -1
View File
@@ -83,4 +83,22 @@
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src)
P.reagents.add_reagent("nutriment", 500)
P.name = "Cyanide pill"
return
return
/obj/ship_landing_beacon
icon = 'craft.dmi'
icon_state = "beacon"
name = "Beacon"
var/active = 0
proc
deploy()
if(active)
return
src.active = 1
src.anchored = 1
deactivate()
if(!active)
return
src.active = 0
src.anchored = 0
+4 -4
View File
@@ -240,7 +240,7 @@
var/obj/item/W = usr.equipped()
if(istype(usr, /mob/living/silicon/hivebot)||istype(usr, /mob/living/silicon/robot))
if(istype(usr, /mob/living/silicon/robot))
if(!isnull(usr:module_active))
W = usr:module_active
else
@@ -267,7 +267,7 @@
if (istype(usr, /mob/living/silicon/ai))
t5 = 1
if ((istype(usr, /mob/living/silicon/robot) || istype(usr, /mob/living/silicon/hivebot)) && W == null)
if ((istype(usr, /mob/living/silicon/robot)) && W == null)
t5 = 1
if (istype(src, /datum/organ) && src in usr.contents)
@@ -372,7 +372,7 @@
if (istype(usr, /mob/living/carbon/alien/humanoid))
src.attack_alien(usr, usr.hand)
else
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)|| istype(usr, /mob/living/silicon/hivebot))
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
src.attack_ai(usr, usr.hand)
else
@@ -388,7 +388,7 @@
if (istype(usr, /mob/living/carbon/alien/humanoid))
src.hand_al(usr, usr.hand)
else
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)|| istype(usr, /mob/living/silicon/hivebot))
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
src.hand_a(usr, usr.hand)
else
+2 -4
View File
@@ -238,7 +238,7 @@
//DISABLE TECH
/mob/proc/tech()
/mob/proc/tech()//Shouldnt this just use the emp() proc?
set category = "Spells"
set name = "Disable Technology"
set desc = "This spell disables all weapons, cameras and most other technology in range."
@@ -290,12 +290,10 @@
M << "\red Warning: Electromagnetic pulse detected."
if(istype(M, /mob/living/silicon/ai))
if (prob(30))
switch(pick(1,2,3)) //Add Random laws.
switch(pick(1,2))
if(1)
M:cancel_camera()
if(2)
M:lockdown()
if(3)
M:ai_call_shuttle()
continue
+4 -4
View File
@@ -100,11 +100,11 @@ obj/hud/New(var/type = 0)
else if(isrobot(mymob))
robot_hud()
else if(ishivebot(mymob))
hivebot_hud()
// else if(ishivebot(mymob))
// hivebot_hud()
else if(ishivemainframe(mymob))
hive_mainframe_hud()
// else if(ishivemainframe(mymob))
// hive_mainframe_hud()
else if(isobserver(mymob))
ghost_hud()
+10
View File
@@ -90,6 +90,7 @@
if (unassigned.len) //unlucky players with preferences and players without preferences
var/list/vacancies = list()
var/list/failsafe = list()
for (var/occ in occupation_eligible)
for (var/i = 1 to occupation_eligible[occ])
vacancies += occ
@@ -100,11 +101,20 @@
if(candidate.jobs_restricted_by_gamemode)
if(occupation in candidate.jobs_restricted_by_gamemode)
vacancies += occupation
failsafe += candidate
continue
candidate.mind.assigned_role = occupation
for (var/mob/new_player/player in unassigned)
if (unassigned.len == 0)
break
player.mind.assigned_role = pick(assistant_occupations)
for (var/mob/new_player/player in failsafe)
if (unassigned.len == 0)
break
player.mind.assigned_role = pick(assistant_occupations)
return 1
-11
View File
@@ -59,17 +59,6 @@
R.cell.charge += 50
return
else if (istype(occupant, /mob/living/silicon/hivebot))
var/mob/living/silicon/hivebot/H = occupant
if(H.energy >= H.energy_max)
H.energy = H.energy_max
return
else
H.energy += 50
return
go_out()
if(!( src.occupant ))
return
-120
View File
@@ -1,120 +0,0 @@
var/global/datum/controller/game_controller/master_controller //Set in world.New()
var/global/controllernum = "no"
var/global/controlleriteration = 0
datum/controller/game_controller
var/processing = 1
proc
setup()
setup_objects()
process()
setup()
if(master_controller && (master_controller != src))
del(src)
return
//There can be only one master.
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
world.tick_lag = 0.9
setup_objects()
setupgenetics()
setupcorpses()
emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
if(!ticker)
ticker = new /datum/controller/gameticker()
spawn
ticker.pregame()
setup_objects()
world << "\red \b Initializing objects"
sleep(-1)
for(var/obj/object in world)
object.initialize()
world << "\red \b Initializing pipe networks"
sleep(-1)
for(var/obj/machinery/atmospherics/machine in world)
machine.build_network()
/*world << "\red \b Initializing atmos machinery"
sleep(-1)
find_air_alarms()*/
world << "\red \b Initializations complete."
process()
if(!processing)
return 0
//world << "Processing"
controllernum = "yes"
spawn (100) controllernum = "no"
controlleriteration++
var/start_time = world.timeofday
if (controlleriteration%2==1) //make the atmos processing only happen every other tick)
air_master.process()
sleep(1)
sun.calc_position()
sleep(-1)
for(var/mob/M in world)
if (M.metabslow)
if (controlleriteration%10==1) // For everyone who has their metabolism slowed, make updates not so frequently
M.Life()
else
M.Life()
sleep(-1)
for(var/datum/disease/D in active_diseases)
D.process()
for(var/obj/machinery/machine in machines)
if(machine)
machine.process()
if(machine && machine.use_power)
machine.auto_use_power()
sleep(-1)
sleep(1)
for(var/obj/item/item in processing_items)
item.process()
for(var/datum/pipe_network/network in pipe_networks)
network.process()
for(var/datum/powernet/P in powernets)
P.reset()
sleep(-1)
ticker.process()
sleep(start_time+10-world.timeofday)
spawn process()
return 1
+1 -1
View File
@@ -300,7 +300,7 @@
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if (ishuman(user) || isrobot(user) || ishivebot(user) || ismonkey(user) || isalien(user))
if (ishuman(user) || isrobot(user) || ismonkey(user) || isalien(user))
if (!( def_zone ))
var/mob/user2 = user
var/t = user2:zone_sel.selecting
-23
View File
@@ -1,23 +0,0 @@
// Made during the internet outage caused by hurricane ike
// fuck you ike
// love persh
///client/proc/grillify()
// set category = "Debug"
// set name = "spawn grilles"
// set desc="it spawns grilles okay fuck if I know"
// if(Debug2)
// // All admins should be authenticated, but... what if?
// if(!src.authenticated || !src.holder)
// src << "Only administrators may use this command."
// return
//
// log_admin("[src.key] used the grillify verb")
// world << "\blue<big><B>[src.key] used the grillify verb/bitches better get yellow gloves verb!</big></B>"
//
// for(var/turf/T in world)
// if(!T.density)
// spawn(-1)
// new /obj/grille(locate(T.x,T.y,T.z))
// else
// alert("Debugging is disabled")
// return
@@ -6,6 +6,7 @@
temperature_alert = 0
/mob/living/carbon/alien/humanoid/Life()
set invisibility = 0
set background = 1
@@ -13,245 +14,84 @@
if (src.monkeyizing)
return
var/datum/gas_mixture/environment = loc.return_air()
if (src.stat != 2) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
var/datum/air_group/breath
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
spawn(0) breathe()
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
src.blinded = null
//Disease Check
handle_virus_updates()
handle_environment(environment)
//Handle temperature/pressure differences between body and environment also handles alien weeds!
//Update mind
update_mind()
//Handle temperature/pressure differences between body and environment
handle_environment()
//Mutations and radiation
handle_mutations_and_radiation()
//Chemicals in the body
handle_chemicals_in_body()
//stuff in the stomach
handle_stomach()
//Disabilities
handle_disabilities()
//Status updates, death etc.
handle_regular_status_updates()
// Update clothing
update_clothing()
if(client)
handle_regular_hud_updates()
//Being buckled to a chair or bed
check_if_buckled()
// Yup.
update_canmove()
clamp_values()
// Grabbing
for(var/obj/item/weapon/grab/G in src)
G.process()
/mob/living/carbon/alien/humanoid
proc
clamp_values()
handle_breath(datum/gas_mixture/breath)
//Aliens can breathe in any atmosphere
var/toxins_used = 0
stunned = max(min(stunned, 20),0)
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(bruteloss, 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
if(breath.toxins > ((ONE_ATMOSPHERE*BREATH_VOLUME*0.15)/(T20C*R_IDEAL_GAS_EQUATION)))
var/available_ratio = breath.toxins/((ONE_ATMOSPHERE*BREATH_VOLUME*0.15)/(T20C*R_IDEAL_GAS_EQUATION))
toxins_used = breath.toxins*available_ratio/6
toxloss += 7*(1-available_ratio)
else
toxloss = max(toxloss-5, 0)
toxins_used = breath.oxygen/6
breath.toxins -= toxins_used
breath.oxygen += toxins_used
handle_disabilities()
if(breath.temperature > (T0C+66))
fire_alert = max(fire_alert, 1)
return 1
handle_environment(datum/gas_mixture/environment)
if(!environment)
return
var/environment_heat_capacity = environment.heat_capacity()
if(istype(loc, /turf/space))
environment_heat_capacity = loc:heat_capacity
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/alien/weeds) in loc)
if(health >= 100)
toxloss += 2
else
health += 5
if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
transfer_coefficient = 1
if(head && (head.body_parts_covered & HEAD) && (environment.temperature < head.protective_temperature))
transfer_coefficient *= head.heat_transfer_coefficient
if(wear_mask && (wear_mask.body_parts_covered & HEAD) && (environment.temperature < wear_mask.protective_temperature))
transfer_coefficient *= wear_mask.heat_transfer_coefficient
if(wear_suit && (wear_suit.body_parts_covered & HEAD) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient)
transfer_coefficient = 1
if(wear_suit && (wear_suit.body_parts_covered & UPPER_TORSO) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(UPPER_TORSO, environment.temperature, environment_heat_capacity*transfer_coefficient)
transfer_coefficient = 1
if(wear_suit && (wear_suit.body_parts_covered & LOWER_TORSO) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(LOWER_TORSO, environment.temperature, environment_heat_capacity*transfer_coefficient)
transfer_coefficient = 1
if(wear_suit && (wear_suit.body_parts_covered & LEGS) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(LEGS, environment.temperature, environment_heat_capacity*transfer_coefficient)
transfer_coefficient = 1
if(wear_suit && (wear_suit.body_parts_covered & ARMS) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(ARMS, environment.temperature, environment_heat_capacity*transfer_coefficient)
transfer_coefficient = 1
if(wear_suit && (wear_suit.body_parts_covered & HANDS) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(HANDS, environment.temperature, environment_heat_capacity*transfer_coefficient)
transfer_coefficient = 1
if(wear_suit && (wear_suit.body_parts_covered & FEET) && (environment.temperature < wear_suit.protective_temperature))
transfer_coefficient *= wear_suit.heat_transfer_coefficient
handle_temperature_damage(FEET, environment.temperature, environment_heat_capacity*transfer_coefficient)
if(stat==2)
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
//Account for massive pressure differences
return //TODO: DEFERRED
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
var/discomfort = abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000
switch(body_part)
if(HEAD)
TakeDamage("head", 0, 2.5*discomfort)
if(UPPER_TORSO)
TakeDamage("chest", 0, 2.5*discomfort)
if(LOWER_TORSO)
TakeDamage("groin", 0, 2.0*discomfort)
if(LEGS)
TakeDamage("l_leg", 0, 0.6*discomfort)
TakeDamage("r_leg", 0, 0.6*discomfort)
if(ARMS)
TakeDamage("l_arm", 0, 0.4*discomfort)
TakeDamage("r_arm", 0, 0.4*discomfort)
if(FEET)
TakeDamage("l_foot", 0, 0.25*discomfort)
TakeDamage("r_foot", 0, 0.25*discomfort)
if(HANDS)
TakeDamage("l_hand", 0, 0.25*discomfort)
TakeDamage("r_hand", 0, 0.25*discomfort)
handle_chemicals_in_body()
return //TODO: DEFERRED
handle_regular_status_updates()
//No toxloss because aliens breathe in toxins
health = 100 - (oxyloss + fireloss + bruteloss)
if(oxyloss > 25)
paralysis = max(paralysis, 3)
if(health < -100)
death()
return 1
handle_regular_hud_updates()
//Aliens can't have internals
if(internal)
internals.icon_state = "internal1"
else
internals.icon_state = "internal0"
//Aliens can breathe any atmosphere
if(oxygen_alert > 0)
oxygen_alert -= 1
oxygen.icon_state = "oxy1"
else
oxygen.icon_state = "oxy0"
//Aliens like toxins :)
if(toxins_alert > 0)
toxins_alert -= 1
toxin.icon_state = "tox1"
else
toxin.icon_state = "tox0"
//This makes sense, aliens hate fire
if(fire_alert > 0)
fire_alert -= 1
fire.icon_state = "fire1"
else
fire.icon_state = "fire0"
return 1
//Should aliens have DNA?
//Figure it out and come back here.
//Nannek
//As a note, the toxloss for radiation should be changed as the alien uses toxloss as a fuel
handle_random_events()
return
/*
if (src.radiation > 100)
src.radiation = 100
if ((prob(1) && (src.radiation >= 75)))
randmutb(src)
src << "\red High levels of Radiation cause you to spontaneously mutate."
domutcheck(src,null)
if ((prob(7) && (src.radiation >= 75)))
if (src.paralysis < 3)
src.paralysis = 3
src << "\red You feel weak!"
emote("collapse")
src.updatehealth()
src.radiation -= 5
else if ((prob(7) && ((src.radiation > 50)&&(src.radiation < 75))))
src.updatehealth()
src.radiation -= 5
emote("gasp")
else
if (prob(7) && (src.radiation > 1))
if (src.radiation >= 10)
src.radiation -= 10
src.toxloss += 5
src.updatehealth()
else
src.radiation = 0
if (src.disabilities & 2)
if ((prob(1) && src.paralysis < 10 && src.r_epil < 1))
src << "\red You have a seizure!"
@@ -271,87 +111,465 @@
if (src.disabilities & 16)
if (prob(10))
src.stuttering = max(10, src.stuttering)
if (prob(1) && prob(2))
spawn(0)
emote("sneeze")
return
*/
//This is fine for the alien
update_mind()
if(!mind && client)
mind = new
mind.current = src
mind.assigned_role = "Hunter"
mind.key = key
handle_mutations_and_radiation()
if(src.fireloss)
if(src.mutations & COLD_RESISTANCE || prob(50))
switch(src.fireloss)
if(1 to 50)
src.fireloss--
if(51 to 100)
src.fireloss -= 5
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
src << "\red You suddenly feel very weak."
src.weakened = 3
emote("collapse")
if (src.radiation)
if (src.radiation > 100)
src.radiation = 100
src.weakened = 10
src << "\red You feel weak."
emote("collapse")
if (src.radiation < 0)
src.radiation = 0
switch(src.radiation)
if(1 to 49)
src.radiation--
if(prob(25))
src.toxloss++
src.updatehealth()
if(50 to 74)
src.radiation -= 2
src.toxloss++
if(prob(5))
src.radiation -= 5
src.weakened = 3
src << "\red You feel weak."
emote("collapse")
src.updatehealth()
if(75 to 100)
src.radiation -= 3
src.toxloss += 3
if(prob(1))
src << "\red You mutate!"
randmutb(src)
domutcheck(src,null)
emote("gasp")
src.updatehealth()
breathe()
if(src.reagents)
if(src.reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
// HACK NEED CHANGING LATER
if(src.health < 0)
src.losebreath++
if(losebreath>0) //Suffocating so do not take a breath
src.losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effects will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
else*/
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(src.internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (src.internals)
src.internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (src.internals)
src.internals.icon_state = "internal0"
return null
update_canmove()
if(paralysis || stunned || weakened || buckled) canmove = 0
else canmove = 1
handle_breath(datum/gas_mixture/breath)
if(src.nodamage)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
var/toxins_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
if(Toxins_pp) // Detect toxins in air
toxloss += breath.toxins*250
toxins_alert = max(toxins_alert, 1)
toxins_used = breath.toxins
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
handle_environment()
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/alien/weeds) in loc)
if(health >= 100)
toxloss += 15
if(toxloss > max_plasma)
toxloss = max_plasma
else
bruteloss -= 15
fireloss -= 15
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
get_thermal_protection()
var/thermal_protection = 1.0
//Handle normal clothing
if(head && (head.body_parts_covered & HEAD))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & UPPER_TORSO))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.flags & SUITSPACE))
thermal_protection += 3
if(src.mutations & COLD_RESISTANCE)
thermal_protection += 5
return thermal_protection
add_fire_protection(var/temp)
var/fire_prot = 0
if(head)
if(head.protective_temperature > temp)
fire_prot += (head.protective_temperature/10)
if(wear_mask)
if(wear_mask.protective_temperature > temp)
fire_prot += (wear_mask.protective_temperature/10)
if(wear_suit)
if(wear_suit.protective_temperature > temp)
fire_prot += (wear_suit.protective_temperature/10)
return fire_prot
handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(src.nutrition > 500 && !(src.mutations & FAT))
if(prob(5 + round((src.nutrition - 200) / 2)))
src << "\red You suddenly feel blubbery!"
src.mutations |= FAT
// update_body()
if (src.nutrition < 100 && src.mutations & FAT)
if(prob(round((50 - src.nutrition) / 100)))
src << "\blue You feel fit again!"
src.mutations &= ~FAT
// update_body()
if (src.nutrition > 0)
src.nutrition -= HUNGER_FACTOR
if (src.drowsyness)
src.drowsyness--
src.eye_blurry = max(2, src.eye_blurry)
if (prob(5))
src.sleeping = 1
src.paralysis = 5
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
src.updatehealth()
return //TODO: DEFERRED
handle_regular_status_updates()
health = 100 - (oxyloss + fireloss + bruteloss + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
if(src.sleeping)
src.paralysis = max(src.paralysis, 3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
if(src.resting)
src.weakened = max(src.weakened, 5)
if(health < -100 || src.brain_op_stage == 4.0)
death()
else if(src.health < 0)
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
src.paralysis = max(src.paralysis, 5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
src.stunned--
src.stat = 0
if (src.weakened > 0)
src.weakened--
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
src.paralysis--
src.blinded = 1
src.lying = 1
src.stat = 1
var/h = src.hand
src.hand = 0
drop_item()
src.hand = 1
drop_item()
src.hand = h
else //Not stunned.
src.lying = 0
src.stat = 0
else //Dead.
src.lying = 1
src.blinded = 1
src.stat = 2
if (src.stuttering) src.stuttering--
if (src.eye_blind)
src.eye_blind--
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf--
if (src.ear_damage < 25)
src.ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0)
src.density = !( src.lying )
if ((src.sdisabilities & 1))
src.blinded = 1
if ((src.sdisabilities & 4))
src.ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry--
src.eye_blurry = max(0, src.eye_blurry)
if (src.druggy > 0)
src.druggy--
src.druggy = max(0, src.druggy)
return 1
handle_regular_hud_updates()
if (src.stat == 2 || src.mutations & XRAY)
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = 2
else if (src.stat != 2)
src.sight |= SEE_MOBS
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_OBJS
src.see_in_dark = 4
src.see_invisible = 2
if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping)
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
if (src.healths)
if (src.stat != 2)
switch(health)
if(100 to INFINITY)
src.healths.icon_state = "health0"
if(75 to 100)
src.healths.icon_state = "health1"
if(50 to 75)
src.healths.icon_state = "health2"
if(25 to 50)
src.healths.icon_state = "health3"
if(0 to 25)
src.healths.icon_state = "health4"
else
src.healths.icon_state = "health5"
else
src.healths.icon_state = "health6"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy
src.client.screen -= src.hud_used.vimpaired
if ((src.blind && src.stat != 2))
if ((src.blinded))
src.blind.layer = 18
else
src.blind.layer = 0
if (src.disabilities & 1)
src.client.screen += src.hud_used.vimpaired
if (src.eye_blurry)
src.client.screen += src.hud_used.blurry
if (src.druggy)
src.client.screen += src.hud_used.druggy
if (src.stat != 2)
if (src.machine)
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
handle_virus_updates()
if(src.bodytemperature > 406)
src.virus.cure()
for(var/datum/disease/D in viruses)
D.cure()
return
if(!src.virus)
if(prob(40))
for(var/mob/living/carbon/M in range(4, src))
if(M.virus && M.virus.spread == "Airborne")
if(M.virus.affected_species.Find("Alien"))
if(M.virus.type in src.resistances)
continue
src.contract_disease(new M.virus.type)
for(var/obj/decal/cleanable/blood/B in range(4, src))
if(B.virus && B.virus.spread == "Airborne")
if(B.virus.affected_species.Find("Alien"))
if(B.virus.type in src.resistances)
continue
src.contract_disease(new B.virus.type)
for(var/obj/decal/cleanable/xenoblood/X in range(4, src))
if(X.virus && X.virus.spread == "Airborne")
if(X.virus.affected_species.Find("Alien"))
if(X.virus.type in src.resistances)
continue
src.contract_disease(new X.virus.type)
check_if_buckled()
if (src.buckled)
src.lying = (istype(src.buckled, /obj/stool/bed) ? 1 : 0)
if(src.lying)
src.drop_item()
src.density = 1
else
src.virus.stage_act()
/*
snippets
src.density = !src.lying
if (src.mach)
if (src.machine)
src.mach.icon_state = "mach1"
else
src.mach.icon_state = null
if (!src.m_flag)
src.moved_recently = 0
src.m_flag = null
if ((istype(src.loc, /turf/space) && !( locate(/obj/movable, src.loc) )))
var/layers = 20
// ******* Check
if (((istype(src.head, /obj/item/clothing/head) && src.head.flags & 4) || (istype(src.wear_mask, /obj/item/clothing/mask) && (!( src.wear_mask.flags & 4 ) && src.wear_mask.flags & 8))))
layers -= 5
if (istype(src.w_uniform, /obj/item/clothing/under))
layers -= 5
if ((istype(src.wear_suit, /obj/item/clothing/suit) && src.wear_suit.flags & 8))
layers -= 10
if (layers > oxcheck)
oxcheck = layers
if(src.bodytemperature < 282.591 && (!src.firemut))
if(src.bodytemperature < 250)
src.fireloss += 4
src.updatehealth()
if(src.paralysis <= 2) src.paralysis += 2
else if(prob(1) && !src.paralysis)
if(src.paralysis <= 5) src.paralysis += 5
emote("collapse")
src << "\red You collapse from the cold!"
if(src.bodytemperature > 327.444 && (!src.firemut))
if(src.bodytemperature > 345.444)
if(!src.eye_blurry) src << "\red The heat blurs your vision!"
src.eye_blurry = max(4, src.eye_blurry)
if(prob(3)) src.fireloss += rand(1,2)
else if(prob(3) && !src.paralysis)
src.paralysis += 2
emote("collapse")
src << "\red You collapse from heat exaustion!"
plcheck = src.t_plasma
oxcheck = src.t_oxygen
G.turf_add(T, G.total_moles())
*/
handle_stomach()
spawn(0)
for(var/mob/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && src.stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
del(M)
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
src.nutrition += 10
@@ -1,575 +0,0 @@
/mob/living/carbon/alien/humanoid
var
oxygen_alert = 0
toxins_alert = 0
fire_alert = 0
temperature_alert = 0
/mob/living/carbon/alien/humanoid/Life()
set invisibility = 0
set background = 1
if (src.monkeyizing)
return
if (src.stat != 2) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
spawn(0) breathe()
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
src.blinded = null
//Disease Check
handle_virus_updates()
//Update mind
update_mind()
//Handle temperature/pressure differences between body and environment
handle_environment()
//Mutations and radiation
handle_mutations_and_radiation()
//Chemicals in the body
handle_chemicals_in_body()
//stuff in the stomach
handle_stomach()
//Disabilities
handle_disabilities()
//Status updates, death etc.
handle_regular_status_updates()
// Update clothing
update_clothing()
if(client)
handle_regular_hud_updates()
//Being buckled to a chair or bed
check_if_buckled()
// Yup.
update_canmove()
clamp_values()
// Grabbing
for(var/obj/item/weapon/grab/G in src)
G.process()
/mob/living/carbon/alien/humanoid
proc
clamp_values()
stunned = max(min(stunned, 20),0)
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(bruteloss, 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
handle_disabilities()
if (src.disabilities & 2)
if ((prob(1) && src.paralysis < 10 && src.r_epil < 1))
src << "\red You have a seizure!"
src.paralysis = max(10, src.paralysis)
if (src.disabilities & 4)
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
src.drop_item()
spawn( 0 )
emote("cough")
return
if (src.disabilities & 8)
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
src.stunned = max(10, src.stunned)
spawn( 0 )
emote("twitch")
return
if (src.disabilities & 16)
if (prob(10))
src.stuttering = max(10, src.stuttering)
update_mind()
if(!mind && client)
mind = new
mind.current = src
mind.assigned_role = "Hunter"
mind.key = key
handle_mutations_and_radiation()
if(src.fireloss)
if(src.mutations & COLD_RESISTANCE || prob(50))
switch(src.fireloss)
if(1 to 50)
src.fireloss--
if(51 to 100)
src.fireloss -= 5
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
src << "\red You suddenly feel very weak."
src.weakened = 3
emote("collapse")
if (src.radiation)
if (src.radiation > 100)
src.radiation = 100
src.weakened = 10
src << "\red You feel weak."
emote("collapse")
if (src.radiation < 0)
src.radiation = 0
switch(src.radiation)
if(1 to 49)
src.radiation--
if(prob(25))
src.toxloss++
src.updatehealth()
if(50 to 74)
src.radiation -= 2
src.toxloss++
if(prob(5))
src.radiation -= 5
src.weakened = 3
src << "\red You feel weak."
emote("collapse")
src.updatehealth()
if(75 to 100)
src.radiation -= 3
src.toxloss += 3
if(prob(1))
src << "\red You mutate!"
randmutb(src)
domutcheck(src,null)
emote("gasp")
src.updatehealth()
breathe()
if(src.reagents)
if(src.reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
// HACK NEED CHANGING LATER
if(src.health < 0)
src.losebreath++
if(losebreath>0) //Suffocating so do not take a breath
src.losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
else
//First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME)
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effects will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
breath_moles = (ONE_ATMOSPHERE*BREATH_VOLUME/R_IDEAL_GAS_EQUATION*environment.temperature)
else*/
// Not enough air around, take a percentage of what's there to model this properly
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
if(breath)
loc.assume_air(breath)
get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(src.internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (src.internals)
src.internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (src.internals)
src.internals.icon_state = "internal0"
return null
update_canmove()
if(paralysis || stunned || weakened || buckled) canmove = 0
else canmove = 1
handle_breath(datum/gas_mixture/breath)
if(src.nodamage)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
var/toxins_used = 0
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath.toxins/breath.total_moles())*breath_pressure
if(Toxins_pp) // Detect toxins in air
toxloss += breath.toxins*250
toxins_alert = max(toxins_alert, 1)
toxins_used = breath.toxins
else
toxins_alert = 0
//Breathe in toxins and out oxygen
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
//Temporary fixes to the alerts.
return 1
handle_environment()
//If there are alien weeds on the ground then heal if needed or give some toxins
if(locate(/obj/alien/weeds) in loc)
if(health >= 100)
toxloss += 15
if(toxloss > max_plasma)
toxloss = max_plasma
else
bruteloss -= 15
fireloss -= 15
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
get_thermal_protection()
var/thermal_protection = 1.0
//Handle normal clothing
if(head && (head.body_parts_covered & HEAD))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & UPPER_TORSO))
thermal_protection += 0.5
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
thermal_protection += 0.2
if(wear_suit && (wear_suit.flags & SUITSPACE))
thermal_protection += 3
if(src.mutations & COLD_RESISTANCE)
thermal_protection += 5
return thermal_protection
add_fire_protection(var/temp)
var/fire_prot = 0
if(head)
if(head.protective_temperature > temp)
fire_prot += (head.protective_temperature/10)
if(wear_mask)
if(wear_mask.protective_temperature > temp)
fire_prot += (wear_mask.protective_temperature/10)
if(wear_suit)
if(wear_suit.protective_temperature > temp)
fire_prot += (wear_suit.protective_temperature/10)
return fire_prot
handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(src.nutrition > 500 && !(src.mutations & FAT))
if(prob(5 + round((src.nutrition - 200) / 2)))
src << "\red You suddenly feel blubbery!"
src.mutations |= FAT
// update_body()
if (src.nutrition < 100 && src.mutations & FAT)
if(prob(round((50 - src.nutrition) / 100)))
src << "\blue You feel fit again!"
src.mutations &= ~FAT
// update_body()
if (src.nutrition > 0)
src.nutrition -= HUNGER_FACTOR
if (src.drowsyness)
src.drowsyness--
src.eye_blurry = max(2, src.eye_blurry)
if (prob(5))
src.sleeping = 1
src.paralysis = 5
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
jitteriness = max(0, jitteriness - 5)
else
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
src.updatehealth()
return //TODO: DEFERRED
handle_regular_status_updates()
health = 100 - (oxyloss + fireloss + bruteloss + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
if(src.sleeping)
src.paralysis = max(src.paralysis, 3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
if(src.resting)
src.weakened = max(src.weakened, 5)
if(health < -100 || src.brain_op_stage == 4.0)
death()
else if(src.health < 0)
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
if(src.stat != 2) src.stat = 1
src.paralysis = max(src.paralysis, 5)
if (src.stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
if (src.stunned > 0)
src.stunned--
src.stat = 0
if (src.weakened > 0)
src.weakened--
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
src.paralysis--
src.blinded = 1
src.lying = 1
src.stat = 1
var/h = src.hand
src.hand = 0
drop_item()
src.hand = 1
drop_item()
src.hand = h
else //Not stunned.
src.lying = 0
src.stat = 0
else //Dead.
src.lying = 1
src.blinded = 1
src.stat = 2
if (src.stuttering) src.stuttering--
if (src.eye_blind)
src.eye_blind--
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf--
if (src.ear_damage < 25)
src.ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0)
src.density = !( src.lying )
if ((src.sdisabilities & 1))
src.blinded = 1
if ((src.sdisabilities & 4))
src.ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry--
src.eye_blurry = max(0, src.eye_blurry)
if (src.druggy > 0)
src.druggy--
src.druggy = max(0, src.druggy)
return 1
handle_regular_hud_updates()
if (src.stat == 2 || src.mutations & XRAY)
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = 2
else if (src.stat != 2)
src.sight |= SEE_MOBS
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_OBJS
src.see_in_dark = 4
src.see_invisible = 2
if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping)
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
if (src.healths)
if (src.stat != 2)
switch(health)
if(100 to INFINITY)
src.healths.icon_state = "health0"
if(75 to 100)
src.healths.icon_state = "health1"
if(50 to 75)
src.healths.icon_state = "health2"
if(25 to 50)
src.healths.icon_state = "health3"
if(0 to 25)
src.healths.icon_state = "health4"
else
src.healths.icon_state = "health5"
else
src.healths.icon_state = "health6"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy
src.client.screen -= src.hud_used.vimpaired
if ((src.blind && src.stat != 2))
if ((src.blinded))
src.blind.layer = 18
else
src.blind.layer = 0
if (src.disabilities & 1)
src.client.screen += src.hud_used.vimpaired
if (src.eye_blurry)
src.client.screen += src.hud_used.blurry
if (src.druggy)
src.client.screen += src.hud_used.druggy
if (src.stat != 2)
if (src.machine)
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
else
if(!client.adminobs)
reset_view(null)
return 1
handle_virus_updates()
if(src.bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
return
check_if_buckled()
if (src.buckled)
src.lying = (istype(src.buckled, /obj/stool/bed) ? 1 : 0)
if(src.lying)
src.drop_item()
src.density = 1
else
src.density = !src.lying
handle_stomach()
spawn(0)
for(var/mob/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && src.stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
del(M)
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
src.nutrition += 10
+1 -5
View File
@@ -32,8 +32,6 @@
verbs += /mob/living/silicon/ai/proc/ai_camera_list
//Added ai_network_change by Mord_Sith
verbs += /mob/living/silicon/ai/proc/ai_network_change
verbs += /mob/living/silicon/ai/proc/lockdown
verbs += /mob/living/silicon/ai/proc/disablelockdown
verbs += /mob/living/silicon/ai/proc/ai_statuschange
//Hologram verb./N
verbs += /mob/living/silicon/ai/proc/ai_hologram_change
@@ -188,12 +186,10 @@
/mob/living/silicon/ai/emp_act(severity)
if (prob(30))
switch(pick(1,2,3)) //Add Random laws.
switch(pick(1,2))
if(1)
cancel_camera()
if(2)
lockdown()
if(3)
ai_call_shuttle()
..()
+2 -2
View File
@@ -5,8 +5,8 @@
return 1
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/hivebot))
return 1
// if (istype(other, /mob/living/silicon/hivebot))
// return 1
return ..()
/mob/living/silicon/robot/say_quote(var/text)
+11 -11
View File
@@ -57,15 +57,15 @@
return 1
return 0
/proc/ishivebot(A)
/*proc/ishivebot(A)
if(A && istype(A, /mob/living/silicon/hivebot))
return 1
return 0
return 0*/
/proc/ishivemainframe(A)
/*proc/ishivemainframe(A)
if(A && istype(A, /mob/living/silicon/hive_mainframe))
return 1
return 0
return 0*/
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
@@ -974,20 +974,20 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
usr << "\blue You successfully unbuckle yourself."
usr:buckled.manual_unbuckle_all(usr)
if("module")
if(istype(usr, /mob/living/silicon/robot)||istype(usr, /mob/living/silicon/hivebot))
if(istype(usr, /mob/living/silicon/robot))
if(usr:module)
return
usr:pick_module()
if("radio")
if(istype(usr, /mob/living/silicon/robot)||istype(usr, /mob/living/silicon/hivebot))
if(istype(usr, /mob/living/silicon/robot))
usr:radio_menu()
if("panel")
if(istype(usr, /mob/living/silicon/robot)||istype(usr, /mob/living/silicon/hivebot))
if(istype(usr, /mob/living/silicon/robot))
usr:installed_modules()
if("store")
if(istype(usr, /mob/living/silicon/robot)||istype(usr, /mob/living/silicon/hivebot))
if(istype(usr, /mob/living/silicon/robot))
usr:uneq_active()
if("module1")
@@ -1254,7 +1254,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/mob/proc/equipped()
if(issilicon(src))
if(ishivebot(src)||isrobot(src))
if(isrobot(src))
if(src:module_active)
return src:module_active
else
@@ -1751,8 +1751,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(isAI(mob))
return AIMove(n,direct,mob)
if(ishivemainframe(mob))
return MainframeMove(n,direct,mob)
// if(ishivemainframe(mob))
// return MainframeMove(n,direct,mob)
if(mob.anchored)/*If mob is not AI and is anchored. This means most anchored mobs will not be able to move.
This is a fix for ninja energy_net to where mobs can not move but can still act to destroy it.
-2
View File
@@ -126,8 +126,6 @@
O.verbs += /mob/living/silicon/ai/proc/ai_camera_track
O.verbs += /mob/living/silicon/ai/proc/ai_alerts
O.verbs += /mob/living/silicon/ai/proc/ai_camera_list
O.verbs += /mob/living/silicon/ai/proc/lockdown
O.verbs += /mob/living/silicon/ai/proc/disablelockdown
O.verbs += /mob/living/silicon/ai/proc/ai_statuschange
O.verbs += /mob/living/silicon/ai/proc/ai_roster