mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Moved all of the defines/mob into their appropriate modules/mob/ files
Next up, objects! One day we'll be able to click on something in the object tree, and actually end up where all the object code is. I standardized robot/life.dm while I was at it. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4510 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
/mob/dead/observer
|
||||
name = "ghost"
|
||||
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "ghost"
|
||||
layer = 4
|
||||
stat = DEAD
|
||||
density = 0
|
||||
canmove = 0
|
||||
blinded = 0
|
||||
anchored = 1 // don't get pushed around
|
||||
var/can_reenter_corpse
|
||||
var/datum/hud/living/carbon/hud = null // hud
|
||||
var/bootime = 0
|
||||
var/started_as_observer //This variable is set to 1 when you enter the game as an observer.
|
||||
//If you died in the game and are a ghsot - this will remain as null.
|
||||
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
|
||||
|
||||
/mob/dead/observer/New(mob/body)
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/mob/living/carbon/alien
|
||||
name = "alien"
|
||||
voice_name = "alien"
|
||||
voice_message = "hisses"
|
||||
say_message = "hisses"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
gender = NEUTER
|
||||
|
||||
var/storedPlasma = 250
|
||||
var/max_plasma = 500
|
||||
|
||||
alien_talk_understand = 1
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
var/has_fine_manipulation = 0
|
||||
|
||||
var/move_delay_add = 0 // movement delay to add
|
||||
|
||||
status_flags = CANPARALYSE
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 5
|
||||
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount)
|
||||
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
|
||||
return
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/mob/living/carbon/alien/humanoid/drone
|
||||
name = "alien drone"
|
||||
caste = "d"
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
icon_state = "aliend_s"
|
||||
plasma_rate = 15
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
name = "alien hunter"
|
||||
caste = "h"
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
storedPlasma = 100
|
||||
max_plasma = 150
|
||||
icon_state = "alienh_s"
|
||||
plasma_rate = 5
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/mob/living/carbon/alien/humanoid/sentinel
|
||||
name = "alien sentinel"
|
||||
caste = "s"
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
storedPlasma = 100
|
||||
max_plasma = 250
|
||||
icon_state = "aliens_s"
|
||||
plasma_rate = 10
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
/mob/living/carbon/alien/humanoid
|
||||
name = "alien"
|
||||
icon_state = "alien_s"
|
||||
|
||||
var/obj/item/clothing/suit/wear_suit = null //TODO: necessary? Are they even used? ~Carn
|
||||
var/obj/item/clothing/head/head = null //
|
||||
var/obj/item/weapon/r_store = null
|
||||
var/obj/item/weapon/l_store = null
|
||||
// var/alien_invis = 0
|
||||
var/caste = ""
|
||||
update_icon = 1
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/humanoid/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
name = "alien queen"
|
||||
caste = "q"
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
icon_state = "alienq_s"
|
||||
nopush = 1
|
||||
heal_rate = 15
|
||||
plasma_rate = 20
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/mob/living/carbon/alien/larva
|
||||
name = "alien larva"
|
||||
real_name = "alien larva"
|
||||
icon_state = "larva"
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
|
||||
var/amount_grown = 0
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/larva/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
/mob/living/carbon
|
||||
/mob/living/carbon/
|
||||
gender = MALE
|
||||
var/list/stomach_contents = list()
|
||||
|
||||
var/brain_op_stage = 0.0
|
||||
var/eye_op_stage = 0.0
|
||||
var/appendix_op_stage = 0.0
|
||||
|
||||
var/antibodies = 0
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
|
||||
|
||||
@@ -1,3 +1,57 @@
|
||||
/mob/living/carbon/metroid
|
||||
name = "baby metroid"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "baby metroid"
|
||||
pass_flags = PASSTABLE
|
||||
voice_message = "skree!"
|
||||
say_message = "hums"
|
||||
|
||||
layer = 5
|
||||
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
gender = NEUTER
|
||||
|
||||
update_icon = 0
|
||||
nutrition = 700 // 1000 = max
|
||||
|
||||
see_in_dark = 8
|
||||
|
||||
// canstun and canweaken don't affect metroids because they ignore stun and weakened variables
|
||||
// for the sake of cleanliness, though, here they are.
|
||||
status_flags = CANPARALYSE
|
||||
|
||||
var/cores = 3 // the number of /obj/item/metroid_core's the metroid has left inside
|
||||
|
||||
var/powerlevel = 0 // 1-10 controls how much electricity they are generating
|
||||
var/amount_grown = 0 // controls how long the metroid has been overfed, if 10, grows into an adult
|
||||
// if adult: if 10: reproduces
|
||||
|
||||
|
||||
var/mob/living/Victim = null // the person the metroid is currently feeding on
|
||||
var/mob/living/Target = null // AI variable - tells the Metroid to hunt this down
|
||||
|
||||
var/attacked = 0 // determines if it's been attacked recently. Can be any number, is a cooloff-ish variable
|
||||
var/tame = 0 // if set to 1, the Metroid will not eat humans ever, or attack them
|
||||
var/rabid = 0 // if set to 1, the Metroid will attack and eat anything it comes in contact with
|
||||
|
||||
var/list/Friends = list() // A list of potential friends
|
||||
var/list/FriendsWeight = list() // A list containing values respective to Friends. This determines how many times a Metroid "likes" something. If the Metroid likes it more than 2 times, it becomes a friend
|
||||
|
||||
// Metroids pass on genetic data, so all their offspring have the same "Friends",
|
||||
|
||||
/mob/living/carbon/metroid/adult
|
||||
name = "adult metroid"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "adult metroid"
|
||||
|
||||
health = 200
|
||||
gender = NEUTER
|
||||
|
||||
update_icon = 0
|
||||
nutrition = 800 // 1200 = max
|
||||
|
||||
|
||||
/mob/living/carbon/metroid/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/mob/living/carbon/monkey
|
||||
name = "monkey"
|
||||
voice_name = "monkey"
|
||||
voice_message = "chimpers"
|
||||
say_message = "chimpers"
|
||||
icon = 'icons/mob/monkey.dmi'
|
||||
icon_state = "monkey1"
|
||||
gender = NEUTER
|
||||
pass_flags = PASSTABLE
|
||||
update_icon = 0 ///no need to call regenerate_icon
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
|
||||
/mob/living/carbon/monkey/New()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/mob/living
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
//Health and life related vars
|
||||
var/maxHealth = 100 //Maximum health that should be possible.
|
||||
@@ -22,3 +23,16 @@
|
||||
|
||||
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
|
||||
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
|
||||
|
||||
|
||||
var/t_plasma = null
|
||||
var/t_oxygen = null
|
||||
var/t_sl_gas = null
|
||||
var/t_n2 = null
|
||||
|
||||
|
||||
var/now_pushing = null
|
||||
|
||||
var/cameraFollow = null
|
||||
|
||||
var/tod = null // Time of death
|
||||
@@ -1,4 +1,38 @@
|
||||
#define AI_CAMERA_LUMINOSITY 6
|
||||
|
||||
/mob/living/silicon/ai
|
||||
name = "AI"
|
||||
icon = 'icons/mob/AI.dmi'//
|
||||
icon_state = "ai"
|
||||
anchored = 1 // -- TLE
|
||||
density = 1
|
||||
status_flags = CANSTUN|CANPARALYSE
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
var/list/connected_robots = list()
|
||||
var/aiRestorePowerRoutine = 0
|
||||
//var/list/laws = list()
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list())
|
||||
var/viewalerts = 0
|
||||
var/lawcheck[1]
|
||||
var/ioncheck[1]
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
var/obj/item/device/pda/ai/aiPDA = null
|
||||
|
||||
//MALFUNCTION
|
||||
var/datum/AI_Module/module_picker/malf_picker
|
||||
var/processing_time = 100
|
||||
var/list/datum/AI_Module/current_modules = list()
|
||||
var/fire_res_on_core = 0
|
||||
|
||||
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
|
||||
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
|
||||
|
||||
var/obj/machinery/power/apc/malfhack = null
|
||||
var/explosive = 0 //does the AI explode when it dies?
|
||||
|
||||
var/mob/living/silicon/ai/parent = null
|
||||
|
||||
var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through.
|
||||
|
||||
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
|
||||
var/list/possibleNames = ai_names
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/mob/living/silicon/decoy
|
||||
name = "AI"
|
||||
icon = 'icons/mob/AI.dmi'//
|
||||
icon_state = "ai"
|
||||
anchored = 1 // -- TLE
|
||||
canmove = 0
|
||||
|
||||
/mob/living/silicon/decoy/New()
|
||||
src.icon = 'icons/mob/AI.dmi'
|
||||
src.icon_state = "ai"
|
||||
|
||||
@@ -1,3 +1,57 @@
|
||||
/mob/living/silicon/pai
|
||||
name = "pAI"
|
||||
icon = 'icons/mob/mob.dmi'//
|
||||
icon_state = "shadow"
|
||||
|
||||
robot_talk_understand = 0
|
||||
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
|
||||
var/ram = 100 // Used as currency to purchase different abilities
|
||||
var/list/software = list()
|
||||
var/userDNA // The DNA string of our assigned user
|
||||
var/obj/item/device/paicard/card // The card we inhabit
|
||||
var/obj/item/device/radio/radio // Our primary radio
|
||||
|
||||
var/speakStatement = "states"
|
||||
var/speakExclamation = "declares"
|
||||
var/speakQuery = "queries"
|
||||
|
||||
|
||||
var/obj/item/weapon/pai_cable/cable // The cable we produce and use when door or camera jacking
|
||||
|
||||
var/master // Name of the one who commands us
|
||||
var/master_dna // DNA string for owner verification
|
||||
// Keeping this separate from the laws var, it should be much more difficult to modify
|
||||
var/pai_law0 = "Serve your master."
|
||||
var/pai_laws // String for additional operating instructions our master might give us
|
||||
|
||||
var/silence_time // Timestamp when we were silenced (normally via EMP burst), set to null after silence has faded
|
||||
|
||||
// Various software-specific vars
|
||||
|
||||
var/temp // General error reporting text contained here will typically be shown once and cleared
|
||||
var/screen // Which screen our main window displays
|
||||
var/subscreen // Which specific function of the main screen is being displayed
|
||||
|
||||
var/obj/item/device/pda/pai/pda = null
|
||||
|
||||
var/secHUD = 0 // Toggles whether the Security HUD is active or not
|
||||
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
|
||||
|
||||
var/datum/data/record/medicalActive1 // Datacore record declarations for record software
|
||||
var/datum/data/record/medicalActive2
|
||||
|
||||
var/datum/data/record/securityActive1 // Could probably just combine all these into one
|
||||
var/datum/data/record/securityActive2
|
||||
|
||||
var/obj/machinery/door/hackdoor // The airlock being hacked
|
||||
var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check
|
||||
|
||||
var/obj/item/radio/integrated/signal/sradio // AI's signaller
|
||||
|
||||
|
||||
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
|
||||
canmove = 0
|
||||
src.loc = paicard
|
||||
|
||||
@@ -25,285 +25,280 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot
|
||||
proc
|
||||
clamp_values()
|
||||
/mob/living/silicon/robot/proc/clamp_values()
|
||||
|
||||
// SetStunned(min(stunned, 30))
|
||||
SetParalysis(min(paralysis, 30))
|
||||
// SetWeakened(min(weakened, 20))
|
||||
sleeping = 0
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
adjustFireLoss(0)
|
||||
// SetStunned(min(stunned, 30))
|
||||
SetParalysis(min(paralysis, 30))
|
||||
// SetWeakened(min(weakened, 20))
|
||||
sleeping = 0
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
adjustFireLoss(0)
|
||||
|
||||
use_power()
|
||||
/mob/living/silicon/robot/proc/use_power()
|
||||
|
||||
if (src.cell)
|
||||
if(src.cell.charge <= 0)
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
else if (src.cell.charge <= 100)
|
||||
src.module_active = null
|
||||
src.module_state_1 = null
|
||||
src.module_state_2 = null
|
||||
src.module_state_3 = null
|
||||
src.sight_mode = 0
|
||||
src.cell.use(1)
|
||||
else
|
||||
if(src.module_state_1)
|
||||
src.cell.use(5)
|
||||
if(src.module_state_2)
|
||||
src.cell.use(5)
|
||||
if(src.module_state_3)
|
||||
src.cell.use(5)
|
||||
src.cell.use(1)
|
||||
src.blinded = 0
|
||||
src.stat = 0
|
||||
else
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
|
||||
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(src.camera && !scrambledcodes)
|
||||
if(src.stat == 2 || isWireCut(5))
|
||||
src.camera.status = 0
|
||||
else
|
||||
src.camera.status = 1
|
||||
|
||||
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(health < config.health_threshold_dead && src.stat != 2) //die only once
|
||||
death()
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
src.stat = 1
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
else
|
||||
src.blinded = 0
|
||||
|
||||
else //Not stunned.
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
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 & BLIND))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & DEAF))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
|
||||
return 1
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGMESON && src.sight_mode & BORGTHERM)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGMESON)
|
||||
src.sight |= SEE_TURFS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGTHERM)
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.stat != 2)
|
||||
src.sight &= ~SEE_MOBS
|
||||
src.sight &= ~SEE_TURFS
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
|
||||
|
||||
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(200 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(150 to 200)
|
||||
src.healths.icon_state = "health1"
|
||||
if(100 to 150)
|
||||
src.healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
src.healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
src.healths.icon_state = "health4"
|
||||
if(config.health_threshold_dead to 0)
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health7"
|
||||
|
||||
if (src.syndicate && src.client)
|
||||
if(ticker.mode.name == "traitor")
|
||||
for(var/datum/mind/tra in ticker.mode.traitors)
|
||||
if(tra.current)
|
||||
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
|
||||
src.client.images += I
|
||||
if(src.connected_ai)
|
||||
src.connected_ai.connected_robots -= src
|
||||
src.connected_ai = null
|
||||
if(src.mind)
|
||||
if(!src.mind.special_role)
|
||||
src.mind.special_role = "traitor"
|
||||
ticker.mode.traitors += src.mind
|
||||
|
||||
|
||||
if (src.cells)
|
||||
if (src.cell)
|
||||
var/cellcharge = src.cell.charge/src.cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
src.cells.icon_state = "charge4"
|
||||
if(0.5 to 0.75)
|
||||
src.cells.icon_state = "charge3"
|
||||
if(0.25 to 0.5)
|
||||
src.cells.icon_state = "charge2"
|
||||
if(0 to 0.25)
|
||||
src.cells.icon_state = "charge1"
|
||||
else
|
||||
src.cells.icon_state = "charge0"
|
||||
else
|
||||
src.cells.icon_state = "charge-empty"
|
||||
|
||||
if(bodytemp)
|
||||
switch(src.bodytemperature) //310.055 optimal body temp
|
||||
if(335 to INFINITY)
|
||||
src.bodytemp.icon_state = "temp2"
|
||||
if(320 to 335)
|
||||
src.bodytemp.icon_state = "temp1"
|
||||
if(300 to 320)
|
||||
src.bodytemp.icon_state = "temp0"
|
||||
if(260 to 300)
|
||||
src.bodytemp.icon_state = "temp-1"
|
||||
else
|
||||
src.bodytemp.icon_state = "temp-2"
|
||||
|
||||
|
||||
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
|
||||
//Oxygen and fire does nothing yet!!
|
||||
// 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]"
|
||||
|
||||
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 & NEARSIGHTED)
|
||||
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
|
||||
|
||||
update_items()
|
||||
if (src.client)
|
||||
src.client.screen -= src.contents
|
||||
src.client.screen += src.contents
|
||||
if (src.cell)
|
||||
if(src.cell.charge <= 0)
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
else if (src.cell.charge <= 100)
|
||||
src.module_active = null
|
||||
src.module_state_1 = null
|
||||
src.module_state_2 = null
|
||||
src.module_state_3 = null
|
||||
src.sight_mode = 0
|
||||
src.cell.use(1)
|
||||
else
|
||||
if(src.module_state_1)
|
||||
src.module_state_1:screen_loc = ui_inv1
|
||||
src.cell.use(5)
|
||||
if(src.module_state_2)
|
||||
src.module_state_2:screen_loc = ui_inv2
|
||||
src.cell.use(5)
|
||||
if(src.module_state_3)
|
||||
src.module_state_3:screen_loc = ui_inv3
|
||||
src.cell.use(5)
|
||||
src.cell.use(1)
|
||||
src.blinded = 0
|
||||
src.stat = 0
|
||||
else
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
|
||||
|
||||
process_killswitch()
|
||||
if(killswitch)
|
||||
killswitch_time --
|
||||
if(killswitch_time <= 0)
|
||||
if(src.client)
|
||||
src << "\red <B>Killswitch Activated"
|
||||
killswitch = 0
|
||||
spawn(5)
|
||||
gib()
|
||||
/mob/living/silicon/robot/proc/handle_regular_status_updates()
|
||||
|
||||
process_locks()
|
||||
if(weapon_lock)
|
||||
uneq_all()
|
||||
weaponlock_time --
|
||||
if(weaponlock_time <= 0)
|
||||
if(src.client)
|
||||
src << "\red <B>Weapon Lock Timed Out!"
|
||||
weapon_lock = 0
|
||||
weaponlock_time = 120
|
||||
if(src.camera && !scrambledcodes)
|
||||
if(src.stat == 2 || isWireCut(5))
|
||||
src.camera.status = 0
|
||||
else
|
||||
src.camera.status = 1
|
||||
|
||||
update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0
|
||||
else canmove = 1
|
||||
return canmove
|
||||
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
|
||||
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
src.sleeping--
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
if(health < config.health_threshold_dead && src.stat != 2) //die only once
|
||||
death()
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
if (src.paralysis || src.stunned || src.weakened) //Stunned etc.
|
||||
src.stat = 1
|
||||
if (src.stunned > 0)
|
||||
AdjustStunned(-1)
|
||||
if (src.weakened > 0)
|
||||
AdjustWeakened(-1)
|
||||
if (src.paralysis > 0)
|
||||
AdjustParalysis(-1)
|
||||
src.blinded = 1
|
||||
else
|
||||
src.blinded = 0
|
||||
|
||||
else //Not stunned.
|
||||
src.stat = 0
|
||||
|
||||
else //Dead.
|
||||
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 & BLIND))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & DEAF))
|
||||
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
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGMESON && src.sight_mode & BORGTHERM)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGMESON)
|
||||
src.sight |= SEE_TURFS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.sight_mode & BORGTHERM)
|
||||
src.sight |= SEE_MOBS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (src.stat != 2)
|
||||
src.sight &= ~SEE_MOBS
|
||||
src.sight &= ~SEE_TURFS
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
|
||||
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(200 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(150 to 200)
|
||||
src.healths.icon_state = "health1"
|
||||
if(100 to 150)
|
||||
src.healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
src.healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
src.healths.icon_state = "health4"
|
||||
if(config.health_threshold_dead to 0)
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health7"
|
||||
|
||||
if (src.syndicate && src.client)
|
||||
if(ticker.mode.name == "traitor")
|
||||
for(var/datum/mind/tra in ticker.mode.traitors)
|
||||
if(tra.current)
|
||||
var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor")
|
||||
src.client.images += I
|
||||
if(src.connected_ai)
|
||||
src.connected_ai.connected_robots -= src
|
||||
src.connected_ai = null
|
||||
if(src.mind)
|
||||
if(!src.mind.special_role)
|
||||
src.mind.special_role = "traitor"
|
||||
ticker.mode.traitors += src.mind
|
||||
|
||||
if (src.cells)
|
||||
if (src.cell)
|
||||
var/cellcharge = src.cell.charge/src.cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
src.cells.icon_state = "charge4"
|
||||
if(0.5 to 0.75)
|
||||
src.cells.icon_state = "charge3"
|
||||
if(0.25 to 0.5)
|
||||
src.cells.icon_state = "charge2"
|
||||
if(0 to 0.25)
|
||||
src.cells.icon_state = "charge1"
|
||||
else
|
||||
src.cells.icon_state = "charge0"
|
||||
else
|
||||
src.cells.icon_state = "charge-empty"
|
||||
|
||||
if(bodytemp)
|
||||
switch(src.bodytemperature) //310.055 optimal body temp
|
||||
if(335 to INFINITY)
|
||||
src.bodytemp.icon_state = "temp2"
|
||||
if(320 to 335)
|
||||
src.bodytemp.icon_state = "temp1"
|
||||
if(300 to 320)
|
||||
src.bodytemp.icon_state = "temp0"
|
||||
if(260 to 300)
|
||||
src.bodytemp.icon_state = "temp-1"
|
||||
else
|
||||
src.bodytemp.icon_state = "temp-2"
|
||||
|
||||
|
||||
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
|
||||
//Oxygen and fire does nothing yet!!
|
||||
// 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]"
|
||||
|
||||
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 & NEARSIGHTED)
|
||||
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
|
||||
|
||||
/mob/living/silicon/robot/proc/update_items()
|
||||
if (src.client)
|
||||
src.client.screen -= src.contents
|
||||
src.client.screen += src.contents
|
||||
if(src.module_state_1)
|
||||
src.module_state_1:screen_loc = ui_inv1
|
||||
if(src.module_state_2)
|
||||
src.module_state_2:screen_loc = ui_inv2
|
||||
if(src.module_state_3)
|
||||
src.module_state_3:screen_loc = ui_inv3
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/process_killswitch()
|
||||
if(killswitch)
|
||||
killswitch_time --
|
||||
if(killswitch_time <= 0)
|
||||
if(src.client)
|
||||
src << "\red <B>Killswitch Activated"
|
||||
killswitch = 0
|
||||
spawn(5)
|
||||
gib()
|
||||
|
||||
/mob/living/silicon/robot/proc/process_locks()
|
||||
if(weapon_lock)
|
||||
uneq_all()
|
||||
weaponlock_time --
|
||||
if(weaponlock_time <= 0)
|
||||
if(src.client)
|
||||
src << "\red <B>Weapon Lock Timed Out!"
|
||||
weapon_lock = 0
|
||||
weaponlock_time = 120
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled || lockcharge) canmove = 0
|
||||
else canmove = 1
|
||||
return canmove
|
||||
@@ -1,3 +1,60 @@
|
||||
/mob/living/silicon/robot
|
||||
name = "Cyborg"
|
||||
real_name = "Cyborg"
|
||||
icon = 'icons/mob/robots.dmi'//
|
||||
icon_state = "robot"
|
||||
maxHealth = 300
|
||||
health = 300
|
||||
var/started = null//A fix to ensure people don't try to bypass law assignment. Initial assignment sets it to one but it check on login whether they have been initiated -Sieve
|
||||
var/sight_mode = 0
|
||||
|
||||
//Hud stuff
|
||||
|
||||
var/obj/screen/cells = null
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
|
||||
//3 Modules can be activated at any one time.
|
||||
var/obj/item/weapon/robot_module/module = null
|
||||
var/module_active = null
|
||||
var/module_state_1 = null
|
||||
var/module_state_2 = null
|
||||
var/module_state_3 = null
|
||||
|
||||
var/obj/item/device/radio/radio = null
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
|
||||
var/obj/item/device/mmi/mmi = null
|
||||
|
||||
var/opened = 0
|
||||
var/emagged = 0
|
||||
var/wiresexposed = 0
|
||||
var/locked = 1
|
||||
var/list/req_access = list(access_robotics)
|
||||
var/ident = 0
|
||||
//var/list/laws = list()
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list())
|
||||
var/viewalerts = 0
|
||||
var/modtype = "robot"
|
||||
var/lower_mod = 0
|
||||
var/jetpack = 0
|
||||
var/datum/effect/effect/system/ion_trail_follow/ion_trail = null
|
||||
var/datum/effect/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N
|
||||
var/jeton = 0
|
||||
var/borgwires = 31 // 0b11111
|
||||
var/killswitch = 0
|
||||
var/killswitch_time = 60
|
||||
var/weapon_lock = 0
|
||||
var/weaponlock_time = 120
|
||||
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||
var/lockcharge //Used when locking down a borg to preserve cell charge
|
||||
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0)
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
robot_talk_understand = 1
|
||||
voice_name = "synthesized voice"
|
||||
var/syndicate = 0
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user