mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Xenos gamemode rework
This commit is contained in:
+17
-3
@@ -338,6 +338,19 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
candidates += G.key
|
||||
i++
|
||||
return candidates
|
||||
|
||||
/proc/get_blob_candidates()
|
||||
|
||||
var/list/candidates = list() //List of candidate KEYS to assume control of the new blob core ~Carn
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/G in respawnable_list)
|
||||
if( G.client && G.client.prefs.be_special & BE_BLOB)
|
||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
i++
|
||||
return candidates
|
||||
|
||||
/proc/get_slime_candidates()
|
||||
|
||||
@@ -355,9 +368,10 @@ proc/isInSight(var/atom/A, var/atom/B)
|
||||
proc/get_candidates(be_special_flag=0)
|
||||
. = list()
|
||||
for(var/mob/G in respawnable_list)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
||||
. += G.client
|
||||
if(G)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
if(!G.client.is_afk() && (G.client.prefs.be_special & be_special_flag))
|
||||
. += G.client
|
||||
|
||||
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
|
||||
if(!isobj(O)) O = new /obj/screen/text()
|
||||
|
||||
@@ -71,6 +71,9 @@
|
||||
#define ui_monkey_mask "5:14,1:5" //monkey
|
||||
#define ui_monkey_back "6:14,1:5" //monkey
|
||||
|
||||
#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
|
||||
//Lower right, persistant menu
|
||||
//#define ui_dropbutton "11:22,1:5"
|
||||
#define ui_drop_throw "16:28,2:7"
|
||||
@@ -99,6 +102,7 @@
|
||||
#define ui_alien_toxin "16:28,13:25"
|
||||
#define ui_alien_fire "16:28,12:25"
|
||||
#define ui_alien_oxygen "16:28,11:25"
|
||||
#define ui_alien_nightvision "16:28,10:25"
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_nutrition "16:28,5:11"
|
||||
|
||||
+32
-110
@@ -2,71 +2,21 @@
|
||||
return
|
||||
|
||||
/datum/hud/proc/alien_hud()
|
||||
|
||||
src.adding = list( )
|
||||
src.other = list( )
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "harm" ? "harm" : mymob.a_intent)
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new('icons/mob/screen1_alien.dmi', "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "harm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 21
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
//end intent small hud objects
|
||||
action_intent = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
@@ -76,35 +26,24 @@
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
move_intent = using
|
||||
|
||||
if(istype(mymob, /mob/living/carbon/alien/humanoid/hunter))
|
||||
mymob.leap_icon = new /obj/screen()
|
||||
mymob.leap_icon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.leap_icon.name = "toggle leap"
|
||||
mymob.leap_icon.icon_state = "leap_off"
|
||||
mymob.leap_icon.screen_loc = ui_alien_storage_r
|
||||
src.adding += mymob.leap_icon
|
||||
|
||||
//equippable shit
|
||||
//suit
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.dir = SOUTH
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "equip"
|
||||
inv_box.screen_loc = ui_alien_oclothing
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.dir = WEST
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hand_inactive"
|
||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||
using.icon_state = "hand_active"
|
||||
inv_box.icon_state = "hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.layer = 19
|
||||
src.r_hand_hud_object = inv_box
|
||||
@@ -142,46 +81,23 @@
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
//pocket 1
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage1"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//pocket 2
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "storage2"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
|
||||
//head
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
||||
inv_box.icon_state = "hair"
|
||||
inv_box.screen_loc = ui_alien_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.layer = 19
|
||||
src.adding += inv_box
|
||||
//end of equippable shit
|
||||
|
||||
/*
|
||||
using = new /obj/screen()
|
||||
using.name = "resist"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_resist
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
*/
|
||||
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -213,6 +129,12 @@
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
nightvisionicon = new /obj/screen()
|
||||
nightvisionicon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
nightvisionicon.icon_state = "nightvision1"
|
||||
nightvisionicon.name = "night vision"
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
@@ -246,5 +168,5 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, alien_plasma_display, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, alien_plasma_display, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
@@ -1,5 +1,4 @@
|
||||
/datum/hud/proc/larva_hud()
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
|
||||
@@ -50,6 +49,12 @@
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
nightvisionicon = new /obj/screen()
|
||||
nightvisionicon.icon = 'icons/mob/screen1_alien.dmi'
|
||||
nightvisionicon.icon_state = "nightvision1"
|
||||
nightvisionicon.name = "night vision"
|
||||
nightvisionicon.screen_loc = ui_alien_nightvision
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
@@ -72,10 +77,11 @@
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
@@ -98,6 +98,7 @@ var/datum/global_hud/global_hud = new()
|
||||
var/obj/screen/blobhealthdisplay
|
||||
var/obj/screen/vampire_blood_display
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/nightvisionicon
|
||||
var/obj/screen/r_hand_hud_object
|
||||
var/obj/screen/l_hand_hud_object
|
||||
var/obj/screen/action_intent
|
||||
|
||||
@@ -558,7 +558,17 @@
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.control_hud()
|
||||
|
||||
|
||||
// Alien
|
||||
if("night vision")
|
||||
var/mob/living/carbon/alien/humanoid/A = usr
|
||||
A.nightvisiontoggle()
|
||||
|
||||
if("toggle leap")
|
||||
if(istype(usr, /mob/living/carbon/alien/humanoid))
|
||||
var/mob/living/carbon/alien/humanoid/hunter/AH = usr
|
||||
AH.toggle_leap()
|
||||
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -100,14 +100,13 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/RangedAttack(var/atom/A)
|
||||
if(!large && a_intent == "harm")
|
||||
if(!large && a_intent == "harm")
|
||||
Neurotox(A)
|
||||
return
|
||||
else if(large && a_intent == "harm")
|
||||
NeuroAOE(A)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/Neurotox(atom/A)
|
||||
if(world.time < next_attack)
|
||||
return
|
||||
@@ -125,9 +124,9 @@
|
||||
NT.current = T
|
||||
NT.yo = U.y - T.y
|
||||
NT.xo = U.x - T.x
|
||||
spawn( 1)
|
||||
spawn(1)
|
||||
NT.process()
|
||||
next_attack = world.time + 100
|
||||
next_attack = world.time + 60
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/NeuroAOE(atom/A)
|
||||
if(world.time < next_attack)
|
||||
@@ -155,18 +154,13 @@
|
||||
return
|
||||
if(istype(atm, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = atm
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space) && istype(H.head, /obj/item/clothing/head/helmet/space))
|
||||
return
|
||||
else
|
||||
C.Weaken(5)
|
||||
C.adjustToxLoss(20)
|
||||
C << "You were drenched with neurotoxin!"
|
||||
C.Weaken(5)
|
||||
C.adjustToxLoss(20)
|
||||
C << "You were drenched with neurotoxin!"
|
||||
// D.reagents.reaction(atm, TOUCH) // Touch, since we sprayed it.
|
||||
if(D.loc == my_target) break
|
||||
sleep(2)
|
||||
next_attack = world.time + 100
|
||||
next_attack = world.time + 60
|
||||
|
||||
|
||||
// Babby aliens
|
||||
|
||||
@@ -217,8 +217,8 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
)
|
||||
|
||||
VS.announcer = "NSV Icarus"
|
||||
VS.arrival_message = "Attention, Exodus, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||
VS.departure_message = "Your guests are pulling away, Exodus - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||
VS.arrival_message = "Attention, Cyberiad, we just tracked a small target bypassing our defensive perimeter. Can't fire on it without hitting the station - you've got incoming visitors, like it or not."
|
||||
VS.departure_message = "Your guests are pulling away, Cyberiad - moving too fast for us to draw a bead on them. Looks like they're heading out of the system at a rapid clip."
|
||||
VS.interim = locate(/area/vox_station/transit)
|
||||
|
||||
VS.warmup_time = 0
|
||||
@@ -240,8 +240,8 @@ var/global/datum/shuttle_controller/shuttle_controller
|
||||
)
|
||||
|
||||
MS.announcer = "NSV Icarus"
|
||||
MS.arrival_message = "Attention, Exodus, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Exodus, burning delta-v like it's nothing. Good riddance."
|
||||
MS.arrival_message = "Attention, Cyberiad, you have a large signature approaching the station - looks unarmed to surface scans. We're too far out to intercept - brace for visitors."
|
||||
MS.departure_message = "Your visitors are on their way out of the system, Cyberiad, burning delta-v like it's nothing. Good riddance."
|
||||
MS.interim = locate(/area/syndicate_station/transit)
|
||||
|
||||
MS.warmup_time = 0
|
||||
|
||||
@@ -514,7 +514,7 @@ var/list/uplink_items = list()
|
||||
/datum/uplink_item/device_tools/cipherkey
|
||||
name = "Syndicate Encryption Key"
|
||||
desc = "A key, that when inserted into a radio headset, allows you to listen to all station department channels as well as talk on an encrypted Syndicate channel."
|
||||
item = /obj/item/device/encryptionkey/syndicate
|
||||
item = /obj/item/device/encryptionkey/syndicate/hacked
|
||||
cost = 5
|
||||
|
||||
/datum/uplink_item/device_tools/hacked_module
|
||||
|
||||
@@ -626,8 +626,9 @@ var/list/ghostteleportlocs = list()
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/start
|
||||
name = "\improper Start Area"
|
||||
name = "\improper Alien Shuttle"
|
||||
icon_state = "north"
|
||||
requires_power = 0
|
||||
|
||||
/area/xenos_station/transit
|
||||
name = "\improper Hyperspace"
|
||||
|
||||
@@ -30,7 +30,7 @@ var/list/blob_nodes = list()
|
||||
|
||||
/datum/game_mode/blob/pre_setup()
|
||||
|
||||
var/list/possible_blobs = get_players_for_role(BE_ALIEN)
|
||||
var/list/possible_blobs = get_players_for_role(BE_BLOB)
|
||||
|
||||
// stop setup if no possible traitors
|
||||
if(!possible_blobs.len)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/list/candidates = list()
|
||||
|
||||
if(!new_overmind)
|
||||
candidates = get_candidates(BE_ALIEN)
|
||||
candidates = get_candidates(BE_BLOB)
|
||||
if(candidates.len)
|
||||
C = pick(candidates)
|
||||
else
|
||||
|
||||
@@ -101,6 +101,9 @@ rcd light flash thingy on matter drain
|
||||
set name = "Overload Machine"
|
||||
set category = "Malfunction"
|
||||
if (istype(M, /obj/machinery))
|
||||
if(istype(M, /obj/machinery/singularity) || istype(M,/obj/machinery/field_generator) || istype(M, /obj/machinery/singularity/narsie))
|
||||
src << "This machine can not be overloaded due to a firewall."
|
||||
return
|
||||
for(var/datum/AI_Module/small/overload_machine/overload in current_modules)
|
||||
if(overload.uses > 0)
|
||||
overload.uses --
|
||||
|
||||
@@ -8,20 +8,23 @@
|
||||
required_players = 0
|
||||
recommended_players = 30
|
||||
required_players_secret = 20
|
||||
required_enemies = 5
|
||||
required_enemies = 1//5
|
||||
recommended_enemies = 8
|
||||
var/result = 0
|
||||
var/checkwin_counter = 0
|
||||
var/xenos_list = list()
|
||||
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/list/raid_objectives = list() //Raid objectives.
|
||||
|
||||
var/xenoai = 0 //Should the Xenos have their own AI?
|
||||
var/xenoborg = 0 //Should the Xenos have their own borg?
|
||||
|
||||
/datum/game_mode/xenos/announce()
|
||||
world << "<B>The current game mode is - Xenos!</B>"
|
||||
world << "<B>There is a \red Xenos Attack\black on the station. You can't let them take over!</B>"
|
||||
world << "<B>There is an Xenomorph attack on the station.<BR>Aliens - Kill or infect the crew. Protect the Queen. <BR>Crew - Protect the station. Exterminate all aliens.</B>"
|
||||
|
||||
/datum/game_mode/xenos/can_start()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
@@ -32,7 +35,6 @@
|
||||
if((player.client)&&(player.ready))
|
||||
playersready += 1
|
||||
|
||||
|
||||
//Check that we have enough alien candidates
|
||||
if(candidates.len < required_enemies)
|
||||
return 0
|
||||
@@ -67,15 +69,15 @@
|
||||
continue
|
||||
|
||||
var/xenoai_selected = 0
|
||||
var/xenoborg_selected=0
|
||||
var/xenoqueen_selected=0
|
||||
var/xenoborg_selected = 0
|
||||
var/xenoqueen_selected = 0
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/xeno_mind in xenos)
|
||||
if(spawnpos > xenos_spawn.len)
|
||||
spawnpos = 1
|
||||
//XenoAI selection
|
||||
if(!xenoai_selected)
|
||||
//XenoAI selection
|
||||
if(xenoai && !xenoai_selected)
|
||||
var/mob/living/silicon/ai/O = new(xenos_spawn[spawnpos],,,1)//No MMI but safety is in effect.
|
||||
O.invisibility = 0
|
||||
O.aiRestorePowerRoutine = 0
|
||||
@@ -85,7 +87,7 @@
|
||||
O.mind.original = O
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
//del(xeno_mind)
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name == "XenoAI")
|
||||
@@ -106,31 +108,30 @@
|
||||
xenoai_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoQueen Selection
|
||||
//XenoQueen Selection
|
||||
if(!xenoqueen_selected)
|
||||
var/mob/living/carbon/alien/humanoid/queen/large/O = new(xenos_spawn[spawnpos])
|
||||
var/mob/living/carbon/alien/humanoid/queen/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
//del(xeno_mind)
|
||||
xenoqueen_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoBorg Selection
|
||||
if(!xenoborg_selected)
|
||||
//XenoBorg Selection
|
||||
if(xenoborg && !xenoborg_selected)
|
||||
var/mob/living/silicon/robot/O = new(xenos_spawn[spawnpos],0,0,1)
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.alien = 1
|
||||
O.mmi.transfer_identity(xeno_mind.current)//Does not transfer key/client.
|
||||
O.cell = new(O)
|
||||
O.cell.maxcharge = 15000
|
||||
O.cell.charge = 15000
|
||||
O.cell.maxcharge = 25000
|
||||
O.cell.charge = 25000
|
||||
O.gender = xeno_mind.current.gender
|
||||
O.invisibility = 0
|
||||
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
//del(xeno_mind)
|
||||
O.job = "Alien Cyborg"
|
||||
O.name = "Alien Cyborg"
|
||||
O.real_name = name
|
||||
@@ -142,24 +143,106 @@
|
||||
O.connected_ai = select_active_alien_ai()
|
||||
O.laws = new /datum/ai_laws/alienmov()
|
||||
O.scrambledcodes = 1
|
||||
O.hiddenborg = 1
|
||||
O.alien_talk_understand = 1
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
|
||||
|
||||
xenoborg_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//Additional larvas if playercount > 20
|
||||
//Additional larvas if playercount > 20
|
||||
else
|
||||
var/mob/living/carbon/alien/larva/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
del(xeno_mind)
|
||||
//del(xeno_mind)
|
||||
spawnpos++
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/xenos/process()
|
||||
checkwin_counter++
|
||||
if(checkwin_counter >= 5)
|
||||
if(!result)
|
||||
ticker.mode.check_win()
|
||||
checkwin_counter = 0
|
||||
return 0
|
||||
|
||||
/datum/game_mode/xenos/check_win()
|
||||
var/xenosalive = xenos_alive()
|
||||
var/playersalive = players_alive()
|
||||
if(emergency_shuttle && (emergency_shuttle.returned() || emergency_shuttle.departed))
|
||||
return ..()
|
||||
if(!xenosalive)
|
||||
result = 1
|
||||
return 1
|
||||
else if(!playersalive)
|
||||
result = 2
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/xenos/check_finished()
|
||||
if(config.continous_rounds)
|
||||
if(result)
|
||||
return ..()
|
||||
if(emergency_shuttle && (emergency_shuttle.returned() || emergency_shuttle.departed))
|
||||
return ..()
|
||||
if(result)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/game_mode/xenos/proc/xenos_alive()
|
||||
var/list/livingxenos = list()
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
|
||||
if(istype(xeno.current,/mob/living/carbon/alien) || (xenoborg && isrobot(xeno.current)) || (xenoai && isAI(xeno.current)))
|
||||
livingxenos += xeno
|
||||
return livingxenos.len
|
||||
|
||||
/datum/game_mode/xenos/proc/players_alive()
|
||||
var/list/livingplayers = list()
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if((M) && (M.stat != 2) && M.client && T && (T.z == 1))
|
||||
if(ishuman(M))
|
||||
livingplayers += 1
|
||||
return livingplayers.len
|
||||
|
||||
/datum/game_mode/xenos/declare_completion()
|
||||
if(result == 1)
|
||||
feedback_set_details("round_end_result","win - xenos killed")
|
||||
world << "<FONT size = 3><B>Crew Major Victory</B></FONT>"
|
||||
world << "<B>The aliens did not succeed and were exterminated by the crew!</B>"
|
||||
else if(result == 2)
|
||||
feedback_set_details("round_end_result","win - crew killed")
|
||||
world << "<FONT size = 3><B>Alien Victory</B></FONT>"
|
||||
world << "<B>The aliens were successful and slaughtered the crew!</B>"
|
||||
else
|
||||
feedback_set_details("round_end_result","win - crew escaped")
|
||||
world << "<FONT size = 3><B>Draw</B></FONT>"
|
||||
world << "<B>The crew has escaped from the aliens but did not exterminate them, allowing them to overrun the station.</B>"
|
||||
|
||||
var/text = "<br><FONT size=3><B>There were [xenos.len] aliens.</B></FONT>"
|
||||
text += "<br><FONT size=3><B>The aliens were:</B></FONT>"
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
text += "<br><b>[xeno.key]</b> was <b>[xeno.current.name]</b> ("
|
||||
if(xeno.current)
|
||||
if(xeno.current.stat == DEAD)
|
||||
text += "died"
|
||||
else if(!xeno.current.client)
|
||||
text += "SSD"
|
||||
else
|
||||
text += "survived"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
world << text
|
||||
|
||||
..()
|
||||
return 1
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/New()
|
||||
curr_location= locate(/area/xenos_station/start)
|
||||
curr_location = locate(/area/xenos_station/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/xenos_station/proc/xenos_move_to(area/destination as area)
|
||||
@@ -23,13 +23,25 @@
|
||||
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
|
||||
for(var/obj/machinery/door/airlock/alien/A in world)
|
||||
A.close()
|
||||
if(dest_location == locate(/area/xenos_station/start))
|
||||
A.locked = 1
|
||||
A.update_icon()
|
||||
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/xenos_station/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(XENOS_SHUTTLE_MOVE_TIME)
|
||||
|
||||
|
||||
for(var/obj/machinery/door/airlock/alien/A in world)
|
||||
A.close()
|
||||
if(dest_location != locate(/area/xenos_station/start))
|
||||
A.locked = 0
|
||||
A.update_icon()
|
||||
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
@@ -47,7 +59,11 @@
|
||||
|
||||
/obj/machinery/computer/xenos_station/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied"
|
||||
user << "\red Access denied."
|
||||
return
|
||||
|
||||
if(!istype(user,/mob/living/carbon/alien) && !isrobot(user) && !isAI(user))
|
||||
user << "You do not know how to operate this computer."
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -284,6 +284,26 @@
|
||||
name = "Secure Armory Airlock"
|
||||
hackProof = 1
|
||||
aiControlDisabled = 1
|
||||
|
||||
/obj/machinery/door/airlock/alien
|
||||
name = "Alien Airlock"
|
||||
desc = "A mysterious alien airlock with a complicated opening mechanism."
|
||||
hackProof = 1
|
||||
icon = 'icons/obj/doors/Doorplasma.dmi'
|
||||
|
||||
/obj/machinery/door/airlock/alien/bumpopen(mob/living/user as mob)
|
||||
if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user))
|
||||
..(user)
|
||||
else
|
||||
user << "You do not know how to operate this airlock's mechanism."
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/alien/attackby(C as obj, mob/user as mob)
|
||||
if(istype(user,/mob/living/carbon/alien) || isrobot(user) || isAI(user))
|
||||
..(C, user)
|
||||
else
|
||||
user << "You do not know how to operate this airlock's mechanism."
|
||||
return
|
||||
|
||||
/*
|
||||
About the new airlock wires panel:
|
||||
@@ -322,166 +342,6 @@ About the new airlock wires panel:
|
||||
/obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user as mob)
|
||||
..(user)
|
||||
|
||||
|
||||
/*
|
||||
/obj/machinery/door/airlock/proc/pulse(var/wireColor)
|
||||
//var/wireFlag = airlockWireColorToFlag[wireColor] //not used in this function
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor]
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_IDSCAN)
|
||||
//Sending a pulse through this flashes the red light on the door (if the door has power).
|
||||
if((src.arePowerSystemsOn()) && (!(stat & NOPOWER)))
|
||||
do_animate("deny")
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
|
||||
src.loseMainPower()
|
||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
|
||||
//raises them if they are down (only if power's on)
|
||||
if(!src.locked)
|
||||
src.lock()
|
||||
else
|
||||
src.unlock()
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
|
||||
src.loseBackupPower()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
if(src.aiControlDisabled == 0)
|
||||
src.aiControlDisabled = 1
|
||||
else if(src.aiControlDisabled == -1)
|
||||
src.aiControlDisabled = 2
|
||||
src.updateDialog()
|
||||
spawn(10)
|
||||
if(src.aiControlDisabled == 1)
|
||||
src.aiControlDisabled = 0
|
||||
else if(src.aiControlDisabled == 2)
|
||||
src.aiControlDisabled = -1
|
||||
src.updateDialog()
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
|
||||
if(src.secondsElectrified==0)
|
||||
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
|
||||
src.secondsElectrified = 30
|
||||
spawn(10)
|
||||
//TODO: Move this into process() and make pulsing reset secondsElectrified to 30
|
||||
while (src.secondsElectrified>0)
|
||||
src.secondsElectrified-=1
|
||||
if(src.secondsElectrified<0)
|
||||
src.secondsElectrified = 0
|
||||
// src.updateUsrDialog() //Commented this line out to keep the airlock from clusterfucking you with electricity. --NeoFite
|
||||
sleep(10)
|
||||
if(AIRLOCK_WIRE_OPEN_DOOR)
|
||||
//tries to open the door without ID
|
||||
//will succeed only if the ID wire is cut or the door requires no access
|
||||
if(!src.requiresID() || src.check_access(null))
|
||||
if(density) open()
|
||||
else close()
|
||||
if(AIRLOCK_WIRE_SAFETY)
|
||||
safe = !safe
|
||||
if(!src.density)
|
||||
close()
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
normalspeed = !normalspeed
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
lights = !lights
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/proc/cut(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor]
|
||||
wires &= ~wireFlag
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
//Cutting either one disables the main door power, but unless backup power is also cut, the backup power re-powers the door in 10 seconds. While unpowered, the door may be crowbarred open, but bolts-raising will not work. Cutting these wires may electocute the user.
|
||||
src.loseMainPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_DOOR_BOLTS)
|
||||
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
|
||||
src.lock()
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
//Cutting either one disables the backup door power (allowing it to be crowbarred open, but disabling bolts-raising), but may electocute the user.
|
||||
src.loseBackupPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if(src.aiControlDisabled == 0)
|
||||
src.aiControlDisabled = 1
|
||||
else if(src.aiControlDisabled == -1)
|
||||
src.aiControlDisabled = 2
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
|
||||
if(src.secondsElectrified != -1)
|
||||
shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [name] at [x] [y] [z]</font>")
|
||||
src.secondsElectrified = -1
|
||||
if (AIRLOCK_WIRE_SAFETY)
|
||||
safe = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
autoclose = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
lights = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/door/airlock/proc/mend(var/wireColor)
|
||||
var/wireFlag = airlockWireColorToFlag[wireColor]
|
||||
var/wireIndex = airlockWireColorToIndex[wireColor] //not used in this function
|
||||
wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
|
||||
if((!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_MAIN_POWER2)))
|
||||
src.regainMainPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
|
||||
if((!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER1)) && (!src.isWireCut(AIRLOCK_WIRE_BACKUP_POWER2)))
|
||||
src.regainBackupPower()
|
||||
src.shock(usr, 50)
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_AI_CONTROL)
|
||||
//one wire for AI control. Cutting this prevents the AI from controlling the door unless it has hacked the door through the power connection (which takes about a minute). If both main and backup power are cut, as well as this wire, then the AI cannot operate or hack the door at all.
|
||||
//aiControlDisabled: If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
|
||||
if(src.aiControlDisabled == 1)
|
||||
src.aiControlDisabled = 0
|
||||
else if(src.aiControlDisabled == 2)
|
||||
src.aiControlDisabled = -1
|
||||
src.updateUsrDialog()
|
||||
if(AIRLOCK_WIRE_ELECTRIFY)
|
||||
if(src.secondsElectrified == -1)
|
||||
src.secondsElectrified = 0
|
||||
|
||||
if (AIRLOCK_WIRE_SAFETY)
|
||||
safe = 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_SPEED)
|
||||
autoclose = 1
|
||||
if(!src.density)
|
||||
close()
|
||||
src.updateUsrDialog()
|
||||
|
||||
if(AIRLOCK_WIRE_LIGHT)
|
||||
lights = 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/door/airlock/proc/isElectrified()
|
||||
if(src.secondsElectrified != 0)
|
||||
return 1
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
component_parts += new /obj/item/weapon/cell/high(src)
|
||||
RefreshParts()
|
||||
build_icon()
|
||||
|
||||
/obj/machinery/recharge_station/upgraded/New()
|
||||
..()
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(src)
|
||||
component_parts += new /obj/item/weapon/cell/hyper(src)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/recharge_station/RefreshParts()
|
||||
recharge_speed = 0
|
||||
|
||||
+178
-253
@@ -11,167 +11,132 @@
|
||||
* effect/alien
|
||||
*/
|
||||
/obj/effect/alien
|
||||
name = "alien thing"
|
||||
desc = "theres something alien about this"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
// unacidable = 1 //Aliens won't ment their own.
|
||||
|
||||
/*
|
||||
* Resin
|
||||
*/
|
||||
/obj/effect/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of slimy growth."
|
||||
desc = "Looks like some kind of thick resin."
|
||||
icon_state = "resin"
|
||||
|
||||
density = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
var/health = 200
|
||||
var/turf/linked_turf
|
||||
|
||||
wall
|
||||
name = "resin wall"
|
||||
desc = "Purple slime solidified into a wall."
|
||||
icon_state = "resinwall" //same as resin, but consistency ho!
|
||||
|
||||
membrane
|
||||
name = "resin membrane"
|
||||
desc = "Purple slime just thin enough to let light pass through."
|
||||
icon_state = "resinmembrane"
|
||||
opacity = 0
|
||||
health = 120
|
||||
|
||||
/obj/effect/alien/resin/New()
|
||||
var/resintype = null
|
||||
|
||||
/obj/effect/alien/resin/New(location)
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
linked_turf = get_turf(src)
|
||||
linked_turf.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/Destroy()
|
||||
if(linked_turf)
|
||||
linked_turf.thermal_conductivity = initial(linked_turf.thermal_conductivity)
|
||||
var/turf/T = loc
|
||||
loc = null
|
||||
T.relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/effect/alien/resin/Move()
|
||||
..()
|
||||
|
||||
/obj/effect/alien/resin/wall
|
||||
name = "resin wall"
|
||||
desc = "Thick resin solidified into a wall."
|
||||
icon_state = "resinwall" //same as resin, but consistency ho!
|
||||
|
||||
/obj/effect/alien/resin/wall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
|
||||
/obj/effect/alien/resin/membrane
|
||||
name = "resin membrane"
|
||||
desc = "Resin just thin enough to let light pass through."
|
||||
icon_state = "resinmembrane"
|
||||
opacity = 0
|
||||
health = 120
|
||||
|
||||
/obj/effect/alien/resin/membrane/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
|
||||
/obj/effect/alien/resin/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
/obj/effect/alien/resin/bullet_act(obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/ex_act(severity)
|
||||
|
||||
/obj/effect/alien/resin/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
health-=50
|
||||
health -= 150
|
||||
if(2.0)
|
||||
health-=50
|
||||
health -= 100
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
health-=50
|
||||
else
|
||||
health-=25
|
||||
health -= 50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/alien/resin/blob_act()
|
||||
health-=50
|
||||
health -= 50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/meteorhit()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/hitby(AM as mob|obj)
|
||||
/obj/effect/alien/resin/hitby(atom/movable/AM)
|
||||
..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
|
||||
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
if(!isobj(AM))
|
||||
tforce = 10
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
var/obj/O = AM
|
||||
tforce = O.throwforce
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
health -= tforce
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_hand()
|
||||
if (M_HULK in usr.mutations)
|
||||
usr << "\blue You easily destroy the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] destroys the [name]!", 1)
|
||||
|
||||
/obj/effect/alien/resin/attack_hand(mob/living/user)
|
||||
if(M_HULK in user.mutations)
|
||||
|
||||
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
|
||||
health = 0
|
||||
else
|
||||
usr << "\blue You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the [name]!", 1)
|
||||
health -= rand(5,10)
|
||||
healthcheck()
|
||||
return
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/resin/attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
/obj/effect/alien/resin/attack_alien()
|
||||
if (islarva(usr))//Safety check for larva. /N
|
||||
/obj/effect/alien/resin/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/effect/alien/resin/attack_alien(mob/living/user)
|
||||
if(islarva(user))
|
||||
return
|
||||
usr << "\green You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the resin!", 1)
|
||||
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health -= rand(40, 60)
|
||||
health -= 50
|
||||
if(health <= 0)
|
||||
usr << "\green You slice the [name] to pieces."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] slices the [name] apart!", 1)
|
||||
user.visible_message("<span class='danger'>[user] slices the [name] apart!</span>")
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
|
||||
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
|
||||
if(!affecting)
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src
|
||||
G.affecting.paralysis = 10
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
|
||||
affecting=G.affecting
|
||||
del(W)
|
||||
spawn(0)
|
||||
process()
|
||||
else
|
||||
user << "\red This wall is already occupied."
|
||||
return */
|
||||
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
/obj/effect/alien/resin/attackby(obj/item/I, mob/living/user)
|
||||
health -= I.force
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
|
||||
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Weeds
|
||||
*/
|
||||
@@ -179,7 +144,7 @@
|
||||
|
||||
/obj/effect/alien/weeds
|
||||
name = "weeds"
|
||||
desc = "Weird purple weeds."
|
||||
desc = "Strange, alien-looking purple weeds."
|
||||
icon_state = "weeds"
|
||||
|
||||
anchored = 1
|
||||
@@ -187,31 +152,20 @@
|
||||
layer = 2
|
||||
var/health = 15
|
||||
var/obj/effect/alien/weeds/node/linked_node = null
|
||||
|
||||
/obj/effect/alien/weeds/Destroy()
|
||||
if(linked_node)
|
||||
linked_node.connected_weeds.Remove(src)
|
||||
linked_node = null
|
||||
..()
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/node
|
||||
icon_state = "weednode"
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
desc = "A purple sac covering alien weeds."
|
||||
icon_state = "weednode"
|
||||
layer = 3
|
||||
luminosity = NODERANGE
|
||||
var/node_range = NODERANGE
|
||||
var/list/obj/effect/alien/weeds/connected_weeds
|
||||
|
||||
/obj/effect/alien/weeds/node/Destroy()
|
||||
for(var/obj/effect/alien/weeds/W in connected_weeds)
|
||||
W.linked_node = null
|
||||
..()
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
connected_weeds = new()
|
||||
..(src.loc, src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/New(pos, var/obj/effect/alien/weeds/node/N)
|
||||
..()
|
||||
|
||||
@@ -229,27 +183,22 @@
|
||||
Life()
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
//set background = 1
|
||||
/obj/effect/alien/weeds/Destroy()
|
||||
if(linked_node)
|
||||
linked_node.connected_weeds.Remove(src)
|
||||
linked_node = null
|
||||
..()
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
/*
|
||||
if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
Alien plants should do something if theres a lot of poison
|
||||
if(U.poison> 200000)
|
||||
health -= round(U.poison/200000)
|
||||
update()
|
||||
return
|
||||
*/
|
||||
if (istype(U, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) )
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
direction_loop:
|
||||
@@ -260,75 +209,45 @@ Alien plants should do something if theres a lot of poison
|
||||
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
continue direction_loop
|
||||
|
||||
new /obj/effect/alien/weeds(T, linked_node)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity,target)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/alien/weeds/fire_act(null, temperature, volume)
|
||||
if(temperature > T0C+200)
|
||||
health -= 1 * temperature
|
||||
healthcheck()
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
/obj/effect/alien/weeds/attackby(obj/item/I, mob/user)
|
||||
if(I.attack_verb.len)
|
||||
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
|
||||
else
|
||||
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
|
||||
|
||||
var/damage = I.force / 4.0
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/weeds/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/*/obj/effect/alien/weeds/burn(fi_amount)
|
||||
if (fi_amount > 18000)
|
||||
spawn( 0 )
|
||||
del(src)
|
||||
return
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
#undef NODERANGE
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Acid
|
||||
*/
|
||||
@@ -388,123 +307,121 @@ Alien plants should do something if theres a lot of poison
|
||||
/*
|
||||
* Egg
|
||||
*/
|
||||
/var/const //for the status var
|
||||
BURST = 0
|
||||
BURSTING = 1
|
||||
GROWING = 2
|
||||
GROWN = 3
|
||||
|
||||
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
|
||||
MAX_GROWTH_TIME = 3000
|
||||
//for the status var
|
||||
#define BURST 0
|
||||
#define BURSTING 1
|
||||
#define GROWING 2
|
||||
#define GROWN 3
|
||||
#define MIN_GROWTH_TIME 1800 //time it takes to grow a hugger
|
||||
#define MAX_GROWTH_TIME 3000
|
||||
|
||||
/obj/effect/alien/egg
|
||||
desc = "It looks like a weird egg"
|
||||
name = "egg"
|
||||
desc = "A large mottled egg."
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
var/health = 100
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
|
||||
New()
|
||||
if(aliens_allowed)
|
||||
..()
|
||||
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
else
|
||||
del(src)
|
||||
|
||||
attack_paw(user as mob)
|
||||
if(isalien(user))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
user << "\red You clear the hatched egg."
|
||||
del(src)
|
||||
return
|
||||
if(GROWING)
|
||||
user << "\red The child is not developed yet."
|
||||
return
|
||||
if(GROWN)
|
||||
user << "\red You retrieve the child."
|
||||
Burst(0)
|
||||
return
|
||||
else
|
||||
return attack_hand(user)
|
||||
/obj/effect/alien/egg/New()
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
..()
|
||||
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
|
||||
attack_hand(user as mob)
|
||||
user << "It feels slimy."
|
||||
return
|
||||
|
||||
proc/GetFacehugger()
|
||||
return locate(/mob/living/carbon/alien/facehugger) in contents
|
||||
/obj/effect/alien/egg/attack_paw(mob/user)
|
||||
if(isalien(user))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
user << "<span class='notice'>You clear the hatched egg.</span>"
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(GROWING)
|
||||
user << "<span class='notice'>The child is not developed yet.</span>"
|
||||
return
|
||||
if(GROWN)
|
||||
user << "<span class='notice'>You retrieve the child.</span>"
|
||||
Burst(0)
|
||||
return
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
new /mob/living/carbon/alien/facehugger(src)
|
||||
return
|
||||
|
||||
proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
|
||||
if(status == GROWN || status == GROWING)
|
||||
var/mob/living/carbon/alien/facehugger/child = GetFacehugger()
|
||||
icon_state = "egg_hatched"
|
||||
flick("egg_opening", src)
|
||||
status = BURSTING
|
||||
spawn(15)
|
||||
status = BURST
|
||||
if(!child)
|
||||
src.visible_message("\red The egg bursts apart revealing nothing")
|
||||
status = "GROWN"
|
||||
new /obj/effect/decal/cleanable/xenoblood(src)
|
||||
loc.contents += child//need to write the code for giving it to the alien later
|
||||
/obj/effect/alien/egg/attack_hand(mob/user)
|
||||
user << "<span class='notice'>It feels slimy.</span>"
|
||||
|
||||
/obj/effect/alien/egg/proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
|
||||
|
||||
/obj/effect/alien/egg/proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
|
||||
|
||||
/obj/effect/alien/egg/proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
|
||||
if(status == GROWN || status == GROWING)
|
||||
icon_state = "egg_hatched"
|
||||
flick("egg_opening", src)
|
||||
status = BURSTING
|
||||
spawn(15)
|
||||
status = BURST
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
if(child)
|
||||
child.loc = get_turf(src)
|
||||
if(kill && istype(child))
|
||||
child.death()
|
||||
child.Die()
|
||||
else
|
||||
child.cancel_camera()
|
||||
for(var/mob/M in range(1,src))
|
||||
if(CanHug(M))
|
||||
child.Attach(M)
|
||||
break
|
||||
|
||||
|
||||
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/effect/alien/egg/bullet_act(obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(health <= 0)
|
||||
return
|
||||
if(W.attack_verb.len)
|
||||
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
/obj/effect/alien/egg/attackby(obj/item/I, mob/user)
|
||||
if(I.attack_verb.len)
|
||||
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
|
||||
else
|
||||
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
var/damage = W.force / 4.0
|
||||
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
var/damage = I.force / 4
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
src.health -= damage
|
||||
src.healthcheck()
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
|
||||
/obj/effect/alien/egg/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
Burst()
|
||||
if(status != BURST && status != BURSTING)
|
||||
Burst()
|
||||
else if(status == BURST && prob(50))
|
||||
qdel(src) //Remove the egg after it has been hit after bursting.
|
||||
|
||||
|
||||
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/egg/HasProximity(atom/movable/AM as mob|obj)
|
||||
|
||||
/obj/effect/alien/egg/HasProximity(atom/movable/AM)
|
||||
if(status == GROWN)
|
||||
if(!CanHug(AM))
|
||||
return
|
||||
@@ -514,3 +431,11 @@ Alien plants should do something if theres a lot of poison
|
||||
return
|
||||
|
||||
Burst(0)
|
||||
|
||||
#undef BURST
|
||||
#undef BURSTING
|
||||
#undef GROWING
|
||||
#undef GROWN
|
||||
#undef MIN_GROWTH_TIME
|
||||
#undef MAX_GROWTH_TIME
|
||||
|
||||
|
||||
@@ -19,12 +19,14 @@
|
||||
icon_state = "cypherkey"
|
||||
channels = list("Syndicate" = 1)
|
||||
origin_tech = "syndicate=3"
|
||||
syndie = 1//Signifies that it de-crypts Syndicate transmissions
|
||||
syndie = 1 //Signifies that it de-crypts Syndicate transmissions
|
||||
|
||||
/obj/item/device/encryptionkey/syndicate/hacked
|
||||
name = "Standard Encryption Key"
|
||||
desc = "An encryption key for a radio headset. Has no special codes in it. Looks more sophisticated than usual."
|
||||
channels = list("Command" = 0, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
|
||||
desc = "An encryption key for a radio headset. Has no special codes in it. Looks more sophisticated than usual."
|
||||
channels = list("Command" = 0, "Security" = 0, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0, "Syndicate" = 1)
|
||||
origin_tech = "syndicate=3"
|
||||
syndie = 1
|
||||
|
||||
/obj/item/device/encryptionkey/binary
|
||||
icon_state = "cypherkey"
|
||||
@@ -33,109 +35,91 @@
|
||||
|
||||
/obj/item/device/encryptionkey/headset_sec
|
||||
name = "Security Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "sec_cypherkey"
|
||||
channels = list("Security" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_eng
|
||||
name = "Engineering Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "eng_cypherkey"
|
||||
channels = list("Engineering" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_rob
|
||||
name = "Robotics Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "rob_cypherkey"
|
||||
channels = list("Engineering" = 1, "Science" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_med
|
||||
name = "Medical Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "med_cypherkey"
|
||||
channels = list("Medical" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_sci
|
||||
name = "Science Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "sci_cypherkey"
|
||||
channels = list("Science" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_medsci
|
||||
name = "Medical Research Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "medsci_cypherkey"
|
||||
channels = list("Medical" = 1, "Science" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_com
|
||||
name = "Command Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "com_cypherkey"
|
||||
channels = list("Command" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/captain
|
||||
name = "Captain's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "cap_cypherkey"
|
||||
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/rd
|
||||
name = "Research Director's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "rd_cypherkey"
|
||||
channels = list("Science" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/hos
|
||||
name = "Head of Security's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "hos_cypherkey"
|
||||
channels = list("Security" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/ce
|
||||
name = "Chief Engineer's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "ce_cypherkey"
|
||||
channels = list("Engineering" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/cmo
|
||||
name = "Chief Medical Officer's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "cmo_cypherkey"
|
||||
channels = list("Medical" = 1, "Command" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/hop
|
||||
name = "Head of Personnel's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "hop_cypherkey"
|
||||
channels = list("Supply" = 1, "Service" = 1, "Command" = 1, "Security" = 0)
|
||||
/*
|
||||
/obj/item/device/encryptionkey/headset_mine
|
||||
name = "Mining Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "mine_cypherkey"
|
||||
channels = list("Mining" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/qm
|
||||
name = "Quartermaster's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "qm_cypherkey"
|
||||
channels = list("Cargo" = 1, "Mining" = 1)
|
||||
*/
|
||||
/obj/item/device/encryptionkey/headset_cargo
|
||||
name = "Supply Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "cargo_cypherkey"
|
||||
channels = list("Supply" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_service
|
||||
name = "Service Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "srv_cypherkey"
|
||||
channels = list("Service" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/ert
|
||||
name = "Nanotrasen ERT Radio Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
channels = list("Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1, "Service" = 1)
|
||||
|
||||
/obj/item/device/encryptionkey/heads/ai_integrated //ported from bay, this goes 'inside' the AI.
|
||||
|
||||
@@ -89,16 +89,7 @@
|
||||
|
||||
/obj/structure/lamarr/proc/Break()
|
||||
if(occupied)
|
||||
new /mob/living/carbon/alien/facehugger/lamarr(src.loc)
|
||||
new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/facehugger/lamarr
|
||||
name = "Lamarr"
|
||||
desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
|
||||
sterile = 1
|
||||
gender = FEMALE
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
|
||||
return
|
||||
@@ -297,5 +297,4 @@
|
||||
|
||||
CheckHardness()
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
..()
|
||||
|
||||
..()
|
||||
@@ -2,15 +2,18 @@
|
||||
var/global/wcBar
|
||||
var/global/wcBrig
|
||||
var/global/wcCommon
|
||||
var/global/wcXeno
|
||||
var/global/wcColored
|
||||
/proc/color_windows_init()
|
||||
var/list/bar = list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff")
|
||||
var/list/brig = list("#aa0808", "#7f0606", "#ff0000")
|
||||
var/list/common = list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")
|
||||
var/list/xeno = list("#73248B")
|
||||
|
||||
wcBar = pick(bar)
|
||||
wcBrig = pick(brig)
|
||||
wcCommon = pick(common)
|
||||
wcXeno = pick(xeno)
|
||||
|
||||
/obj/proc/color_windows(var/obj/W as obj)
|
||||
if(!wcColored)
|
||||
@@ -19,6 +22,7 @@ var/global/wcColored
|
||||
|
||||
var/list/wcBarAreas = list(/area/crew_quarters/bar)
|
||||
var/list/wcBrigAreas = list(/area/security,/area/security/main,/area/security/lobby,/area/security/brig,/area/security/permabrig,/area/security/prison,/area/security/prison/cell_block/A,/area/security/prison/cell_block/B,/area/security/prison/cell_block/C,/area/security/execution,/area/security/processing,/area/security/interrogation,/area/security/interrogationobs,/area/security/evidence,/area/security/prisonlockers,/area/security/medbay,/area/security/processing,/area/security/warden,/area/security/armoury,/area/security/securearmoury,/area/security/armoury/gamma,/area/security/securehallway,/area/security/hos,/area/security/podbay,/area/security/detectives_office,/area/security/range,/area/security/nuke_storage,/area/security/checkpoint,/area/security/checkpoint2,/area/security/checkpoint2,/area/security/checkpoint/supply,/area/security/checkpoint/engineering,/area/security/checkpoint/medical,/area/security/checkpoint/science,/area/security/vacantoffice,/area/security/vacantoffice2,/area/prison,/area/prison/arrival_airlock,/area/prison/control,/area/prison/crew_quarters,/area/prison/rec_room,/area/prison/closet,/area/prison/hallway/fore,/area/prison/hallway/aft,/area/prison/hallway/port,/area/prison/hallway/starboard,/area/prison/morgue,/area/prison/medical_research,/area/prison/medical,/area/prison/solar,/area/prison/podbay,/area/prison/solar_control,/area/prison/solitary,/area/prison/cell_block,/area/prison/cell_block/A,/area/prison/cell_block/B,/area/prison/cell_block/C,/area/shuttle/gamma/space,/area/shuttle/gamma/station)
|
||||
var/list/wcXenoAreas = list(/area/xenos_station/start)
|
||||
|
||||
var/newcolor
|
||||
for(var/A in wcBarAreas)
|
||||
@@ -31,6 +35,11 @@ var/global/wcColored
|
||||
newcolor = wcBrig
|
||||
break
|
||||
|
||||
for(var/A in wcXenoAreas)
|
||||
if(W.areaMaster == locate(A))
|
||||
newcolor = wcXeno
|
||||
break
|
||||
|
||||
if(!newcolor)
|
||||
newcolor = wcCommon
|
||||
|
||||
|
||||
@@ -13,12 +13,13 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
|
||||
"alien candidate" = 1, //always show // 6
|
||||
"pAI candidate" = 1, // -- TLE // 7
|
||||
"cultist" = IS_MODE_COMPILED("cult"), // 8
|
||||
"plant" = 1, // 9
|
||||
"plant" = 1, // 9
|
||||
"ninja" = "true", // 10
|
||||
"vox raider" = IS_MODE_COMPILED("heist"), // 11
|
||||
"slime" = 1, // 12
|
||||
"vampire" = IS_MODE_COMPILED("vampire"), // 13
|
||||
"mutineer" = IS_MODE_COMPILED("mutiny") // 14
|
||||
"vampire" = IS_MODE_COMPILED("vampire"), // 13
|
||||
"mutineer" = IS_MODE_COMPILED("mutiny"), // 14
|
||||
"blob" = IS_MODE_COMPILED("blob") // 15
|
||||
)
|
||||
|
||||
var/const/MAX_SAVE_SLOTS = 10
|
||||
|
||||
@@ -15,21 +15,32 @@
|
||||
|
||||
alien_talk_understand = 1
|
||||
|
||||
nightvision = 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|CANPUSH
|
||||
var/heal_rate = 1
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 5
|
||||
|
||||
var/oxygen_alert = 0
|
||||
var/toxins_alert = 0
|
||||
var/fire_alert = 0
|
||||
|
||||
var/large = 0
|
||||
var/heat_protection = 0.5
|
||||
var/leaping = 0
|
||||
|
||||
/mob/living/carbon/alien/New()
|
||||
verbs += /mob/living/carbon/verb/mob_sleep
|
||||
verbs += /mob/living/verb/lay_down
|
||||
internal_organs += new /obj/item/brain/alien
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount)
|
||||
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
|
||||
updatePlasmaDisplay()
|
||||
@@ -52,10 +63,8 @@
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
//oxyloss is only used for suicide
|
||||
//toxloss isn't used for aliens, its actually used as alien powers!!
|
||||
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
return
|
||||
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
|
||||
@@ -70,6 +79,7 @@
|
||||
|
||||
if(!environment)
|
||||
return
|
||||
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
@@ -114,7 +124,6 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
|
||||
|
||||
if(getFireLoss())
|
||||
if((M_RESIST_HEAT in mutations) || prob(5))
|
||||
adjustFireLoss(-1)
|
||||
@@ -184,6 +193,21 @@
|
||||
|
||||
/mob/living/carbon/alien/setDNA()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/verb/nightvisiontoggle()
|
||||
set name = "Toggle Night Vision"
|
||||
set category = "Alien"
|
||||
|
||||
if(!nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
nightvision = 1
|
||||
usr.hud_used.nightvisionicon.icon_state = "nightvision1"
|
||||
else if(nightvision == 1)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
nightvision = 0
|
||||
usr.hud_used.nightvisionicon.icon_state = "nightvision0"
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: AddInfectionImages()
|
||||
@@ -193,7 +217,7 @@ Des: Gives the client of the alien an image on each infected mob.
|
||||
if (client)
|
||||
for (var/mob/living/C in mob_list)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/mob/living/carbon/alien/embryo/A = locate() in C
|
||||
var/obj/item/alien_embryo/A = locate() in C
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
|
||||
client.images += I
|
||||
return
|
||||
@@ -210,10 +234,8 @@ Des: Removes all infected images from the alien.
|
||||
del(I)
|
||||
return
|
||||
|
||||
#undef HEAT_DAMAGE_LEVEL_1
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
/mob/living/carbon/alien/canBeHandcuffed()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/proc/updatePlasmaDisplay()
|
||||
if(hud_used) //clientless aliens
|
||||
@@ -221,3 +243,7 @@ Des: Removes all infected images from the alien.
|
||||
|
||||
/mob/living/carbon/alien/larva/updatePlasmaDisplay()
|
||||
return
|
||||
|
||||
#undef HEAT_DAMAGE_LEVEL_1
|
||||
#undef HEAT_DAMAGE_LEVEL_2
|
||||
#undef HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
@@ -1,2 +1,106 @@
|
||||
/mob/living/carbon/alien/hitby(atom/movable/AM)
|
||||
..(AM, 1)
|
||||
..(AM, 1)
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
sleeping = max(0,sleeping-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
|
||||
|
||||
if ("grab")
|
||||
if (M == src || anchored)
|
||||
return
|
||||
if (!(status_flags & CANPUSH))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = 1
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>")
|
||||
adjustBruteLoss(damage)
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
updatehealth()
|
||||
else
|
||||
M << "<span class='warning'>[name] is too injured for that.</span>"
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L as mob)
|
||||
return attack_alien(L)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return 0
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
help_shake_act(M)
|
||||
if("grab")
|
||||
if (M == src || anchored)
|
||||
return
|
||||
if (!(status_flags & CANPUSH))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
if ("harm", "disarm")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(..())
|
||||
if (stat != DEAD)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(..())
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
@@ -23,26 +23,17 @@ Doesn't work on other aliens/AI.*/
|
||||
set desc = "Plants some alien weeds"
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/weeds/node) in get_turf(src))
|
||||
src << "There's already a weed node here."
|
||||
return
|
||||
|
||||
if(powerc(50,1))
|
||||
adjustToxLoss(-50)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1)
|
||||
O.show_message(text("<span class='alertalien'>[src] has planted some alien weeds!</span>"), 1)
|
||||
new /obj/effect/alien/weeds/node(loc)
|
||||
return
|
||||
|
||||
/*
|
||||
/mob/living/carbon/alien/humanoid/verb/ActivateHuggers()
|
||||
set name = "Activate facehuggers (5)"
|
||||
set desc = "Makes all nearby facehuggers activate"
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(5))
|
||||
adjustToxLoss(-5)
|
||||
for(var/obj/item/clothing/mask/facehugger/F in range(8,src))
|
||||
F.GoActive()
|
||||
emote("roar")
|
||||
return
|
||||
*/
|
||||
/mob/living/carbon/alien/humanoid/verb/whisp(mob/M as mob in oview())
|
||||
set name = "Whisper (10)"
|
||||
set desc = "Whisper to someone"
|
||||
@@ -53,8 +44,8 @@ Doesn't work on other aliens/AI.*/
|
||||
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
|
||||
if(msg)
|
||||
log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
|
||||
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
|
||||
src << {"\green You said: "[msg]" to [M]"}
|
||||
M << "<span class='noticealien'>You hear a strange, alien voice in your head...<span class='noticealien'>[msg]"
|
||||
src << {"<span class='noticealien'>You said: "[msg]" to [M]</span>"}
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview())
|
||||
@@ -70,10 +61,10 @@ Doesn't work on other aliens/AI.*/
|
||||
if (get_dist(src,M) <= 1)
|
||||
M.adjustToxLoss(amount)
|
||||
adjustToxLoss(-amount)
|
||||
M << "\green [src] has transfered [amount] plasma to you."
|
||||
src << {"\green You have trasferred [amount] plasma to [M]"}
|
||||
M << "<span class='noticealien'>[src] has transfered [amount] plasma to you.</span>"
|
||||
src << {"<span class='noticealien'>You have trasferred [amount] plasma to [M]</span>"}
|
||||
else
|
||||
src << "\green You need to be closer."
|
||||
src << "<span class='noticealien'>You need to be closer.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -88,30 +79,51 @@ Doesn't work on other aliens/AI.*/
|
||||
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."
|
||||
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
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."
|
||||
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
return
|
||||
// R FLOOR
|
||||
if(istype(T, /turf/simulated/floor/engine))
|
||||
src << "\green You cannot dissolve this object."
|
||||
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
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>")
|
||||
visible_message("<span class='alertalien'>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
|
||||
else
|
||||
src << "\green Target is too far away."
|
||||
src << "<span class='noticealien'>Target is too far away.</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/neurotoxin() // ok
|
||||
set name = "Spit Neurotoxin (50)"
|
||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
src.visible_message("<span class='danger'>[src] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
|
||||
var/turf/T = loc
|
||||
var/turf/U = get_step(src, dir) // Get the tile infront of the move, based on their direction
|
||||
if(!isturf(U) || !isturf(T))
|
||||
return
|
||||
|
||||
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(usr.loc)
|
||||
A.current = U
|
||||
A.firer = src
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
spawn(1)
|
||||
A.process()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
||||
set name = "Secrete Resin (75)"
|
||||
@@ -119,21 +131,32 @@ Doesn't work on other aliens/AI.*/
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(75))
|
||||
if(constructing)
|
||||
src << "<span class='noticealien'>You are already constructing something.</span>"
|
||||
return
|
||||
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(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)
|
||||
switch(choice)
|
||||
if("resin door")
|
||||
new /obj/structure/mineral_door/resin(loc)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
|
||||
if(!choice || !powerc(75))
|
||||
return
|
||||
|
||||
constructing = 1
|
||||
stunned = 5
|
||||
src << "<span class='noticealien'>You start shaping a [choice].</span>"
|
||||
spawn(60)
|
||||
adjustToxLoss(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='noticealien'>[src] vomits up a thick purple substance and shapes it!</span>"), 1)
|
||||
switch(choice)
|
||||
if("resin door")
|
||||
new /obj/structure/mineral_door/resin(loc)
|
||||
if("resin wall")
|
||||
new /obj/effect/alien/resin/wall(loc)
|
||||
if("resin membrane")
|
||||
new /obj/effect/alien/resin/membrane(loc)
|
||||
if("resin nest")
|
||||
new /obj/structure/stool/bed/nest(loc)
|
||||
constructing = 0
|
||||
stunned = 0
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
||||
@@ -148,5 +171,5 @@ Doesn't work on other aliens/AI.*/
|
||||
stomach_contents.Remove(M)
|
||||
M.loc = loc
|
||||
//Paralyse(10)
|
||||
src.visible_message("\green <B>[src] hurls out the contents of their stomach!</B>")
|
||||
src.visible_message("<span class='alertalien'><B>[src] hurls out the contents of their stomach!</span>")
|
||||
return
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
// if(src.name == "alien drone")
|
||||
// src.name = text("alien drone ([rand(1, 1000)])")
|
||||
if(src.name == "alien drone")
|
||||
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)
|
||||
..()
|
||||
@@ -36,10 +36,10 @@
|
||||
return
|
||||
if(no_queen)
|
||||
adjustToxLoss(-500)
|
||||
src << "\green You begin to evolve!"
|
||||
src << "<span class='noticealien'>You begin to evolve!</span>"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/queen/large/new_xeno = new (loc)
|
||||
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
|
||||
mind.transfer_to(new_xeno)
|
||||
del(src)
|
||||
else
|
||||
|
||||
@@ -12,65 +12,139 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
// if(name == "alien hunter")
|
||||
// name = text("alien hunter ([rand(1, 1000)])")
|
||||
if(name == "alien hunter")
|
||||
name = text("alien hunter ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
|
||||
..() //-Yvarov
|
||||
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..() //-Yvarov
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(150 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 150)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 100)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
|
||||
handle_environment()
|
||||
if(m_intent == "run" || resting)
|
||||
..()
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(150 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 150)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 100)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
adjustToxLoss(-heal_rate)
|
||||
healths.icon_state = "health6"
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
|
||||
if(m_intent == "run" || resting)
|
||||
..()
|
||||
else
|
||||
adjustToxLoss(-heal_rate)
|
||||
|
||||
|
||||
//Hunter verbs
|
||||
/*
|
||||
/mob/living/carbon/alien/humanoid/hunter/verb/invis()
|
||||
set name = "Invisibility (50)"
|
||||
set desc = "Makes you invisible for 15 seconds"
|
||||
set category = "Alien"
|
||||
|
||||
if(alien_invis)
|
||||
update_icons()
|
||||
/mob/living/carbon/alien/humanoid/hunter/proc/toggle_leap()
|
||||
leap_on_click = !leap_on_click
|
||||
leap_icon.icon_state = "leap_[leap_on_click ? "on":"off"]"
|
||||
src << "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/ClickOn(var/atom/A, var/params)
|
||||
face_atom(A)
|
||||
if(leap_on_click)
|
||||
leap_at(A)
|
||||
else
|
||||
if(powerc(50))
|
||||
adjustToxLoss(-50)
|
||||
alien_invis = 1.0
|
||||
update_icons()
|
||||
src << "\green You are now invisible."
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
|
||||
spawn(250)
|
||||
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
|
||||
alien_invis = 0.0
|
||||
update_icons()
|
||||
src << "\green You are no longer invisible."
|
||||
return
|
||||
*/
|
||||
..()
|
||||
|
||||
#define MAX_ALIEN_LEAP_DIST 7
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(var/atom/A)
|
||||
if(leaping) //Leap while you leap, so you can leap while you leap
|
||||
return
|
||||
|
||||
if(!has_gravity(src) || !has_gravity(A))
|
||||
src << "<span class='alertalien'>It is unsafe to leap without gravity!</span>"
|
||||
//It's also extremely buggy visually, so it's balance+bugfix
|
||||
return
|
||||
if(lying)
|
||||
return
|
||||
|
||||
leaping = 1
|
||||
update_icons()
|
||||
throw_at(A,MAX_ALIEN_LEAP_DIST,1)
|
||||
leaping = 0
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/throw_impact(A)
|
||||
var/msg = ""
|
||||
|
||||
if(A)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
msg = "<span class ='alertalien'>[src] pounces on [A]!</span>"
|
||||
L.Weaken(5)
|
||||
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
|
||||
step_towards(src,L)
|
||||
else
|
||||
msg = "<span class ='alertalien'>[src] smashes into [A]!</span>"
|
||||
weakened = 2
|
||||
|
||||
if(leaping)
|
||||
leaping = 0
|
||||
update_canmove()
|
||||
visible_message(msg)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/float(on)
|
||||
if(leaping)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
//Modified throw_at() that will use diagonal dirs where appropriate
|
||||
//instead of locking it to cardinal dirs
|
||||
/mob/living/carbon/alien/humanoid/throw_at(atom/target, range, speed)
|
||||
if(!target || !src) return 0
|
||||
|
||||
src.throwing = 1
|
||||
|
||||
var/dist_x = abs(target.x - src.x)
|
||||
var/dist_y = abs(target.y - src.y)
|
||||
var/dist_travelled = 0
|
||||
var/dist_since_sleep = 0
|
||||
|
||||
var/tdist_x = dist_x;
|
||||
var/tdist_y = dist_y;
|
||||
|
||||
if(dist_x <= dist_y)
|
||||
tdist_x = dist_y;
|
||||
tdist_y = dist_x;
|
||||
|
||||
var/error = tdist_x/2 - tdist_y
|
||||
while(target && (((((dist_x > dist_y) && ((src.x < target.x) || (src.x > target.x))) || ((dist_x <= dist_y) && ((src.y < target.y) || (src.y > target.y))) || (src.x > target.x)) && dist_travelled < range) || !has_gravity(src)))
|
||||
|
||||
if(!src.throwing) break
|
||||
if(!istype(src.loc, /turf)) break
|
||||
|
||||
var/atom/step = get_step(src, get_dir(src,target))
|
||||
if(!step)
|
||||
break
|
||||
src.Move(step, get_dir(src, step))
|
||||
hit_check()
|
||||
error += (error < 0) ? tdist_x : -tdist_y;
|
||||
dist_travelled++
|
||||
dist_since_sleep++
|
||||
if(dist_since_sleep >= speed)
|
||||
dist_since_sleep = 0
|
||||
sleep(1)
|
||||
|
||||
|
||||
src.throwing = 0
|
||||
if(isobj(src))
|
||||
src.throw_impact(get_turf(src))
|
||||
|
||||
return 1
|
||||
@@ -7,61 +7,7 @@
|
||||
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
|
||||
R.my_atom = src
|
||||
// if(name == "alien sentinel")
|
||||
// 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/sentinel
|
||||
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..() //-Yvarov
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(125 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 125)
|
||||
healths.icon_state = "health1"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 75)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/verb/evolve() // -- TLE
|
||||
set name = "Evolve (250)"
|
||||
set desc = "Become a Praetorian, Royal Guard to the Queen."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(250))
|
||||
adjustToxLoss(-250)
|
||||
src << "\green You begin to evolve!"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/sentinel/large/new_xeno = new (loc)
|
||||
if(mind)
|
||||
mind.transfer_to(new_xeno)
|
||||
else
|
||||
new_xeno.key = key
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/large
|
||||
name = "alien praetorian"
|
||||
icon = 'icons/mob/alienlarge.dmi'
|
||||
@@ -72,7 +18,13 @@
|
||||
move_delay_add = 1
|
||||
large = 1
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/praetorian
|
||||
name = "alien praetorian"
|
||||
maxHealth = 200
|
||||
health = 200
|
||||
move_delay_add = 1
|
||||
large = 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
@@ -85,4 +37,55 @@
|
||||
else
|
||||
icon_state = "prat_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
overlays += I
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
if(name == "alien sentinel")
|
||||
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)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
|
||||
..() //-Yvarov
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(125 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(100 to 125)
|
||||
healths.icon_state = "health1"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 75)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/verb/evolve() // -- TLE
|
||||
set name = "Evolve (250)"
|
||||
set desc = "Become a Praetorian, Royal Guard to the Queen."
|
||||
set category = "Alien"
|
||||
|
||||
if(powerc(250))
|
||||
adjustToxLoss(-250)
|
||||
src << "\green You begin to evolve!"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/sentinel/praetorian/new_xeno = new (loc)
|
||||
if(mind)
|
||||
mind.transfer_to(new_xeno)
|
||||
else
|
||||
new_xeno.key = key
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
/mob/living/carbon/alien/humanoid/empress/large
|
||||
/mob/living/carbon/alien/humanoid/empress
|
||||
name = "alien empress"
|
||||
caste = "e"
|
||||
caste = "q"
|
||||
maxHealth = 700
|
||||
health = 700
|
||||
icon_state = "empress_s"
|
||||
icon_state = "alienq_s"
|
||||
status_flags = CANPARALYSE
|
||||
heal_rate = 5
|
||||
plasma_rate = 20
|
||||
move_delay_add = 3
|
||||
max_plasma = 1000
|
||||
large = 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress/large
|
||||
name = "alien empress"
|
||||
caste = "e"
|
||||
icon = 'icons/mob/alienhuge.dmi'
|
||||
icon_state = "empress_s"
|
||||
pixel_x = -32
|
||||
move_delay_add = 3
|
||||
large = 1
|
||||
max_plasma = 1000
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
@@ -28,7 +32,6 @@
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
@@ -72,18 +75,28 @@
|
||||
src.healths.icon_state = "health6"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (250)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/egg) in get_turf(src))
|
||||
src << "There's already an egg here."
|
||||
return
|
||||
|
||||
|
||||
if(constructing)
|
||||
src << "<span class='noticealien'>You are already constructing something.</span>"
|
||||
return
|
||||
|
||||
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-250)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
return
|
||||
constructing = 1
|
||||
stunned = 5
|
||||
src << "<span class='noticealien'>You start laying an egg.</span>"
|
||||
spawn(30)
|
||||
adjustToxLoss(-250)
|
||||
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)
|
||||
constructing = 0
|
||||
stunned = 0
|
||||
return
|
||||
|
||||
@@ -9,14 +9,16 @@
|
||||
var/caste = ""
|
||||
var/next_attack = 0
|
||||
update_icon = 1
|
||||
var/leap_on_click = 0
|
||||
var/constructing = 0
|
||||
|
||||
//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)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
// if(name == "alien")
|
||||
// name = text("alien ([rand(1, 1000)])")
|
||||
if(name == "alien")
|
||||
name = text("alien ([rand(1, 1000)])")
|
||||
real_name = name
|
||||
..()
|
||||
|
||||
@@ -58,6 +60,9 @@
|
||||
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
|
||||
tally = -1 // hunters go supersuperfast
|
||||
return (tally + move_delay_add + config.alien_delay)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0)
|
||||
return 1
|
||||
|
||||
///mob/living/carbon/alien/humanoid/bullet_act(var/obj/item/projectile/Proj) taken care of in living
|
||||
|
||||
@@ -116,12 +121,9 @@
|
||||
|
||||
|
||||
show_message("\red The blob attacks!")
|
||||
|
||||
adjustFireLoss(damage)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
@@ -133,35 +135,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -222,18 +195,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
@@ -332,48 +293,6 @@
|
||||
O.show_message(text("\red <B>[] has attempted to disarm []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
sleeping = max(0,sleeping-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
M << "\green <B>[name] is too injured for that.</B>"
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/restrained()
|
||||
if (handcuffed)
|
||||
return 1
|
||||
|
||||
@@ -4,16 +4,13 @@
|
||||
oxygen_alert = 0
|
||||
toxins_alert = 0
|
||||
fire_alert = 0
|
||||
|
||||
pass_flags = PASSTABLE
|
||||
var/temperature_alert = 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/Life()
|
||||
set invisibility = 0
|
||||
//set background = 1
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
..()
|
||||
|
||||
@@ -59,6 +56,7 @@
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
update_canmove()
|
||||
update_icons()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
@@ -68,388 +66,200 @@
|
||||
handle_regular_hud_updates()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid
|
||||
proc/handle_disabilities()
|
||||
if (disabilities & EPILEPSY)
|
||||
if ((prob(1) && paralysis < 10))
|
||||
src << "\red You have a seizure!"
|
||||
Paralyse(10)
|
||||
if (disabilities & COUGHING)
|
||||
if ((prob(5) && paralysis <= 1))
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & TOURETTES)
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
/mob/living/carbon/alien/humanoid/proc/handle_disabilities()
|
||||
if (disabilities & EPILEPSY)
|
||||
if ((prob(1) && paralysis < 10))
|
||||
src << "<span class='danger'>You have a seizure!</span>"
|
||||
Paralyse(10)
|
||||
if (disabilities & COUGHING)
|
||||
if ((prob(5) && paralysis <= 1))
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & TOURETTES)
|
||||
if ((prob(10) && paralysis <= 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
emote("twitch")
|
||||
return
|
||||
if (disabilities & NERVOUS)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/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
|
||||
|
||||
proc/breathe()
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
|
||||
/mob/living/carbon/alien/humanoid/proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
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 effect 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)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(status_flags & GODMODE)
|
||||
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
|
||||
|
||||
adjustToxLoss(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) && !(M_RESIST_HEAT in mutations)) // 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
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
/*
|
||||
proc/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(M_RESIST_COLD in mutations)
|
||||
thermal_protection += 5
|
||||
|
||||
return thermal_protection
|
||||
|
||||
proc/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
|
||||
*/
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(M_FAT in mutations)
|
||||
if(nutrition < 100)
|
||||
if(prob(round((50 - nutrition) / 100)))
|
||||
src << "\blue You feel fit again!"
|
||||
mutations.Remove(M_FAT)
|
||||
else
|
||||
if(nutrition > 500)
|
||||
if(prob(5 + round((nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(M_FAT)
|
||||
|
||||
if (nutrition > 0)
|
||||
nutrition -= HUNGER_FACTOR
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(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)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
|
||||
proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
handle_statuses()
|
||||
return 1
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
if(!weakened)
|
||||
update_icons()
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
proc/handle_regular_hud_updates()
|
||||
/mob/living/carbon/alien/humanoid/proc/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (M_XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
if (stat == 2 || (M_XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 75)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
if (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(75 to 100)
|
||||
healths.icon_state = "health1"
|
||||
if(50 to 75)
|
||||
healths.icon_state = "health2"
|
||||
if(25 to 50)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 25)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
return 1
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
proc/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
stomach_contents.Remove(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
del(M)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!(status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
/mob/living/carbon/alien/humanoid/handle_stunned()
|
||||
if(stunned && !..())
|
||||
update_icons()
|
||||
return stunned
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[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.
|
||||
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
plasma_rate = 20
|
||||
move_delay_add = 2
|
||||
max_plasma = 1000
|
||||
large = 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
@@ -24,7 +25,7 @@
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/resin)
|
||||
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/alien_ventcrawl
|
||||
..()
|
||||
|
||||
@@ -60,17 +61,26 @@
|
||||
set name = "Lay Egg (250)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
|
||||
if(locate(/obj/effect/alien/egg) in get_turf(src))
|
||||
src << "There's already an egg here."
|
||||
return
|
||||
|
||||
|
||||
if(constructing)
|
||||
src << "<span class='noticealien'>You are already constructing something.</span>"
|
||||
return
|
||||
|
||||
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustToxLoss(-250)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
return
|
||||
constructing = 1
|
||||
stunned = 5
|
||||
src << "<span class='noticealien'>You start laying an egg.</span>"
|
||||
spawn(60)
|
||||
adjustToxLoss(-250)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] has laid an egg!</span>"), 1)
|
||||
new /obj/effect/alien/egg(loc)
|
||||
constructing = 0
|
||||
stunned = 0
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large
|
||||
@@ -113,7 +123,7 @@
|
||||
src << "\green You begin to evolve!"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/empress/large/new_xeno = new (loc)
|
||||
var/mob/living/carbon/alien/humanoid/empress/new_xeno = new (loc)
|
||||
if(mind)
|
||||
mind.transfer_to(new_xeno)
|
||||
else
|
||||
|
||||
@@ -13,31 +13,43 @@
|
||||
var/list/overlays_standing[X_TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/alien/humanoid/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays.Cut()
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
|
||||
if(stat == DEAD)
|
||||
//If we mostly took damage from fire
|
||||
if(fireloss > 125)
|
||||
icon_state = "alien[caste]_husked"
|
||||
pixel_y = 0
|
||||
else
|
||||
icon_state = "alien[caste]_dead"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else if(lying)
|
||||
if(resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(stat == UNCONSCIOUS)
|
||||
icon_state = "alien[caste]_unconscious"
|
||||
else
|
||||
icon_state = "alien[caste]_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
pixel_y = 0
|
||||
|
||||
else if(stat == UNCONSCIOUS || weakened)
|
||||
icon_state = "alien[caste]_unconscious"
|
||||
pixel_y = 0
|
||||
else if(leap_on_click)
|
||||
icon_state = "alien[caste]_pounce"
|
||||
|
||||
else if(lying || resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(m_intent == "run")
|
||||
icon_state = "alien[caste]_running"
|
||||
else
|
||||
if(m_intent == "run") icon_state = "alien[caste]_running"
|
||||
else icon_state = "alien[caste]_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
icon_state = "alien[caste]_s"
|
||||
|
||||
if(leaping)
|
||||
icon = 'icons/mob/alienleap.dmi'
|
||||
icon_state = "alien[caste]_leap"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
else
|
||||
icon = initial(icon)
|
||||
pixel_x = initial(pixel_x)
|
||||
pixel_y = initial(pixel_y)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/regenerate_icons()
|
||||
..()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "larva_dead"
|
||||
|
||||
if(!gibbed)
|
||||
visible_message("<span class='name'>[src]</span> lets out a waning high-pitched cry.")
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
|
||||
/datum/hud/proc/larva_hud()
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.dir = SOUTHWEST
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = 20
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_alien_oxygen
|
||||
|
||||
mymob.toxin = new /obj/screen()
|
||||
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_alien_toxin
|
||||
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_alien_fire
|
||||
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
|
||||
mymob.flash = new /obj/screen()
|
||||
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.flash.icon_state = "blank"
|
||||
mymob.flash.name = "flash"
|
||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||
mymob.flash.layer = 17
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
|
||||
|
||||
@@ -140,186 +140,31 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if (health > 0)
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (M.health >= -75.0)
|
||||
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
|
||||
M << "\blue <B>Remove that mask!</B>"
|
||||
return
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
if(..())
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
if (M_HULK in M.mutations)
|
||||
damage += 5
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
add_logs(M, src, "attacked")
|
||||
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has kicked [src]!</span>")
|
||||
if ((stat != DEAD) && (damage > 4.9))
|
||||
Paralyse(rand(5,10))
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
if (M_HULK in M.mutations)
|
||||
damage += 5
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
step_away(src,M,15)
|
||||
sleep(3)
|
||||
step_away(src,M,15)
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
|
||||
if (damage > 4.9)
|
||||
Weaken(rand(10,15))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has attempted to punch []!</B>", M, src), 1)
|
||||
return
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
sleeping = max(0,sleeping-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\blue [M.name] nuzzles [] trying to wake it up!", src), 1)
|
||||
|
||||
else
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
var/damage = rand(1, 3)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
M << "\green <B>[name] is too injured for that.</B>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/larva/restrained()
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
|
||||
var/temperature_alert = 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/Life()
|
||||
set invisibility = 0
|
||||
//set background = 1
|
||||
|
||||
if (monkeyizing)
|
||||
return
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
..()
|
||||
var/datum/gas_mixture/enviroment = loc.return_air()
|
||||
@@ -61,309 +57,160 @@
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
/mob/living/carbon/alien/larva/proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/larva
|
||||
|
||||
proc/breathe()
|
||||
|
||||
if(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/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < 0)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
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 effect 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)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(status_flags & GODMODE)
|
||||
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
|
||||
|
||||
adjustToxLoss(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) && !(M_RESIST_HEAT in mutations)) // 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
|
||||
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(M_FAT in mutations)
|
||||
if(nutrition < 100)
|
||||
if(prob(round((50 - nutrition) / 100)))
|
||||
src << "\blue You feel fit again!"
|
||||
mutations.Add(M_FAT)
|
||||
else
|
||||
if(nutrition > 500)
|
||||
if(prob(5 + round((nutrition - max_grown) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations.Add(M_FAT)
|
||||
|
||||
if (nutrition > 0)
|
||||
nutrition-= HUNGER_FACTOR
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(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)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < -25 || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < -25 || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (0 > health) )
|
||||
//if( health <= 20 && prob(1) )
|
||||
// spawn(0)
|
||||
// emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
|
||||
//if( health <= 20 && prob(1) )
|
||||
// spawn(0)
|
||||
// emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-2)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss_")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
if(paralysis)
|
||||
AdjustParalysis(-2)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss_")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
handle_statuses()
|
||||
return 1
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
|
||||
|
||||
proc/handle_regular_hud_updates()
|
||||
/mob/living/carbon/alien/larva/proc/handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || (M_XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
if (stat == 2 || (M_XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if (stat != 2)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(25 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(19 to 25)
|
||||
healths.icon_state = "health1"
|
||||
if(13 to 19)
|
||||
healths.icon_state = "health2"
|
||||
if(7 to 13)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 7)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
if (client)
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
switch(health)
|
||||
if(25 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(19 to 25)
|
||||
healths.icon_state = "health1"
|
||||
if(13 to 19)
|
||||
healths.icon_state = "health2"
|
||||
if(7 to 13)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 7)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
return 1
|
||||
if(pullin)
|
||||
if(pulling)
|
||||
pullin.icon_state = "pull"
|
||||
else
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
proc/handle_random_events()
|
||||
return
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[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.
|
||||
|
||||
|
||||
proc/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
stomach_contents.Remove(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && 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.status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
|
||||
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHTED)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/larva/proc/handle_random_events()
|
||||
return
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/mob/living/carbon/alien/proc/handle_chemicals_in_body()
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(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)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
/mob/living/carbon/alien/proc/breathe()
|
||||
if(reagents)
|
||||
if(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/gas_mixture/breath
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
losebreath--
|
||||
if (prob(75)) //High chance of gasping for air
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
else
|
||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
||||
|
||||
//No breath from internal atmosphere so get breath from location
|
||||
if(!breath)
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
|
||||
else if(istype(loc, /turf/))
|
||||
var/breath_moles = environment.total_moles()*BREATH_PERCENTAGE
|
||||
|
||||
breath = loc.remove_air(breath_moles)
|
||||
|
||||
// Handle chem smoke effect -- Doohl
|
||||
for(var/obj/effect/effect/chem_smoke/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
|
||||
else //Still give containing object the chance to interact
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
location_as_object.handle_internal_lifeform(src, 0)
|
||||
|
||||
handle_breath(breath)
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(status_flags & GODMODE)
|
||||
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
|
||||
|
||||
adjustToxLoss(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) && !(M_RESIST_COLD in mutations)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
|
||||
fire_alert = max(fire_alert, 1)
|
||||
else
|
||||
fire_alert = 0
|
||||
|
||||
//Temporary fixes to the alerts.
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/proc/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
stomach_contents.Remove(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
qdel(M)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!(M.status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/alien/verb/alien_ventcrawl() // -- TLE
|
||||
set name = "Crawl through vent(Alien)"
|
||||
set name = "Crawl through vent"
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Alien"
|
||||
handle_ventcrawl()
|
||||
@@ -1,7 +1,8 @@
|
||||
// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability
|
||||
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
|
||||
var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
|
||||
/mob/living/carbon/alien/embryo
|
||||
/obj/item/alien_embryo
|
||||
name = "alien embryo"
|
||||
desc = "All slimy and yuck."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
@@ -9,31 +10,28 @@
|
||||
var/mob/living/affected_mob
|
||||
var/stage = 0
|
||||
|
||||
/mob/living/carbon/alien/embryo/New()
|
||||
..()
|
||||
/obj/item/alien_embryo/New()
|
||||
if(istype(loc, /mob/living))
|
||||
affected_mob = loc
|
||||
affected_mob.status_flags |= XENO_HOST
|
||||
processing_objects.Add(src)
|
||||
spawn(0)
|
||||
AddInfectionImages(affected_mob)
|
||||
// if(name == "alien embryo")
|
||||
// name = "alien embryo ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/alien/embryo/Destroy()
|
||||
/obj/item/alien_embryo/Destroy()
|
||||
if(affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/embryo/Life()
|
||||
..()
|
||||
/obj/item/alien_embryo/process()
|
||||
if(!affected_mob) return
|
||||
if(loc != affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
processing_objects.Remove(src)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
affected_mob = null
|
||||
@@ -51,48 +49,71 @@
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(1))
|
||||
affected_mob << "\red Your throat feels sore."
|
||||
affected_mob << "<span class='danger'>Your throat feels sore.</span>"
|
||||
if(prob(1))
|
||||
affected_mob << "\red Mucous runs down the back of your throat."
|
||||
affected_mob << "<span class='danger'>Mucous runs down the back of your throat.</span>"
|
||||
if(4)
|
||||
if(prob(1))
|
||||
affected_mob.emote("sneeze")
|
||||
if(prob(1))
|
||||
affected_mob.emote("cough")
|
||||
if(prob(2))
|
||||
affected_mob << "\red Your muscles ache."
|
||||
affected_mob << "<span class='danger'>Your muscles ache.</span>"
|
||||
if(prob(20))
|
||||
affected_mob.take_organ_damage(1)
|
||||
if(prob(2))
|
||||
affected_mob << "\red Your stomach hurts."
|
||||
affected_mob << "<span class='danger'>Your stomach hurts.</span>"
|
||||
if(prob(20))
|
||||
affected_mob.adjustToxLoss(1)
|
||||
affected_mob.updatehealth()
|
||||
if(5)
|
||||
affected_mob << "\red You feel something tearing its way out of your stomach..."
|
||||
affected_mob << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
|
||||
affected_mob.adjustToxLoss(10)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(50))
|
||||
AttemptGrow()
|
||||
|
||||
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET)
|
||||
var/client/C = null
|
||||
|
||||
/mob/living/carbon/alien/embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
// To stop clientless larva, we will check that our host has a client
|
||||
// if we find no ghosts to become the alien. If the host has a client
|
||||
// he will become the alien but if he doesn't then we will set the stage
|
||||
// to 2, so we don't do a process heavy check everytime.
|
||||
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
||||
if(candidates.len)
|
||||
C = pick(candidates)
|
||||
else if(affected_mob.client)
|
||||
C = affected_mob.client
|
||||
else
|
||||
stage = 4 // Let's try again later.
|
||||
return
|
||||
|
||||
if(affected_mob.lying)
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
|
||||
else
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
||||
spawn(6)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
new_xeno.key = key
|
||||
new_xeno.key = C.key
|
||||
if(ticker && ticker.mode)
|
||||
ticker.mode.xenos += new_xeno.mind
|
||||
new_xeno.mind.assigned_role = "MODE"
|
||||
new_xeno.mind.special_role = "Alien"
|
||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||
if(gib_on_success)
|
||||
affected_mob.gib()
|
||||
del(src)
|
||||
if(istype(new_xeno.loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/digester = new_xeno.loc
|
||||
digester.stomach_contents += new_xeno
|
||||
qdel(src)
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: RefreshInfectionImage()
|
||||
Des: Removes the current icons located in the infected mob adds the current stage
|
||||
----------------------------------------*/
|
||||
|
||||
/mob/living/carbon/alien/embryo/proc/RefreshInfectionImage()
|
||||
/obj/item/alien_embryo/proc/RefreshInfectionImage()
|
||||
RemoveInfectionImages()
|
||||
AddInfectionImages()
|
||||
|
||||
@@ -100,21 +121,19 @@ Des: Removes the current icons located in the infected mob adds the current stag
|
||||
Proc: AddInfectionImages(C)
|
||||
Des: Adds the infection image to all aliens for this embryo
|
||||
----------------------------------------*/
|
||||
|
||||
/mob/living/carbon/alien/embryo/AddInfectionImages()
|
||||
/obj/item/alien_embryo/proc/AddInfectionImages()
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
var/I = image('icons/mob/alien.dmi', loc = src.loc, icon_state = "infected[stage]")
|
||||
var/I = image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "infected[stage]")
|
||||
alien.client.images += I
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: RemoveInfectionImage(C)
|
||||
Des: Removes all images from the mob infected by this embryo
|
||||
----------------------------------------*/
|
||||
|
||||
/mob/living/carbon/alien/embryo/RemoveInfectionImages()
|
||||
/obj/item/alien_embryo/proc/RemoveInfectionImages()
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == loc)
|
||||
del(I)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == affected_mob)
|
||||
del(I)
|
||||
@@ -8,315 +8,248 @@ var/const/MAX_IMPREGNATION_TIME = 150
|
||||
var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle
|
||||
var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
/obj/item/weapon/holder/facehugger
|
||||
name = "facehugger"
|
||||
/obj/item/clothing/mask/facehugger
|
||||
name = "alien"
|
||||
desc = "It has some sort of a tube at the end of its tail."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "facehugger"
|
||||
item_state = "facehugger"
|
||||
origin_tech = "magnets=3;biotech=5"
|
||||
w_class = 1
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_MASK
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
||||
throw_range = 5
|
||||
|
||||
/*
|
||||
/obj/item/weapon/holder/facehugger/throw_at(atom/target, range, speed)
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
|
||||
var/sterile = 0
|
||||
var/real = 1 //0 for the toy, 1 for real. Sure I could istype, but fuck that.
|
||||
var/strength = 5
|
||||
|
||||
var/attached = 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_alien(user as mob) //can be picked up by aliens
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||
if((stat == CONSCIOUS && !sterile) && !isalien(user))
|
||||
Attach(user)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
||||
..()
|
||||
icon_state = "[initial(icon_state)]_thrown"
|
||||
spawn(15)
|
||||
if(icon_state == "[initial(icon_state)]_thrown")
|
||||
icon_state = "[initial(icon_state)]"
|
||||
user.before_take_item(src)
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/examine(mob/user)
|
||||
..()
|
||||
if(!real)//So that giant red text about probisci doesn't show up.
|
||||
return
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
user << "<span class='userdanger'>[src] is not moving.</span>"
|
||||
if(CONSCIOUS)
|
||||
user << "<span class='userdanger'>[src] seems to be active!</span>"
|
||||
if (sterile)
|
||||
user << "<span class='userdanger'>It looks like the proboscis has been removed.</span>"
|
||||
|
||||
/obj/item/weapon/holder/facehugger/throw_impact(atom/hit_atom)
|
||||
/obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m)
|
||||
if(O.force)
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/bullet_act(var/obj/item/projectile/P)
|
||||
if(P.damage)
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/equipped(mob/M)
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
|
||||
HasProximity(target)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
|
||||
if(stat == CONSCIOUS)
|
||||
return HasProximity(finder)
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(CanHug(AM))
|
||||
return Attach(AM)
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
|
||||
if(!..())
|
||||
return
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]_thrown"
|
||||
spawn(15)
|
||||
if(icon_state == "[initial(icon_state)]_thrown")
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
Attach(hit_atom)
|
||||
*/
|
||||
|
||||
|
||||
/mob/living/carbon/alien/facehugger
|
||||
name = "alien facehugger"
|
||||
desc = "It has some sort of a tube at the end of its tail."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "facehugger"
|
||||
flags = FPRINT | TABLEPASS
|
||||
throw_range = 5
|
||||
|
||||
maxHealth = 5
|
||||
health = 5
|
||||
density = 0 // Avoiding Facehugger clusterfucks at the egg room.
|
||||
var/strength=5
|
||||
var/sterile = 0
|
||||
var/attached = 0
|
||||
var/icon_dead = "facehugger_dead"
|
||||
|
||||
/mob/living/carbon/alien/facehugger/New()
|
||||
if(aliens_allowed)
|
||||
// if(name == "alien facehugger")
|
||||
// name = "alien facehugger ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
..()
|
||||
else
|
||||
del(src)
|
||||
|
||||
/mob/living/carbon/alien/facehugger/attack_hand(mob/living/carbon/M as mob)
|
||||
|
||||
//Let people pick the little buggers up.
|
||||
if(istype(M,/mob/living/carbon/alien/humanoid))
|
||||
var/mob/living/carbon/alien/humanoid/H = M
|
||||
if(H.a_intent == "help")
|
||||
var/obj/item/weapon/holder/facehugger/F = new(loc)
|
||||
src.loc = F
|
||||
F.name = loc.name
|
||||
F.attack_hand(H)
|
||||
H << "You scoop up [src]."
|
||||
src << "[H] scoops you up."
|
||||
return
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
if(stat == CONSCIOUS && !sterile)
|
||||
Attach(M)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/facehugger/UnarmedAttack(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/facehugger/examine()
|
||||
..()
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
usr << "\red \b [src] is not moving."
|
||||
if(CONSCIOUS)
|
||||
usr << "\red \b [src] seems to be active."
|
||||
if (sterile)
|
||||
usr << "\red \b It looks like the proboscis has been removed."
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/facehugger/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Alien"
|
||||
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
if (layer != TURF_LAYER+0.2)
|
||||
layer = TURF_LAYER+0.2
|
||||
src << text("\green You are now hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("<B>[] scurries to the ground!</B>", src)
|
||||
else
|
||||
layer = MOB_LAYER
|
||||
src << text("\green You have stopped hiding.")
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("[] slowly peaks up from the ground...", src)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/facehugger/verb/Attach()
|
||||
set name = "Facehug"
|
||||
set desc = "Allows you to molest someone's mouth-hole in the hope of impregnating them with an embryo."
|
||||
set category = "Alien"
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/L in view(1,src))
|
||||
if(L.stat != 2 && !istype(L,/mob/living/carbon/alien) && src.Adjacent(L))
|
||||
choices += L
|
||||
|
||||
var/mob/living/M = pick(choices)
|
||||
|
||||
if(!M || !src) return
|
||||
|
||||
if(!(src.Adjacent(M))) return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
|
||||
return
|
||||
return 0
|
||||
if(attached)
|
||||
return
|
||||
return 0
|
||||
else
|
||||
attached++
|
||||
spawn(MAX_IMPREGNATION_TIME)
|
||||
attached = 0
|
||||
|
||||
attached++
|
||||
spawn(MAX_IMPREGNATION_TIME)
|
||||
attached = 0
|
||||
var/mob/living/L = M //just so I don't need to use :
|
||||
|
||||
if(loc == M) return
|
||||
if(stat != CONSCIOUS) return
|
||||
if(!sterile) M.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
if(loc == L) return 0
|
||||
if(stat != CONSCIOUS) return 0
|
||||
if(locate(/obj/item/alien_embryo) in L) return 0
|
||||
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
|
||||
M.visible_message("\red \b [src] leaps at [M]'s face!")
|
||||
L.visible_message("<span class='userdanger'>[src] leaps at [L]'s face!</span>")
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
|
||||
death()
|
||||
return
|
||||
H.visible_message("<span class='userdanger'>[src] smashes against [H]'s [H.head]!</span>")
|
||||
Die()
|
||||
return 0
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/target = M
|
||||
|
||||
var/mob/living/carbon/target = L
|
||||
if(target.wear_mask)
|
||||
if(prob(20)) return
|
||||
if(prob(20)) return 0
|
||||
var/obj/item/clothing/W = target.wear_mask
|
||||
if(!W.canremove) return
|
||||
target.drop_from_inventory(W)
|
||||
target.before_take_item(W)
|
||||
|
||||
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
||||
target.visible_message("<span class='danger'>[src] tears [W] off of [target]'s face!</span>", \
|
||||
"<span class='userdanger'>[src] tears [W] off of [target]'s face!</span>")
|
||||
|
||||
var/obj/item/weapon/holder/facehugger/FH = new(loc)
|
||||
src.loc = FH
|
||||
FH.name = loc.name
|
||||
target.equip_to_slot(FH, slot_wear_mask)
|
||||
target.regenerate_icons()
|
||||
|
||||
if(!sterile) M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
src.loc = target
|
||||
target.equip_to_slot(src, slot_wear_mask,,0)
|
||||
|
||||
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
else if (iscorgi(M))
|
||||
var/mob/living/simple_animal/corgi/C = M
|
||||
var/obj/item/weapon/holder/facehugger/FH = new(loc)
|
||||
src.loc = FH
|
||||
FH.name = loc.name
|
||||
FH.loc = C
|
||||
C.facehugger = FH
|
||||
C.wear_mask = FH
|
||||
C.regenerate_icons()
|
||||
loc = C
|
||||
C.facehugger = src
|
||||
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(M)
|
||||
Impregnate(L)
|
||||
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/facehugger/proc/Impregnate(mob/living/target as mob)
|
||||
if(!target || !target.wear_mask || (!src in target.wear_mask.contents) || target.stat == DEAD || target.status_flags & XENO_HOST) //was taken off or something
|
||||
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
|
||||
if(!target || target.stat == DEAD) //was taken off or something
|
||||
return
|
||||
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.wear_mask != src)
|
||||
return
|
||||
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if((H.species.flags & IS_SYNTHETIC))
|
||||
return
|
||||
|
||||
if(!sterile)
|
||||
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
|
||||
var/mob/living/carbon/alien/embryo/A = new /mob/living/carbon/alien/embryo(target)
|
||||
target.status_flags |= XENO_HOST
|
||||
target.visible_message("<span class='danger'>[src] falls limp after violating [target]'s face!</span>", \
|
||||
"<span class='userdanger'>[src] falls limp after violating [target]'s face!</span>")
|
||||
|
||||
loc = get_turf(target.loc)
|
||||
death()
|
||||
Die()
|
||||
icon_state = "[initial(icon_state)]_impregnated"
|
||||
|
||||
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
|
||||
A.key = src.key
|
||||
if(!(target.status_flags & XENO_HOST))
|
||||
new /obj/item/alien_embryo(target)
|
||||
|
||||
|
||||
if(iscorgi(target))
|
||||
var/mob/living/simple_animal/corgi/C = target
|
||||
src.loc = get_turf(C)
|
||||
C.facehugger = null
|
||||
else
|
||||
target.visible_message("\red \b [src] violates [target]'s face!")
|
||||
target.visible_message("<span class='danger'>[src] violates [target]'s face!</span>", \
|
||||
"<span class='userdanger'>[src] violates [target]'s face!</span>")
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/GoActive()
|
||||
if(stat == DEAD || stat == CONSCIOUS)
|
||||
return
|
||||
|
||||
stat = CONSCIOUS
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/* for(var/mob/living/carbon/alien/alien in world)
|
||||
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = src, icon_state = "facehugger_active")
|
||||
activeIndicator.override = 1
|
||||
if(alien && alien.client)
|
||||
alien.client.images += activeIndicator */
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/GoIdle()
|
||||
if(stat == DEAD || stat == UNCONSCIOUS)
|
||||
return
|
||||
|
||||
/* RemoveActiveIndicators() */
|
||||
|
||||
stat = UNCONSCIOUS
|
||||
icon_state = "[initial(icon_state)]_inactive"
|
||||
|
||||
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
|
||||
GoActive()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Die()
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
/* RemoveActiveIndicators() */
|
||||
|
||||
icon_state = "[initial(icon_state)]_dead"
|
||||
stat = DEAD
|
||||
|
||||
src.visible_message("<span class='userdanger'>[src] curls up into a ball!</span>")
|
||||
|
||||
return
|
||||
|
||||
/proc/CanHug(var/mob/M)
|
||||
if(M.stat == DEAD)
|
||||
return 0
|
||||
|
||||
if(iscorgi(M))
|
||||
if(iscorgi(M) || ismonkey(M))
|
||||
return 1
|
||||
|
||||
if(!iscarbon(M) || isalien(M))
|
||||
return 0
|
||||
var/mob/living/carbon/C = M
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||
return 0
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/facehugger/Login()
|
||||
..()
|
||||
sleeping = 0
|
||||
/obj/item/clothing/mask/facehugger/lamarr
|
||||
name = "Lamarr"
|
||||
desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
|
||||
sterile = 1
|
||||
gender = FEMALE
|
||||
|
||||
/mob/living/carbon/alien/facehugger/death(gibbed)
|
||||
icon_state = icon_dead
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/alien/facehugger/Life()
|
||||
..()
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
/mob/living/carbon/alien/facehugger/proc/handle_regular_status_updates()
|
||||
updatehealth()
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health <= 0 || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 5) || (0 > health) )
|
||||
//if( health <= 20 && prob(1) )
|
||||
// spawn(0)
|
||||
// emote("gasp")
|
||||
if(!reagents.has_reagent("inaprovaline"))
|
||||
adjustOxyLoss(1)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-2)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
spawn(0)
|
||||
emote("hiss_")
|
||||
//CONSCIOUS
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
/* What in the living hell is this?*/
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(ear_damage < 5) //ear damage heals slowly under this threshold.
|
||||
ear_damage = max(ear_damage-0.05, 0)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
|
||||
return
|
||||
@@ -19,3 +19,5 @@
|
||||
var/pose = null
|
||||
|
||||
var/pulse = PULSE_NORM //current pulse level
|
||||
|
||||
var/list/internal_organs = list() //List of /obj/item/organ in the mob. they don't go in the contents.
|
||||
|
||||
@@ -464,19 +464,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
for(var/mob/living/carbon/M in view(1,src))
|
||||
src.spread_disease_to(M)
|
||||
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else if(internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
// USED IN DEATHWHISPERS
|
||||
proc/isInCrit()
|
||||
// Health is in deep shit and we're not already dead
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/mob/living/carbon/proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return
|
||||
@@ -274,22 +274,6 @@
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
|
||||
|
||||
proc/get_breath_from_internal(volume_needed)
|
||||
if(internal)
|
||||
if (!contents.Find(internal))
|
||||
internal = null
|
||||
if (!wear_mask || !(wear_mask.flags|MASKINTERNALS) )
|
||||
internal = null
|
||||
if(internal)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
return internal.remove_air_volume(volume_needed)
|
||||
else
|
||||
if (internals)
|
||||
internals.icon_state = "internal0"
|
||||
return null
|
||||
|
||||
proc/handle_breath(datum/gas_mixture/breath)
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
@@ -43,3 +43,4 @@
|
||||
var/implanting = 0 //Used for the mind-slave implant
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
var/floating = 0
|
||||
var/nightvision = 0
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
Changing this around would probably require a good look-over the pre-existing code.
|
||||
*/
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
var/obj/screen/leap_icon = null
|
||||
|
||||
var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
|
||||
var/damageoverlaytemp = 0
|
||||
@@ -123,6 +124,7 @@
|
||||
var/obj/item/clothing/mask/wear_mask = null//Carbon
|
||||
|
||||
var/seer = 0 //for cult//Carbon, probably Human
|
||||
var/see_override = 0
|
||||
|
||||
var/datum/hud/hud_used = null
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
return 0
|
||||
|
||||
proc/isfacehugger(A)
|
||||
if(istype(A, /mob/living/carbon/alien/facehugger))
|
||||
if(istype(A, /obj/item/clothing/mask/facehugger))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/isembryo(A)
|
||||
if(istype(A, /mob/living/carbon/alien/embryo))
|
||||
if(istype(A, /obj/item/alien_embryo))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -570,6 +570,7 @@ var/list/beam_master = list()
|
||||
icon_state = "xray"
|
||||
damage = 15
|
||||
irradiate = 30
|
||||
kill_count = 50
|
||||
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
|
||||
@@ -223,9 +223,4 @@
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(var/atom/target, var/blocked = 0)
|
||||
if(isalien(target))
|
||||
return 0
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(prob(H.getarmor(def_zone, "melee")))
|
||||
H.visible_message("\red The [src.name] splatters uselessly on the armor!")
|
||||
return 0
|
||||
..() // Execute the rest of the code.
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
user.visible_message(msg, self_msg)
|
||||
|
||||
target.op_stage.ribcage = 0
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// ALIEN EMBRYO SURGERY //
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/embryo = 0
|
||||
for(var/mob/living/carbon/alien/embryo/A in target)
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
embryo = 1
|
||||
break
|
||||
return ..() && embryo && target.op_stage.ribcage == 2
|
||||
@@ -179,10 +179,8 @@
|
||||
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||
"You rip the larva out of [target]'s ribcage!")
|
||||
|
||||
for(var/mob/living/carbon/alien/embryo/A in target)
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
A.loc = A.loc.loc
|
||||
A.death()
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// CHEST INTERNAL ORGAN SURGERY //
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
var/stage = 0
|
||||
/obj/machinery/telepad_cargo/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = 0
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/teleport_cooldown = 0 // every index requires a bluespace crystal
|
||||
var/list/power_options = list(5, 10, 20, 25, 30, 40, 50, 80, 100)
|
||||
var/teleporting = 0
|
||||
var/starting_crystals = 3
|
||||
var/starting_crystals = 0
|
||||
var/max_crystals = 4
|
||||
var/list/crystals = list()
|
||||
var/obj/item/device/gps/inserted_gps
|
||||
|
||||
+3
-1
@@ -719,6 +719,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
|
||||
#define BE_SLIME 4096
|
||||
#define BE_VAMPIRE 8192
|
||||
#define BE_MUTINEER 16384
|
||||
#define BE_BLOB 32768
|
||||
|
||||
var/list/be_special_flags = list(
|
||||
"Traitor" = BE_TRAITOR,
|
||||
@@ -735,7 +736,8 @@ var/list/be_special_flags = list(
|
||||
"Vox" = BE_VOX,
|
||||
"Slime" = BE_SLIME,
|
||||
"Vampire" = BE_VAMPIRE,
|
||||
"Mutineer" = BE_MUTINEER
|
||||
"Mutineer" = BE_MUTINEER,
|
||||
"Blob" = BE_BLOB
|
||||
)
|
||||
|
||||
#define AGE_MIN 17 //youngest a character can be
|
||||
|
||||
@@ -64,6 +64,8 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.adminmod {color: #402A14; font-weight: bold;}
|
||||
|
||||
.alien {color: #543354;}
|
||||
.noticealien {color: #00c000;}
|
||||
.alertalien {color: #00c000; font-weight: bold;}
|
||||
.tajaran {color: #803B56;}
|
||||
.skrell {color: #00CED1;}
|
||||
.soghun {color: #228B22;}
|
||||
|
||||
Reference in New Issue
Block a user