mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'organremoval' of https://github.com/Zuhayr/Baystation12 into dev
First pass on major conversion of xenomorphs to a human subspecies. Additional condensing of various redundant mob verbs. Converted larva and diona to their own class, collapsed the rest of xenomorphs into a human species, other stuff. Completely removed attack_alien(). Still have to reimplement some of the lost behavior for human/alien. Reapplies lost attack_alien() functionality other than tackling/caressing. Further alien/humanoid cleanup and xenospawn fix-ups. Also uncommented caste verbs. Removed half-finished abilities system since species.dm handles it. All xenomorphs functionality should be working now, other than the HUD, tackling and the xenomorph balance issues. Added icons for xenomorph castes, moved broadcast languages into datums, removed alien_talk and robot_talk vars. Merged with organ removal code. Reapplied verbs to simple_animals/slimes. Updated species definitions to have appropriate organs. Readded tackle as a human verb. Borer changes regarding brain removal. Working on moving the human HUD to the species datum a bit. Mixed results. Moved Cortical Link to a language, added borer husks. Tidied up the HUD stuff. Still need to make it rebuild properly when species is changed, but this will do for no Compile fix, forgot the DME. Fixed up ventcrawl, added new organ mechanics for dionaea. Fixed up some overlooked sections causing mobs without brains to die immediately. Fixed up plasma generation for queens, bugs with organs, force_organ issues with set_species().
This commit is contained in:
@@ -40,7 +40,6 @@
|
|||||||
#include "code\_onclick\other_mobs.dm"
|
#include "code\_onclick\other_mobs.dm"
|
||||||
#include "code\_onclick\telekinesis.dm"
|
#include "code\_onclick\telekinesis.dm"
|
||||||
#include "code\_onclick\hud\_defines.dm"
|
#include "code\_onclick\hud\_defines.dm"
|
||||||
#include "code\_onclick\hud\alien.dm"
|
|
||||||
#include "code\_onclick\hud\alien_larva.dm"
|
#include "code\_onclick\hud\alien_larva.dm"
|
||||||
#include "code\_onclick\hud\hud.dm"
|
#include "code\_onclick\hud\hud.dm"
|
||||||
#include "code\_onclick\hud\human.dm"
|
#include "code\_onclick\hud\human.dm"
|
||||||
@@ -897,7 +896,6 @@
|
|||||||
#include "code\modules\mining\drilling\distribution.dm"
|
#include "code\modules\mining\drilling\distribution.dm"
|
||||||
#include "code\modules\mining\drilling\drill.dm"
|
#include "code\modules\mining\drilling\drill.dm"
|
||||||
#include "code\modules\mining\drilling\scanner.dm"
|
#include "code\modules\mining\drilling\scanner.dm"
|
||||||
#include "code\modules\mob\abilities.dm"
|
|
||||||
#include "code\modules\mob\death.dm"
|
#include "code\modules\mob\death.dm"
|
||||||
#include "code\modules\mob\emote.dm"
|
#include "code\modules\mob\emote.dm"
|
||||||
#include "code\modules\mob\hear_say.dm"
|
#include "code\modules\mob\hear_say.dm"
|
||||||
@@ -925,42 +923,33 @@
|
|||||||
#include "code\modules\mob\living\living.dm"
|
#include "code\modules\mob\living\living.dm"
|
||||||
#include "code\modules\mob\living\living_defense.dm"
|
#include "code\modules\mob\living\living_defense.dm"
|
||||||
#include "code\modules\mob\living\living_defines.dm"
|
#include "code\modules\mob\living\living_defines.dm"
|
||||||
|
#include "code\modules\mob\living\living_powers.dm"
|
||||||
#include "code\modules\mob\living\login.dm"
|
#include "code\modules\mob\living\login.dm"
|
||||||
#include "code\modules\mob\living\logout.dm"
|
#include "code\modules\mob\living\logout.dm"
|
||||||
#include "code\modules\mob\living\say.dm"
|
#include "code\modules\mob\living\say.dm"
|
||||||
#include "code\modules\mob\living\blob\blob.dm"
|
#include "code\modules\mob\living\blob\blob.dm"
|
||||||
#include "code\modules\mob\living\carbon\carbon.dm"
|
#include "code\modules\mob\living\carbon\carbon.dm"
|
||||||
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
#include "code\modules\mob\living\carbon\carbon_defines.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\carbon_powers.dm"
|
||||||
#include "code\modules\mob\living\carbon\give.dm"
|
#include "code\modules\mob\living\carbon\give.dm"
|
||||||
#include "code\modules\mob\living\carbon\shock.dm"
|
#include "code\modules\mob\living\carbon\shock.dm"
|
||||||
#include "code\modules\mob\living\carbon\species.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\alien.dm"
|
#include "code\modules\mob\living\carbon\alien\alien.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\alien\alien_attacks.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\alien\alien_damage.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\death.dm"
|
#include "code\modules\mob\living\carbon\alien\death.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\login.dm"
|
#include "code\modules\mob\living\carbon\alien\emote.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\logout.dm"
|
#include "code\modules\mob\living\carbon\alien\life.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\powers.dm"
|
#include "code\modules\mob\living\carbon\alien\progression.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\say.dm"
|
#include "code\modules\mob\living\carbon\alien\say.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"
|
#include "code\modules\mob\living\carbon\alien\update_icons.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\death.dm"
|
#include "code\modules\mob\living\carbon\alien\diona\diona.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\emote.dm"
|
#include "code\modules\mob\living\carbon\alien\diona\diona_attacks.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\humanoid.dm"
|
#include "code\modules\mob\living\carbon\alien\diona\diona_powers.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\inventory.dm"
|
#include "code\modules\mob\living\carbon\alien\diona\life.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\life.dm"
|
#include "code\modules\mob\living\carbon\alien\diona\progression.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\login.dm"
|
#include "code\modules\mob\living\carbon\alien\diona\say_understands.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\queen.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\update_icons.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\caste\drone.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\caste\hunter.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\humanoid\caste\sentinel.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\death.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\emote.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\inventory.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\larva.dm"
|
#include "code\modules\mob\living\carbon\alien\larva\larva.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\life.dm"
|
#include "code\modules\mob\living\carbon\alien\larva\progression.dm"
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\powers.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\larva\update_icons.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\special\alien_embryo.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\alien\special\facehugger.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\brain\brain.dm"
|
#include "code\modules\mob\living\carbon\brain\brain.dm"
|
||||||
#include "code\modules\mob\living\carbon\brain\brain_item.dm"
|
#include "code\modules\mob\living\carbon\brain\brain_item.dm"
|
||||||
#include "code\modules\mob\living\carbon\brain\death.dm"
|
#include "code\modules\mob\living\carbon\brain\death.dm"
|
||||||
@@ -974,19 +963,27 @@
|
|||||||
#include "code\modules\mob\living\carbon\human\emote.dm"
|
#include "code\modules\mob\living\carbon\human\emote.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\examine.dm"
|
#include "code\modules\mob\living\carbon\human\examine.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human.dm"
|
#include "code\modules\mob\living\carbon\human\human.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_attackalien.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
|
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_attackpaw.dm"
|
#include "code\modules\mob\living\carbon\human\human_attackpaw.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_damage.dm"
|
#include "code\modules\mob\living\carbon\human\human_damage.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\human_movement.dm"
|
#include "code\modules\mob\living\carbon\human\human_movement.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\human_powers.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\human_species.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\inventory.dm"
|
#include "code\modules\mob\living\carbon\human\inventory.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\life.dm"
|
#include "code\modules\mob\living\carbon\human\life.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\login.dm"
|
#include "code\modules\mob\living\carbon\human\login.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\logout.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\say.dm"
|
#include "code\modules\mob\living\carbon\human\say.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\species.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\update_icons.dm"
|
#include "code\modules\mob\living\carbon\human\update_icons.dm"
|
||||||
#include "code\modules\mob\living\carbon\human\whisper.dm"
|
#include "code\modules\mob\living\carbon\human\whisper.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\alien\alien.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\alien\alien_embryo.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\alien\alien_facehugger.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\alien\alien_powers.dm"
|
||||||
|
#include "code\modules\mob\living\carbon\human\alien\alien_species.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\death.dm"
|
#include "code\modules\mob\living\carbon\metroid\death.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\emote.dm"
|
#include "code\modules\mob\living\carbon\metroid\emote.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\examine.dm"
|
#include "code\modules\mob\living\carbon\metroid\examine.dm"
|
||||||
@@ -999,14 +996,12 @@
|
|||||||
#include "code\modules\mob\living\carbon\metroid\subtypes.dm"
|
#include "code\modules\mob\living\carbon\metroid\subtypes.dm"
|
||||||
#include "code\modules\mob\living\carbon\metroid\update_icons.dm"
|
#include "code\modules\mob\living\carbon\metroid\update_icons.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\death.dm"
|
#include "code\modules\mob\living\carbon\monkey\death.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\diona.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\monkey\emote.dm"
|
#include "code\modules\mob\living\carbon\monkey\emote.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\examine.dm"
|
#include "code\modules\mob\living\carbon\monkey\examine.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\inventory.dm"
|
#include "code\modules\mob\living\carbon\monkey\inventory.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\life.dm"
|
#include "code\modules\mob\living\carbon\monkey\life.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\login.dm"
|
#include "code\modules\mob\living\carbon\monkey\login.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\monkey.dm"
|
#include "code\modules\mob\living\carbon\monkey\monkey.dm"
|
||||||
#include "code\modules\mob\living\carbon\monkey\powers.dm"
|
|
||||||
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
|
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
|
||||||
#include "code\modules\mob\living\silicon\alarm.dm"
|
#include "code\modules\mob\living\silicon\alarm.dm"
|
||||||
#include "code\modules\mob\living\silicon\death.dm"
|
#include "code\modules\mob\living\silicon\death.dm"
|
||||||
@@ -1052,6 +1047,7 @@
|
|||||||
#include "code\modules\mob\living\silicon\robot\robot_items.dm"
|
#include "code\modules\mob\living\silicon\robot\robot_items.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
|
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
|
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
|
||||||
|
#include "code\modules\mob\living\silicon\robot\robot_powers.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\wires.dm"
|
#include "code\modules\mob\living\silicon\robot\wires.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\drone\drone.dm"
|
#include "code\modules\mob\living\silicon\robot\drone\drone.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm"
|
#include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm"
|
||||||
@@ -1060,13 +1056,16 @@
|
|||||||
#include "code\modules\mob\living\silicon\robot\drone\drone_items.dm"
|
#include "code\modules\mob\living\silicon\robot\drone\drone_items.dm"
|
||||||
#include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm"
|
#include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\bees.dm"
|
#include "code\modules\mob\living\simple_animal\bees.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\borer.dm"
|
|
||||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\corpse.dm"
|
#include "code\modules\mob\living\simple_animal\corpse.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\shade.dm"
|
#include "code\modules\mob\living\simple_animal\shade.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
|
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\worm.dm"
|
#include "code\modules\mob\living\simple_animal\worm.dm"
|
||||||
|
#include "code\modules\mob\living\simple_animal\borer\borer.dm"
|
||||||
|
#include "code\modules\mob\living\simple_animal\borer\borer_captive.dm"
|
||||||
|
#include "code\modules\mob\living\simple_animal\borer\borer_powers.dm"
|
||||||
|
#include "code\modules\mob\living\simple_animal\borer\say.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
|
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
|
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
|
||||||
#include "code\modules\mob\living\simple_animal\friendly\crab.dm"
|
#include "code\modules\mob\living\simple_animal\friendly\crab.dm"
|
||||||
@@ -1109,6 +1108,7 @@
|
|||||||
#include "code\modules\nano\nanoui.dm"
|
#include "code\modules\nano\nanoui.dm"
|
||||||
#include "code\modules\organs\blood.dm"
|
#include "code\modules\organs\blood.dm"
|
||||||
#include "code\modules\organs\organ.dm"
|
#include "code\modules\organs\organ.dm"
|
||||||
|
#include "code\modules\organs\organ_alien.dm"
|
||||||
#include "code\modules\organs\organ_external.dm"
|
#include "code\modules\organs\organ_external.dm"
|
||||||
#include "code\modules\organs\organ_internal.dm"
|
#include "code\modules\organs\organ_internal.dm"
|
||||||
#include "code\modules\organs\organ_objects.dm"
|
#include "code\modules\organs\organ_objects.dm"
|
||||||
|
|||||||
@@ -425,14 +425,16 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Alt-click to ventcrawl - Monkeys, aliens, slimes and mice.
|
Alt-click to vent crawl - Monkeys, aliens, slimes and mice.
|
||||||
This is a little buggy but somehow that just seems to plague ventcrawl.
|
This is a little buggy but somehow that just seems to plague ventcrawl.
|
||||||
I am sorry, I don't know why.
|
I am sorry, I don't know why.
|
||||||
*/
|
*/
|
||||||
/obj/machinery/atmospherics/unary/vent_pump/AltClick(var/mob/living/ML)
|
// Commenting this out for now, it's not critical, stated to be buggy, and seems like
|
||||||
|
// a really clumsy way of doing this. ~Z
|
||||||
|
/*/obj/machinery/atmospherics/unary/vent_pump/AltClick(var/mob/living/ML)
|
||||||
if(istype(ML))
|
if(istype(ML))
|
||||||
var/list/ventcrawl_verbs = list(/mob/living/carbon/monkey/verb/ventcrawl, /mob/living/carbon/alien/verb/ventcrawl, /mob/living/carbon/slime/verb/ventcrawl,/mob/living/simple_animal/mouse/verb/ventcrawl)
|
var/list/ventcrawl_verbs = list(/mob/living/carbon/monkey/verb/ventcrawl, /mob/living/carbon/alien/verb/ventcrawl, /mob/living/carbon/slime/verb/ventcrawl,/mob/living/simple_animal/mouse/verb/ventcrawl)
|
||||||
if(length(ML.verbs & ventcrawl_verbs)) // alien queens have this removed, an istype would be complicated
|
if(length(ML.verbs & ventcrawl_verbs)) // alien queens have this removed, an istype would be complicated
|
||||||
ML.handle_ventcrawl(src)
|
ML.handle_ventcrawl(src)
|
||||||
return
|
return
|
||||||
..()
|
..()*/
|
||||||
@@ -1,241 +0,0 @@
|
|||||||
/datum/hud/proc/alien_hud()
|
|
||||||
|
|
||||||
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 == "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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
//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.screen_loc = ui_rhand
|
|
||||||
inv_box.layer = 19
|
|
||||||
src.r_hand_hud_object = inv_box
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
|
||||||
inv_box.name = "l_hand"
|
|
||||||
inv_box.dir = EAST
|
|
||||||
inv_box.icon = 'icons/mob/screen1_alien.dmi'
|
|
||||||
inv_box.icon_state = "hand_inactive"
|
|
||||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
|
||||||
inv_box.icon_state = "hand_active"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
src.l_hand_hud_object = inv_box
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
|
||||||
using.name = "hand"
|
|
||||||
using.dir = SOUTH
|
|
||||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
|
||||||
using.icon_state = "hand1"
|
|
||||||
using.screen_loc = ui_swaphand1
|
|
||||||
using.layer = 19
|
|
||||||
src.adding += using
|
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
|
||||||
using.name = "hand"
|
|
||||||
using.dir = SOUTH
|
|
||||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
|
||||||
using.icon_state = "hand2"
|
|
||||||
using.screen_loc = ui_swaphand2
|
|
||||||
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.layer = 19
|
|
||||||
src.adding += using
|
|
||||||
*/
|
|
||||||
|
|
||||||
mymob.throw_icon = new /obj/screen()
|
|
||||||
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
|
|
||||||
mymob.throw_icon.icon_state = "act_throw_off"
|
|
||||||
mymob.throw_icon.name = "throw"
|
|
||||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
|
||||||
|
|
||||||
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.icon = 'icons/mob/screen1_alien.dmi'
|
|
||||||
mymob.zone_sel.overlays.Cut()
|
|
||||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
|
||||||
|
|
||||||
mymob.client.screen = null
|
|
||||||
|
|
||||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
|
|
||||||
mymob.client.screen += src.adding + src.other
|
|
||||||
@@ -194,15 +194,13 @@ datum/hud/New(mob/owner)
|
|||||||
var/ui_alpha = mymob.client.prefs.UI_style_alpha
|
var/ui_alpha = mymob.client.prefs.UI_style_alpha
|
||||||
|
|
||||||
if(ishuman(mymob))
|
if(ishuman(mymob))
|
||||||
human_hud(ui_style, ui_color, ui_alpha) // Pass the player the UI style chosen in preferences
|
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
|
||||||
else if(ismonkey(mymob))
|
else if(ismonkey(mymob))
|
||||||
monkey_hud(ui_style)
|
monkey_hud(ui_style)
|
||||||
else if(isbrain(mymob))
|
else if(isbrain(mymob))
|
||||||
brain_hud(ui_style)
|
brain_hud(ui_style)
|
||||||
else if(islarva(mymob))
|
|
||||||
larva_hud()
|
|
||||||
else if(isalien(mymob))
|
else if(isalien(mymob))
|
||||||
alien_hud()
|
larva_hud()
|
||||||
else if(isAI(mymob))
|
else if(isAI(mymob))
|
||||||
ai_hud()
|
ai_hud()
|
||||||
else if(isrobot(mymob))
|
else if(isrobot(mymob))
|
||||||
|
|||||||
@@ -1,416 +1,305 @@
|
|||||||
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
|
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
|
||||||
|
|
||||||
|
var/datum/hud_data/hud_data
|
||||||
|
if(!istype(target))
|
||||||
|
hud_data = new()
|
||||||
|
else
|
||||||
|
hud_data = target.species.hud
|
||||||
|
|
||||||
|
if(hud_data.icon)
|
||||||
|
ui_style = hud_data.icon
|
||||||
|
|
||||||
src.adding = list()
|
src.adding = list()
|
||||||
src.other = list()
|
src.other = list()
|
||||||
src.hotkeybuttons = list() //These can be disabled for hotkey usersx
|
src.hotkeybuttons = list() //These can be disabled for hotkey usersx
|
||||||
|
|
||||||
|
var/list/hud_elements = list()
|
||||||
var/obj/screen/using
|
var/obj/screen/using
|
||||||
var/obj/screen/inventory/inv_box
|
var/obj/screen/inventory/inv_box
|
||||||
|
|
||||||
using = new /obj/screen()
|
// Draw the various inventory equipment slots.
|
||||||
using.name = "act_intent"
|
var/has_hidden_gear
|
||||||
using.dir = SOUTHWEST
|
for(var/gear_slot in hud_data.gear)
|
||||||
using.icon = ui_style
|
|
||||||
using.icon_state = "intent_"+mymob.a_intent
|
|
||||||
using.screen_loc = ui_acti
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.layer = 20
|
|
||||||
src.adding += using
|
|
||||||
action_intent = using
|
|
||||||
|
|
||||||
//intent small hud objects
|
inv_box = new /obj/screen/inventory()
|
||||||
var/icon/ico
|
inv_box.icon = ui_style
|
||||||
|
inv_box.layer = 19
|
||||||
|
inv_box.color = ui_color
|
||||||
|
inv_box.alpha = ui_alpha
|
||||||
|
|
||||||
ico = new(ui_style, "black")
|
var/list/slot_data = hud_data.gear[gear_slot]
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
inv_box.name = gear_slot
|
||||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
inv_box.screen_loc = slot_data["loc"]
|
||||||
using = new /obj/screen( src )
|
inv_box.slot_id = slot_data["slot"]
|
||||||
using.name = "help"
|
inv_box.icon_state = slot_data["state"]
|
||||||
using.icon = ico
|
|
||||||
using.screen_loc = ui_acti
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.layer = 21
|
|
||||||
src.adding += using
|
|
||||||
help_intent = using
|
|
||||||
|
|
||||||
ico = new(ui_style, "black")
|
if(slot_data["dir"])
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
inv_box.dir = slot_data["dir"]
|
||||||
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.alpha = ui_alpha
|
|
||||||
using.layer = 21
|
|
||||||
src.adding += using
|
|
||||||
disarm_intent = using
|
|
||||||
|
|
||||||
ico = new(ui_style, "black")
|
if(slot_data["toggle"])
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
src.other += inv_box
|
||||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
has_hidden_gear = 1
|
||||||
using = new /obj/screen( src )
|
else
|
||||||
using.name = "grab"
|
src.adding += inv_box
|
||||||
using.icon = ico
|
|
||||||
using.screen_loc = ui_acti
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
using.layer = 21
|
|
||||||
src.adding += using
|
|
||||||
grab_intent = using
|
|
||||||
|
|
||||||
ico = new(ui_style, "black")
|
if(has_hidden_gear)
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
using = new /obj/screen()
|
||||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
using.name = "toggle"
|
||||||
using = new /obj/screen( src )
|
using.icon = ui_style
|
||||||
using.name = "harm"
|
using.icon_state = "other"
|
||||||
using.icon = ico
|
using.screen_loc = ui_inventory
|
||||||
using.screen_loc = ui_acti
|
using.layer = 20
|
||||||
using.alpha = ui_alpha
|
using.color = ui_color
|
||||||
using.layer = 21
|
using.alpha = ui_alpha
|
||||||
src.adding += using
|
src.adding += using
|
||||||
hurt_intent = using
|
|
||||||
|
|
||||||
//end intent small hud objects
|
// Draw the attack intent dialogue.
|
||||||
|
if(hud_data.has_a_intent)
|
||||||
|
|
||||||
using = new /obj/screen()
|
using = new /obj/screen()
|
||||||
using.name = "mov_intent"
|
using.name = "act_intent"
|
||||||
using.dir = SOUTHWEST
|
using.dir = SOUTHWEST
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
using.icon_state = "intent_"+mymob.a_intent
|
||||||
using.screen_loc = ui_movi
|
using.screen_loc = ui_acti
|
||||||
using.layer = 20
|
using.color = ui_color
|
||||||
using.color = ui_color
|
using.alpha = ui_alpha
|
||||||
using.alpha = ui_alpha
|
using.layer = 20
|
||||||
src.adding += using
|
src.adding += using
|
||||||
move_intent = using
|
action_intent = using
|
||||||
|
|
||||||
using = new /obj/screen()
|
hud_elements |= using
|
||||||
using.name = "drop"
|
|
||||||
using.icon = ui_style
|
|
||||||
using.icon_state = "act_drop"
|
|
||||||
using.screen_loc = ui_drop_throw
|
|
||||||
using.layer = 19
|
|
||||||
using.color = ui_color
|
|
||||||
using.alpha = ui_alpha
|
|
||||||
src.hotkeybuttons += using
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
//intent small hud objects
|
||||||
inv_box.name = "i_clothing"
|
var/icon/ico
|
||||||
inv_box.dir = SOUTH
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.slot_id = slot_w_uniform
|
|
||||||
inv_box.icon_state = "center"
|
|
||||||
inv_box.screen_loc = ui_iclothing
|
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
ico = new(ui_style, "black")
|
||||||
inv_box.name = "o_clothing"
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
inv_box.dir = SOUTH
|
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||||
inv_box.icon = ui_style
|
using = new /obj/screen( src )
|
||||||
inv_box.slot_id = slot_wear_suit
|
using.name = "help"
|
||||||
inv_box.icon_state = "equip"
|
using.icon = ico
|
||||||
inv_box.screen_loc = ui_oclothing
|
using.screen_loc = ui_acti
|
||||||
inv_box.layer = 19
|
using.alpha = ui_alpha
|
||||||
inv_box.color = ui_color
|
using.layer = 21
|
||||||
inv_box.alpha = ui_alpha
|
src.adding += using
|
||||||
src.other += inv_box
|
help_intent = using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
ico = new(ui_style, "black")
|
||||||
inv_box.name = "r_hand"
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
inv_box.dir = WEST
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||||
inv_box.icon = ui_style
|
using = new /obj/screen( src )
|
||||||
inv_box.icon_state = "hand_inactive"
|
using.name = "disarm"
|
||||||
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
using.icon = ico
|
||||||
inv_box.icon_state = "hand_active"
|
using.screen_loc = ui_acti
|
||||||
inv_box.screen_loc = ui_rhand
|
using.alpha = ui_alpha
|
||||||
inv_box.slot_id = slot_r_hand
|
using.layer = 21
|
||||||
inv_box.layer = 19
|
src.adding += using
|
||||||
inv_box.color = ui_color
|
disarm_intent = using
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
|
|
||||||
src.r_hand_hud_object = inv_box
|
ico = new(ui_style, "black")
|
||||||
src.adding += inv_box
|
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.alpha = ui_alpha
|
||||||
|
using.layer = 21
|
||||||
|
src.adding += using
|
||||||
|
grab_intent = using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
ico = new(ui_style, "black")
|
||||||
inv_box.name = "l_hand"
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
inv_box.dir = EAST
|
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||||
inv_box.icon = ui_style
|
using = new /obj/screen( src )
|
||||||
inv_box.icon_state = "hand_inactive"
|
using.name = "harm"
|
||||||
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
using.icon = ico
|
||||||
inv_box.icon_state = "hand_active"
|
using.screen_loc = ui_acti
|
||||||
inv_box.screen_loc = ui_lhand
|
using.alpha = ui_alpha
|
||||||
inv_box.slot_id = slot_l_hand
|
using.layer = 21
|
||||||
inv_box.layer = 19
|
src.adding += using
|
||||||
inv_box.color = ui_color
|
hurt_intent = using
|
||||||
inv_box.alpha = ui_alpha
|
//end intent small hud objects
|
||||||
src.l_hand_hud_object = inv_box
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
if(hud_data.has_m_intent)
|
||||||
using.name = "hand"
|
using = new /obj/screen()
|
||||||
using.dir = SOUTH
|
using.name = "mov_intent"
|
||||||
using.icon = ui_style
|
using.dir = SOUTHWEST
|
||||||
using.icon_state = "hand1"
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_swaphand1
|
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||||
using.layer = 19
|
using.screen_loc = ui_movi
|
||||||
using.color = ui_color
|
using.layer = 20
|
||||||
using.alpha = ui_alpha
|
using.color = ui_color
|
||||||
src.adding += using
|
using.alpha = ui_alpha
|
||||||
|
src.adding += using
|
||||||
|
move_intent = using
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
if(hud_data.has_drop)
|
||||||
using.name = "hand"
|
using = new /obj/screen()
|
||||||
using.dir = SOUTH
|
using.name = "drop"
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "hand2"
|
using.icon_state = "act_drop"
|
||||||
using.screen_loc = ui_swaphand2
|
using.screen_loc = ui_drop_throw
|
||||||
using.layer = 19
|
using.layer = 19
|
||||||
using.color = ui_color
|
using.color = ui_color
|
||||||
using.alpha = ui_alpha
|
using.alpha = ui_alpha
|
||||||
src.adding += using
|
src.hotkeybuttons += using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
if(hud_data.has_hands)
|
||||||
inv_box.name = "id"
|
|
||||||
inv_box.dir = NORTH
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "id"
|
|
||||||
inv_box.screen_loc = ui_id
|
|
||||||
inv_box.slot_id = slot_wear_id
|
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
using = new /obj/screen()
|
||||||
inv_box.name = "mask"
|
using.name = "equip"
|
||||||
inv_box.dir = NORTH
|
using.icon = ui_style
|
||||||
inv_box.icon = ui_style
|
using.icon_state = "act_equip"
|
||||||
inv_box.icon_state = "equip"
|
using.screen_loc = ui_equip
|
||||||
inv_box.screen_loc = ui_mask
|
using.layer = 20
|
||||||
inv_box.slot_id = slot_wear_mask
|
using.color = ui_color
|
||||||
inv_box.layer = 19
|
using.alpha = ui_alpha
|
||||||
inv_box.color = ui_color
|
src.adding += using
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
inv_box = new /obj/screen/inventory()
|
||||||
inv_box.name = "back"
|
inv_box.name = "r_hand"
|
||||||
inv_box.dir = NORTH
|
inv_box.dir = WEST
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "back"
|
inv_box.icon_state = "hand_inactive"
|
||||||
inv_box.screen_loc = ui_back
|
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
||||||
inv_box.slot_id = slot_back
|
inv_box.icon_state = "hand_active"
|
||||||
inv_box.layer = 19
|
inv_box.screen_loc = ui_rhand
|
||||||
inv_box.color = ui_color
|
inv_box.slot_id = slot_r_hand
|
||||||
inv_box.alpha = ui_alpha
|
inv_box.layer = 19
|
||||||
src.adding += inv_box
|
inv_box.color = ui_color
|
||||||
|
inv_box.alpha = ui_alpha
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
src.r_hand_hud_object = inv_box
|
||||||
inv_box.name = "storage1"
|
src.adding += inv_box
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "pocket"
|
|
||||||
inv_box.screen_loc = ui_storage1
|
|
||||||
inv_box.slot_id = slot_l_store
|
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
inv_box = new /obj/screen/inventory()
|
||||||
inv_box.name = "storage2"
|
inv_box.name = "l_hand"
|
||||||
inv_box.icon = ui_style
|
inv_box.dir = EAST
|
||||||
inv_box.icon_state = "pocket"
|
inv_box.icon = ui_style
|
||||||
inv_box.screen_loc = ui_storage2
|
inv_box.icon_state = "hand_inactive"
|
||||||
inv_box.slot_id = slot_r_store
|
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
||||||
inv_box.layer = 19
|
inv_box.icon_state = "hand_active"
|
||||||
inv_box.color = ui_color
|
inv_box.screen_loc = ui_lhand
|
||||||
inv_box.alpha = ui_alpha
|
inv_box.slot_id = slot_l_hand
|
||||||
src.adding += inv_box
|
inv_box.layer = 19
|
||||||
|
inv_box.color = ui_color
|
||||||
|
inv_box.alpha = ui_alpha
|
||||||
|
src.l_hand_hud_object = inv_box
|
||||||
|
src.adding += inv_box
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
using = new /obj/screen/inventory()
|
||||||
inv_box.name = "suit storage"
|
using.name = "hand"
|
||||||
inv_box.icon = ui_style
|
using.dir = SOUTH
|
||||||
inv_box.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
|
using.icon = ui_style
|
||||||
inv_box.icon_state = "belt"
|
using.icon_state = "hand1"
|
||||||
inv_box.screen_loc = ui_sstore1
|
using.screen_loc = ui_swaphand1
|
||||||
inv_box.slot_id = slot_s_store
|
using.layer = 19
|
||||||
inv_box.layer = 19
|
using.color = ui_color
|
||||||
inv_box.color = ui_color
|
using.alpha = ui_alpha
|
||||||
inv_box.alpha = ui_alpha
|
src.adding += using
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen()
|
using = new /obj/screen/inventory()
|
||||||
using.name = "resist"
|
using.name = "hand"
|
||||||
using.icon = ui_style
|
using.dir = SOUTH
|
||||||
using.icon_state = "act_resist"
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_pull_resist
|
using.icon_state = "hand2"
|
||||||
using.layer = 19
|
using.screen_loc = ui_swaphand2
|
||||||
using.color = ui_color
|
using.layer = 19
|
||||||
using.alpha = ui_alpha
|
using.color = ui_color
|
||||||
src.hotkeybuttons += using
|
using.alpha = ui_alpha
|
||||||
|
src.adding += using
|
||||||
|
|
||||||
using = new /obj/screen()
|
if(hud_data.has_resist)
|
||||||
using.name = "toggle"
|
using = new /obj/screen()
|
||||||
using.icon = ui_style
|
using.name = "resist"
|
||||||
using.icon_state = "other"
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_inventory
|
using.icon_state = "act_resist"
|
||||||
using.layer = 20
|
using.screen_loc = ui_pull_resist
|
||||||
using.color = ui_color
|
using.layer = 19
|
||||||
using.alpha = ui_alpha
|
using.color = ui_color
|
||||||
src.adding += using
|
using.alpha = ui_alpha
|
||||||
|
src.hotkeybuttons += using
|
||||||
|
|
||||||
using = new /obj/screen()
|
if(hud_data.has_throw)
|
||||||
using.name = "equip"
|
mymob.throw_icon = new /obj/screen()
|
||||||
using.icon = ui_style
|
mymob.throw_icon.icon = ui_style
|
||||||
using.icon_state = "act_equip"
|
mymob.throw_icon.icon_state = "act_throw_off"
|
||||||
using.screen_loc = ui_equip
|
mymob.throw_icon.name = "throw"
|
||||||
using.layer = 20
|
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||||
using.color = ui_color
|
mymob.throw_icon.color = ui_color
|
||||||
using.alpha = ui_alpha
|
mymob.throw_icon.alpha = ui_alpha
|
||||||
src.adding += using
|
src.hotkeybuttons += mymob.throw_icon
|
||||||
|
hud_elements |= mymob.throw_icon
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
mymob.pullin = new /obj/screen()
|
||||||
inv_box.name = "gloves"
|
mymob.pullin.icon = ui_style
|
||||||
inv_box.icon = ui_style
|
mymob.pullin.icon_state = "pull0"
|
||||||
inv_box.icon_state = "gloves"
|
mymob.pullin.name = "pull"
|
||||||
inv_box.screen_loc = ui_gloves
|
mymob.pullin.screen_loc = ui_pull_resist
|
||||||
inv_box.slot_id = slot_gloves
|
src.hotkeybuttons += mymob.pullin
|
||||||
inv_box.layer = 19
|
hud_elements |= mymob.pullin
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
if(hud_data.has_internals)
|
||||||
inv_box.name = "eyes"
|
mymob.internals = new /obj/screen()
|
||||||
inv_box.icon = ui_style
|
mymob.internals.icon = ui_style
|
||||||
inv_box.icon_state = "glasses"
|
mymob.internals.icon_state = "internal0"
|
||||||
inv_box.screen_loc = ui_glasses
|
mymob.internals.name = "internal"
|
||||||
inv_box.slot_id = slot_glasses
|
mymob.internals.screen_loc = ui_internal
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
if(hud_data.has_warnings)
|
||||||
inv_box.name = "l_ear"
|
mymob.oxygen = new /obj/screen()
|
||||||
inv_box.icon = ui_style
|
mymob.oxygen.icon = ui_style
|
||||||
inv_box.icon_state = "ears"
|
mymob.oxygen.icon_state = "oxy0"
|
||||||
inv_box.screen_loc = ui_l_ear
|
mymob.oxygen.name = "oxygen"
|
||||||
inv_box.slot_id = slot_l_ear
|
mymob.oxygen.screen_loc = ui_oxygen
|
||||||
inv_box.layer = 19
|
hud_elements |= mymob.oxygen
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
mymob.toxin = new /obj/screen()
|
||||||
inv_box.name = "r_ear"
|
mymob.toxin.icon = ui_style
|
||||||
inv_box.icon = ui_style
|
mymob.toxin.icon_state = "tox0"
|
||||||
inv_box.icon_state = "ears"
|
mymob.toxin.name = "toxin"
|
||||||
inv_box.screen_loc = ui_r_ear
|
mymob.toxin.screen_loc = ui_toxin
|
||||||
inv_box.slot_id = slot_r_ear
|
hud_elements |= mymob.toxin
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
mymob.fire = new /obj/screen()
|
||||||
inv_box.name = "head"
|
mymob.fire.icon = ui_style
|
||||||
inv_box.icon = ui_style
|
mymob.fire.icon_state = "fire0"
|
||||||
inv_box.icon_state = "hair"
|
mymob.fire.name = "fire"
|
||||||
inv_box.screen_loc = ui_head
|
mymob.fire.screen_loc = ui_fire
|
||||||
inv_box.slot_id = slot_head
|
hud_elements |= mymob.fire
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
mymob.healths = new /obj/screen()
|
||||||
inv_box.name = "shoes"
|
mymob.healths.icon = ui_style
|
||||||
inv_box.icon = ui_style
|
mymob.healths.icon_state = "health0"
|
||||||
inv_box.icon_state = "shoes"
|
mymob.healths.name = "health"
|
||||||
inv_box.screen_loc = ui_shoes
|
mymob.healths.screen_loc = ui_health
|
||||||
inv_box.slot_id = slot_shoes
|
hud_elements |= mymob.healths
|
||||||
inv_box.layer = 19
|
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.other += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
if(hud_data.has_pressure)
|
||||||
inv_box.name = "belt"
|
mymob.pressure = new /obj/screen()
|
||||||
inv_box.icon = ui_style
|
mymob.pressure.icon = ui_style
|
||||||
inv_box.icon_state = "belt"
|
mymob.pressure.icon_state = "pressure0"
|
||||||
inv_box.screen_loc = ui_belt
|
mymob.pressure.name = "pressure"
|
||||||
inv_box.slot_id = slot_belt
|
mymob.pressure.screen_loc = ui_pressure
|
||||||
inv_box.layer = 19
|
hud_elements |= mymob.pressure
|
||||||
inv_box.color = ui_color
|
|
||||||
inv_box.alpha = ui_alpha
|
|
||||||
src.adding += inv_box
|
|
||||||
|
|
||||||
mymob.throw_icon = new /obj/screen()
|
if(hud_data.has_bodytemp)
|
||||||
mymob.throw_icon.icon = ui_style
|
mymob.bodytemp = new /obj/screen()
|
||||||
mymob.throw_icon.icon_state = "act_throw_off"
|
mymob.bodytemp.icon = ui_style
|
||||||
mymob.throw_icon.name = "throw"
|
mymob.bodytemp.icon_state = "temp1"
|
||||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
mymob.bodytemp.name = "body temperature"
|
||||||
mymob.throw_icon.color = ui_color
|
mymob.bodytemp.screen_loc = ui_temp
|
||||||
mymob.throw_icon.alpha = ui_alpha
|
hud_elements |= mymob.bodytemp
|
||||||
src.hotkeybuttons += mymob.throw_icon
|
|
||||||
|
|
||||||
mymob.oxygen = new /obj/screen()
|
if(hud_data.has_nutrition)
|
||||||
mymob.oxygen.icon = ui_style
|
mymob.nutrition_icon = new /obj/screen()
|
||||||
mymob.oxygen.icon_state = "oxy0"
|
mymob.nutrition_icon.icon = ui_style
|
||||||
mymob.oxygen.name = "oxygen"
|
mymob.nutrition_icon.icon_state = "nutrition0"
|
||||||
mymob.oxygen.screen_loc = ui_oxygen
|
mymob.nutrition_icon.name = "nutrition"
|
||||||
|
mymob.nutrition_icon.screen_loc = ui_nutrition
|
||||||
mymob.pressure = new /obj/screen()
|
hud_elements |= mymob.nutrition_icon
|
||||||
mymob.pressure.icon = ui_style
|
|
||||||
mymob.pressure.icon_state = "pressure0"
|
|
||||||
mymob.pressure.name = "pressure"
|
|
||||||
mymob.pressure.screen_loc = ui_pressure
|
|
||||||
|
|
||||||
mymob.toxin = new /obj/screen()
|
|
||||||
mymob.toxin.icon = ui_style
|
|
||||||
mymob.toxin.icon_state = "tox0"
|
|
||||||
mymob.toxin.name = "toxin"
|
|
||||||
mymob.toxin.screen_loc = ui_toxin
|
|
||||||
|
|
||||||
mymob.internals = new /obj/screen()
|
|
||||||
mymob.internals.icon = ui_style
|
|
||||||
mymob.internals.icon_state = "internal0"
|
|
||||||
mymob.internals.name = "internal"
|
|
||||||
mymob.internals.screen_loc = ui_internal
|
|
||||||
|
|
||||||
mymob.fire = new /obj/screen()
|
|
||||||
mymob.fire.icon = ui_style
|
|
||||||
mymob.fire.icon_state = "fire0"
|
|
||||||
mymob.fire.name = "fire"
|
|
||||||
mymob.fire.screen_loc = ui_fire
|
|
||||||
|
|
||||||
mymob.bodytemp = new /obj/screen()
|
|
||||||
mymob.bodytemp.icon = ui_style
|
|
||||||
mymob.bodytemp.icon_state = "temp1"
|
|
||||||
mymob.bodytemp.name = "body temperature"
|
|
||||||
mymob.bodytemp.screen_loc = ui_temp
|
|
||||||
|
|
||||||
mymob.healths = new /obj/screen()
|
|
||||||
mymob.healths.icon = ui_style
|
|
||||||
mymob.healths.icon_state = "health0"
|
|
||||||
mymob.healths.name = "health"
|
|
||||||
mymob.healths.screen_loc = ui_health
|
|
||||||
|
|
||||||
mymob.nutrition_icon = new /obj/screen()
|
|
||||||
mymob.nutrition_icon.icon = ui_style
|
|
||||||
mymob.nutrition_icon.icon_state = "nutrition0"
|
|
||||||
mymob.nutrition_icon.name = "nutrition"
|
|
||||||
mymob.nutrition_icon.screen_loc = ui_nutrition
|
|
||||||
|
|
||||||
mymob.pullin = new /obj/screen()
|
|
||||||
mymob.pullin.icon = ui_style
|
|
||||||
mymob.pullin.icon_state = "pull0"
|
|
||||||
mymob.pullin.name = "pull"
|
|
||||||
mymob.pullin.screen_loc = ui_pull_resist
|
|
||||||
src.hotkeybuttons += mymob.pullin
|
|
||||||
|
|
||||||
mymob.blind = new /obj/screen()
|
mymob.blind = new /obj/screen()
|
||||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||||
@@ -419,6 +308,7 @@
|
|||||||
mymob.blind.screen_loc = "1,1"
|
mymob.blind.screen_loc = "1,1"
|
||||||
mymob.blind.mouse_opacity = 0
|
mymob.blind.mouse_opacity = 0
|
||||||
mymob.blind.layer = 0
|
mymob.blind.layer = 0
|
||||||
|
hud_elements |= mymob.blind
|
||||||
|
|
||||||
mymob.damageoverlay = new /obj/screen()
|
mymob.damageoverlay = new /obj/screen()
|
||||||
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
|
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
|
||||||
@@ -427,6 +317,7 @@
|
|||||||
mymob.damageoverlay.screen_loc = "1,1"
|
mymob.damageoverlay.screen_loc = "1,1"
|
||||||
mymob.damageoverlay.mouse_opacity = 0
|
mymob.damageoverlay.mouse_opacity = 0
|
||||||
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
|
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
|
||||||
|
hud_elements |= mymob.damageoverlay
|
||||||
|
|
||||||
mymob.flash = new /obj/screen()
|
mymob.flash = new /obj/screen()
|
||||||
mymob.flash.icon = ui_style
|
mymob.flash.icon = ui_style
|
||||||
@@ -434,6 +325,7 @@
|
|||||||
mymob.flash.name = "flash"
|
mymob.flash.name = "flash"
|
||||||
mymob.flash.screen_loc = "1,1 to 15,15"
|
mymob.flash.screen_loc = "1,1 to 15,15"
|
||||||
mymob.flash.layer = 17
|
mymob.flash.layer = 17
|
||||||
|
hud_elements |= mymob.flash
|
||||||
|
|
||||||
mymob.pain = new /obj/screen( null )
|
mymob.pain = new /obj/screen( null )
|
||||||
|
|
||||||
@@ -443,11 +335,13 @@
|
|||||||
mymob.zone_sel.alpha = ui_alpha
|
mymob.zone_sel.alpha = ui_alpha
|
||||||
mymob.zone_sel.overlays.Cut()
|
mymob.zone_sel.overlays.Cut()
|
||||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||||
|
hud_elements |= mymob.zone_sel
|
||||||
|
|
||||||
//Handle the gun settings buttons
|
//Handle the gun settings buttons
|
||||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||||
//mymob.gun_setting_icon.color = ui_color
|
//mymob.gun_setting_icon.color = ui_color
|
||||||
mymob.gun_setting_icon.alpha = ui_alpha
|
mymob.gun_setting_icon.alpha = ui_alpha
|
||||||
|
hud_elements |= mymob.gun_setting_icon
|
||||||
|
|
||||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||||
//mymob.item_use_icon.color = ui_color
|
//mymob.item_use_icon.color = ui_color
|
||||||
@@ -468,7 +362,7 @@
|
|||||||
|
|
||||||
mymob.client.screen = null
|
mymob.client.screen = null
|
||||||
|
|
||||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
|
mymob.client.screen += hud_elements
|
||||||
mymob.client.screen += src.adding + src.hotkeybuttons
|
mymob.client.screen += src.adding + src.hotkeybuttons
|
||||||
inventory_shown = 0;
|
inventory_shown = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -235,8 +235,6 @@
|
|||||||
if("walk")
|
if("walk")
|
||||||
usr.m_intent = "run"
|
usr.m_intent = "run"
|
||||||
usr.hud_used.move_intent.icon_state = "running"
|
usr.hud_used.move_intent.icon_state = "running"
|
||||||
if(istype(usr,/mob/living/carbon/alien/humanoid))
|
|
||||||
usr.update_icons()
|
|
||||||
if("m_intent")
|
if("m_intent")
|
||||||
if(!usr.m_int)
|
if(!usr.m_int)
|
||||||
switch(usr.m_intent)
|
switch(usr.m_intent)
|
||||||
|
|||||||
@@ -90,21 +90,10 @@
|
|||||||
Aliens
|
Aliens
|
||||||
Defaults to same as monkey in most places
|
Defaults to same as monkey in most places
|
||||||
*/
|
*/
|
||||||
/mob/living/carbon/alien/UnarmedAttack(var/atom/A)
|
|
||||||
A.attack_alien(src)
|
|
||||||
/atom/proc/attack_alien(mob/user as mob)
|
|
||||||
attack_paw(user)
|
|
||||||
return
|
|
||||||
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
|
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
|
||||||
return
|
return
|
||||||
|
|
||||||
// Babby aliens
|
|
||||||
/mob/living/carbon/alien/larva/UnarmedAttack(var/atom/A)
|
|
||||||
A.attack_larva(src)
|
|
||||||
/atom/proc/attack_larva(mob/user as mob)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Slimes
|
Slimes
|
||||||
Nothing happening here
|
Nothing happening here
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
/**
|
/**
|
||||||
* Podman hook.
|
* Podman hook.
|
||||||
* Called in podmen.dm when someone is brought back as a Diona.
|
* Called in podmen.dm when someone is brought back as a Diona.
|
||||||
* Parameters: var/mob/living/carbon/monkey/diona
|
* Parameters: var/mob/living/carbon/alien/diona
|
||||||
*/
|
*/
|
||||||
/hook/harvest_podman
|
/hook/harvest_podman
|
||||||
|
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ client
|
|||||||
|
|
||||||
src.give_disease(M)
|
src.give_disease(M)
|
||||||
href_list["datumrefresh"] = href_list["give_spell"]
|
href_list["datumrefresh"] = href_list["give_spell"]
|
||||||
|
|
||||||
else if(href_list["give_disease2"])
|
else if(href_list["give_disease2"])
|
||||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||||
|
|
||||||
@@ -777,6 +777,9 @@ client
|
|||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
// Clear out their species abilities.
|
||||||
|
H.species.remove_inherent_verbs(H)
|
||||||
|
|
||||||
if(H.set_species(new_species))
|
if(H.set_species(new_species))
|
||||||
usr << "Set species of [H] to [H.species]."
|
usr << "Set species of [H] to [H.species]."
|
||||||
H.regenerate_icons()
|
H.regenerate_icons()
|
||||||
@@ -827,9 +830,9 @@ client
|
|||||||
|
|
||||||
else if(href_list["addverb"])
|
else if(href_list["addverb"])
|
||||||
if(!check_rights(R_DEBUG)) return
|
if(!check_rights(R_DEBUG)) return
|
||||||
|
|
||||||
var/mob/living/H = locate(href_list["addverb"])
|
var/mob/living/H = locate(href_list["addverb"])
|
||||||
|
|
||||||
if(!istype(H))
|
if(!istype(H))
|
||||||
usr << "This can only be done to instances of type /mob/living"
|
usr << "This can only be done to instances of type /mob/living"
|
||||||
return
|
return
|
||||||
@@ -845,7 +848,7 @@ client
|
|||||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
||||||
possibleverbs -= H.verbs
|
possibleverbs -= H.verbs
|
||||||
possibleverbs += "Cancel" // ...And one for the bottom
|
possibleverbs += "Cancel" // ...And one for the bottom
|
||||||
|
|
||||||
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
|
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
|
||||||
if(!H)
|
if(!H)
|
||||||
usr << "Mob doesn't exist anymore"
|
usr << "Mob doesn't exist anymore"
|
||||||
@@ -854,7 +857,7 @@ client
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
H.verbs += verb
|
H.verbs += verb
|
||||||
|
|
||||||
else if(href_list["remverb"])
|
else if(href_list["remverb"])
|
||||||
if(!check_rights(R_DEBUG)) return
|
if(!check_rights(R_DEBUG)) return
|
||||||
|
|
||||||
@@ -872,7 +875,7 @@ client
|
|||||||
else
|
else
|
||||||
H.verbs -= verb
|
H.verbs -= verb
|
||||||
|
|
||||||
|
|
||||||
else if(href_list["fix_nano"])
|
else if(href_list["fix_nano"])
|
||||||
if(!check_rights(R_DEBUG)) return
|
if(!check_rights(R_DEBUG)) return
|
||||||
|
|
||||||
@@ -881,11 +884,11 @@ client
|
|||||||
if(!istype(H) || !H.client)
|
if(!istype(H) || !H.client)
|
||||||
usr << "This can only be done on mobs with clients"
|
usr << "This can only be done on mobs with clients"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
nanomanager.send_resources(H.client)
|
nanomanager.send_resources(H.client)
|
||||||
|
|
||||||
usr << "Resource files sent"
|
usr << "Resource files sent"
|
||||||
H << "Your NanoUI Resource files have been refreshed"
|
H << "Your NanoUI Resource files have been refreshed"
|
||||||
|
|
||||||
|
|||||||
@@ -1234,27 +1234,6 @@ datum/mind
|
|||||||
..()
|
..()
|
||||||
mind.assigned_role = "slime"
|
mind.assigned_role = "slime"
|
||||||
|
|
||||||
//XENO
|
|
||||||
/mob/living/carbon/alien/mind_initialize()
|
|
||||||
..()
|
|
||||||
mind.assigned_role = "Alien"
|
|
||||||
//XENO HUMANOID
|
|
||||||
/mob/living/carbon/alien/humanoid/queen/mind_initialize()
|
|
||||||
..()
|
|
||||||
mind.special_role = "Queen"
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/hunter/mind_initialize()
|
|
||||||
..()
|
|
||||||
mind.special_role = "Hunter"
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/drone/mind_initialize()
|
|
||||||
..()
|
|
||||||
mind.special_role = "Drone"
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/sentinel/mind_initialize()
|
|
||||||
..()
|
|
||||||
mind.special_role = "Sentinel"
|
|
||||||
//XENO LARVA
|
|
||||||
/mob/living/carbon/alien/larva/mind_initialize()
|
/mob/living/carbon/alien/larva/mind_initialize()
|
||||||
..()
|
..()
|
||||||
mind.special_role = "Larva"
|
mind.special_role = "Larva"
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
src.visible_message("<span class='warning'>[src] transforms!</span>")
|
src.visible_message("<span class='warning'>[src] transforms!</span>")
|
||||||
|
|
||||||
src.verbs -= /mob/proc/changeling_change_species
|
src.verbs -= /mob/proc/changeling_change_species
|
||||||
H.set_species(S,null,1) //Until someone moves body colour into DNA, they're going to have to use the default.
|
H.set_species(S,1) //Until someone moves body colour into DNA, they're going to have to use the default.
|
||||||
|
|
||||||
spawn(10)
|
spawn(10)
|
||||||
src.verbs += /mob/proc/changeling_change_species
|
src.verbs += /mob/proc/changeling_change_species
|
||||||
|
|||||||
@@ -690,21 +690,6 @@ var/list/sacrificed = list()
|
|||||||
if(prob(20))
|
if(prob(20))
|
||||||
ticker.mode.grant_runeword(usr)
|
ticker.mode.grant_runeword(usr)
|
||||||
M.gib()
|
M.gib()
|
||||||
/* for(var/mob/living/carbon/alien/A)
|
|
||||||
for(var/mob/K in cultsinrange)
|
|
||||||
K.say("Barhah hra zar'garis!")
|
|
||||||
A.dust() /// A.gib() doesnt work for some reason, and dust() leaves that skull and bones thingy which we dont really need.
|
|
||||||
if (ticker.mode.name == "cult")
|
|
||||||
if(prob(75))
|
|
||||||
usr << "\red The Geometer of Blood accepts your exotic sacrifice."
|
|
||||||
ticker.mode:grant_runeword(usr)
|
|
||||||
else
|
|
||||||
usr << "\red The Geometer of Blood accepts your exotic sacrifice."
|
|
||||||
usr << "\red However, this alien is not enough to gain His favor."
|
|
||||||
else
|
|
||||||
usr << "\red The Geometer of Blood accepts your exotic sacrifice."
|
|
||||||
return
|
|
||||||
return fizzle() */
|
|
||||||
|
|
||||||
/////////////////////////////////////////SIXTEENTH RUNE
|
/////////////////////////////////////////SIXTEENTH RUNE
|
||||||
|
|
||||||
|
|||||||
@@ -1451,32 +1451,34 @@ It is possible to destroy the net by the occupant or someone else.
|
|||||||
return
|
return
|
||||||
|
|
||||||
attack_hand()
|
attack_hand()
|
||||||
|
|
||||||
if (HULK in usr.mutations)
|
if (HULK in usr.mutations)
|
||||||
usr << text("\blue You easily destroy the energy net.")
|
usr << text("\blue You easily destroy the energy net.")
|
||||||
for(var/mob/O in oviewers(src))
|
for(var/mob/O in oviewers(src))
|
||||||
O.show_message(text("\red [] rips the energy net apart!", usr), 1)
|
O.show_message(text("\red [] rips the energy net apart!", usr), 1)
|
||||||
health-=50
|
health-=50
|
||||||
|
else if(istype(usr,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
if(H.species.can_shred(H))
|
||||||
|
|
||||||
|
H << text("\green You claw at the net.")
|
||||||
|
for(var/mob/O in oviewers(src))
|
||||||
|
O.show_message(text("\red [] claws at the energy net!", H), 1)
|
||||||
|
|
||||||
|
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
|
||||||
|
health -= rand(10, 20)
|
||||||
|
|
||||||
|
if(health <= 0)
|
||||||
|
H << text("\green You slice the energy net to pieces.")
|
||||||
|
for(var/mob/O in oviewers(src))
|
||||||
|
O.show_message(text("\red [] slices the energy net apart!", H), 1)
|
||||||
|
|
||||||
healthcheck()
|
healthcheck()
|
||||||
return
|
return
|
||||||
|
|
||||||
attack_paw()
|
attack_paw()
|
||||||
return attack_hand()
|
return attack_hand()
|
||||||
|
|
||||||
attack_alien()
|
|
||||||
if (islarva(usr))
|
|
||||||
return
|
|
||||||
usr << text("\green You claw at the net.")
|
|
||||||
for(var/mob/O in oviewers(src))
|
|
||||||
O.show_message(text("\red [] claws at the energy net!", usr), 1)
|
|
||||||
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
|
|
||||||
health -= rand(10, 20)
|
|
||||||
if(health <= 0)
|
|
||||||
usr << text("\green You slice the energy net to pieces.")
|
|
||||||
for(var/mob/O in oviewers(src))
|
|
||||||
O.show_message(text("\red [] slices the energy net apart!", usr), 1)
|
|
||||||
healthcheck()
|
|
||||||
return
|
|
||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
var/aforce = W.force
|
var/aforce = W.force
|
||||||
health = max(0, health - aforce)
|
health = max(0, health - aforce)
|
||||||
|
|||||||
@@ -219,8 +219,8 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
|||||||
//Xenos and deathsquads take precedence over everything else.
|
//Xenos and deathsquads take precedence over everything else.
|
||||||
|
|
||||||
//Unless the xenos are hiding in a locker somewhere, this'll find em.
|
//Unless the xenos are hiding in a locker somewhere, this'll find em.
|
||||||
for(var/mob/living/carbon/alien/humanoid/xeno in player_list)
|
for(var/mob/living/carbon/human/xeno in player_list)
|
||||||
if(istype(xeno))
|
if(istype(xeno.species,/datum/species/xenos))
|
||||||
xeno_list += xeno
|
xeno_list += xeno
|
||||||
|
|
||||||
if(assign_mission)
|
if(assign_mission)
|
||||||
@@ -230,11 +230,11 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
|||||||
if(xeno_list.len>3)//If there are more than three humanoid xenos on the station, time to get dangerous.
|
if(xeno_list.len>3)//If there are more than three humanoid xenos on the station, time to get dangerous.
|
||||||
//Here we want the ninja to murder all the queens. The other aliens don't really matter.
|
//Here we want the ninja to murder all the queens. The other aliens don't really matter.
|
||||||
var/xeno_queen_list[] = list()
|
var/xeno_queen_list[] = list()
|
||||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_list)
|
for(var/mob/living/carbon/human/xeno_queen in xeno_list)
|
||||||
if(xeno_queen.mind&&xeno_queen.stat!=2)
|
if(xeno_queen.species.name == "Xenomorph Queen" && xeno_queen.mind && xeno_queen.stat!=2)
|
||||||
xeno_queen_list += xeno_queen
|
xeno_queen_list += xeno_queen
|
||||||
if(xeno_queen_list.len&&side=="face")//If there are queen about and the probability is 50.
|
if(xeno_queen_list.len&&side=="face")//If there are queen about and the probability is 50.
|
||||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_queen_list)
|
for(var/mob/living/carbon/human/xeno_queen in xeno_queen_list)
|
||||||
var/datum/objective/assassinate/ninja_objective = new
|
var/datum/objective/assassinate/ninja_objective = new
|
||||||
ninja_objective.owner = ninja_mind
|
ninja_objective.owner = ninja_mind
|
||||||
//We'll do some manual overrides to properly set it up.
|
//We'll do some manual overrides to properly set it up.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
mode.update_icon(H.mind)
|
mode.update_icon(H.mind)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/hook/harvest_podman/proc/update_icon(mob/living/carbon/monkey/diona/D)
|
/hook/harvest_podman/proc/update_icon(mob/living/carbon/alien/diona/D)
|
||||||
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
|
var/datum/game_mode/mutiny/mode = get_mutiny_mode()
|
||||||
if (!mode) return 1
|
if (!mode) return 1
|
||||||
|
|
||||||
|
|||||||
@@ -649,17 +649,6 @@ datum/objective/capture
|
|||||||
captured_amount+=0.5
|
captured_amount+=0.5
|
||||||
continue
|
continue
|
||||||
captured_amount+=1
|
captured_amount+=1
|
||||||
for(var/mob/living/carbon/alien/humanoid/M in A)//Aliens are worth twice as much as humans.
|
|
||||||
if(istype(M, /mob/living/carbon/alien/humanoid/queen))//Queens are worth three times as much as humans.
|
|
||||||
if(M.stat==2)
|
|
||||||
captured_amount+=1.5
|
|
||||||
else
|
|
||||||
captured_amount+=3
|
|
||||||
continue
|
|
||||||
if(M.stat==2)
|
|
||||||
captured_amount+=1
|
|
||||||
continue
|
|
||||||
captured_amount+=2
|
|
||||||
if(captured_amount<target_amount)
|
if(captured_amount<target_amount)
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
//if they are holding or wearing a card that has access, that works
|
//if they are holding or wearing a card that has access, that works
|
||||||
if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
|
if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
|
||||||
return 1
|
return 1
|
||||||
else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid))
|
else if(istype(M, /mob/living/carbon/monkey))
|
||||||
var/mob/living/carbon/george = M
|
var/mob/living/carbon/george = M
|
||||||
//they can only hold things :(
|
//they can only hold things :(
|
||||||
if(src.check_access(george.get_active_hand()))
|
if(src.check_access(george.get_active_hand()))
|
||||||
|
|||||||
@@ -51,15 +51,6 @@
|
|||||||
usr << "<span class='danger'>[src]'s parts look very loose!</span>"
|
usr << "<span class='danger'>[src]'s parts look very loose!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
|
||||||
src.health -= rand(15,30)*brute_dam_coeff
|
|
||||||
src.visible_message("\red <B>[user] has slashed [src]!</B>")
|
|
||||||
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
|
||||||
if(prob(10))
|
|
||||||
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
|
||||||
healthcheck()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||||
if(M.melee_damage_upper == 0) return
|
if(M.melee_damage_upper == 0) return
|
||||||
src.health -= M.melee_damage_upper
|
src.health -= M.melee_damage_upper
|
||||||
@@ -155,6 +146,19 @@
|
|||||||
/obj/machinery/bot/attack_ai(mob/user as mob)
|
/obj/machinery/bot/attack_ai(mob/user as mob)
|
||||||
src.attack_hand(user)
|
src.attack_hand(user)
|
||||||
|
|
||||||
|
/obj/machinery/bot/attack_hand(var/mob/living/carbon/human/user)
|
||||||
|
|
||||||
|
if(!istype(user))
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
if(user.species.can_shred(user))
|
||||||
|
src.health -= rand(15,30)*brute_dam_coeff
|
||||||
|
src.visible_message("\red <B>[user] has slashed [src]!</B>")
|
||||||
|
playsound(src.loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||||
|
if(prob(10))
|
||||||
|
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||||
|
healthcheck()
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
// Navigation procs
|
// Navigation procs
|
||||||
// Used for A-star pathfinding
|
// Used for A-star pathfinding
|
||||||
|
|||||||
@@ -787,12 +787,6 @@ Auto Patrol: []"},
|
|||||||
if(prob(50))
|
if(prob(50))
|
||||||
new /obj/item/robot_parts/l_arm(Tsec)
|
new /obj/item/robot_parts/l_arm(Tsec)
|
||||||
|
|
||||||
/obj/machinery/bot/secbot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
|
||||||
..()
|
|
||||||
if(!isalien(target))
|
|
||||||
src.target = user
|
|
||||||
src.mode = SECBOT_HUNT
|
|
||||||
|
|
||||||
//Secbot Construction
|
//Secbot Construction
|
||||||
|
|
||||||
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob)
|
/obj/item/clothing/head/helmet/attackby(var/obj/item/device/assembly/signaler/S, mob/user as mob)
|
||||||
|
|||||||
@@ -88,15 +88,18 @@
|
|||||||
src.view_range = num
|
src.view_range = num
|
||||||
cameranet.updateVisibility(src, 0)
|
cameranet.updateVisibility(src, 0)
|
||||||
|
|
||||||
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
|
/obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob)
|
||||||
|
|
||||||
if(!istype(user))
|
if(!istype(user))
|
||||||
return
|
return
|
||||||
status = 0
|
|
||||||
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
if(user.species.can_shred(user))
|
||||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
status = 0
|
||||||
icon_state = "[initial(icon_state)]1"
|
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
||||||
add_hiddenprint(user)
|
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||||
deactivate(user,0)
|
icon_state = "[initial(icon_state)]1"
|
||||||
|
add_hiddenprint(user)
|
||||||
|
deactivate(user,0)
|
||||||
|
|
||||||
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob)
|
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob)
|
||||||
|
|
||||||
|
|||||||
@@ -77,9 +77,10 @@
|
|||||||
if ((M.stat != 2) || (!M.client))
|
if ((M.stat != 2) || (!M.client))
|
||||||
continue
|
continue
|
||||||
//They need a brain!
|
//They need a brain!
|
||||||
if ((istype(M, /mob/living/carbon/human)) && (!M.has_brain()))
|
if(istype(M, /mob/living/carbon/human))
|
||||||
continue
|
var/mob/living/carbon/human/H = M
|
||||||
|
if(H.species.has_organ["brain"] && !H.has_brain())
|
||||||
|
continue
|
||||||
if (M.ckey == find_key)
|
if (M.ckey == find_key)
|
||||||
selected = M
|
selected = M
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -339,10 +339,7 @@ var/global/list/holodeck_programs = list(
|
|||||||
/obj/structure/table/holotable/attack_paw(mob/user as mob)
|
/obj/structure/table/holotable/attack_paw(mob/user as mob)
|
||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
/obj/structure/table/holotable/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
/obj/structure/table/holotable/attack_animal(mob/living/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
|
||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
/obj/structure/table/holotable/attack_hand(mob/user as mob)
|
/obj/structure/table/holotable/attack_hand(mob/user as mob)
|
||||||
@@ -594,9 +591,6 @@ var/global/list/holodeck_programs = list(
|
|||||||
icon = 'icons/obj/objects.dmi'
|
icon = 'icons/obj/objects.dmi'
|
||||||
icon_state = "rack"
|
icon_state = "rack"
|
||||||
|
|
||||||
/obj/structure/rack/holorack/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
/obj/structure/rack/holorack/attack_hand(mob/user as mob)
|
/obj/structure/rack/holorack/attack_hand(mob/user as mob)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -338,7 +338,12 @@
|
|||||||
scantemp = "Error: Unable to locate valid genetic data."
|
scantemp = "Error: Unable to locate valid genetic data."
|
||||||
return
|
return
|
||||||
if (!subject.has_brain())
|
if (!subject.has_brain())
|
||||||
scantemp = "Error: No signs of intelligence detected."
|
if(istype(subject, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = subject
|
||||||
|
if(H.species.has_organ["brain"])
|
||||||
|
scantemp = "Error: No signs of intelligence detected."
|
||||||
|
else
|
||||||
|
scantemp = "Error: No signs of intelligence detected."
|
||||||
return
|
return
|
||||||
if (subject.suiciding == 1)
|
if (subject.suiciding == 1)
|
||||||
scantemp = "Error: Subject's brain is not responding to scanning stimuli."
|
scantemp = "Error: Subject's brain is not responding to scanning stimuli."
|
||||||
|
|||||||
@@ -172,18 +172,15 @@
|
|||||||
/obj/machinery/door/window/attack_ai(mob/user as mob)
|
/obj/machinery/door/window/attack_ai(mob/user as mob)
|
||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
/obj/machinery/door/window/attack_paw(mob/user as mob)
|
|
||||||
if(istype(user, /mob/living/carbon/alien/humanoid))
|
|
||||||
if(src.operating)
|
|
||||||
return
|
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
|
||||||
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
|
||||||
take_damage(25)
|
|
||||||
else
|
|
||||||
return src.attack_hand(user)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||||
|
|
||||||
|
if(istype(user,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(H.species.can_shred(H))
|
||||||
|
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||||
|
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
|
||||||
|
take_damage(25)
|
||||||
|
return
|
||||||
return src.attackby(user, user)
|
return src.attackby(user, user)
|
||||||
|
|
||||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||||
|
|||||||
@@ -71,6 +71,27 @@
|
|||||||
var/targeting_active = 0
|
var/targeting_active = 0
|
||||||
var/area/turret_protected/protected_area
|
var/area/turret_protected/protected_area
|
||||||
|
|
||||||
|
/obj/machinery/turret/proc/take_damage(damage)
|
||||||
|
src.health -= damage
|
||||||
|
if(src.health<=0)
|
||||||
|
del src
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/turret/attack_hand(var/mob/living/carbon/human/user)
|
||||||
|
|
||||||
|
if(!istype(user))
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
if(user.species.can_shred(user) && !(stat & BROKEN))
|
||||||
|
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||||
|
visible_message("\red <B>[] has slashed at []!</B>", user, src)
|
||||||
|
src.take_damage(15)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
take_damage(Proj.damage)
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
/obj/machinery/turret/New()
|
/obj/machinery/turret/New()
|
||||||
spark_system = new /datum/effect/effect/system/spark_spread
|
spark_system = new /datum/effect/effect/system/spark_spread
|
||||||
@@ -80,6 +101,11 @@
|
|||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/machinery/turret/proc/update_health()
|
||||||
|
if(src.health<=0)
|
||||||
|
del src
|
||||||
|
return
|
||||||
|
|
||||||
/obj/machinery/turretcover
|
/obj/machinery/turretcover
|
||||||
name = "pop-up turret cover"
|
name = "pop-up turret cover"
|
||||||
icon = 'icons/obj/turrets.dmi'
|
icon = 'icons/obj/turrets.dmi'
|
||||||
@@ -407,7 +433,7 @@
|
|||||||
onclose(user, "turretid")
|
onclose(user, "turretid")
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
|
/obj/machinery/turret/attack_animal(mob/living/M as mob)
|
||||||
if(M.melee_damage_upper == 0) return
|
if(M.melee_damage_upper == 0) return
|
||||||
if(!(stat & BROKEN))
|
if(!(stat & BROKEN))
|
||||||
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
|
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
|
||||||
@@ -420,22 +446,6 @@
|
|||||||
M << "\red That object is useless to you."
|
M << "\red That object is useless to you."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
|
||||||
if(!(stat & BROKEN))
|
|
||||||
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
|
||||||
visible_message("\red <B>[] has slashed at []!</B>", M, src)
|
|
||||||
src.health -= 15
|
|
||||||
if (src.health <= 0)
|
|
||||||
src.die()
|
|
||||||
else
|
|
||||||
M << "\green That object is useless to you."
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
|
/obj/machinery/turretid/Topic(href, href_list, var/nowindow = 0)
|
||||||
if(..(href, href_list))
|
if(..(href, href_list))
|
||||||
return
|
return
|
||||||
@@ -494,6 +504,18 @@
|
|||||||
icon = 'icons/obj/turrets.dmi'
|
icon = 'icons/obj/turrets.dmi'
|
||||||
icon_state = "gun_turret"
|
icon_state = "gun_turret"
|
||||||
|
|
||||||
|
proc/take_damage(damage)
|
||||||
|
src.health -= damage
|
||||||
|
if(src.health<=0)
|
||||||
|
del src
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
take_damage(Proj.damage)
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
ex_act()
|
ex_act()
|
||||||
del src
|
del src
|
||||||
@@ -507,24 +529,6 @@
|
|||||||
del src
|
del src
|
||||||
return
|
return
|
||||||
|
|
||||||
proc/update_health()
|
|
||||||
if(src.health<=0)
|
|
||||||
del src
|
|
||||||
return
|
|
||||||
|
|
||||||
proc/take_damage(damage)
|
|
||||||
src.health -= damage
|
|
||||||
if(src.health<=0)
|
|
||||||
del src
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
bullet_act(var/obj/item/projectile/Proj)
|
|
||||||
src.take_damage(Proj.damage)
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
attack_hand(mob/user as mob)
|
attack_hand(mob/user as mob)
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
var/dat = {"<html>
|
var/dat = {"<html>
|
||||||
@@ -546,12 +550,6 @@
|
|||||||
attack_ai(mob/user as mob)
|
attack_ai(mob/user as mob)
|
||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
|
|
||||||
attack_alien(mob/user as mob)
|
|
||||||
user.visible_message("[user] slashes at [src]", "You slash at [src]")
|
|
||||||
src.take_damage(15)
|
|
||||||
return
|
|
||||||
|
|
||||||
Topic(href, href_list)
|
Topic(href, href_list)
|
||||||
if(href_list["power"])
|
if(href_list["power"])
|
||||||
src.on = !src.on
|
src.on = !src.on
|
||||||
|
|||||||
@@ -418,7 +418,26 @@
|
|||||||
/obj/mecha/attack_hand(mob/user as mob)
|
/obj/mecha/attack_hand(mob/user as mob)
|
||||||
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||||
|
|
||||||
if ((HULK in user.mutations) && !prob(src.deflect_chance))
|
if(istype(user,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(H.species.can_shred(user))
|
||||||
|
if(!prob(src.deflect_chance))
|
||||||
|
src.take_damage(15)
|
||||||
|
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||||
|
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||||
|
user << "\red You slash at the armored suit!"
|
||||||
|
visible_message("\red The [user] slashes at [src.name]'s armor!")
|
||||||
|
else
|
||||||
|
src.log_append_to_last("Armor saved.")
|
||||||
|
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||||
|
user << "\green Your claws had no effect!"
|
||||||
|
src.occupant_message("\blue The [user]'s claws are stopped by the armor.")
|
||||||
|
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
|
||||||
|
else
|
||||||
|
user.visible_message("<font color='red'><b>[user] hits [src.name]. Nothing happens</b></font>","<font color='red'><b>You hit [src.name] with no visible effect.</b></font>")
|
||||||
|
src.log_append_to_last("Armor saved.")
|
||||||
|
return
|
||||||
|
else if ((HULK in user.mutations) && !prob(src.deflect_chance))
|
||||||
src.take_damage(15)
|
src.take_damage(15)
|
||||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||||
user.visible_message("<font color='red'><b>[user] hits [src.name], doing some damage.</b></font>", "<font color='red'><b>You hit [src.name] with all your might. The metal creaks and bends.</b></font>")
|
user.visible_message("<font color='red'><b>[user] hits [src.name], doing some damage.</b></font>", "<font color='red'><b>You hit [src.name] with all your might. The metal creaks and bends.</b></font>")
|
||||||
@@ -430,25 +449,7 @@
|
|||||||
/obj/mecha/attack_paw(mob/user as mob)
|
/obj/mecha/attack_paw(mob/user as mob)
|
||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
|
/obj/mecha/attack_animal(mob/living/user as mob)
|
||||||
/obj/mecha/attack_alien(mob/user as mob)
|
|
||||||
src.log_message("Attack by alien. Attacker - [user].",1)
|
|
||||||
if(!prob(src.deflect_chance))
|
|
||||||
src.take_damage(15)
|
|
||||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
|
||||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
|
||||||
user << "\red You slash at the armored suit!"
|
|
||||||
visible_message("\red The [user] slashes at [src.name]'s armor!")
|
|
||||||
else
|
|
||||||
src.log_append_to_last("Armor saved.")
|
|
||||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
|
||||||
user << "\green Your claws had no effect!"
|
|
||||||
src.occupant_message("\blue The [user]'s claws are stopped by the armor.")
|
|
||||||
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/mecha/attack_animal(mob/living/simple_animal/user as mob)
|
|
||||||
src.log_message("Attack by simple animal. Attacker - [user].",1)
|
src.log_message("Attack by simple animal. Attacker - [user].",1)
|
||||||
if(user.melee_damage_upper == 0)
|
if(user.melee_damage_upper == 0)
|
||||||
user.emote("[user.friendly] [src]")
|
user.emote("[user.friendly] [src]")
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
name = "alien thing"
|
name = "alien thing"
|
||||||
desc = "theres something alien about this"
|
desc = "theres something alien about this"
|
||||||
icon = 'icons/mob/alien.dmi'
|
icon = 'icons/mob/alien.dmi'
|
||||||
// unacidable = 1 //Aliens won't ment their own.
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resin
|
* Resin
|
||||||
@@ -31,17 +29,17 @@
|
|||||||
var/health = 200
|
var/health = 200
|
||||||
//var/mob/living/affecting = null
|
//var/mob/living/affecting = null
|
||||||
|
|
||||||
wall
|
/obj/effect/alien/resin/wall
|
||||||
name = "resin wall"
|
name = "resin wall"
|
||||||
desc = "Purple slime solidified into a wall."
|
desc = "Purple slime solidified into a wall."
|
||||||
icon_state = "resinwall" //same as resin, but consistency ho!
|
icon_state = "resinwall" //same as resin, but consistency ho!
|
||||||
|
|
||||||
membrane
|
/obj/effect/alien/resin/membrane
|
||||||
name = "resin membrane"
|
name = "resin membrane"
|
||||||
desc = "Purple slime just thin enough to let light pass through."
|
desc = "Purple slime just thin enough to let light pass through."
|
||||||
icon_state = "resinmembrane"
|
icon_state = "resinmembrane"
|
||||||
opacity = 0
|
opacity = 0
|
||||||
health = 120
|
health = 120
|
||||||
|
|
||||||
/obj/effect/alien/resin/New()
|
/obj/effect/alien/resin/New()
|
||||||
..()
|
..()
|
||||||
@@ -121,42 +119,7 @@
|
|||||||
/obj/effect/alien/resin/attack_paw()
|
/obj/effect/alien/resin/attack_paw()
|
||||||
return attack_hand()
|
return attack_hand()
|
||||||
|
|
||||||
/obj/effect/alien/resin/attack_alien()
|
|
||||||
if (islarva(usr))//Safety check for larva. /N
|
|
||||||
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)
|
|
||||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
|
||||||
health -= rand(40, 60)
|
|
||||||
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)
|
|
||||||
healthcheck()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/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
|
var/aforce = W.force
|
||||||
health = max(0, health - aforce)
|
health = max(0, health - aforce)
|
||||||
@@ -234,7 +197,7 @@ Alien plants should do something if theres a lot of poison
|
|||||||
|
|
||||||
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) )
|
if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) )
|
||||||
return
|
return
|
||||||
|
|
||||||
direction_loop:
|
direction_loop:
|
||||||
for(var/dirn in cardinal)
|
for(var/dirn in cardinal)
|
||||||
var/turf/T = get_step(src, dirn)
|
var/turf/T = get_step(src, dirn)
|
||||||
@@ -292,15 +255,6 @@ Alien plants should do something if theres a lot of poison
|
|||||||
health -= 5
|
health -= 5
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|
||||||
/*/obj/effect/alien/weeds/burn(fi_amount)
|
|
||||||
if (fi_amount > 18000)
|
|
||||||
spawn( 0 )
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
#undef NODERANGE
|
#undef NODERANGE
|
||||||
|
|
||||||
|
|
||||||
@@ -382,61 +336,59 @@ Alien plants should do something if theres a lot of poison
|
|||||||
var/health = 100
|
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()
|
/obj/effect/alien/egg/New()
|
||||||
if(aliens_allowed)
|
if(aliens_allowed)
|
||||||
..()
|
..()
|
||||||
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
|
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
|
||||||
Grow()
|
Grow()
|
||||||
else
|
else
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/effect/alien/egg/attack_hand(user as mob)
|
||||||
|
|
||||||
|
var/mob/living/carbon/M = user
|
||||||
|
if(!istype(M) || !(locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs))
|
||||||
|
return attack_hand(user)
|
||||||
|
|
||||||
|
switch(status)
|
||||||
|
if(BURST)
|
||||||
|
user << "\red You clear the hatched egg."
|
||||||
del(src)
|
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
|
||||||
|
|
||||||
attack_paw(user as mob)
|
/obj/effect/alien/egg/proc/GetFacehugger()
|
||||||
if(isalien(user))
|
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||||
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)
|
|
||||||
|
|
||||||
attack_hand(user as mob)
|
/obj/effect/alien/egg/proc/Grow()
|
||||||
user << "It feels slimy."
|
icon_state = "egg"
|
||||||
return
|
status = GROWN
|
||||||
|
new /obj/item/clothing/mask/facehugger(src)
|
||||||
|
return
|
||||||
|
|
||||||
proc/GetFacehugger()
|
/obj/effect/alien/egg/proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
|
||||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
if(status == GROWN || status == GROWING)
|
||||||
|
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||||
proc/Grow()
|
icon_state = "egg_hatched"
|
||||||
icon_state = "egg"
|
flick("egg_opening", src)
|
||||||
status = GROWN
|
status = BURSTING
|
||||||
new /obj/item/clothing/mask/facehugger(src)
|
spawn(15)
|
||||||
return
|
status = BURST
|
||||||
|
child.loc = get_turf(src)
|
||||||
proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
|
|
||||||
if(status == GROWN || status == GROWING)
|
|
||||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
|
||||||
icon_state = "egg_hatched"
|
|
||||||
flick("egg_opening", src)
|
|
||||||
status = BURSTING
|
|
||||||
spawn(15)
|
|
||||||
status = BURST
|
|
||||||
loc.contents += child//need to write the code for giving it to the alien later
|
|
||||||
if(kill && istype(child))
|
|
||||||
child.Die()
|
|
||||||
else
|
|
||||||
for(var/mob/M in range(1,src))
|
|
||||||
if(CanHug(M))
|
|
||||||
child.Attach(M)
|
|
||||||
break
|
|
||||||
|
|
||||||
|
if(kill && istype(child))
|
||||||
|
child.Die()
|
||||||
|
else
|
||||||
|
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(var/obj/item/projectile/Proj)
|
||||||
health -= Proj.damage
|
health -= Proj.damage
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
if(prob(25))
|
if(prob(25))
|
||||||
src.visible_message("\blue \the [src] skitters[pick(" away"," around","")].")
|
src.visible_message("\blue \the [src] skitters[pick(" away"," around","")].")
|
||||||
else if(prob(5))
|
else if(prob(5))
|
||||||
//ventcrawl!
|
//vent crawl!
|
||||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
|
||||||
if(!v.welded)
|
if(!v.welded)
|
||||||
entry_vent = v
|
entry_vent = v
|
||||||
|
|||||||
@@ -155,15 +155,6 @@
|
|||||||
|
|
||||||
/obj/item/attack_paw(mob/user as mob)
|
/obj/item/attack_paw(mob/user as mob)
|
||||||
|
|
||||||
if(isalien(user)) // -- TLE
|
|
||||||
var/mob/living/carbon/alien/A = user
|
|
||||||
|
|
||||||
if(!A.has_fine_manipulation || w_class >= 4)
|
|
||||||
if(src in A.contents) // To stop Aliens having items stuck in their pockets
|
|
||||||
A.drop_from_inventory(src)
|
|
||||||
user << "Your claws aren't capable of such fine manipulation."
|
|
||||||
return
|
|
||||||
|
|
||||||
if (istype(src.loc, /obj/item/weapon/storage))
|
if (istype(src.loc, /obj/item/weapon/storage))
|
||||||
for(var/mob/M in range(1, src.loc))
|
for(var/mob/M in range(1, src.loc))
|
||||||
if (M.s_active == src.loc)
|
if (M.s_active == src.loc)
|
||||||
|
|||||||
@@ -32,9 +32,6 @@
|
|||||||
..()
|
..()
|
||||||
usr << text("The service panel is [src.open ? "open" : "closed"].")
|
usr << text("The service panel is [src.open ? "open" : "closed"].")
|
||||||
|
|
||||||
attack_alien(mob/user as mob)
|
|
||||||
return attack_hand(user)
|
|
||||||
|
|
||||||
attack_paw(mob/user as mob)
|
attack_paw(mob/user as mob)
|
||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
|
|||||||
@@ -21,106 +21,6 @@
|
|||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
origin_tech = "materials=1;biotech=1"
|
origin_tech = "materials=1;biotech=1"
|
||||||
|
|
||||||
/*HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
|
|
||||||
|
|
||||||
NOW YOUR JOB IOS DONE BY ONLY 500 LINES OF SPAGHETTI CODE!
|
|
||||||
|
|
||||||
LOOK FOR SURGERY.DM*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
||||||
if(!istype(M))
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H) && ( \
|
|
||||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
|
||||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
|
||||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/monkey/Mo = M
|
|
||||||
if(istype(Mo) && ( \
|
|
||||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
|
|
||||||
user << "\red You cannot locate any eyes on this creature!"
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(M.eye_op_stage)
|
|
||||||
if(1.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is having his eyes retracted by [user].", 1)
|
|
||||||
M << "\red [user] begins to seperate your eyes with [src]!"
|
|
||||||
user << "\red You seperate [M]'s eyes with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] begins to have his eyes retracted.", \
|
|
||||||
"\red You begin to pry open your eyes with [src]!" \
|
|
||||||
)
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
M.updatehealth()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
|
|
||||||
M:eye_op_stage = 2.0
|
|
||||||
|
|
||||||
else if(user.zone_sel.selecting == "chest")
|
|
||||||
switch(M:alien_op_stage)
|
|
||||||
if(3.0)
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(!istype(H))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if(H.wear_suit || H.w_uniform)
|
|
||||||
user << "\red You're going to need to remove that suit/jumpsuit first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/obj/item/alien_embryo/A = locate() in M.contents
|
|
||||||
if(!A)
|
|
||||||
return ..()
|
|
||||||
user.visible_message("\red [user] begins to pull something out of [M]'s chest.", "\red You begin to pull the alien organism out of [M]'s chest.")
|
|
||||||
|
|
||||||
spawn(20 + rand(0,50))
|
|
||||||
if(!A || A.loc != M)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("chest")
|
|
||||||
if(affecting.take_damage(30))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(30)
|
|
||||||
|
|
||||||
if(A.stage > 3)
|
|
||||||
var/chance = 15 + max(0, A.stage - 3) * 10
|
|
||||||
if(prob(chance))
|
|
||||||
A.AttemptGrow(0)
|
|
||||||
M:alien_op_stage = 4.0
|
|
||||||
|
|
||||||
if(M)
|
|
||||||
user.visible_message("\red [user] pulls an alien organism out of [M]'s chest.", "\red You pull the alien organism out of [M]'s chest.")
|
|
||||||
A.loc = M.loc //alien embryo handles cleanup
|
|
||||||
|
|
||||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hemostat
|
* Hemostat
|
||||||
*/
|
*/
|
||||||
@@ -135,126 +35,6 @@ LOOK FOR SURGERY.DM*/
|
|||||||
origin_tech = "materials=1;biotech=1"
|
origin_tech = "materials=1;biotech=1"
|
||||||
attack_verb = list("attacked", "pinched")
|
attack_verb = list("attacked", "pinched")
|
||||||
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
||||||
if(!istype(M))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if(user.zone_sel.selecting == "groin")
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
switch(M:appendix_op_stage)
|
|
||||||
if(1.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [user] is beginning to clamp bleeders in [M]'s abdomen cut open with [src].", 1)
|
|
||||||
M << "\red [user] begins to clamp bleeders in your abdomen with [src]!"
|
|
||||||
user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
|
|
||||||
M:appendix_op_stage = 2.0
|
|
||||||
if(4.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [user] is removing [M]'s appendix with [src].", 1)
|
|
||||||
M << "\red [user] begins to remove your appendix with [src]!"
|
|
||||||
user << "\red You remove [M]'s appendix with [src]!"
|
|
||||||
for(var/datum/disease/D in M.viruses)
|
|
||||||
if(istype(D, /datum/disease/appendicitis))
|
|
||||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(M))
|
|
||||||
M:appendix_op_stage = 5.0
|
|
||||||
return
|
|
||||||
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(M))
|
|
||||||
M:appendix_op_stage = 5.0
|
|
||||||
return
|
|
||||||
|
|
||||||
if (user.zone_sel.selecting == "eyes")
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H) && ( \
|
|
||||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
|
||||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
|
||||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/monkey/Mo = M
|
|
||||||
if(istype(Mo) && ( \
|
|
||||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
|
|
||||||
user << "\red You cannot locate any eyes on this creature!"
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(M.eye_op_stage)
|
|
||||||
if(2.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is having his eyes mended by [user].", 1)
|
|
||||||
M << "\red [user] begins to mend your eyes with [src]!"
|
|
||||||
user << "\red You mend [M]'s eyes with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] begins to have his eyes mended.", \
|
|
||||||
"\red You begin to mend your eyes with [src]!" \
|
|
||||||
)
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
M.updatehealth()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
M:eye_op_stage = 3.0
|
|
||||||
|
|
||||||
else if(user.zone_sel.selecting == "chest")
|
|
||||||
if(M:alien_op_stage == 2.0 || M:alien_op_stage == 3.0)
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(!istype(H))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if(H.wear_suit || H.w_uniform)
|
|
||||||
user << "\red You're going to need to remove that suit/jumpsuit first."
|
|
||||||
return
|
|
||||||
|
|
||||||
user.visible_message("\red [user] begins to dig around in [M]'s chest.", "\red You begin to dig around in [M]'s chest.")
|
|
||||||
|
|
||||||
spawn(20 + (M:alien_op_stage == 3 ? 0 : rand(0,50)))
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("chest")
|
|
||||||
if(affecting.take_damage(30))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(30)
|
|
||||||
|
|
||||||
var/obj/item/alien_embryo/A = locate() in M.contents
|
|
||||||
if(A)
|
|
||||||
var/dat = "\blue You found an unknown alien organism in [M]'s chest!"
|
|
||||||
if(A.stage < 4)
|
|
||||||
dat += " It's small and weak, barely the size of a foetus."
|
|
||||||
if(A.stage > 3)
|
|
||||||
dat += " It's grown quite large, and writhes slightly as you look at it."
|
|
||||||
if(prob(10))
|
|
||||||
A.AttemptGrow()
|
|
||||||
user << dat
|
|
||||||
M:alien_op_stage = 3.0
|
|
||||||
else
|
|
||||||
user << "\blue You find nothing of interest."
|
|
||||||
|
|
||||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cautery
|
* Cautery
|
||||||
*/
|
*/
|
||||||
@@ -269,81 +49,6 @@ LOOK FOR SURGERY.DM*/
|
|||||||
origin_tech = "materials=1;biotech=1"
|
origin_tech = "materials=1;biotech=1"
|
||||||
attack_verb = list("burnt")
|
attack_verb = list("burnt")
|
||||||
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
||||||
if(!istype(M))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if(user.zone_sel.selecting == "groin")
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
switch(M:appendix_op_stage)
|
|
||||||
if(5.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [user] is beginning to cauterize the incision in [M]'s abdomen with [src].", 1)
|
|
||||||
M << "\red [user] begins to cauterize the incision in your abdomen with [src]!"
|
|
||||||
user << "\red You cauterize the incision in [M]'s abdomen with [src]!"
|
|
||||||
M:appendix_op_stage = 6.0
|
|
||||||
for(var/datum/disease/appendicitis in M.viruses)
|
|
||||||
appendicitis.cure()
|
|
||||||
return
|
|
||||||
|
|
||||||
if (user.zone_sel.selecting == "eyes")
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H) && ( \
|
|
||||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
|
||||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
|
||||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/monkey/Mo = M
|
|
||||||
if(istype(Mo) && ( \
|
|
||||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
|
|
||||||
user << "\red You cannot locate any eyes on this creature!"
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(M.eye_op_stage)
|
|
||||||
if(3.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is having his eyes cauterized by [user].", 1)
|
|
||||||
M << "\red [user] begins to cauterize your eyes!"
|
|
||||||
user << "\red You cauterize [M]'s eyes with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] begins to have his eyes cauterized.", \
|
|
||||||
"\red You begin to cauterize your eyes!" \
|
|
||||||
)
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
M.updatehealth()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
M.sdisabilities &= ~BLIND
|
|
||||||
M.eye_stat = 0
|
|
||||||
M:eye_op_stage = 0.0
|
|
||||||
|
|
||||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Surgical Drill
|
* Surgical Drill
|
||||||
*/
|
*/
|
||||||
@@ -391,232 +96,6 @@ LOOK FOR SURGERY.DM*/
|
|||||||
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
|
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
|
||||||
return (BRUTELOSS)
|
return (BRUTELOSS)
|
||||||
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
||||||
if(!istype(M))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
//if(M.mutations & HUSK) return ..()
|
|
||||||
|
|
||||||
if((CLUMSY in user.mutations) && prob(50))
|
|
||||||
M = user
|
|
||||||
return eyestab(M,user)
|
|
||||||
|
|
||||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
|
|
||||||
if(user.zone_sel.selecting == "groin")
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
switch(M:appendix_op_stage)
|
|
||||||
if(0.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is beginning to have his abdomen cut open with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to cut open your abdomen with [src]!"
|
|
||||||
user << "\red You cut [M]'s abdomen open with [src]!"
|
|
||||||
M:appendix_op_stage = 1.0
|
|
||||||
if(3.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is beginning to have his appendix seperated with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to seperate your appendix with [src]!"
|
|
||||||
user << "\red You seperate [M]'s appendix with [src]!"
|
|
||||||
M:appendix_op_stage = 4.0
|
|
||||||
return
|
|
||||||
|
|
||||||
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H) && ( \
|
|
||||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
|
||||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
|
||||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/monkey/Mo = M
|
|
||||||
if(istype(Mo) && ( \
|
|
||||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(M:brain_op_stage)
|
|
||||||
if(0.0)
|
|
||||||
if(istype(M, /mob/living/carbon/slime))
|
|
||||||
if(M.stat == 2)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M.name] is beginning to have its flesh cut open with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to cut open your flesh with [src]!"
|
|
||||||
user << "\red You cut [M]'s flesh open with [src]!"
|
|
||||||
M:brain_op_stage = 1.0
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is beginning to have his head cut open with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to cut open your head with [src]!"
|
|
||||||
user << "\red You cut [M]'s head open with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] begins to cut open his skull with [src]!", \
|
|
||||||
"\red You begin to cut open your head with [src]!" \
|
|
||||||
)
|
|
||||||
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
affecting.take_damage(7)
|
|
||||||
else
|
|
||||||
M.take_organ_damage(7)
|
|
||||||
|
|
||||||
M.updatehealth()
|
|
||||||
M:brain_op_stage = 1.0
|
|
||||||
|
|
||||||
if(1)
|
|
||||||
if(istype(M, /mob/living/carbon/slime))
|
|
||||||
if(M.stat == 2)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M.name] is having its silky innards cut apart with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to cut apart your innards with [src]!"
|
|
||||||
user << "\red You cut [M]'s silky innards apart with [src]!"
|
|
||||||
M:brain_op_stage = 2.0
|
|
||||||
return
|
|
||||||
if(2.0)
|
|
||||||
if(istype(M, /mob/living/carbon/slime))
|
|
||||||
if(M.stat == 2)
|
|
||||||
var/mob/living/carbon/slime/slime = M
|
|
||||||
if(slime.cores > 0)
|
|
||||||
if(istype(M, /mob/living/carbon/slime))
|
|
||||||
user << "\red You attempt to remove [M]'s core, but [src] is ineffective!"
|
|
||||||
return
|
|
||||||
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is having his connections to the brain delicately severed with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to cut open your head with [src]!"
|
|
||||||
user << "\red You cut [M]'s head open with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] begin to delicately remove the connections to his brain with [src]!", \
|
|
||||||
"\red You begin to cut open your head with [src]!" \
|
|
||||||
)
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You nick an artery!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(75))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(75)
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
affecting.take_damage(7)
|
|
||||||
else
|
|
||||||
M.take_organ_damage(7)
|
|
||||||
|
|
||||||
M.updatehealth()
|
|
||||||
M:brain_op_stage = 3.0
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
|
|
||||||
else if(user.zone_sel.selecting == "eyes")
|
|
||||||
user << "\blue So far so good."
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H) && ( \
|
|
||||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
|
||||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
|
||||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/monkey/Mo = M
|
|
||||||
if(istype(Mo) && ( \
|
|
||||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
|
|
||||||
user << "\red You cannot locate any eyes on this creature!"
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(M:eye_op_stage)
|
|
||||||
if(0.0)
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] is beginning to have his eyes incised with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to cut open your eyes with [src]!"
|
|
||||||
user << "\red You make an incision around [M]'s eyes with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] begins to cut around his eyes with [src]!", \
|
|
||||||
"\red You begin to cut open your eyes with [src]!" \
|
|
||||||
)
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
|
|
||||||
user << "\blue So far so good before."
|
|
||||||
M.updatehealth()
|
|
||||||
M:eye_op_stage = 1.0
|
|
||||||
user << "\blue So far so good after."
|
|
||||||
|
|
||||||
else if(user.zone_sel.selecting == "chest")
|
|
||||||
switch(M:alien_op_stage)
|
|
||||||
if(0.0)
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(!istype(H))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if(H.wear_suit || H.w_uniform)
|
|
||||||
user << "\red You're going to need to remove that suit/jumpsuit first."
|
|
||||||
return
|
|
||||||
|
|
||||||
user.visible_message("\red [user] begins to slice open [M]'s chest.", "\red You begin to slice open [M]'s chest.")
|
|
||||||
|
|
||||||
spawn(rand(20,50))
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("chest")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
|
|
||||||
M:alien_op_stage = 1.0
|
|
||||||
user << "\blue So far so good."
|
|
||||||
|
|
||||||
else
|
|
||||||
return ..()
|
|
||||||
/* wat
|
|
||||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
|
||||||
return ..()*/
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Researchable Scalpels
|
* Researchable Scalpels
|
||||||
*/
|
*/
|
||||||
@@ -667,157 +146,6 @@ LOOK FOR SURGERY.DM*/
|
|||||||
sharp = 1
|
sharp = 1
|
||||||
edge = 1
|
edge = 1
|
||||||
|
|
||||||
/*
|
|
||||||
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
|
||||||
if(!istype(M))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if((CLUMSY in user.mutations) && prob(50))
|
|
||||||
M = user
|
|
||||||
return eyestab(M,user)
|
|
||||||
|
|
||||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
|
|
||||||
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
|
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(istype(H) && ( \
|
|
||||||
(H.head && H.head.flags & HEADCOVERSEYES) || \
|
|
||||||
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
|
|
||||||
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
var/mob/living/carbon/monkey/Mo = M
|
|
||||||
if(istype(Mo) && ( \
|
|
||||||
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
|
|
||||||
))
|
|
||||||
user << "\red You're going to need to remove that mask/helmet/glasses first."
|
|
||||||
return
|
|
||||||
|
|
||||||
switch(M:brain_op_stage)
|
|
||||||
if(1.0)
|
|
||||||
if(istype(M, /mob/living/carbon/slime))
|
|
||||||
return
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] has his skull sawed open with [src] by [user].", 1)
|
|
||||||
M << "\red [user] begins to saw open your head with [src]!"
|
|
||||||
user << "\red You saw [M]'s head open with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] saws open his skull with [src]!", \
|
|
||||||
"\red You begin to saw open your head with [src]!" \
|
|
||||||
)
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
if(affecting.take_damage(40))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
M.updatehealth()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(40)
|
|
||||||
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("head")
|
|
||||||
affecting.take_damage(7)
|
|
||||||
else
|
|
||||||
M.take_organ_damage(7)
|
|
||||||
|
|
||||||
M.updatehealth()
|
|
||||||
M:brain_op_stage = 2.0
|
|
||||||
|
|
||||||
if(2.0)
|
|
||||||
if(istype(M, /mob/living/carbon/slime))
|
|
||||||
if(M.stat == 2)
|
|
||||||
var/mob/living/carbon/slime/slime = M
|
|
||||||
if(slime.cores > 0)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M.name] is having one of its cores sawed out with [src] by [user].", 1)
|
|
||||||
|
|
||||||
slime.cores--
|
|
||||||
M << "\red [user] begins to remove one of your cores with [src]! ([slime.cores] cores remaining)"
|
|
||||||
user << "\red You cut one of [M]'s cores out with [src]! ([slime.cores] cores remaining)"
|
|
||||||
|
|
||||||
new slime.coretype(M.loc)
|
|
||||||
|
|
||||||
if(slime.cores <= 0)
|
|
||||||
M.icon_state = "[slime.colour] baby slime dead-nocore"
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
if(3.0)
|
|
||||||
/*if(M.mind && M.mind.changeling)
|
|
||||||
user << "\red The neural tissue regrows before your eyes as you cut it."
|
|
||||||
return*/
|
|
||||||
|
|
||||||
if(M != user)
|
|
||||||
for(var/mob/O in (viewers(M) - user - M))
|
|
||||||
O.show_message("\red [M] has his spine's connection to the brain severed with [src] by [user].", 1)
|
|
||||||
M << "\red [user] severs your brain's connection to the spine with [src]!"
|
|
||||||
user << "\red You sever [M]'s brain's connection to the spine with [src]!"
|
|
||||||
else
|
|
||||||
user.visible_message( \
|
|
||||||
"\red [user] severs his brain's connection to the spine with [src]!", \
|
|
||||||
"\red You sever your brain's connection to the spine with [src]!" \
|
|
||||||
)
|
|
||||||
|
|
||||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
|
||||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
|
||||||
|
|
||||||
log_attack("<font color='red'>[user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
|
||||||
|
|
||||||
|
|
||||||
var/obj/item/organ/brain/B = new(M.loc)
|
|
||||||
B.transfer_identity(M)
|
|
||||||
|
|
||||||
M:brain_op_stage = 4.0
|
|
||||||
M.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
|
|
||||||
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
|
|
||||||
else if(user.zone_sel.selecting == "chest")
|
|
||||||
switch(M:alien_op_stage)
|
|
||||||
if(1.0)
|
|
||||||
var/mob/living/carbon/human/H = M
|
|
||||||
if(!istype(H))
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
if(H.wear_suit || H.w_uniform)
|
|
||||||
user << "\red You're going to need to remove that suit/jumpsuit first."
|
|
||||||
return
|
|
||||||
|
|
||||||
user.visible_message("\red [user] begins to slice through the bone of [M]'s chest.", "\red You begin to slice through the bone of [M]'s chest.")
|
|
||||||
|
|
||||||
spawn(20 + rand(0,50))
|
|
||||||
if(M == user && prob(25))
|
|
||||||
user << "\red You mess up!"
|
|
||||||
if(istype(M, /mob/living/carbon/human))
|
|
||||||
var/datum/organ/external/affecting = M:get_organ("chest")
|
|
||||||
if(affecting.take_damage(15))
|
|
||||||
M:UpdateDamageIcon()
|
|
||||||
else
|
|
||||||
M.take_organ_damage(15)
|
|
||||||
|
|
||||||
M:alien_op_stage = 2.0
|
|
||||||
user << "\blue So far so good."
|
|
||||||
|
|
||||||
else
|
|
||||||
return ..()
|
|
||||||
/*
|
|
||||||
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
|
|
||||||
return ..()
|
|
||||||
*/
|
|
||||||
return
|
|
||||||
*/
|
|
||||||
|
|
||||||
//misc, formerly from code/defines/weapons.dm
|
//misc, formerly from code/defines/weapons.dm
|
||||||
/obj/item/weapon/bonegel
|
/obj/item/weapon/bonegel
|
||||||
name = "bone gel"
|
name = "bone gel"
|
||||||
|
|||||||
@@ -1,11 +1,46 @@
|
|||||||
/obj/structure
|
/obj/structure
|
||||||
icon = 'icons/obj/structures.dmi'
|
icon = 'icons/obj/structures.dmi'
|
||||||
var/climbable
|
var/climbable
|
||||||
|
var/breakable
|
||||||
|
var/parts
|
||||||
|
|
||||||
|
/obj/structure/proc/destroy()
|
||||||
|
if(parts)
|
||||||
|
new parts(loc)
|
||||||
|
density = 0
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/obj/structure/attack_hand(mob/user)
|
||||||
|
if(breakable)
|
||||||
|
if(HULK in user.mutations)
|
||||||
|
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||||
|
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
|
||||||
|
destroy()
|
||||||
|
else if(istype(user,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(H.species.can_shred(user))
|
||||||
|
visible_message("<span class='danger'>[H] slices [src] apart!</span>")
|
||||||
|
destroy()
|
||||||
|
|
||||||
|
/obj/structure/attack_animal(mob/living/user)
|
||||||
|
if(breakable)
|
||||||
|
if(user.wall_smash)
|
||||||
|
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||||
|
destroy()
|
||||||
|
|
||||||
|
/obj/structure/attack_paw(mob/user)
|
||||||
|
if(breakable) attack_hand(user)
|
||||||
|
|
||||||
/obj/structure/blob_act()
|
/obj/structure/blob_act()
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
/obj/structure/meteorhit(obj/O as obj)
|
||||||
|
destroy(src)
|
||||||
|
|
||||||
|
/obj/structure/attack_tk()
|
||||||
|
return
|
||||||
|
|
||||||
/obj/structure/ex_act(severity)
|
/obj/structure/ex_act(severity)
|
||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
|
/obj/structure/closet/attack_animal(mob/living/user as mob)
|
||||||
if(user.wall_smash)
|
if(user.wall_smash)
|
||||||
visible_message("\red [user] destroys the [src]. ")
|
visible_message("\red [user] destroys the [src]. ")
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
|
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
|
||||||
if(isrobot(user) || isalien(user))
|
if(isrobot(user))
|
||||||
return
|
return
|
||||||
if(istype(O, /obj/item/weapon/extinguisher))
|
if(istype(O, /obj/item/weapon/extinguisher))
|
||||||
if(!has_extinguisher && opened)
|
if(!has_extinguisher && opened)
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||||
if(isrobot(user) || isalien(user))
|
if(isrobot(user))
|
||||||
return
|
return
|
||||||
if (hasorgans(user))
|
if (hasorgans(user))
|
||||||
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
||||||
|
|||||||
@@ -31,32 +31,34 @@
|
|||||||
attack_hand(user)
|
attack_hand(user)
|
||||||
|
|
||||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||||
|
|
||||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
|
||||||
|
var/damage_dealt
|
||||||
|
if(istype(user,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
if(H.species.can_shred(H))
|
||||||
|
damage_dealt = 5
|
||||||
|
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||||
|
"<span class='warning'>You mangle [src].</span>", \
|
||||||
|
"You hear twisting metal.")
|
||||||
|
|
||||||
|
if(!damage_dealt)
|
||||||
|
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||||
"<span class='warning'>You kick [src].</span>", \
|
"<span class='warning'>You kick [src].</span>", \
|
||||||
"You hear twisting metal.")
|
"You hear twisting metal.")
|
||||||
|
|
||||||
if(shock(user, 70))
|
if(shock(user, 70))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(HULK in user.mutations)
|
if(HULK in user.mutations)
|
||||||
health -= 5
|
damage_dealt += 5
|
||||||
else
|
else
|
||||||
health -= 1
|
damage_dealt += 1
|
||||||
|
|
||||||
|
health -= damage_dealt
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|
||||||
/obj/structure/grille/attack_alien(mob/user as mob)
|
|
||||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
|
||||||
|
|
||||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
|
||||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
|
||||||
"<span class='warning'>You mangle [src].</span>", \
|
|
||||||
"You hear twisting metal.")
|
|
||||||
|
|
||||||
if(!shock(user, 70))
|
|
||||||
health -= 5
|
|
||||||
healthcheck()
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/grille/attack_slime(mob/user as mob)
|
/obj/structure/grille/attack_slime(mob/user as mob)
|
||||||
var/mob/living/carbon/slime/S = user
|
var/mob/living/carbon/slime/S = user
|
||||||
if (!S.is_adult)
|
if (!S.is_adult)
|
||||||
@@ -199,6 +201,7 @@
|
|||||||
// returns 1 if shocked, 0 otherwise
|
// returns 1 if shocked, 0 otherwise
|
||||||
|
|
||||||
/obj/structure/grille/proc/shock(mob/user as mob, prb)
|
/obj/structure/grille/proc/shock(mob/user as mob, prb)
|
||||||
|
|
||||||
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
|
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
|
||||||
return 0
|
return 0
|
||||||
if(!prob(prb))
|
if(!prob(prb))
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime
|
||||||
health -= damage
|
health -= damage
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
||||||
@@ -91,10 +91,6 @@
|
|||||||
else //for nicer text~
|
else //for nicer text~
|
||||||
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
|
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
|
||||||
|
|
||||||
attack_alien(mob/user as mob)
|
|
||||||
if(islarva(user)) return
|
|
||||||
attack_generic(user, 15)
|
|
||||||
|
|
||||||
attack_animal(mob/user as mob)
|
attack_animal(mob/user as mob)
|
||||||
if(!isanimal(user)) return
|
if(!isanimal(user)) return
|
||||||
var/mob/living/simple_animal/M = user
|
var/mob/living/simple_animal/M = user
|
||||||
|
|||||||
@@ -256,7 +256,9 @@
|
|||||||
var/close_delay = 100
|
var/close_delay = 100
|
||||||
|
|
||||||
TryToSwitchState(atom/user)
|
TryToSwitchState(atom/user)
|
||||||
if(isalien(user))
|
|
||||||
|
var/mob/living/carbon/M = user
|
||||||
|
if(istype(M) && locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
Open()
|
Open()
|
||||||
|
|||||||
@@ -10,11 +10,23 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||||
|
|
||||||
if(shattered) return
|
if(shattered) return
|
||||||
|
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
|
|
||||||
|
if(H.a_intent == "hurt")
|
||||||
|
if(shattered)
|
||||||
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||||
|
return
|
||||||
|
if(prob(30) || H.species.can_shred(H))
|
||||||
|
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||||
|
shatter()
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
||||||
|
return
|
||||||
|
|
||||||
var/userloc = H.loc
|
var/userloc = H.loc
|
||||||
|
|
||||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||||
@@ -83,16 +95,6 @@
|
|||||||
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
|
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
|
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/mirror/attack_alien(mob/user as mob)
|
|
||||||
if(islarva(user)) return
|
|
||||||
if(shattered)
|
|
||||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
|
||||||
return
|
|
||||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
|
||||||
shatter()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/mirror/attack_animal(mob/user as mob)
|
/obj/structure/mirror/attack_animal(mob/user as mob)
|
||||||
if(!isanimal(user)) return
|
if(!isanimal(user)) return
|
||||||
var/mob/living/simple_animal/M = user
|
var/mob/living/simple_animal/M = user
|
||||||
|
|||||||
@@ -30,15 +30,20 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
||||||
|
|
||||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(M,/mob/living/carbon/alien))
|
unbuckle()
|
||||||
return
|
|
||||||
if(!istype(user,/mob/living/carbon/alien/humanoid))
|
var/mob/living/carbon/xenos = user
|
||||||
|
var/mob/living/carbon/victim = M
|
||||||
|
|
||||||
|
if(istype(victim) && locate(/datum/organ/internal/xenos/hivenode) in victim.internal_organs)
|
||||||
return
|
return
|
||||||
|
|
||||||
unbuckle()
|
if(istype(xenos) && !(locate(/datum/organ/internal/xenos/hivenode) in xenos.internal_organs))
|
||||||
|
return
|
||||||
|
|
||||||
if(M == usr)
|
if(M == usr)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
layer = 2.8
|
layer = 2.8
|
||||||
throwpass = 1 //You can throw objects over this, despite it's density.")
|
throwpass = 1 //You can throw objects over this, despite it's density.")
|
||||||
climbable = 1
|
climbable = 1
|
||||||
|
breakable = 1
|
||||||
|
parts = /obj/item/weapon/table_parts
|
||||||
|
|
||||||
var/parts = /obj/item/weapon/table_parts
|
|
||||||
var/flipped = 0
|
var/flipped = 0
|
||||||
var/health = 100
|
var/health = 100
|
||||||
|
|
||||||
@@ -43,16 +44,6 @@
|
|||||||
update_adjacent()
|
update_adjacent()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/structure/table/proc/destroy()
|
|
||||||
new parts(loc)
|
|
||||||
density = 0
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
/obj/structure/rack/proc/destroy()
|
|
||||||
new parts(loc)
|
|
||||||
density = 0
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
/obj/structure/table/update_icon()
|
/obj/structure/table/update_icon()
|
||||||
spawn(2) //So it properly updates when deleting
|
spawn(2) //So it properly updates when deleting
|
||||||
|
|
||||||
@@ -247,49 +238,6 @@
|
|||||||
else
|
else
|
||||||
dir = 2
|
dir = 2
|
||||||
|
|
||||||
/obj/structure/table/ex_act(severity)
|
|
||||||
switch(severity)
|
|
||||||
if(1.0)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if(2.0)
|
|
||||||
if (prob(50))
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
if(3.0)
|
|
||||||
if (prob(25))
|
|
||||||
destroy()
|
|
||||||
else
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/table/blob_act()
|
|
||||||
if(prob(75))
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
/obj/structure/table/attack_paw(mob/user)
|
|
||||||
if(HULK in user.mutations)
|
|
||||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
|
||||||
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/table/attack_alien(mob/user)
|
|
||||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
|
||||||
|
|
||||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
|
||||||
if(user.wall_smash)
|
|
||||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/table/attack_hand(mob/user)
|
|
||||||
if(HULK in user.mutations)
|
|
||||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
|
||||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -576,29 +524,9 @@
|
|||||||
flags = FPRINT
|
flags = FPRINT
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||||
var/parts = /obj/item/weapon/rack_parts
|
breakable = 1
|
||||||
|
climbable = 1
|
||||||
/obj/structure/rack/ex_act(severity)
|
parts = /obj/item/weapon/rack_parts
|
||||||
switch(severity)
|
|
||||||
if(1.0)
|
|
||||||
del(src)
|
|
||||||
if(2.0)
|
|
||||||
del(src)
|
|
||||||
if(prob(50))
|
|
||||||
new /obj/item/weapon/rack_parts(src.loc)
|
|
||||||
if(3.0)
|
|
||||||
if(prob(25))
|
|
||||||
del(src)
|
|
||||||
new /obj/item/weapon/rack_parts(src.loc)
|
|
||||||
|
|
||||||
/obj/structure/rack/blob_act()
|
|
||||||
if(prob(75))
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
else if(prob(50))
|
|
||||||
new /obj/item/weapon/rack_parts(src.loc)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||||
if(air_group || (height==0)) return 1
|
if(air_group || (height==0)) return 1
|
||||||
@@ -629,32 +557,4 @@
|
|||||||
return
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
if(W && W.loc) W.loc = src.loc
|
if(W && W.loc) W.loc = src.loc
|
||||||
return
|
|
||||||
|
|
||||||
/obj/structure/rack/meteorhit(obj/O as obj)
|
|
||||||
del(src)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/table/attack_hand(mob/user)
|
|
||||||
if(HULK in user.mutations)
|
|
||||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
|
||||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
/obj/structure/rack/attack_paw(mob/user)
|
|
||||||
if(HULK in user.mutations)
|
|
||||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
|
||||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
/obj/structure/rack/attack_alien(mob/user)
|
|
||||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
|
||||||
if(user.wall_smash)
|
|
||||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
|
||||||
destroy()
|
|
||||||
|
|
||||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
|
||||||
return
|
return
|
||||||
@@ -114,6 +114,14 @@
|
|||||||
new /obj/item/weapon/shard(loc)
|
new /obj/item/weapon/shard(loc)
|
||||||
if(reinf) new /obj/item/stack/rods(loc)
|
if(reinf) new /obj/item/stack/rods(loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
else if (istype(usr,/mob/living/carbon/human))
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/H = usr
|
||||||
|
|
||||||
|
if(H.species.can_shred(H))
|
||||||
|
attack_generic(H,25)
|
||||||
|
return
|
||||||
|
|
||||||
else if (usr.a_intent == "hurt")
|
else if (usr.a_intent == "hurt")
|
||||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||||
@@ -131,7 +139,7 @@
|
|||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime
|
||||||
health -= damage
|
health -= damage
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||||
@@ -142,11 +150,6 @@
|
|||||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/window/attack_alien(mob/user as mob)
|
|
||||||
if(islarva(user)) return
|
|
||||||
attack_generic(user, 15)
|
|
||||||
|
|
||||||
/obj/structure/window/attack_animal(mob/user as mob)
|
/obj/structure/window/attack_animal(mob/user as mob)
|
||||||
if(!isanimal(user)) return
|
if(!isanimal(user)) return
|
||||||
var/mob/living/simple_animal/M = user
|
var/mob/living/simple_animal/M = user
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
|
|
||||||
/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
|
/turf/simulated/wall/attack_animal(mob/living/M as mob)
|
||||||
if(M.wall_smash)
|
if(M.wall_smash)
|
||||||
if (istype(src, /turf/simulated/wall/r_wall) && !rotting)
|
if (istype(src, /turf/simulated/wall/r_wall) && !rotting)
|
||||||
M << text("\blue This wall is far too strong for you to destroy.")
|
M << text("\blue This wall is far too strong for you to destroy.")
|
||||||
|
|||||||
@@ -191,27 +191,6 @@
|
|||||||
else
|
else
|
||||||
src << "Aborting suicide attempt."
|
src << "Aborting suicide attempt."
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/verb/suicide()
|
|
||||||
set hidden = 1
|
|
||||||
|
|
||||||
if (stat == 2)
|
|
||||||
src << "You're already dead!"
|
|
||||||
return
|
|
||||||
|
|
||||||
if (suiciding)
|
|
||||||
src << "You're already committing suicide! Be patient!"
|
|
||||||
return
|
|
||||||
|
|
||||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
|
||||||
|
|
||||||
if(confirm == "Yes")
|
|
||||||
suiciding = 1
|
|
||||||
viewers(src) << "\red <b>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</b>"
|
|
||||||
//put em at -175
|
|
||||||
adjustOxyLoss(max(175 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/slime/verb/suicide()
|
/mob/living/carbon/slime/verb/suicide()
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
if (stat == 2)
|
if (stat == 2)
|
||||||
|
|||||||
@@ -141,10 +141,6 @@ var/global/floorIsLava = 0
|
|||||||
body += {"<br><br>
|
body += {"<br><br>
|
||||||
<b>Rudimentary transformation:</b><font size=2><br>These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.</font><br>
|
<b>Rudimentary transformation:</b><font size=2><br>These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.</font><br>
|
||||||
<A href='?src=\ref[src];simplemake=observer;mob=\ref[M]'>Observer</A> |
|
<A href='?src=\ref[src];simplemake=observer;mob=\ref[M]'>Observer</A> |
|
||||||
\[ Alien: <A href='?src=\ref[src];simplemake=drone;mob=\ref[M]'>Drone</A>,
|
|
||||||
<A href='?src=\ref[src];simplemake=hunter;mob=\ref[M]'>Hunter</A>,
|
|
||||||
<A href='?src=\ref[src];simplemake=queen;mob=\ref[M]'>Queen</A>,
|
|
||||||
<A href='?src=\ref[src];simplemake=sentinel;mob=\ref[M]'>Sentinel</A>,
|
|
||||||
<A href='?src=\ref[src];simplemake=larva;mob=\ref[M]'>Larva</A> \]
|
<A href='?src=\ref[src];simplemake=larva;mob=\ref[M]'>Larva</A> \]
|
||||||
<A href='?src=\ref[src];simplemake=human;mob=\ref[M]'>Human</A>
|
<A href='?src=\ref[src];simplemake=human;mob=\ref[M]'>Human</A>
|
||||||
\[ slime: <A href='?src=\ref[src];simplemake=slime;mob=\ref[M]'>Baby</A>,
|
\[ slime: <A href='?src=\ref[src];simplemake=slime;mob=\ref[M]'>Baby</A>,
|
||||||
|
|||||||
@@ -233,11 +233,8 @@
|
|||||||
M_job = "slime"
|
M_job = "slime"
|
||||||
else if(ismonkey(M))
|
else if(ismonkey(M))
|
||||||
M_job = "Monkey"
|
M_job = "Monkey"
|
||||||
else if(isalien(M)) //aliens
|
else if(isalien(M))
|
||||||
if(islarva(M))
|
M_job = "Alien"
|
||||||
M_job = "Alien larva"
|
|
||||||
else
|
|
||||||
M_job = "Alien"
|
|
||||||
else
|
else
|
||||||
M_job = "Carbon-based"
|
M_job = "Carbon-based"
|
||||||
|
|
||||||
|
|||||||
@@ -284,10 +284,6 @@
|
|||||||
|
|
||||||
switch(href_list["simplemake"])
|
switch(href_list["simplemake"])
|
||||||
if("observer") M.change_mob_type( /mob/dead/observer , null, null, delmob )
|
if("observer") M.change_mob_type( /mob/dead/observer , null, null, delmob )
|
||||||
if("drone") M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob )
|
|
||||||
if("hunter") M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob )
|
|
||||||
if("queen") M.change_mob_type( /mob/living/carbon/alien/humanoid/queen , null, null, delmob )
|
|
||||||
if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
|
|
||||||
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
|
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
|
||||||
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
|
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
|
||||||
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
|
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob )
|
||||||
@@ -2205,11 +2201,6 @@
|
|||||||
if(aliens_allowed)
|
if(aliens_allowed)
|
||||||
new /datum/event/alien_infestation
|
new /datum/event/alien_infestation
|
||||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||||
if("alien_silent") //replaces the spawn_xeno verb
|
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
|
||||||
feedback_add_details("admin_secrets_fun_used","ALS")
|
|
||||||
if(aliens_allowed)
|
|
||||||
create_xeno()
|
|
||||||
if("spiders")
|
if("spiders")
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
feedback_inc("admin_secrets_fun_used",1)
|
||||||
feedback_add_details("admin_secrets_fun_used","SL")
|
feedback_add_details("admin_secrets_fun_used","SL")
|
||||||
|
|||||||
@@ -225,38 +225,6 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
|||||||
IonStorm(0)
|
IonStorm(0)
|
||||||
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
|
|
||||||
//I use this proc for respawn character too. /N
|
|
||||||
/proc/create_xeno(ckey)
|
|
||||||
if(!ckey)
|
|
||||||
var/list/candidates = list()
|
|
||||||
for(var/mob/M in player_list)
|
|
||||||
if(M.stat != DEAD) continue //we are not dead!
|
|
||||||
if(!M.client.prefs.be_special & BE_ALIEN) continue //we don't want to be an alium
|
|
||||||
if(M.client.is_afk()) continue //we are afk
|
|
||||||
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
|
|
||||||
candidates += M.ckey
|
|
||||||
if(candidates.len)
|
|
||||||
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
|
|
||||||
else
|
|
||||||
usr << "<font color='red'>Error: create_xeno(): no suitable candidates.</font>"
|
|
||||||
if(!istext(ckey)) return 0
|
|
||||||
|
|
||||||
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Hunter","Sentinel","Drone","Larva")
|
|
||||||
var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
|
|
||||||
var/mob/living/carbon/alien/new_xeno
|
|
||||||
switch(alien_caste)
|
|
||||||
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(spawn_here)
|
|
||||||
if("Hunter") new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
|
|
||||||
if("Sentinel") new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
|
|
||||||
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
|
|
||||||
if("Larva") new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
|
|
||||||
else return 0
|
|
||||||
|
|
||||||
new_xeno.ckey = ckey
|
|
||||||
message_admins("\blue [key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].", 1)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Allow admins to set players to be able to respawn/bypass 30 min wait, without the admin having to edit variables directly
|
Allow admins to set players to be able to respawn/bypass 30 min wait, without the admin having to edit variables directly
|
||||||
Ccomp's first proc.
|
Ccomp's first proc.
|
||||||
@@ -376,9 +344,6 @@ Ccomp's first proc.
|
|||||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||||
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
|
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
||||||
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
|
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
|
||||||
@@ -406,32 +371,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
||||||
//Check if they were an alien
|
|
||||||
if(G_found.mind.assigned_role=="Alien")
|
|
||||||
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
|
||||||
var/turf/T
|
|
||||||
if(xeno_spawn.len) T = pick(xeno_spawn)
|
|
||||||
else T = pick(latejoin)
|
|
||||||
|
|
||||||
var/mob/living/carbon/alien/new_xeno
|
|
||||||
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
|
|
||||||
if("Hunter") new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T)
|
|
||||||
if("Sentinel") new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T)
|
|
||||||
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
|
|
||||||
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(T)
|
|
||||||
else//If we don't know what special role they have, for whatever reason, or they're a larva.
|
|
||||||
create_xeno(G_found.ckey)
|
|
||||||
return
|
|
||||||
|
|
||||||
//Now to give them their mind back.
|
|
||||||
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
||||||
new_xeno.key = G_found.key
|
|
||||||
new_xeno << "You have been fully respawned. Enjoy the game."
|
|
||||||
message_admins("\blue [key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.", 1)
|
|
||||||
return //all done. The ghost is auto-deleted
|
|
||||||
|
|
||||||
//check if they were a monkey
|
//check if they were a monkey
|
||||||
else if(findtext(G_found.real_name,"monkey"))
|
if(findtext(G_found.real_name,"monkey"))
|
||||||
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
||||||
var/mob/living/carbon/monkey/new_monkey = new(pick(latejoin))
|
var/mob/living/carbon/monkey/new_monkey = new(pick(latejoin))
|
||||||
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||||
@@ -440,8 +382,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
message_admins("\blue [key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.", 1)
|
message_admins("\blue [key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.", 1)
|
||||||
return //all done. The ghost is auto-deleted
|
return //all done. The ghost is auto-deleted
|
||||||
|
|
||||||
|
//Ok, it's not a monkey. So, spawn a human.
|
||||||
//Ok, it's not a xeno or a monkey. So, spawn a human.
|
|
||||||
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
|
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
|
||||||
|
|
||||||
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
|
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
|
||||||
|
|||||||
@@ -1580,6 +1580,9 @@ datum/preferences
|
|||||||
var/datum/organ/internal/I = character.internal_organs_by_name[name]
|
var/datum/organ/internal/I = character.internal_organs_by_name[name]
|
||||||
var/status = organ_data[name]
|
var/status = organ_data[name]
|
||||||
|
|
||||||
|
if(!I || !O)
|
||||||
|
continue
|
||||||
|
|
||||||
if(status == "amputated")
|
if(status == "amputated")
|
||||||
O.amputated = 1
|
O.amputated = 1
|
||||||
O.status |= ORGAN_DESTROYED
|
O.status |= ORGAN_DESTROYED
|
||||||
|
|||||||
@@ -1499,7 +1499,7 @@ proc/populate_seed_list()
|
|||||||
seed_noun = "nodes"
|
seed_noun = "nodes"
|
||||||
display_name = "replicant pods"
|
display_name = "replicant pods"
|
||||||
packet_icon = "seed-replicapod"
|
packet_icon = "seed-replicapod"
|
||||||
products = list(/mob/living/carbon/monkey/diona)
|
products = list(/mob/living/carbon/alien/diona)
|
||||||
plant_icon = "replicapod"
|
plant_icon = "replicapod"
|
||||||
product_requires_player = 1
|
product_requires_player = 1
|
||||||
immutable = 1
|
immutable = 1
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
|
host << "\green <B>You awaken slowly, stirring into sluggish motion as the air caresses you.</B>"
|
||||||
|
|
||||||
// This is a hack, replace with some kind of species blurb proc.
|
// This is a hack, replace with some kind of species blurb proc.
|
||||||
if(istype(host,/mob/living/carbon/monkey/diona))
|
if(istype(host,/mob/living/carbon/alien/diona))
|
||||||
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
|
host << "<B>You are [host], one of a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders.</B>"
|
||||||
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
|
host << "<B>Too much darkness will send you into shock and starve you, but light will help you heal.</B>"
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
Creature-level abilities.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/var/global/list/ability_verbs = list( )
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
Example ability:
|
|
||||||
|
|
||||||
/client/proc/test_ability()
|
|
||||||
|
|
||||||
set category = "Ability"
|
|
||||||
set name = "Test ability"
|
|
||||||
set desc = "An ability for testing."
|
|
||||||
|
|
||||||
// Check if the client has a mob and if the mob is valid and alive.
|
|
||||||
if(!mob || !istype(mob,/mob/living) || mob.stat)
|
|
||||||
src << "\red You must be corporeal and alive to do that."
|
|
||||||
return 0
|
|
||||||
|
|
||||||
//Handcuff check.
|
|
||||||
if(mob.restrained())
|
|
||||||
src << "\red You cannot do this while restrained."
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if(istype(mob,/mob/living/carbon))
|
|
||||||
var/mob/living/carbon/M = mob
|
|
||||||
if(M.handcuffed)
|
|
||||||
src << "\red You cannot do this while cuffed."
|
|
||||||
return 0
|
|
||||||
|
|
||||||
src << "\blue You perform an ability."
|
|
||||||
|
|
||||||
*/
|
|
||||||
@@ -56,6 +56,8 @@
|
|||||||
|
|
||||||
timeofdeath = world.time
|
timeofdeath = world.time
|
||||||
|
|
||||||
|
var/tod = worldtime2text() //weasellos time of death patch
|
||||||
|
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||||
living_mob_list -= src
|
living_mob_list -= src
|
||||||
dead_mob_list += src
|
dead_mob_list += src
|
||||||
return ..(gibbed)
|
return ..(gibbed)
|
||||||
|
|||||||
@@ -12,6 +12,23 @@
|
|||||||
var/flags = 0 // Various language flags.
|
var/flags = 0 // Various language flags.
|
||||||
var/native // If set, non-native speakers will have trouble speaking.
|
var/native // If set, non-native speakers will have trouble speaking.
|
||||||
|
|
||||||
|
/datum/language/proc/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
|
||||||
|
|
||||||
|
log_say("[key_name(speaker)] : ([name]) [message]")
|
||||||
|
|
||||||
|
for(var/mob/player in player_list)
|
||||||
|
|
||||||
|
var/understood = 0
|
||||||
|
|
||||||
|
if(istype(player,/mob/dead))
|
||||||
|
understood = 1
|
||||||
|
else if(src in player.languages)
|
||||||
|
understood = 1
|
||||||
|
|
||||||
|
if(understood)
|
||||||
|
if(!speaker_mask) speaker_mask = speaker.name
|
||||||
|
player << "<i><span class='game say'>[name], <span class='name'>[speaker_mask]</span> <span class='message'>[speech_verb], \"<span class='[colour]'>[message]</span><span class='message'>\"</span></span></i>"
|
||||||
|
|
||||||
/datum/language/unathi
|
/datum/language/unathi
|
||||||
name = "Sinta'unathi"
|
name = "Sinta'unathi"
|
||||||
desc = "The common language of Moghes, composed of sibilant hisses and rattles. Spoken natively by Unathi."
|
desc = "The common language of Moghes, composed of sibilant hisses and rattles. Spoken natively by Unathi."
|
||||||
@@ -74,6 +91,105 @@
|
|||||||
colour = "rough"
|
colour = "rough"
|
||||||
key = "3"
|
key = "3"
|
||||||
|
|
||||||
|
/datum/language/xenos
|
||||||
|
name = "Hivemind"
|
||||||
|
desc = "Xenomorphs have the strange ability to commune over a psychic hivemind."
|
||||||
|
speech_verb = "hisses"
|
||||||
|
colour = "alien"
|
||||||
|
key = "a"
|
||||||
|
flags = RESTRICTED | HIVEMIND
|
||||||
|
|
||||||
|
/datum/language/ling
|
||||||
|
name = "Changeling"
|
||||||
|
desc = "Although they are normally wary and suspicious of each other, changelings can commune over a distance."
|
||||||
|
speech_verb = "says"
|
||||||
|
colour = "changeling"
|
||||||
|
key = "g"
|
||||||
|
flags = RESTRICTED | HIVEMIND
|
||||||
|
|
||||||
|
/datum/language/ling/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
|
||||||
|
|
||||||
|
if(speaker.mind && speaker.mind.changeling)
|
||||||
|
..(speaker,message,speaker.mind.changeling.changelingID)
|
||||||
|
else
|
||||||
|
..(speaker,message)
|
||||||
|
|
||||||
|
/datum/language/corticalborer
|
||||||
|
name = "Cortical Link"
|
||||||
|
desc = "Cortical borers possess a strange between their tiny minds."
|
||||||
|
speech_verb = "sings"
|
||||||
|
colour = "alien"
|
||||||
|
key = "x"
|
||||||
|
flags = RESTRICTED | HIVEMIND
|
||||||
|
|
||||||
|
/datum/language/corticalborer/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
|
||||||
|
|
||||||
|
var/mob/living/simple_animal/borer/B
|
||||||
|
|
||||||
|
if(istype(speaker,/mob/living/carbon))
|
||||||
|
var/mob/living/carbon/M = speaker
|
||||||
|
B = M.has_brain_worms()
|
||||||
|
else if(istype(speaker,/mob/living/simple_animal/borer))
|
||||||
|
B = speaker
|
||||||
|
|
||||||
|
if(B)
|
||||||
|
speaker_mask = B.truename
|
||||||
|
..(speaker,message,speaker_mask)
|
||||||
|
|
||||||
|
/datum/language/binary
|
||||||
|
name = "Robot Talk"
|
||||||
|
desc = "Most human stations support free-use communications protocols and routing hubs for synthetic use."
|
||||||
|
speech_verb = "transmits"
|
||||||
|
colour = "say_quote"
|
||||||
|
key = "b"
|
||||||
|
flags = RESTRICTED | HIVEMIND
|
||||||
|
var/drone_only
|
||||||
|
|
||||||
|
/datum/language/binary/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
|
||||||
|
|
||||||
|
if(!speaker.binarycheck())
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!message)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/message_start = "<i><span class='game say'>[name], <span class='name'>[speaker.name]</span>"
|
||||||
|
var/message_body = "<span class='message'>[speaker.say_quote(message)], \"[message]\"</span></span></i>"
|
||||||
|
|
||||||
|
for (var/mob/M in dead_mob_list)
|
||||||
|
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
||||||
|
M.show_message("[message_start] [message_body]", 2)
|
||||||
|
|
||||||
|
world << "Got through checks, transmitting."
|
||||||
|
|
||||||
|
for (var/mob/living/S in living_mob_list)
|
||||||
|
|
||||||
|
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
|
||||||
|
continue
|
||||||
|
else if(istype(S , /mob/living/silicon/ai))
|
||||||
|
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src];trackname=[html_encode(speaker.name)]'><span class='name'>[speaker.name]</span></a>"
|
||||||
|
else if (!S.binarycheck())
|
||||||
|
continue
|
||||||
|
|
||||||
|
S.show_message("[message_start] [message_body]", 2)
|
||||||
|
|
||||||
|
var/list/listening = hearers(1, src)
|
||||||
|
listening -= src
|
||||||
|
|
||||||
|
for (var/mob/living/M in listening)
|
||||||
|
if(istype(M, /mob/living/silicon) || M.binarycheck())
|
||||||
|
continue
|
||||||
|
M.show_message("<i><span class='game say'><span class='name'>synthesised voice</span> <span class='message'>beeps, \"beep beep beep\"</span></span></i>",2)
|
||||||
|
|
||||||
|
/datum/language/binary/drone
|
||||||
|
name = "Drone Talk"
|
||||||
|
desc = "A heavily encoded damage control coordination stream."
|
||||||
|
speech_verb = "transmits"
|
||||||
|
colour = "say_quote"
|
||||||
|
key = "d"
|
||||||
|
flags = RESTRICTED | HIVEMIND
|
||||||
|
drone_only = 1
|
||||||
|
|
||||||
// Language handling.
|
// Language handling.
|
||||||
/mob/proc/add_language(var/language)
|
/mob/proc/add_language(var/language)
|
||||||
|
|
||||||
|
|||||||
@@ -1,210 +1,90 @@
|
|||||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
|
||||||
#define HEAT_DAMAGE_LEVEL_2 4 //Amount of damage applied when your body temperature passes the 400K point
|
|
||||||
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 1000K point
|
|
||||||
|
|
||||||
/mob/living/carbon/alien
|
/mob/living/carbon/alien
|
||||||
|
|
||||||
name = "alien"
|
name = "alien"
|
||||||
voice_name = "alien"
|
desc = "What IS that?"
|
||||||
speak_emote = list("hisses")
|
|
||||||
icon = 'icons/mob/alien.dmi'
|
icon = 'icons/mob/alien.dmi'
|
||||||
|
icon_state = "alien"
|
||||||
|
pass_flags = PASSTABLE
|
||||||
|
melee_damage_lower = 1
|
||||||
|
melee_damage_upper = 3
|
||||||
|
attacktext = "bites"
|
||||||
|
attack_sound = null
|
||||||
|
friendly = "nuzzles"
|
||||||
|
wall_smash = 0
|
||||||
|
|
||||||
|
var/adult_form
|
||||||
|
var/dead_icon
|
||||||
|
var/amount_grown = 0
|
||||||
|
var/max_grown = 10
|
||||||
|
var/time_of_birth
|
||||||
|
var/co2overloadtime = null
|
||||||
|
var/temperature_resistance = T0C+75
|
||||||
|
var/language
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/New()
|
||||||
|
|
||||||
|
verbs += /mob/living/proc/ventcrawl
|
||||||
|
verbs += /mob/living/proc/hide
|
||||||
|
|
||||||
|
var/datum/reagents/R = new/datum/reagents(100)
|
||||||
|
reagents = R
|
||||||
|
R.my_atom = src
|
||||||
|
|
||||||
|
name = "[initial(name)] ([rand(1, 1000)])"
|
||||||
|
real_name = name
|
||||||
|
regenerate_icons()
|
||||||
|
|
||||||
|
if(language)
|
||||||
|
add_language(language)
|
||||||
|
|
||||||
gender = NEUTER
|
gender = NEUTER
|
||||||
dna = null
|
|
||||||
|
|
||||||
var/storedPlasma = 250
|
|
||||||
var/max_plasma = 500
|
|
||||||
|
|
||||||
alien_talk_understand = 1
|
|
||||||
|
|
||||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
|
||||||
var/has_fine_manipulation = 0
|
|
||||||
|
|
||||||
var/move_delay_add = 0 // movement delay to add
|
|
||||||
|
|
||||||
status_flags = CANPARALYSE|CANPUSH
|
|
||||||
var/heal_rate = 1
|
|
||||||
var/plasma_rate = 5
|
|
||||||
|
|
||||||
var/oxygen_alert = 0
|
|
||||||
var/phoron_alert = 0
|
|
||||||
var/fire_alert = 0
|
|
||||||
|
|
||||||
var/heat_protection = 0.5
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/adjustToxLoss(amount)
|
|
||||||
storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire
|
|
||||||
if(amount > 0)
|
|
||||||
..(amount * 2)
|
|
||||||
else
|
|
||||||
..(amount)
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/proc/getPlasma()
|
|
||||||
return storedPlasma
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/eyecheck()
|
|
||||||
return 2
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/updatehealth()
|
|
||||||
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()
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/proc/handle_environment(var/datum/gas_mixture/environment)
|
|
||||||
|
|
||||||
//If there are alien weeds on the ground then heal if needed or give some plasma
|
|
||||||
if(locate(/obj/effect/alien/weeds) in loc)
|
|
||||||
if(health >= maxHealth - getCloneLoss())
|
|
||||||
adjustToxLoss(plasma_rate)
|
|
||||||
else
|
|
||||||
adjustBruteLoss(-heal_rate)
|
|
||||||
adjustFireLoss(-heal_rate)
|
|
||||||
adjustOxyLoss(-heal_rate)
|
|
||||||
|
|
||||||
if(!environment)
|
|
||||||
return
|
|
||||||
var/loc_temp = T0C
|
|
||||||
if(istype(loc, /obj/mecha))
|
|
||||||
var/obj/mecha/M = loc
|
|
||||||
loc_temp = M.return_temperature()
|
|
||||||
else if(istype(get_turf(src), /turf/space))
|
|
||||||
var/turf/heat_turf = get_turf(src)
|
|
||||||
loc_temp = heat_turf.temperature
|
|
||||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
|
||||||
loc_temp = loc:air_contents.temperature
|
|
||||||
else
|
|
||||||
loc_temp = environment.temperature
|
|
||||||
|
|
||||||
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Fire protection: [heat_protection] - Location: [loc] - src: [src]"
|
|
||||||
|
|
||||||
// Aliens are now weak to fire.
|
|
||||||
|
|
||||||
//After then, it reacts to the surrounding atmosphere based on your thermal protection
|
|
||||||
if(loc_temp > bodytemperature)
|
|
||||||
//Place is hotter than we are
|
|
||||||
var/thermal_protection = heat_protection //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
|
||||||
if(thermal_protection < 1)
|
|
||||||
bodytemperature += (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
|
||||||
else
|
|
||||||
bodytemperature += 1 * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
|
||||||
// bodytemperature -= max((loc_temp - bodytemperature / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
|
||||||
|
|
||||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
|
||||||
if(bodytemperature > 360.15)
|
|
||||||
//Body temperature is too hot.
|
|
||||||
fire_alert = max(fire_alert, 1)
|
|
||||||
switch(bodytemperature)
|
|
||||||
if(360 to 400)
|
|
||||||
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
|
|
||||||
fire_alert = max(fire_alert, 2)
|
|
||||||
if(400 to 1000)
|
|
||||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
|
||||||
fire_alert = max(fire_alert, 2)
|
|
||||||
if(1000 to INFINITY)
|
|
||||||
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
|
|
||||||
fire_alert = max(fire_alert, 2)
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
|
|
||||||
|
|
||||||
if(getFireLoss())
|
|
||||||
if((COLD_RESISTANCE in mutations) || prob(5))
|
|
||||||
adjustFireLoss(-1)
|
|
||||||
|
|
||||||
// Aliens love radiation nom nom nom
|
|
||||||
if (radiation)
|
|
||||||
if (radiation > 100)
|
|
||||||
radiation = 100
|
|
||||||
|
|
||||||
if (radiation < 0)
|
|
||||||
radiation = 0
|
|
||||||
|
|
||||||
switch(radiation)
|
|
||||||
if(1 to 49)
|
|
||||||
radiation--
|
|
||||||
if(prob(25))
|
|
||||||
adjustToxLoss(1)
|
|
||||||
|
|
||||||
if(50 to 74)
|
|
||||||
radiation -= 2
|
|
||||||
adjustToxLoss(1)
|
|
||||||
if(prob(5))
|
|
||||||
radiation -= 5
|
|
||||||
|
|
||||||
if(75 to 100)
|
|
||||||
radiation -= 3
|
|
||||||
adjustToxLoss(3)
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/IsAdvancedToolUser()
|
|
||||||
return has_fine_manipulation
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/Process_Spaceslipping()
|
|
||||||
return 0 // Don't slip in space.
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/Stat()
|
|
||||||
|
|
||||||
statpanel("Status")
|
|
||||||
stat(null, "Intent: [a_intent]")
|
|
||||||
stat(null, "Move Mode: [m_intent]")
|
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
if (client.statpanel == "Status")
|
/mob/living/carbon/alien/u_equip(obj/item/W as obj)
|
||||||
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
|
|
||||||
|
|
||||||
if(emergency_shuttle)
|
|
||||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
|
||||||
if(eta_status)
|
|
||||||
stat(null, eta_status)
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/Stun(amount)
|
|
||||||
if(status_flags & CANSTUN)
|
|
||||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
|
||||||
else
|
|
||||||
// add some movement delay
|
|
||||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/carbon/alien/getDNA()
|
//This is fine, works the same as a human
|
||||||
return null
|
/mob/living/carbon/alien/Bump(atom/movable/AM as mob|obj, yes)
|
||||||
|
|
||||||
/mob/living/carbon/alien/setDNA()
|
spawn( 0 )
|
||||||
|
if ((!( yes ) || now_pushing))
|
||||||
|
return
|
||||||
|
now_pushing = 1
|
||||||
|
if(ismob(AM))
|
||||||
|
var/mob/tmob = AM
|
||||||
|
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||||
|
if(prob(70))
|
||||||
|
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||||
|
now_pushing = 0
|
||||||
|
return
|
||||||
|
if(!(tmob.status_flags & CANPUSH))
|
||||||
|
now_pushing = 0
|
||||||
|
return
|
||||||
|
tmob.LAssailant = src
|
||||||
|
|
||||||
|
now_pushing = 0
|
||||||
|
..()
|
||||||
|
if (!( istype(AM, /atom/movable) ))
|
||||||
|
return
|
||||||
|
if (!( now_pushing ))
|
||||||
|
now_pushing = 1
|
||||||
|
if (!( AM.anchored ))
|
||||||
|
var/t = get_dir(src, AM)
|
||||||
|
step(AM, t)
|
||||||
|
now_pushing = null
|
||||||
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
/*----------------------------------------
|
/mob/living/carbon/alien/Stat()
|
||||||
Proc: AddInfectionImages()
|
..()
|
||||||
Des: Gives the client of the alien an image on each infected mob.
|
stat(null, "Progress: [amount_grown]/[max_grown]")
|
||||||
----------------------------------------*/
|
|
||||||
/mob/living/carbon/alien/proc/AddInfectionImages()
|
|
||||||
if (client)
|
|
||||||
for (var/mob/living/C in mob_list)
|
|
||||||
if(C.status_flags & XENO_HOST)
|
|
||||||
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
|
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/restrained()
|
||||||
/*----------------------------------------
|
|
||||||
Proc: RemoveInfectionImages()
|
|
||||||
Des: Removes all infected images from the alien.
|
|
||||||
----------------------------------------*/
|
|
||||||
/mob/living/carbon/alien/proc/RemoveInfectionImages()
|
|
||||||
if (client)
|
|
||||||
for(var/image/I in client.images)
|
|
||||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
|
||||||
del(I)
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/has_eyes()
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
#undef HEAT_DAMAGE_LEVEL_1
|
/mob/living/carbon/alien/show_inv(mob/user as mob)
|
||||||
#undef HEAT_DAMAGE_LEVEL_2
|
return //Consider adding cuffs and hats to this, for the sake of fun.
|
||||||
#undef HEAT_DAMAGE_LEVEL_3
|
|
||||||
|
/mob/living/carbon/alien/can_use_vents()
|
||||||
|
return
|
||||||
183
code/modules/mob/living/carbon/alien/alien_attacks.dm
Normal file
183
code/modules/mob/living/carbon/alien/alien_attacks.dm
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
//There has to be a better way to define this shit. ~ Z
|
||||||
|
//can't equip anything
|
||||||
|
/mob/living/carbon/alien/attack_ui(slot_id)
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/meteorhit(O as obj)
|
||||||
|
for(var/mob/M in viewers(src, null))
|
||||||
|
if ((M.client && !( M.blinded )))
|
||||||
|
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||||
|
if (health > 0)
|
||||||
|
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||||
|
adjustFireLoss(30)
|
||||||
|
|
||||||
|
updatehealth()
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/attack_animal(mob/living/M as mob)
|
||||||
|
|
||||||
|
if(istype(M,/mob/living/simple_animal))
|
||||||
|
var/mob/living/simple_animal/S = M
|
||||||
|
if(S.melee_damage_upper == 0)
|
||||||
|
S.emote("[S.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[S]</B> [S.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(S.melee_damage_lower, S.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
S.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 [S.name] ([S.ckey])</font>")
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/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/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/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
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||||
|
var/obj/item/clothing/gloves/G = M.gloves
|
||||||
|
if(G.cell)
|
||||||
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||||
|
if(G.cell.charge >= 2500)
|
||||||
|
G.cell.use(2500)
|
||||||
|
|
||||||
|
Weaken(5)
|
||||||
|
if (stuttering < 5)
|
||||||
|
stuttering = 5
|
||||||
|
Stun(5)
|
||||||
|
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
if ((O.client && !( O.blinded )))
|
||||||
|
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
M << "\red Not enough charge! "
|
||||||
|
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, 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)
|
||||||
|
|
||||||
|
else
|
||||||
|
var/damage = rand(1, 9)
|
||||||
|
if (prob(90))
|
||||||
|
if (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
|
||||||
56
code/modules/mob/living/carbon/alien/alien_damage.dm
Normal file
56
code/modules/mob/living/carbon/alien/alien_damage.dm
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/mob/living/carbon/alien/ex_act(severity)
|
||||||
|
|
||||||
|
if(!blinded)
|
||||||
|
flick("flash", flash)
|
||||||
|
|
||||||
|
var/b_loss = null
|
||||||
|
var/f_loss = null
|
||||||
|
switch (severity)
|
||||||
|
if (1.0)
|
||||||
|
b_loss += 500
|
||||||
|
gib()
|
||||||
|
return
|
||||||
|
|
||||||
|
if (2.0)
|
||||||
|
|
||||||
|
b_loss += 60
|
||||||
|
|
||||||
|
f_loss += 60
|
||||||
|
|
||||||
|
ear_damage += 30
|
||||||
|
ear_deaf += 120
|
||||||
|
|
||||||
|
if(3.0)
|
||||||
|
b_loss += 30
|
||||||
|
if (prob(50))
|
||||||
|
Paralyse(1)
|
||||||
|
ear_damage += 15
|
||||||
|
ear_deaf += 60
|
||||||
|
|
||||||
|
adjustBruteLoss(b_loss)
|
||||||
|
adjustFireLoss(f_loss)
|
||||||
|
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/blob_act()
|
||||||
|
if (stat == 2)
|
||||||
|
return
|
||||||
|
var/shielded = 0
|
||||||
|
|
||||||
|
var/damage = null
|
||||||
|
if (stat != 2)
|
||||||
|
damage = rand(10,30)
|
||||||
|
|
||||||
|
if(shielded)
|
||||||
|
damage /= 4
|
||||||
|
|
||||||
|
//paralysis += 1
|
||||||
|
|
||||||
|
show_message("\red The blob attacks you!")
|
||||||
|
|
||||||
|
adjustFireLoss(damage)
|
||||||
|
|
||||||
|
updatehealth()
|
||||||
|
return
|
||||||
@@ -1,41 +1,13 @@
|
|||||||
/mob/living/carbon/alien/gib()
|
/mob/living/carbon/alien/death(gibbed)
|
||||||
death(1)
|
|
||||||
var/atom/movable/overlay/animation = null
|
|
||||||
monkeyizing = 1
|
|
||||||
canmove = 0
|
|
||||||
icon = null
|
|
||||||
invisibility = 101
|
|
||||||
|
|
||||||
animation = new(loc)
|
if(stat == DEAD) return
|
||||||
animation.icon_state = "blank"
|
if(healths) healths.icon_state = "health6"
|
||||||
animation.icon = 'icons/mob/mob.dmi'
|
stat = DEAD
|
||||||
animation.master = src
|
|
||||||
|
|
||||||
flick("gibbed-a", animation)
|
if(dead_icon) icon_state = dead_icon
|
||||||
xgibs(loc, viruses)
|
|
||||||
dead_mob_list -= src
|
|
||||||
|
|
||||||
spawn(15)
|
if(!gibbed)
|
||||||
if(animation) del(animation)
|
update_canmove()
|
||||||
if(src) del(src)
|
if(client) blind.layer = 0
|
||||||
|
|
||||||
/mob/living/carbon/alien/dust()
|
return ..(gibbed)
|
||||||
death(1)
|
|
||||||
var/atom/movable/overlay/animation = null
|
|
||||||
monkeyizing = 1
|
|
||||||
canmove = 0
|
|
||||||
icon = null
|
|
||||||
invisibility = 101
|
|
||||||
|
|
||||||
animation = new(loc)
|
|
||||||
animation.icon_state = "blank"
|
|
||||||
animation.icon = 'icons/mob/mob.dmi'
|
|
||||||
animation.master = src
|
|
||||||
|
|
||||||
flick("dust-a", animation)
|
|
||||||
new /obj/effect/decal/remains/xeno(loc)
|
|
||||||
dead_mob_list -= src
|
|
||||||
|
|
||||||
spawn(15)
|
|
||||||
if(animation) del(animation)
|
|
||||||
if(src) del(src)
|
|
||||||
25
code/modules/mob/living/carbon/alien/diona/diona.dm
Normal file
25
code/modules/mob/living/carbon/alien/diona/diona.dm
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/mob/living/carbon/alien/diona
|
||||||
|
name = "diona nymph"
|
||||||
|
voice_name = "diona nymph"
|
||||||
|
adult_form = /mob/living/carbon/human
|
||||||
|
speak_emote = list("chirrups")
|
||||||
|
icon_state = "nymph"
|
||||||
|
language = "Rootspeak"
|
||||||
|
|
||||||
|
amount_grown = 0
|
||||||
|
max_grown = 5 // Target number of donors.
|
||||||
|
|
||||||
|
var/list/donors = list()
|
||||||
|
var/last_checked_stage = 0
|
||||||
|
|
||||||
|
universal_understand = 0 // Dionaea do not need to speak to people
|
||||||
|
universal_speak = 0 // before becoming an adult. Use *chirp.
|
||||||
|
holder_type = /obj/item/weapon/holder/diona
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/diona/New()
|
||||||
|
|
||||||
|
..()
|
||||||
|
verbs += /mob/living/carbon/proc/eat_weeds
|
||||||
|
verbs += /mob/living/carbon/proc/fertilize_plant
|
||||||
|
verbs += /mob/living/carbon/alien/diona/proc/steal_blood
|
||||||
|
verbs += /mob/living/carbon/alien/diona/proc/merge
|
||||||
14
code/modules/mob/living/carbon/alien/diona/diona_attacks.dm
Normal file
14
code/modules/mob/living/carbon/alien/diona/diona_attacks.dm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||||
|
|
||||||
|
//Let people pick the little buggers up.
|
||||||
|
if(M.a_intent == "help")
|
||||||
|
if(M.species && M.species.name == "Diona")
|
||||||
|
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||||
|
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||||
|
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||||
|
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||||
|
src.loc = M
|
||||||
|
else
|
||||||
|
get_scooped(M)
|
||||||
|
|
||||||
|
..()
|
||||||
90
code/modules/mob/living/carbon/alien/diona/diona_powers.dm
Normal file
90
code/modules/mob/living/carbon/alien/diona/diona_powers.dm
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
//Verbs after this point.
|
||||||
|
/mob/living/carbon/alien/diona/proc/merge()
|
||||||
|
|
||||||
|
set category = "Abilities"
|
||||||
|
set name = "Merge with gestalt"
|
||||||
|
set desc = "Merge with another diona."
|
||||||
|
|
||||||
|
if(istype(src.loc,/mob/living/carbon))
|
||||||
|
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||||
|
return
|
||||||
|
|
||||||
|
var/list/choices = list()
|
||||||
|
for(var/mob/living/carbon/C in view(1,src))
|
||||||
|
|
||||||
|
if(!(src.Adjacent(C)) || !(C.client)) continue
|
||||||
|
|
||||||
|
if(istype(C,/mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/D = C
|
||||||
|
if(D.species && D.species.name == "Diona")
|
||||||
|
choices += C
|
||||||
|
|
||||||
|
var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
|
||||||
|
|
||||||
|
if(!M || !src || !(src.Adjacent(M))) return
|
||||||
|
|
||||||
|
if(istype(M,/mob/living/carbon/human))
|
||||||
|
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||||
|
M.status_flags |= PASSEMOTES
|
||||||
|
|
||||||
|
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||||
|
src.loc = M
|
||||||
|
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||||
|
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||||
|
else
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/diona/proc/split()
|
||||||
|
|
||||||
|
set category = "Abilities"
|
||||||
|
set name = "Split from gestalt"
|
||||||
|
set desc = "Split away from your gestalt as a lone nymph."
|
||||||
|
|
||||||
|
if(!(istype(src.loc,/mob/living/carbon)))
|
||||||
|
src.verbs -= /mob/living/carbon/alien/diona/proc/split
|
||||||
|
return
|
||||||
|
|
||||||
|
src.loc << "You feel a pang of loss as [src] splits away from your biomass."
|
||||||
|
src << "You wiggle out of the depths of [src.loc]'s biomass and plop to the ground."
|
||||||
|
|
||||||
|
var/mob/living/M = src.loc
|
||||||
|
|
||||||
|
src.loc = get_turf(src)
|
||||||
|
src.verbs -= /mob/living/carbon/alien/diona/proc/split
|
||||||
|
src.verbs += /mob/living/carbon/alien/diona/proc/merge
|
||||||
|
|
||||||
|
if(istype(M))
|
||||||
|
for(var/atom/A in M.contents)
|
||||||
|
if(istype(A,/mob/living/simple_animal/borer) || istype(A,/obj/item/weapon/holder))
|
||||||
|
return
|
||||||
|
M.status_flags &= ~PASSEMOTES
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/diona/proc/steal_blood()
|
||||||
|
set category = "Abilities"
|
||||||
|
set name = "Steal Blood"
|
||||||
|
set desc = "Take a blood sample from a suitable donor."
|
||||||
|
|
||||||
|
var/list/choices = list()
|
||||||
|
for(var/mob/living/carbon/human/H in oview(1,src))
|
||||||
|
if(src.Adjacent(H))
|
||||||
|
choices += H
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/M = input(src,"Who do you wish to take a sample from?") in null|choices
|
||||||
|
|
||||||
|
if(!M || !src) return
|
||||||
|
|
||||||
|
if(M.species.flags & NO_BLOOD)
|
||||||
|
src << "\red That donor has no blood to take."
|
||||||
|
return
|
||||||
|
|
||||||
|
if(donors.Find(M.real_name))
|
||||||
|
src << "\red That donor offers you nothing new."
|
||||||
|
return
|
||||||
|
|
||||||
|
src.visible_message("\red [src] flicks out a feeler and neatly steals a sample of [M]'s blood.","\red You flick out a feeler and neatly steal a sample of [M]'s blood.")
|
||||||
|
donors += M.real_name
|
||||||
|
for(var/datum/language/L in M.languages)
|
||||||
|
languages |= L
|
||||||
|
|
||||||
|
spawn(25)
|
||||||
|
update_progression()
|
||||||
20
code/modules/mob/living/carbon/alien/diona/life.dm
Normal file
20
code/modules/mob/living/carbon/alien/diona/life.dm
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/* TODO
|
||||||
|
if(alien) //Diona nymphs are the only alien monkey currently.
|
||||||
|
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||||
|
if(isturf(loc)) //else, there's considered to be no light
|
||||||
|
var/turf/T = loc
|
||||||
|
var/area/A = T.loc
|
||||||
|
if(A)
|
||||||
|
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
|
||||||
|
else light_amount = 5
|
||||||
|
|
||||||
|
nutrition += light_amount
|
||||||
|
traumatic_shock -= light_amount
|
||||||
|
|
||||||
|
if(nutrition > 500)
|
||||||
|
nutrition = 500
|
||||||
|
if(light_amount > 2) //if there's enough light, heal
|
||||||
|
adjustBruteLoss(-1)
|
||||||
|
adjustToxLoss(-1)
|
||||||
|
adjustOxyLoss(-1)
|
||||||
|
*/
|
||||||
40
code/modules/mob/living/carbon/alien/diona/progression.dm
Normal file
40
code/modules/mob/living/carbon/alien/diona/progression.dm
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/mob/living/carbon/alien/diona/confirm_evolution()
|
||||||
|
|
||||||
|
if(!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist)
|
||||||
|
src << alert("You are currently not whitelisted to play as a full diona.")
|
||||||
|
return null
|
||||||
|
|
||||||
|
if(amount_grown < max_grown)
|
||||||
|
src << "You are not yet ready for your growth..."
|
||||||
|
return null
|
||||||
|
|
||||||
|
src.split()
|
||||||
|
|
||||||
|
if(istype(loc,/obj/item/weapon/holder/diona))
|
||||||
|
var/obj/item/weapon/holder/diona/L = loc
|
||||||
|
src.loc = L.loc
|
||||||
|
del(L)
|
||||||
|
|
||||||
|
src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark as it splits into a tangle of nearly a dozen new dionaea.","\red You begin to shift and quiver, feeling your awareness splinter. All at once, we consume our stored nutrients to surge with growth, splitting into a tangle of at least a dozen new dionaea. We have attained our gestalt form.")
|
||||||
|
return "Diona"
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/diona/show_evolution_blurb()
|
||||||
|
//TODO
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/diona/update_progression()
|
||||||
|
|
||||||
|
amount_grown = donors.len
|
||||||
|
|
||||||
|
if(amount_grown <= last_checked_stage)
|
||||||
|
return
|
||||||
|
|
||||||
|
// Only fire off these messages once.
|
||||||
|
last_checked_stage = amount_grown
|
||||||
|
if(amount_grown == max_grown)
|
||||||
|
src << "\green You feel ready to move on to your next stage of growth."
|
||||||
|
else if(amount_grown == 3)
|
||||||
|
universal_understand = 1
|
||||||
|
src << "\green You feel your awareness expand, and realize you know how to understand the creatures around you."
|
||||||
|
else
|
||||||
|
src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind."
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
/mob/living/carbon/alien/diona/say_understands(var/mob/other,var/datum/language/speaking = null)
|
||||||
|
|
||||||
|
if (istype(other, /mob/living/carbon/human) && !speaking)
|
||||||
|
if(languages.len >= 2) // They have sucked down some blood.
|
||||||
|
return 1
|
||||||
|
return ..()
|
||||||
@@ -1,127 +1,127 @@
|
|||||||
/mob/living/carbon/alien/larva/emote(var/act,var/m_type=1,var/message = null)
|
/mob/living/carbon/alien/emote(var/act,var/m_type=1,var/message = null)
|
||||||
|
|
||||||
var/param = null
|
var/param = null
|
||||||
if (findtext(act, "-", 1, null))
|
if (findtext(act, "-", 1, null))
|
||||||
var/t1 = findtext(act, "-", 1, null)
|
var/t1 = findtext(act, "-", 1, null)
|
||||||
param = copytext(act, t1 + 1, length(act) + 1)
|
param = copytext(act, t1 + 1, length(act) + 1)
|
||||||
act = copytext(act, 1, t1)
|
act = copytext(act, 1, t1)
|
||||||
|
|
||||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
||||||
act = copytext(act,1,length(act))
|
act = copytext(act,1,length(act))
|
||||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
||||||
|
|
||||||
switch(act)
|
switch(act)
|
||||||
if ("me")
|
if ("me")
|
||||||
if(silent)
|
if(silent)
|
||||||
return
|
return
|
||||||
if (src.client)
|
if (src.client)
|
||||||
if (client.prefs.muted & MUTE_IC)
|
if (client.prefs.muted & MUTE_IC)
|
||||||
src << "\red You cannot send IC messages (muted)."
|
src << "\red You cannot send IC messages (muted)."
|
||||||
return
|
return
|
||||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||||
return
|
return
|
||||||
if (stat)
|
if (stat)
|
||||||
return
|
return
|
||||||
if(!(message))
|
if(!(message))
|
||||||
return
|
return
|
||||||
return custom_emote(m_type, message)
|
return custom_emote(m_type, message)
|
||||||
|
|
||||||
if ("custom")
|
if ("custom")
|
||||||
return custom_emote(m_type, message)
|
return custom_emote(m_type, message)
|
||||||
if("sign")
|
if("sign")
|
||||||
if (!src.restrained())
|
if (!src.restrained())
|
||||||
message = text("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
message = text("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
||||||
m_type = 1
|
m_type = 1
|
||||||
if ("burp")
|
if ("burp")
|
||||||
if (!muzzled)
|
if (!muzzled)
|
||||||
message = "<B>[src]</B> burps."
|
message = "<B>[src]</B> burps."
|
||||||
m_type = 2
|
m_type = 2
|
||||||
if("scratch")
|
if("scratch")
|
||||||
if (!src.restrained())
|
if (!src.restrained())
|
||||||
message = "<B>The [src.name]</B> scratches."
|
message = "<B>The [src.name]</B> scratches."
|
||||||
m_type = 1
|
m_type = 1
|
||||||
if("whimper")
|
if("whimper")
|
||||||
if (!muzzled)
|
if (!muzzled)
|
||||||
message = "<B>The [src.name]</B> whimpers."
|
message = "<B>The [src.name]</B> whimpers."
|
||||||
m_type = 2
|
m_type = 2
|
||||||
// if("roar")
|
if("tail")
|
||||||
// if (!muzzled)
|
message = "<B>The [src.name]</B> waves its tail."
|
||||||
// message = "<B>The [src.name]</B> roars." Commenting out since larva shouldn't roar /N
|
m_type = 1
|
||||||
// m_type = 2
|
if("gasp")
|
||||||
if("tail")
|
message = "<B>The [src.name]</B> gasps."
|
||||||
message = "<B>The [src.name]</B> waves its tail."
|
m_type = 2
|
||||||
m_type = 1
|
if("shiver")
|
||||||
if("gasp")
|
message = "<B>The [src.name]</B> shivers."
|
||||||
message = "<B>The [src.name]</B> gasps."
|
m_type = 2
|
||||||
m_type = 2
|
if("drool")
|
||||||
if("shiver")
|
message = "<B>The [src.name]</B> drools."
|
||||||
message = "<B>The [src.name]</B> shivers."
|
m_type = 1
|
||||||
m_type = 2
|
if("scretch")
|
||||||
if("drool")
|
if (!muzzled)
|
||||||
message = "<B>The [src.name]</B> drools."
|
message = "<B>The [src.name]</B> scretches."
|
||||||
m_type = 1
|
m_type = 2
|
||||||
if("scretch")
|
if("choke")
|
||||||
if (!muzzled)
|
message = "<B>The [src.name]</B> chokes."
|
||||||
message = "<B>The [src.name]</B> scretches."
|
m_type = 2
|
||||||
m_type = 2
|
if("moan")
|
||||||
if("choke")
|
message = "<B>The [src.name]</B> moans!"
|
||||||
message = "<B>The [src.name]</B> chokes."
|
m_type = 2
|
||||||
m_type = 2
|
if("nod")
|
||||||
if("moan")
|
message = "<B>The [src.name]</B> nods its head."
|
||||||
message = "<B>The [src.name]</B> moans!"
|
m_type = 1
|
||||||
m_type = 2
|
// if("sit")
|
||||||
if("nod")
|
// message = "<B>The [src.name]</B> sits down." //Larvan can't sit down, /N
|
||||||
message = "<B>The [src.name]</B> nods its head."
|
// m_type = 1
|
||||||
m_type = 1
|
if("sway")
|
||||||
// if("sit")
|
message = "<B>The [src.name]</B> sways around dizzily."
|
||||||
// message = "<B>The [src.name]</B> sits down." //Larvan can't sit down, /N
|
m_type = 1
|
||||||
// m_type = 1
|
if("sulk")
|
||||||
if("sway")
|
message = "<B>The [src.name]</B> sulks down sadly."
|
||||||
message = "<B>The [src.name]</B> sways around dizzily."
|
m_type = 1
|
||||||
m_type = 1
|
if("twitch")
|
||||||
if("sulk")
|
message = "<B>The [src.name]</B> twitches violently."
|
||||||
message = "<B>The [src.name]</B> sulks down sadly."
|
m_type = 1
|
||||||
m_type = 1
|
if("dance")
|
||||||
if("twitch")
|
if (!src.restrained())
|
||||||
message = "<B>The [src.name]</B> twitches violently."
|
message = "<B>The [src.name]</B> dances around happily."
|
||||||
m_type = 1
|
m_type = 1
|
||||||
if("dance")
|
if("roll")
|
||||||
if (!src.restrained())
|
if (!src.restrained())
|
||||||
message = "<B>The [src.name]</B> dances around happily."
|
message = "<B>The [src.name]</B> rolls."
|
||||||
m_type = 1
|
m_type = 1
|
||||||
if("roll")
|
if("shake")
|
||||||
if (!src.restrained())
|
message = "<B>The [src.name]</B> shakes its head."
|
||||||
message = "<B>The [src.name]</B> rolls."
|
m_type = 1
|
||||||
m_type = 1
|
if("gnarl")
|
||||||
if("shake")
|
if (!muzzled)
|
||||||
message = "<B>The [src.name]</B> shakes its head."
|
message = "<B>The [src.name]</B> gnarls and shows its teeth.."
|
||||||
m_type = 1
|
m_type = 2
|
||||||
if("gnarl")
|
if("jump")
|
||||||
if (!muzzled)
|
message = "<B>The [src.name]</B> jumps!"
|
||||||
message = "<B>The [src.name]</B> gnarls and shows its teeth.."
|
m_type = 1
|
||||||
m_type = 2
|
if("hiss_")
|
||||||
if("jump")
|
message = "<B>The [src.name]</B> hisses softly."
|
||||||
message = "<B>The [src.name]</B> jumps!"
|
m_type = 1
|
||||||
m_type = 1
|
if("collapse")
|
||||||
if("hiss_")
|
Paralyse(2)
|
||||||
message = "<B>The [src.name]</B> hisses softly."
|
message = text("<B>[]</B> collapses!", src)
|
||||||
m_type = 1
|
m_type = 2
|
||||||
if("collapse")
|
if("chirp")
|
||||||
Paralyse(2)
|
message = "<B>The [src.name]</B> chirps!"
|
||||||
message = text("<B>[]</B> collapses!", src)
|
playsound(src.loc, 'sound/misc/nymphchirp.ogg', 50, 0)
|
||||||
m_type = 2
|
m_type = 2
|
||||||
if("help")
|
if("help")
|
||||||
src << "burp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roll, scratch,\nscretch, shake, sign-#, sulk, sway, tail, twitch, whimper"
|
src << "burp, chirp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roll, scratch,\nscretch, shake, sign-#, sulk, sway, tail, twitch, whimper"
|
||||||
else
|
else
|
||||||
src << text("Invalid Emote: []", act)
|
src << text("Invalid Emote: []", act)
|
||||||
if ((message && src.stat == 0))
|
if ((message && src.stat == 0))
|
||||||
log_emote("[name]/[key] : [message]")
|
log_emote("[name]/[key] : [message]")
|
||||||
if (m_type & 1)
|
if (m_type & 1)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
O.show_message(message, m_type)
|
O.show_message(message, m_type)
|
||||||
//Foreach goto(703)
|
//Foreach goto(703)
|
||||||
else
|
else
|
||||||
for(var/mob/O in hearers(src, null))
|
for(var/mob/O in hearers(src, null))
|
||||||
O.show_message(message, m_type)
|
O.show_message(message, m_type)
|
||||||
//Foreach goto(746)
|
//Foreach goto(746)
|
||||||
return
|
return
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
/*NOTES:
|
|
||||||
These are general powers. Specific powers are stored under the appropriate alien creature type.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*Alien spit now works like a taser shot. It won't home in on the target but will act the same once it does hit.
|
|
||||||
Doesn't work on other aliens/AI.*/
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/proc/powerc(X, Y)//Y is optional, checks for weed planting. X can be null.
|
|
||||||
if(stat)
|
|
||||||
src << "\green You must be conscious to do this."
|
|
||||||
return 0
|
|
||||||
else if(X && getPlasma() < X)
|
|
||||||
src << "\green Not enough plasma stored."
|
|
||||||
return 0
|
|
||||||
else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
|
|
||||||
src << "\green Bad place for a garden!"
|
|
||||||
return 0
|
|
||||||
else return 1
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/verb/plant()
|
|
||||||
set name = "Plant Weeds (50)"
|
|
||||||
set desc = "Plants some alien weeds"
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
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)
|
|
||||||
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"
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(powerc(10))
|
|
||||||
adjustToxLoss(-10)
|
|
||||||
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]"}
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview())
|
|
||||||
set name = "Transfer Plasma"
|
|
||||||
set desc = "Transfer Plasma to another alien"
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(isalien(M))
|
|
||||||
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
|
|
||||||
if (amount)
|
|
||||||
amount = abs(round(amount))
|
|
||||||
if(powerc(amount))
|
|
||||||
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]"}
|
|
||||||
else
|
|
||||||
src << "\green You need to be closer."
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
|
|
||||||
set name = "Corrossive Acid (200)"
|
|
||||||
set desc = "Drench an object in acid, destroying it over time."
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(powerc(200))
|
|
||||||
if(O in oview(1))
|
|
||||||
// OBJ CHECK
|
|
||||||
if(isobj(O))
|
|
||||||
var/obj/I = O
|
|
||||||
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
|
|
||||||
src << "\green You cannot dissolve this object."
|
|
||||||
return
|
|
||||||
// TURF CHECK
|
|
||||||
else if(istype(O, /turf/simulated))
|
|
||||||
var/turf/T = O
|
|
||||||
// R WALL
|
|
||||||
if(istype(T, /turf/simulated/wall/r_wall))
|
|
||||||
src << "\green You cannot dissolve this object."
|
|
||||||
return
|
|
||||||
// R FLOOR
|
|
||||||
if(istype(T, /turf/simulated/floor/engine))
|
|
||||||
src << "\green You cannot dissolve this object."
|
|
||||||
return
|
|
||||||
else// Not a type we can acid.
|
|
||||||
return
|
|
||||||
|
|
||||||
adjustToxLoss(-200)
|
|
||||||
new /obj/effect/alien/acid(get_turf(O), O)
|
|
||||||
visible_message("\green <B>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</B>")
|
|
||||||
else
|
|
||||||
src << "\green Target is too far away."
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
|
|
||||||
set name = "Spit Neurotoxin (50)"
|
|
||||||
set desc = "Spits neurotoxin at someone, paralyzing them for a short time if they are not wearing protective gear."
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(powerc(50))
|
|
||||||
if(isalien(target))
|
|
||||||
src << "\green Your allies are not a valid target."
|
|
||||||
return
|
|
||||||
adjustToxLoss(-50)
|
|
||||||
src << "\green You spit neurotoxin at [target]."
|
|
||||||
for(var/mob/O in oviewers())
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O << "\red [src] spits neurotoxin at [target]!"
|
|
||||||
//I'm not motivated enough to revise this. Prjectile code in general needs update.
|
|
||||||
var/turf/T = loc
|
|
||||||
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
|
|
||||||
|
|
||||||
if(!U || !T)
|
|
||||||
return
|
|
||||||
while(U && !istype(U,/turf))
|
|
||||||
U = U.loc
|
|
||||||
if(!istype(T, /turf))
|
|
||||||
return
|
|
||||||
if (U == T)
|
|
||||||
usr.bullet_act(new /obj/item/projectile/energy/neurotoxin(usr.loc), get_organ_target())
|
|
||||||
return
|
|
||||||
if(!istype(U, /turf))
|
|
||||||
return
|
|
||||||
|
|
||||||
var/obj/item/projectile/energy/neurotoxin/A = new /obj/item/projectile/energy/neurotoxin(usr.loc)
|
|
||||||
A.current = U
|
|
||||||
A.yo = U.y - T.y
|
|
||||||
A.xo = U.x - T.x
|
|
||||||
A.process()
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
|
||||||
set name = "Secrete Resin (75)"
|
|
||||||
set desc = "Secrete tough malleable resin."
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(powerc(75))
|
|
||||||
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
|
|
||||||
if(!choice || !powerc(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)
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/verb/regurgitate()
|
|
||||||
set name = "Regurgitate"
|
|
||||||
set desc = "Empties the contents of your stomach"
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(powerc())
|
|
||||||
if(stomach_contents.len)
|
|
||||||
for(var/mob/M in src)
|
|
||||||
if(M in stomach_contents)
|
|
||||||
stomach_contents.Remove(M)
|
|
||||||
M.loc = loc
|
|
||||||
//Paralyse(10)
|
|
||||||
src.visible_message("\green <B>[src] hurls out the contents of their stomach!</B>")
|
|
||||||
return
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/drone
|
|
||||||
name = "alien drone"
|
|
||||||
caste = "d"
|
|
||||||
maxHealth = 100
|
|
||||||
health = 100
|
|
||||||
icon_state = "aliend_s"
|
|
||||||
plasma_rate = 15
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/drone/New()
|
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
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)
|
|
||||||
..()
|
|
||||||
//Drones use the same base as generic humanoids.
|
|
||||||
//Drone verbs
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/drone/verb/evolve() // -- TLE
|
|
||||||
set name = "Evolve (500)"
|
|
||||||
set desc = "Produce an interal egg sac capable of spawning children. Only one queen can exist at a time."
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(powerc(500))
|
|
||||||
// Queen check
|
|
||||||
var/no_queen = 1
|
|
||||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
|
|
||||||
if(!Q.key && Q.has_brain())
|
|
||||||
continue
|
|
||||||
no_queen = 0
|
|
||||||
|
|
||||||
if(src.has_brain_worms())
|
|
||||||
src << "<span class='warning'>We cannot perform this ability at the present time!</span>"
|
|
||||||
return
|
|
||||||
|
|
||||||
if(no_queen)
|
|
||||||
adjustToxLoss(-500)
|
|
||||||
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/queen/new_xeno = new (loc)
|
|
||||||
mind.transfer_to(new_xeno)
|
|
||||||
del(src)
|
|
||||||
else
|
|
||||||
src << "<span class='notice'>We already have an alive queen.</span>"
|
|
||||||
return
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/hunter
|
|
||||||
name = "alien hunter"
|
|
||||||
caste = "h"
|
|
||||||
maxHealth = 150
|
|
||||||
health = 150
|
|
||||||
storedPlasma = 100
|
|
||||||
max_plasma = 150
|
|
||||||
icon_state = "alienh_s"
|
|
||||||
plasma_rate = 5
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/hunter/New()
|
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
if(name == "alien hunter")
|
|
||||||
name = text("alien hunter ([rand(1, 1000)])")
|
|
||||||
real_name = name
|
|
||||||
..()
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/hunter
|
|
||||||
|
|
||||||
|
|
||||||
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)
|
|
||||||
..()
|
|
||||||
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()
|
|
||||||
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
|
|
||||||
*/
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/sentinel
|
|
||||||
name = "alien sentinel"
|
|
||||||
caste = "s"
|
|
||||||
maxHealth = 125
|
|
||||||
health = 125
|
|
||||||
storedPlasma = 100
|
|
||||||
max_plasma = 250
|
|
||||||
icon_state = "aliens_s"
|
|
||||||
plasma_rate = 10
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/sentinel/New()
|
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
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"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/death(gibbed)
|
|
||||||
if(stat == DEAD) return
|
|
||||||
if(healths) healths.icon_state = "health6"
|
|
||||||
stat = DEAD
|
|
||||||
|
|
||||||
if(!gibbed)
|
|
||||||
playsound(loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
O.show_message("<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw...", 1)
|
|
||||||
update_canmove()
|
|
||||||
if(client) blind.layer = 0
|
|
||||||
update_icons()
|
|
||||||
|
|
||||||
tod = worldtime2text() //weasellos time of death patch
|
|
||||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
|
||||||
|
|
||||||
return ..(gibbed)
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
|
|
||||||
|
|
||||||
var/param = null
|
|
||||||
if (findtext(act, "-", 1, null))
|
|
||||||
var/t1 = findtext(act, "-", 1, null)
|
|
||||||
param = copytext(act, t1 + 1, length(act) + 1)
|
|
||||||
act = copytext(act, 1, t1)
|
|
||||||
|
|
||||||
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
|
|
||||||
act = copytext(act,1,length(act))
|
|
||||||
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
|
||||||
|
|
||||||
switch(act)
|
|
||||||
if ("me")
|
|
||||||
if(silent)
|
|
||||||
return
|
|
||||||
if (src.client)
|
|
||||||
if (client.prefs.muted & MUTE_IC)
|
|
||||||
src << "\red You cannot send IC messages (muted)."
|
|
||||||
return
|
|
||||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
|
||||||
return
|
|
||||||
if (stat)
|
|
||||||
return
|
|
||||||
if(!(message))
|
|
||||||
return
|
|
||||||
return custom_emote(m_type, message)
|
|
||||||
|
|
||||||
if ("custom")
|
|
||||||
return custom_emote(m_type, message)
|
|
||||||
if("sign")
|
|
||||||
if (!src.restrained())
|
|
||||||
message = text("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
|
||||||
m_type = 1
|
|
||||||
if ("burp")
|
|
||||||
if (!muzzled)
|
|
||||||
message = "<B>[src]</B> burps."
|
|
||||||
m_type = 2
|
|
||||||
if ("deathgasp")
|
|
||||||
message = "<B>[src]</B> lets out a waning guttural screech, green blood bubbling from its maw..."
|
|
||||||
m_type = 2
|
|
||||||
if("scratch")
|
|
||||||
if (!src.restrained())
|
|
||||||
message = "<B>The [src.name]</B> scratches."
|
|
||||||
m_type = 1
|
|
||||||
if("whimper")
|
|
||||||
if (!muzzled)
|
|
||||||
message = "<B>The [src.name]</B> whimpers."
|
|
||||||
m_type = 2
|
|
||||||
if("roar")
|
|
||||||
if (!muzzled)
|
|
||||||
message = "<B>The [src.name]</B> roars."
|
|
||||||
m_type = 2
|
|
||||||
if("hiss")
|
|
||||||
if(!muzzled)
|
|
||||||
message = "<B>The [src.name]</B> hisses."
|
|
||||||
m_type = 2
|
|
||||||
if("tail")
|
|
||||||
message = "<B>The [src.name]</B> waves its tail."
|
|
||||||
m_type = 1
|
|
||||||
if("gasp")
|
|
||||||
message = "<B>The [src.name]</B> gasps."
|
|
||||||
m_type = 2
|
|
||||||
if("shiver")
|
|
||||||
message = "<B>The [src.name]</B> shivers."
|
|
||||||
m_type = 2
|
|
||||||
if("drool")
|
|
||||||
message = "<B>The [src.name]</B> drools."
|
|
||||||
m_type = 1
|
|
||||||
if("scretch")
|
|
||||||
if (!muzzled)
|
|
||||||
message = "<B>The [src.name]</B> scretches."
|
|
||||||
m_type = 2
|
|
||||||
if("choke")
|
|
||||||
message = "<B>The [src.name]</B> chokes."
|
|
||||||
m_type = 2
|
|
||||||
if("moan")
|
|
||||||
message = "<B>The [src.name]</B> moans!"
|
|
||||||
m_type = 2
|
|
||||||
if("nod")
|
|
||||||
message = "<B>The [src.name]</B> nods its head."
|
|
||||||
m_type = 1
|
|
||||||
if("sit")
|
|
||||||
message = "<B>The [src.name]</B> sits down."
|
|
||||||
m_type = 1
|
|
||||||
if("sway")
|
|
||||||
message = "<B>The [src.name]</B> sways around dizzily."
|
|
||||||
m_type = 1
|
|
||||||
if("sulk")
|
|
||||||
message = "<B>The [src.name]</B> sulks down sadly."
|
|
||||||
m_type = 1
|
|
||||||
if("twitch")
|
|
||||||
message = "<B>The [src.name]</B> twitches violently."
|
|
||||||
m_type = 1
|
|
||||||
if("dance")
|
|
||||||
if (!src.restrained())
|
|
||||||
message = "<B>The [src.name]</B> dances around happily."
|
|
||||||
m_type = 1
|
|
||||||
if("roll")
|
|
||||||
if (!src.restrained())
|
|
||||||
message = "<B>The [src.name]</B> rolls."
|
|
||||||
m_type = 1
|
|
||||||
if("shake")
|
|
||||||
message = "<B>The [src.name]</B> shakes its head."
|
|
||||||
m_type = 1
|
|
||||||
if("gnarl")
|
|
||||||
if (!muzzled)
|
|
||||||
message = "<B>The [src.name]</B> gnarls and shows its teeth.."
|
|
||||||
m_type = 2
|
|
||||||
if("jump")
|
|
||||||
message = "<B>The [src.name]</B> jumps!"
|
|
||||||
m_type = 1
|
|
||||||
if("collapse")
|
|
||||||
Paralyse(2)
|
|
||||||
message = text("<B>[]</B> collapses!", src)
|
|
||||||
m_type = 2
|
|
||||||
if("help")
|
|
||||||
src << "burp, deathgasp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
|
|
||||||
else
|
|
||||||
src << text("Invalid Emote: []", act)
|
|
||||||
if ((message && src.stat == 0))
|
|
||||||
log_emote("[name]/[key] : [message]")
|
|
||||||
if (act == "roar")
|
|
||||||
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
|
|
||||||
if (act == "deathgasp")
|
|
||||||
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
|
|
||||||
if (m_type & 1)
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
O.show_message(message, m_type)
|
|
||||||
//Foreach goto(703)
|
|
||||||
else
|
|
||||||
for(var/mob/O in hearers(src, null))
|
|
||||||
O.show_message(message, m_type)
|
|
||||||
//Foreach goto(746)
|
|
||||||
return
|
|
||||||
@@ -1,423 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid
|
|
||||||
name = "alien"
|
|
||||||
icon_state = "alien_s"
|
|
||||||
|
|
||||||
var/obj/item/clothing/suit/wear_suit = null //TODO: necessary? Are they even used? ~Carn
|
|
||||||
var/obj/item/clothing/head/head = null //
|
|
||||||
var/obj/item/weapon/r_store = null
|
|
||||||
var/obj/item/weapon/l_store = null
|
|
||||||
var/caste = ""
|
|
||||||
update_icon = 1
|
|
||||||
|
|
||||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
|
||||||
/mob/living/carbon/alien/humanoid/New()
|
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
if(name == "alien")
|
|
||||||
name = text("alien ([rand(1, 1000)])")
|
|
||||||
real_name = name
|
|
||||||
..()
|
|
||||||
|
|
||||||
//This is fine, works the same as a human
|
|
||||||
/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes)
|
|
||||||
spawn( 0 )
|
|
||||||
if ((!( yes ) || now_pushing))
|
|
||||||
return
|
|
||||||
now_pushing = 0
|
|
||||||
..()
|
|
||||||
if (!istype(AM, /atom/movable))
|
|
||||||
return
|
|
||||||
|
|
||||||
if (ismob(AM))
|
|
||||||
var/mob/tmob = AM
|
|
||||||
tmob.LAssailant = src
|
|
||||||
|
|
||||||
if (!now_pushing)
|
|
||||||
now_pushing = 1
|
|
||||||
if (!AM.anchored)
|
|
||||||
var/t = get_dir(src, AM)
|
|
||||||
if (istype(AM, /obj/structure/window))
|
|
||||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
|
||||||
for(var/obj/structure/window/win in get_step(AM,t))
|
|
||||||
now_pushing = 0
|
|
||||||
return
|
|
||||||
step(AM, t)
|
|
||||||
now_pushing = null
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/movement_delay()
|
|
||||||
var/tally = 0
|
|
||||||
if (istype(src, /mob/living/carbon/alien/humanoid/queen))
|
|
||||||
tally += 5
|
|
||||||
if (istype(src, /mob/living/carbon/alien/humanoid/drone))
|
|
||||||
tally += 2
|
|
||||||
if (istype(src, /mob/living/carbon/alien/humanoid/sentinel))
|
|
||||||
tally += 1
|
|
||||||
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/bullet_act(var/obj/item/projectile/Proj) taken care of in living
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/emp_act(severity)
|
|
||||||
if(wear_suit) wear_suit.emp_act(severity)
|
|
||||||
if(head) head.emp_act(severity)
|
|
||||||
if(r_store) r_store.emp_act(severity)
|
|
||||||
if(l_store) l_store.emp_act(severity)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/ex_act(severity)
|
|
||||||
if(!blinded)
|
|
||||||
flick("flash", flash)
|
|
||||||
|
|
||||||
var/shielded = 0
|
|
||||||
|
|
||||||
var/b_loss = null
|
|
||||||
var/f_loss = null
|
|
||||||
switch (severity)
|
|
||||||
if (1.0)
|
|
||||||
b_loss += 500
|
|
||||||
gib()
|
|
||||||
return
|
|
||||||
|
|
||||||
if (2.0)
|
|
||||||
if (!shielded)
|
|
||||||
b_loss += 60
|
|
||||||
|
|
||||||
f_loss += 60
|
|
||||||
|
|
||||||
ear_damage += 30
|
|
||||||
ear_deaf += 120
|
|
||||||
|
|
||||||
if(3.0)
|
|
||||||
b_loss += 30
|
|
||||||
if (prob(50) && !shielded)
|
|
||||||
Paralyse(1)
|
|
||||||
ear_damage += 15
|
|
||||||
ear_deaf += 60
|
|
||||||
|
|
||||||
adjustBruteLoss(b_loss)
|
|
||||||
adjustFireLoss(f_loss)
|
|
||||||
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/blob_act()
|
|
||||||
if (stat == 2)
|
|
||||||
return
|
|
||||||
var/shielded = 0
|
|
||||||
var/damage = null
|
|
||||||
if (stat != 2)
|
|
||||||
damage = rand(30,40)
|
|
||||||
|
|
||||||
if(shielded)
|
|
||||||
damage /= 4
|
|
||||||
|
|
||||||
|
|
||||||
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 )))
|
|
||||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
|
||||||
if (health > 0)
|
|
||||||
adjustFireLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
|
||||||
adjustFireLoss(30)
|
|
||||||
|
|
||||||
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."
|
|
||||||
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(10, 40)
|
|
||||||
else
|
|
||||||
damage = rand(5, 35)
|
|
||||||
|
|
||||||
adjustBruteLoss(damage)
|
|
||||||
|
|
||||||
if(M.powerlevel > 0)
|
|
||||||
var/stunprob = 10
|
|
||||||
var/power = M.powerlevel + rand(0,3)
|
|
||||||
|
|
||||||
switch(M.powerlevel)
|
|
||||||
if(1 to 2) stunprob = 20
|
|
||||||
if(3 to 4) stunprob = 30
|
|
||||||
if(5 to 6) stunprob = 40
|
|
||||||
if(7 to 8) stunprob = 60
|
|
||||||
if(9) stunprob = 70
|
|
||||||
if(10) stunprob = 95
|
|
||||||
|
|
||||||
if(prob(stunprob))
|
|
||||||
M.powerlevel -= 3
|
|
||||||
if(M.powerlevel < 0)
|
|
||||||
M.powerlevel = 0
|
|
||||||
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
|
||||||
|
|
||||||
Weaken(power)
|
|
||||||
if (stuttering < power)
|
|
||||||
stuttering = power
|
|
||||||
Stun(power)
|
|
||||||
|
|
||||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
|
||||||
s.set_up(5, 1, src)
|
|
||||||
s.start()
|
|
||||||
|
|
||||||
if (prob(stunprob) && M.powerlevel >= 8)
|
|
||||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
|
||||||
|
|
||||||
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
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."
|
|
||||||
return
|
|
||||||
|
|
||||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
|
||||||
M << "No attacking people at spawn, you jackass."
|
|
||||||
return
|
|
||||||
|
|
||||||
..()
|
|
||||||
|
|
||||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
|
||||||
var/obj/item/clothing/gloves/G = M.gloves
|
|
||||||
if(G.cell)
|
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
|
||||||
if(G.cell.charge >= 2500)
|
|
||||||
G.cell.use(2500)
|
|
||||||
|
|
||||||
Weaken(5)
|
|
||||||
if (stuttering < 5)
|
|
||||||
stuttering = 5
|
|
||||||
Stun(5)
|
|
||||||
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
M << "\red Not enough charge! "
|
|
||||||
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 )) || ((head && head.flags & 4) || (wear_mask && !( 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 || anchored)
|
|
||||||
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 ("hurt")
|
|
||||||
var/damage = rand(1, 9)
|
|
||||||
if (prob(90))
|
|
||||||
if (HULK in M.mutations)//HULK SMASH
|
|
||||||
damage += 14
|
|
||||||
spawn(0)
|
|
||||||
Weaken(damage) // Why can a hulk knock an alien out but not knock out a human? Damage is robust enough.
|
|
||||||
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 > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
|
|
||||||
Weaken(1,5)
|
|
||||||
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)
|
|
||||||
|
|
||||||
if ("disarm")
|
|
||||||
if (!lying)
|
|
||||||
if (prob(5))//Very small chance to push an alien down.
|
|
||||||
Weaken(2)
|
|
||||||
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 <B>[] has pushed down []!</B>", M, src), 1)
|
|
||||||
else
|
|
||||||
if (prob(50))
|
|
||||||
drop_item()
|
|
||||||
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 <B>[] has disarmed []!</B>", M, src), 1)
|
|
||||||
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 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
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/var/co2overloadtime = null
|
|
||||||
/mob/living/carbon/alien/humanoid/var/temperature_resistance = T0C+75
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/show_inv(mob/user as mob)
|
|
||||||
|
|
||||||
user.set_machine(src)
|
|
||||||
var/dat = {"
|
|
||||||
<B><HR><FONT size=3>[name]</FONT></B>
|
|
||||||
<BR><HR>
|
|
||||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
|
|
||||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
|
|
||||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
|
|
||||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
|
|
||||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
|
|
||||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
|
||||||
<BR>"}
|
|
||||||
user << browse(dat, text("window=mob[name];size=340x480"))
|
|
||||||
onclose(user, "mob[name]")
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
//unequip
|
|
||||||
/mob/living/carbon/alien/humanoid/u_equip(obj/item/W as obj)
|
|
||||||
if (W == wear_suit)
|
|
||||||
wear_suit = null
|
|
||||||
update_inv_wear_suit(0)
|
|
||||||
else if (W == head)
|
|
||||||
head = null
|
|
||||||
update_inv_head(0)
|
|
||||||
else if (W == r_store)
|
|
||||||
r_store = null
|
|
||||||
update_inv_pockets(0)
|
|
||||||
else if (W == l_store)
|
|
||||||
l_store = null
|
|
||||||
update_inv_pockets(0)
|
|
||||||
else if (W == r_hand)
|
|
||||||
r_hand = null
|
|
||||||
update_inv_r_hand(0)
|
|
||||||
else if (W == l_hand)
|
|
||||||
l_hand = null
|
|
||||||
update_inv_l_hand(0)
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/attack_ui(slot_id)
|
|
||||||
var/obj/item/W = get_active_hand()
|
|
||||||
if(W)
|
|
||||||
if(!istype(W)) return
|
|
||||||
switch(slot_id)
|
|
||||||
// if("o_clothing")
|
|
||||||
// if("head")
|
|
||||||
if(slot_l_store)
|
|
||||||
if(l_store)
|
|
||||||
return
|
|
||||||
if(W.w_class > 3)
|
|
||||||
return
|
|
||||||
u_equip(W)
|
|
||||||
l_store = W
|
|
||||||
update_inv_pockets()
|
|
||||||
if(slot_r_store)
|
|
||||||
if(r_store)
|
|
||||||
return
|
|
||||||
if(W.w_class > 3)
|
|
||||||
return
|
|
||||||
u_equip(W)
|
|
||||||
r_store = W
|
|
||||||
update_inv_pockets()
|
|
||||||
else
|
|
||||||
switch(slot_id)
|
|
||||||
if(slot_wear_suit)
|
|
||||||
if(wear_suit) wear_suit.attack_alien(src)
|
|
||||||
if(slot_head)
|
|
||||||
if(head) head.attack_alien(src)
|
|
||||||
if(slot_l_store)
|
|
||||||
if(l_store) l_store.attack_alien(src)
|
|
||||||
if(slot_r_store)
|
|
||||||
if(r_store) r_store.attack_alien(src)
|
|
||||||
@@ -1,453 +0,0 @@
|
|||||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid
|
|
||||||
oxygen_alert = 0
|
|
||||||
phoron_alert = 0
|
|
||||||
fire_alert = 0
|
|
||||||
|
|
||||||
var/temperature_alert = 0
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/Life()
|
|
||||||
set invisibility = 0
|
|
||||||
set background = 1
|
|
||||||
|
|
||||||
if (monkeyizing)
|
|
||||||
return
|
|
||||||
|
|
||||||
..()
|
|
||||||
|
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
|
||||||
|
|
||||||
if (stat != DEAD) //still breathing
|
|
||||||
|
|
||||||
//First, resolve location and get a breath
|
|
||||||
|
|
||||||
if(air_master.current_cycle%4==2)
|
|
||||||
//Only try to take a breath every 4 seconds, unless suffocating
|
|
||||||
spawn(0) breathe()
|
|
||||||
|
|
||||||
else //Still give containing object the chance to interact
|
|
||||||
if(istype(loc, /obj/))
|
|
||||||
var/obj/location_as_object = loc
|
|
||||||
location_as_object.handle_internal_lifeform(src, 0)
|
|
||||||
|
|
||||||
//Mutations and radiation
|
|
||||||
handle_mutations_and_radiation()
|
|
||||||
|
|
||||||
//Chemicals in the body
|
|
||||||
handle_chemicals_in_body()
|
|
||||||
|
|
||||||
//Disabilities
|
|
||||||
handle_disabilities()
|
|
||||||
|
|
||||||
//Apparently, the person who wrote this code designed it so that
|
|
||||||
//blinded get reset each cycle and then get activated later in the
|
|
||||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
|
||||||
//to find it.
|
|
||||||
blinded = null
|
|
||||||
|
|
||||||
//Handle temperature/pressure differences between body and environment
|
|
||||||
handle_environment(environment)
|
|
||||||
|
|
||||||
//stuff in the stomach
|
|
||||||
handle_stomach()
|
|
||||||
|
|
||||||
|
|
||||||
//Status updates, death etc.
|
|
||||||
handle_regular_status_updates()
|
|
||||||
update_canmove()
|
|
||||||
|
|
||||||
// Grabbing
|
|
||||||
for(var/obj/item/weapon/grab/G in src)
|
|
||||||
G.process()
|
|
||||||
|
|
||||||
if(client)
|
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
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 < 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/smoke/chem/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/phoron_used = 0
|
|
||||||
var/breath_pressure = (breath.total_moles * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME
|
|
||||||
|
|
||||||
//Partial pressure of the phoron in our breath
|
|
||||||
var/Toxins_pp = (breath.gas["phoron"] / breath.total_moles) * breath_pressure
|
|
||||||
|
|
||||||
if(Toxins_pp) // Detect phoron in air
|
|
||||||
|
|
||||||
adjustToxLoss(breath.gas["phoron"] * 250)
|
|
||||||
phoron_alert = max(phoron_alert, 1)
|
|
||||||
|
|
||||||
phoron_used = breath.gas["phoron"]
|
|
||||||
|
|
||||||
else
|
|
||||||
phoron_alert = 0
|
|
||||||
|
|
||||||
//Breathe in phoron and out oxygen
|
|
||||||
breath.adjust_gas("phoron", -phoron_used)
|
|
||||||
breath.adjust_gas("oxygen", phoron_used)
|
|
||||||
|
|
||||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE 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(COLD_RESISTANCE 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(FAT in mutations)
|
|
||||||
if(nutrition < 100)
|
|
||||||
if(prob(round((50 - nutrition) / 100)))
|
|
||||||
src << "\blue You feel fit again!"
|
|
||||||
mutations.Remove(FAT)
|
|
||||||
/* else
|
|
||||||
if(nutrition > 500)
|
|
||||||
if(prob(5 + round((nutrition - 200) / 2)))
|
|
||||||
src << "\red You suddenly feel blubbery!"
|
|
||||||
mutations.Add(FAT)
|
|
||||||
FUCK YOU FATCODE -Hawk */
|
|
||||||
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
|
|
||||||
blinded = 1
|
|
||||||
silent = 0
|
|
||||||
else //ALIVE. LIGHTS ARE ON
|
|
||||||
if(health < config.health_threshold_dead || !has_brain())
|
|
||||||
death()
|
|
||||||
blinded = 1
|
|
||||||
stat = DEAD
|
|
||||||
silent = 0
|
|
||||||
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)
|
|
||||||
|
|
||||||
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))
|
|
||||||
|
|
||||||
//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)
|
|
||||||
|
|
||||||
//Other
|
|
||||||
handle_statuses()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
proc/handle_regular_hud_updates()
|
|
||||||
|
|
||||||
if (stat == 2 || (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
|
|
||||||
see_in_dark = 4
|
|
||||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
|
||||||
|
|
||||||
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[phoron_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
|
|
||||||
|
|
||||||
if (stat != 2)
|
|
||||||
if (machine)
|
|
||||||
if (!( machine.check_eye(src) ))
|
|
||||||
reset_view(null)
|
|
||||||
else
|
|
||||||
if(client && !client.adminobs)
|
|
||||||
reset_view(null)
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/Login()
|
|
||||||
..()
|
|
||||||
update_hud()
|
|
||||||
if(!isturf(loc))
|
|
||||||
client.eye = loc
|
|
||||||
client.perspective = EYE_PERSPECTIVE
|
|
||||||
return
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/queen
|
|
||||||
name = "alien queen"
|
|
||||||
caste = "q"
|
|
||||||
maxHealth = 250
|
|
||||||
health = 250
|
|
||||||
icon_state = "alienq_s"
|
|
||||||
status_flags = CANPARALYSE
|
|
||||||
heal_rate = 5
|
|
||||||
plasma_rate = 20
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/queen/New()
|
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
|
|
||||||
//there should only be one queen
|
|
||||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
|
|
||||||
if(Q == src) continue
|
|
||||||
if(Q.stat == DEAD) continue
|
|
||||||
if(Q.client)
|
|
||||||
name = "alien princess ([rand(1, 999)])" //if this is too cutesy feel free to change it/remove it.
|
|
||||||
break
|
|
||||||
|
|
||||||
real_name = src.name
|
|
||||||
verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
|
|
||||||
verbs -= /mob/living/carbon/alien/verb/ventcrawl
|
|
||||||
..()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/queen
|
|
||||||
|
|
||||||
handle_regular_hud_updates()
|
|
||||||
|
|
||||||
..() //-Yvarov
|
|
||||||
|
|
||||||
if (src.healths)
|
|
||||||
if (src.stat != 2)
|
|
||||||
switch(health)
|
|
||||||
if(250 to INFINITY)
|
|
||||||
src.healths.icon_state = "health0"
|
|
||||||
if(175 to 250)
|
|
||||||
src.healths.icon_state = "health1"
|
|
||||||
if(100 to 175)
|
|
||||||
src.healths.icon_state = "health2"
|
|
||||||
if(50 to 100)
|
|
||||||
src.healths.icon_state = "health3"
|
|
||||||
if(0 to 50)
|
|
||||||
src.healths.icon_state = "health4"
|
|
||||||
else
|
|
||||||
src.healths.icon_state = "health5"
|
|
||||||
else
|
|
||||||
src.healths.icon_state = "health6"
|
|
||||||
|
|
||||||
|
|
||||||
//Queen verbs
|
|
||||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
|
||||||
|
|
||||||
set name = "Lay Egg (75)"
|
|
||||||
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(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
|
||||||
adjustToxLoss(-75)
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
|
||||||
new /obj/effect/alien/egg(loc)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/queen/large
|
|
||||||
icon = 'icons/mob/alienqueen.dmi'
|
|
||||||
icon_state = "queen_s"
|
|
||||||
pixel_x = -16
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/queen/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
|
|
||||||
overlays.Cut()
|
|
||||||
if(lying)
|
|
||||||
if(resting) icon_state = "queen_sleep"
|
|
||||||
else icon_state = "queen_l"
|
|
||||||
for(var/image/I in overlays_lying)
|
|
||||||
overlays += I
|
|
||||||
else
|
|
||||||
icon_state = "queen_s"
|
|
||||||
for(var/image/I in overlays_standing)
|
|
||||||
overlays += I
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
//Xeno Overlays Indexes//////////
|
|
||||||
#define X_HEAD_LAYER 1
|
|
||||||
#define X_SUIT_LAYER 2
|
|
||||||
#define X_L_HAND_LAYER 3
|
|
||||||
#define X_R_HAND_LAYER 4
|
|
||||||
#define TARGETED_LAYER 5
|
|
||||||
#define X_TOTAL_LAYERS 5
|
|
||||||
/////////////////////////////////
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid
|
|
||||||
var/list/overlays_lying[X_TOTAL_LAYERS]
|
|
||||||
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()
|
|
||||||
if(stat == DEAD)
|
|
||||||
//If we mostly took damage from fire
|
|
||||||
if(fireloss > 125)
|
|
||||||
icon_state = "alien[caste]_husked"
|
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/regenerate_icons()
|
|
||||||
..()
|
|
||||||
if (monkeyizing) return
|
|
||||||
|
|
||||||
update_inv_head(0)
|
|
||||||
update_inv_wear_suit(0)
|
|
||||||
update_inv_r_hand(0)
|
|
||||||
update_inv_l_hand(0)
|
|
||||||
update_inv_pockets(0)
|
|
||||||
update_hud()
|
|
||||||
update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/update_hud()
|
|
||||||
//TODO
|
|
||||||
if (client)
|
|
||||||
// if(other) client.screen |= hud_used.other //Not used
|
|
||||||
// else client.screen -= hud_used.other //Not used
|
|
||||||
client.screen |= contents
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/update_inv_wear_suit(var/update_icons=1)
|
|
||||||
if(wear_suit)
|
|
||||||
var/t_state = wear_suit.item_state
|
|
||||||
if(!t_state) t_state = wear_suit.icon_state
|
|
||||||
var/image/lying = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]2")
|
|
||||||
var/image/standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]")
|
|
||||||
|
|
||||||
if(wear_suit.blood_DNA)
|
|
||||||
var/t_suit = "suit"
|
|
||||||
if( istype(wear_suit, /obj/item/clothing/suit/armor) )
|
|
||||||
t_suit = "armor"
|
|
||||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood2")
|
|
||||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood")
|
|
||||||
|
|
||||||
//TODO
|
|
||||||
wear_suit.screen_loc = ui_alien_oclothing
|
|
||||||
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
|
||||||
drop_from_inventory(handcuffed)
|
|
||||||
drop_r_hand()
|
|
||||||
drop_l_hand()
|
|
||||||
|
|
||||||
overlays_lying[X_SUIT_LAYER] = lying
|
|
||||||
overlays_standing[X_SUIT_LAYER] = standing
|
|
||||||
else
|
|
||||||
overlays_lying[X_SUIT_LAYER] = null
|
|
||||||
overlays_standing[X_SUIT_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/update_inv_head(var/update_icons=1)
|
|
||||||
if (head)
|
|
||||||
var/t_state = head.item_state
|
|
||||||
if(!t_state) t_state = head.icon_state
|
|
||||||
var/image/lying = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]2")
|
|
||||||
var/image/standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]")
|
|
||||||
if(head.blood_DNA)
|
|
||||||
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood2")
|
|
||||||
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "helmetblood")
|
|
||||||
head.screen_loc = ui_alien_head
|
|
||||||
overlays_lying[X_HEAD_LAYER] = lying
|
|
||||||
overlays_standing[X_HEAD_LAYER] = standing
|
|
||||||
else
|
|
||||||
overlays_lying[X_HEAD_LAYER] = null
|
|
||||||
overlays_standing[X_HEAD_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/update_inv_pockets(var/update_icons=1)
|
|
||||||
if(l_store) l_store.screen_loc = ui_storage1
|
|
||||||
if(r_store) r_store.screen_loc = ui_storage2
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/update_inv_r_hand(var/update_icons=1)
|
|
||||||
if(r_hand)
|
|
||||||
var/t_state = r_hand.item_state
|
|
||||||
if(!t_state) t_state = r_hand.icon_state
|
|
||||||
r_hand.screen_loc = ui_rhand
|
|
||||||
overlays_standing[X_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
|
||||||
else
|
|
||||||
overlays_standing[X_R_HAND_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/update_inv_l_hand(var/update_icons=1)
|
|
||||||
if(l_hand)
|
|
||||||
var/t_state = l_hand.item_state
|
|
||||||
if(!t_state) t_state = l_hand.icon_state
|
|
||||||
l_hand.screen_loc = ui_lhand
|
|
||||||
overlays_standing[X_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
|
||||||
else
|
|
||||||
overlays_standing[X_L_HAND_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
//Call when target overlay should be added/removed
|
|
||||||
/mob/living/carbon/alien/humanoid/update_targeted(var/update_icons=1)
|
|
||||||
if (targeted_by && target_locked)
|
|
||||||
overlays_lying[TARGETED_LAYER] = target_locked
|
|
||||||
overlays_standing[TARGETED_LAYER] = target_locked
|
|
||||||
else if (!targeted_by && target_locked)
|
|
||||||
del(target_locked)
|
|
||||||
if (!targeted_by)
|
|
||||||
overlays_lying[TARGETED_LAYER] = null
|
|
||||||
overlays_standing[TARGETED_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
//Xeno Overlays Indexes//////////
|
|
||||||
#undef X_HEAD_LAYER
|
|
||||||
#undef X_SUIT_LAYER
|
|
||||||
#undef X_L_HAND_LAYER
|
|
||||||
#undef X_R_HAND_LAYER
|
|
||||||
#undef TARGETED_LAYER
|
|
||||||
#undef X_TOTAL_LAYERS
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/mob/living/carbon/alien/larva/death(gibbed)
|
|
||||||
if(stat == DEAD) return
|
|
||||||
if(healths) healths.icon_state = "health6"
|
|
||||||
stat = DEAD
|
|
||||||
icon_state = "larva_dead"
|
|
||||||
|
|
||||||
if(!gibbed)
|
|
||||||
update_canmove()
|
|
||||||
if(client) blind.layer = 0
|
|
||||||
|
|
||||||
tod = worldtime2text() //weasellos time of death patch
|
|
||||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
|
||||||
living_mob_list -= src
|
|
||||||
|
|
||||||
return ..(gibbed)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
//can't unequip since it can't equip anything
|
|
||||||
/mob/living/carbon/alien/larva/u_equip(obj/item/W as obj)
|
|
||||||
return
|
|
||||||
@@ -1,375 +1,19 @@
|
|||||||
/mob/living/carbon/alien/larva
|
/mob/living/carbon/alien/larva
|
||||||
name = "alien larva"
|
name = "alien larva"
|
||||||
real_name = "alien larva"
|
real_name = "alien larva"
|
||||||
icon_state = "larva0"
|
adult_form = /mob/living/carbon/human
|
||||||
pass_flags = PASSTABLE
|
speak_emote = list("hisses")
|
||||||
|
icon_state = "larva"
|
||||||
|
language = "Hivemind"
|
||||||
|
melee_damage_lower = 3
|
||||||
|
melee_damage_upper = 6
|
||||||
|
|
||||||
|
amount_grown = 0
|
||||||
|
max_grown = 200
|
||||||
|
|
||||||
maxHealth = 25
|
maxHealth = 25
|
||||||
health = 25
|
health = 25
|
||||||
storedPlasma = 50
|
|
||||||
max_plasma = 50
|
|
||||||
|
|
||||||
var/amount_grown = 0
|
|
||||||
var/max_grown = 200
|
|
||||||
var/time_of_birth
|
|
||||||
|
|
||||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
|
||||||
/mob/living/carbon/alien/larva/New()
|
/mob/living/carbon/alien/larva/New()
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
if(name == "alien larva")
|
|
||||||
name = "alien larva ([rand(1, 1000)])"
|
|
||||||
real_name = name
|
|
||||||
regenerate_icons()
|
|
||||||
..()
|
..()
|
||||||
|
add_language("Rootspeak")
|
||||||
//This is fine, works the same as a human
|
|
||||||
/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes)
|
|
||||||
|
|
||||||
spawn( 0 )
|
|
||||||
if ((!( yes ) || now_pushing))
|
|
||||||
return
|
|
||||||
now_pushing = 1
|
|
||||||
if(ismob(AM))
|
|
||||||
var/mob/tmob = AM
|
|
||||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
|
||||||
if(prob(70))
|
|
||||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
|
||||||
now_pushing = 0
|
|
||||||
return
|
|
||||||
if(!(tmob.status_flags & CANPUSH))
|
|
||||||
now_pushing = 0
|
|
||||||
return
|
|
||||||
tmob.LAssailant = src
|
|
||||||
|
|
||||||
now_pushing = 0
|
|
||||||
..()
|
|
||||||
if (!( istype(AM, /atom/movable) ))
|
|
||||||
return
|
|
||||||
if (!( now_pushing ))
|
|
||||||
now_pushing = 1
|
|
||||||
if (!( AM.anchored ))
|
|
||||||
var/t = get_dir(src, AM)
|
|
||||||
step(AM, t)
|
|
||||||
now_pushing = null
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
//This needs to be fixed
|
|
||||||
/mob/living/carbon/alien/larva/Stat()
|
|
||||||
..()
|
|
||||||
stat(null, "Progress: [amount_grown]/[max_grown]")
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/adjustToxLoss(amount)
|
|
||||||
if(stat != DEAD)
|
|
||||||
amount_grown = min(amount_grown + 1, max_grown)
|
|
||||||
..(amount)
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/ex_act(severity)
|
|
||||||
if(!blinded)
|
|
||||||
flick("flash", flash)
|
|
||||||
|
|
||||||
var/b_loss = null
|
|
||||||
var/f_loss = null
|
|
||||||
switch (severity)
|
|
||||||
if (1.0)
|
|
||||||
b_loss += 500
|
|
||||||
gib()
|
|
||||||
return
|
|
||||||
|
|
||||||
if (2.0)
|
|
||||||
|
|
||||||
b_loss += 60
|
|
||||||
|
|
||||||
f_loss += 60
|
|
||||||
|
|
||||||
ear_damage += 30
|
|
||||||
ear_deaf += 120
|
|
||||||
|
|
||||||
if(3.0)
|
|
||||||
b_loss += 30
|
|
||||||
if (prob(50))
|
|
||||||
Paralyse(1)
|
|
||||||
ear_damage += 15
|
|
||||||
ear_deaf += 60
|
|
||||||
|
|
||||||
adjustBruteLoss(b_loss)
|
|
||||||
adjustFireLoss(f_loss)
|
|
||||||
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/blob_act()
|
|
||||||
if (stat == 2)
|
|
||||||
return
|
|
||||||
var/shielded = 0
|
|
||||||
|
|
||||||
var/damage = null
|
|
||||||
if (stat != 2)
|
|
||||||
damage = rand(10,30)
|
|
||||||
|
|
||||||
if(shielded)
|
|
||||||
damage /= 4
|
|
||||||
|
|
||||||
//paralysis += 1
|
|
||||||
|
|
||||||
show_message("\red The blob attacks you!")
|
|
||||||
|
|
||||||
adjustFireLoss(damage)
|
|
||||||
|
|
||||||
updatehealth()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
//can't equip anything
|
|
||||||
/mob/living/carbon/alien/larva/attack_ui(slot_id)
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/meteorhit(O as obj)
|
|
||||||
for(var/mob/M in viewers(src, null))
|
|
||||||
if ((M.client && !( M.blinded )))
|
|
||||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
|
||||||
if (health > 0)
|
|
||||||
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
|
||||||
adjustFireLoss(30)
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
..()
|
|
||||||
|
|
||||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
|
||||||
var/obj/item/clothing/gloves/G = M.gloves
|
|
||||||
if(G.cell)
|
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
|
||||||
if(G.cell.charge >= 2500)
|
|
||||||
G.cell.use(2500)
|
|
||||||
|
|
||||||
Weaken(5)
|
|
||||||
if (stuttering < 5)
|
|
||||||
stuttering = 5
|
|
||||||
Stun(5)
|
|
||||||
|
|
||||||
for(var/mob/O in viewers(src, null))
|
|
||||||
if ((O.client && !( O.blinded )))
|
|
||||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
M << "\red Not enough charge! "
|
|
||||||
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, 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)
|
|
||||||
|
|
||||||
else
|
|
||||||
var/damage = rand(1, 9)
|
|
||||||
if (prob(90))
|
|
||||||
if (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
|
|
||||||
|
|
||||||
/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()
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/var/co2overloadtime = null
|
|
||||||
/mob/living/carbon/alien/larva/var/temperature_resistance = T0C+75
|
|
||||||
|
|
||||||
// new damage icon system
|
|
||||||
// now constructs damage icon for each organ from mask * damage field
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/show_inv(mob/user as mob)
|
|
||||||
|
|
||||||
user.set_machine(src)
|
|
||||||
var/dat = {"
|
|
||||||
<B><HR><FONT size=3>[name]</FONT></B>
|
|
||||||
<BR><HR><BR>
|
|
||||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
|
||||||
<BR>"}
|
|
||||||
user << browse(dat, text("window=mob[name];size=340x480"))
|
|
||||||
onclose(user, "mob[name]")
|
|
||||||
return
|
|
||||||
|
|
||||||
/* Commented out because it's duplicated in life.dm
|
|
||||||
/mob/living/carbon/alien/larva/proc/grow() // Larvae can grow into full fledged Xenos if they survive long enough -- TLE
|
|
||||||
if(icon_state == "larva_l" && !canmove) // This is a shit death check. It is made of shit and death. Fix later.
|
|
||||||
return
|
|
||||||
else
|
|
||||||
var/mob/living/carbon/alien/humanoid/A = new(loc)
|
|
||||||
A.key = key
|
|
||||||
del(src) */
|
|
||||||
@@ -1,369 +0,0 @@
|
|||||||
//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
|
|
||||||
|
|
||||||
..()
|
|
||||||
var/datum/gas_mixture/enviroment = loc.return_air()
|
|
||||||
if (stat != DEAD) //still breathing
|
|
||||||
|
|
||||||
// GROW!
|
|
||||||
if(amount_grown < max_grown)
|
|
||||||
amount_grown++
|
|
||||||
|
|
||||||
//First, resolve location and get a breath
|
|
||||||
if(air_master.current_cycle%4==2)
|
|
||||||
//Only try to take a breath every 4 seconds, unless suffocating
|
|
||||||
spawn(0) breathe()
|
|
||||||
else //Still give containing object the chance to interact
|
|
||||||
if(istype(loc, /obj/))
|
|
||||||
var/obj/location_as_object = loc
|
|
||||||
location_as_object.handle_internal_lifeform(src, 0)
|
|
||||||
//Mutations and radiation
|
|
||||||
handle_mutations_and_radiation()
|
|
||||||
|
|
||||||
//Chemicals in the body
|
|
||||||
handle_chemicals_in_body()
|
|
||||||
|
|
||||||
|
|
||||||
//Apparently, the person who wrote this code designed it so that
|
|
||||||
//blinded get reset each cycle and then get activated later in the
|
|
||||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
|
||||||
//to find it.
|
|
||||||
blinded = null
|
|
||||||
|
|
||||||
//Handle temperature/pressure differences between body and environment
|
|
||||||
handle_environment(enviroment)
|
|
||||||
|
|
||||||
//stuff in the stomach
|
|
||||||
//handle_stomach()
|
|
||||||
|
|
||||||
//Status updates, death etc.
|
|
||||||
handle_regular_status_updates()
|
|
||||||
update_canmove()
|
|
||||||
|
|
||||||
// Grabbing
|
|
||||||
for(var/obj/item/weapon/grab/G in src)
|
|
||||||
G.process()
|
|
||||||
|
|
||||||
//some kind of bug in canmove() isn't properly calling update_icons, so this is here as a placeholder
|
|
||||||
update_icons()
|
|
||||||
|
|
||||||
if(client)
|
|
||||||
handle_regular_hud_updates()
|
|
||||||
|
|
||||||
|
|
||||||
/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/smoke/chem/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/phoron_used = 0
|
|
||||||
var/breath_pressure = (breath.total_moles * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME
|
|
||||||
|
|
||||||
//Partial pressure of the phoron in our breath
|
|
||||||
var/Toxins_pp = (breath.gas["phoron"] / breath.total_moles) * breath_pressure
|
|
||||||
|
|
||||||
if(Toxins_pp) // Detect phoron in air
|
|
||||||
|
|
||||||
adjustToxLoss(breath.gas["phoron"] * 250)
|
|
||||||
phoron_alert = max(phoron_alert, 1)
|
|
||||||
|
|
||||||
phoron_used = breath.gas["phoron"]
|
|
||||||
|
|
||||||
else
|
|
||||||
phoron_alert = 0
|
|
||||||
|
|
||||||
//Breathe in phoron and out oxygen
|
|
||||||
breath.adjust_gas("phoron", -phoron_used)
|
|
||||||
breath.adjust_gas("oxygen", phoron_used)
|
|
||||||
|
|
||||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE 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(FAT in mutations)
|
|
||||||
if(nutrition < 100)
|
|
||||||
if(prob(round((50 - nutrition) / 100)))
|
|
||||||
src << "\blue You feel fit again!"
|
|
||||||
mutations.Add(FAT)
|
|
||||||
/* else
|
|
||||||
if(nutrition > 500)
|
|
||||||
if(prob(5 + round((nutrition - max_grown) / 2)))
|
|
||||||
src << "\red You suddenly feel blubbery!"
|
|
||||||
mutations.Add(FAT)
|
|
||||||
FUCK YOU MORE FAT CODE -Hawk*/
|
|
||||||
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
|
|
||||||
blinded = 1
|
|
||||||
silent = 0
|
|
||||||
else //ALIVE. LIGHTS ARE ON
|
|
||||||
if(health < -25 || !has_brain())
|
|
||||||
death()
|
|
||||||
blinded = 1
|
|
||||||
silent = 0
|
|
||||||
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)
|
|
||||||
|
|
||||||
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 < 25) //ear damage heals slowly under this threshold.
|
|
||||||
ear_damage = max(ear_damage-0.05, 0)
|
|
||||||
|
|
||||||
//Other
|
|
||||||
handle_statuses()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
proc/handle_regular_hud_updates()
|
|
||||||
|
|
||||||
if (stat == 2 || (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
|
|
||||||
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[phoron_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
|
|
||||||
|
|
||||||
if (stat != 2)
|
|
||||||
if (machine)
|
|
||||||
if (!( machine.check_eye(src) ))
|
|
||||||
reset_view(null)
|
|
||||||
else
|
|
||||||
if(client && !client.adminobs)
|
|
||||||
reset_view(null)
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
proc/handle_random_events()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/mob/living/carbon/alien/larva/Login()
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
/mob/living/carbon/alien/larva/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/larva/verb/evolve()
|
|
||||||
set name = "Evolve"
|
|
||||||
set desc = "Evolve into a fully grown Alien."
|
|
||||||
set category = "Alien"
|
|
||||||
|
|
||||||
if(stat != CONSCIOUS)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(handcuffed || legcuffed)
|
|
||||||
src << "\red You cannot evolve when you are cuffed."
|
|
||||||
|
|
||||||
if(amount_grown >= max_grown) //TODO ~Carn
|
|
||||||
//green is impossible to read, so i made these blue and changed the formatting slightly
|
|
||||||
src << "\blue <b>You are growing into a beautiful alien! It is time to choose a caste.</b>"
|
|
||||||
src << "\blue There are three to choose from:"
|
|
||||||
src << "<B>Hunters</B> \blue are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
|
|
||||||
src << "<B>Sentinels</B> \blue are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
|
|
||||||
src << "<B>Drones</B> \blue are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
|
|
||||||
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
|
|
||||||
|
|
||||||
var/mob/living/carbon/alien/humanoid/new_xeno
|
|
||||||
switch(alien_caste)
|
|
||||||
if("Hunter")
|
|
||||||
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(loc)
|
|
||||||
if("Sentinel")
|
|
||||||
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
|
|
||||||
if("Drone")
|
|
||||||
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
|
|
||||||
if(mind) mind.transfer_to(new_xeno)
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
else
|
|
||||||
src << "\red You are not fully grown."
|
|
||||||
return
|
|
||||||
17
code/modules/mob/living/carbon/alien/larva/progression.dm
Normal file
17
code/modules/mob/living/carbon/alien/larva/progression.dm
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/mob/living/carbon/alien/larva/update_progression()
|
||||||
|
if(amount_grown < max_grown)
|
||||||
|
amount_grown++
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/larva/confirm_evolution()
|
||||||
|
|
||||||
|
src << "\blue <b>You are growing into a beautiful alien! It is time to choose a caste.</b>"
|
||||||
|
src << "\blue There are three to choose from:"
|
||||||
|
src << "<B>Hunters</B> \blue are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
|
||||||
|
src << "<B>Sentinels</B> \blue are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
|
||||||
|
src << "<B>Drones</B> \blue are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
|
||||||
|
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
|
||||||
|
return alien_caste ? "Xenomorph [alien_caste]" : null
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/larva/show_evolution_blurb()
|
||||||
|
return
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
/mob/living/carbon/alien/larva/regenerate_icons()
|
|
||||||
overlays = list()
|
|
||||||
update_icons()
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/update_icons()
|
|
||||||
var/state = 0
|
|
||||||
if(amount_grown > 150)
|
|
||||||
state = 2
|
|
||||||
else if(amount_grown > 50)
|
|
||||||
state = 1
|
|
||||||
|
|
||||||
if(stat == DEAD)
|
|
||||||
icon_state = "larva[state]_dead"
|
|
||||||
else if (handcuffed || legcuffed)
|
|
||||||
icon_state = "larva[state]_cuff"
|
|
||||||
else if (stunned)
|
|
||||||
icon_state = "larva[state]_stun"
|
|
||||||
else if(lying || resting)
|
|
||||||
icon_state = "larva[state]_sleep"
|
|
||||||
else
|
|
||||||
icon_state = "larva[state]"
|
|
||||||
63
code/modules/mob/living/carbon/alien/life.dm
Normal file
63
code/modules/mob/living/carbon/alien/life.dm
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
// Alien larva are quite simple.
|
||||||
|
/mob/living/carbon/alien/Life()
|
||||||
|
|
||||||
|
set invisibility = 0
|
||||||
|
set background = 1
|
||||||
|
|
||||||
|
if (monkeyizing)
|
||||||
|
return
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
if (stat != DEAD) //still breathing
|
||||||
|
|
||||||
|
// GROW!
|
||||||
|
update_progression()
|
||||||
|
|
||||||
|
// Radiation.
|
||||||
|
handle_mutations_and_radiation()
|
||||||
|
|
||||||
|
// Chemicals in the body
|
||||||
|
handle_chemicals_in_body()
|
||||||
|
|
||||||
|
blinded = null
|
||||||
|
|
||||||
|
handle_environment()
|
||||||
|
|
||||||
|
//Status updates, death etc.
|
||||||
|
handle_regular_status_updates()
|
||||||
|
update_canmove()
|
||||||
|
update_icons()
|
||||||
|
|
||||||
|
if(client)
|
||||||
|
handle_regular_hud_updates()
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/handle_chemicals_in_body()
|
||||||
|
return // Nothing yet. Maybe check it out at a later date.
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
|
||||||
|
// Currently both Dionaea and larvae like to eat radiation, so I'm defining the
|
||||||
|
// rad absorbtion here. This will need to be changed if other baby aliens are added.
|
||||||
|
|
||||||
|
if(!radiation)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/rads = radiation/25
|
||||||
|
radiation -= rads
|
||||||
|
nutrition += rads
|
||||||
|
heal_overall_damage(rads,rads)
|
||||||
|
adjustOxyLoss(-(rads))
|
||||||
|
adjustToxLoss(-(rads))
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/handle_environment(enviroment)
|
||||||
|
//TODO: Work out if larvae breathe/suffer from pressure/suffer from heat.
|
||||||
|
if(!enviroment)
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/handle_regular_status_updates()
|
||||||
|
// TODO: sleep, blind, stunned, paralyzed?
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/handle_regular_hud_updates()
|
||||||
|
return //TODO: Not sure what to do with this yet.
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/Login()
|
|
||||||
..()
|
|
||||||
AddInfectionImages()
|
|
||||||
return
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/Logout()
|
|
||||||
..()
|
|
||||||
RemoveInfectionImages()
|
|
||||||
return
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
/mob/living/carbon/alien/verb/ventcrawl() // -- TLE
|
|
||||||
set name = "Crawl through vent"
|
|
||||||
set desc = "Enter an air vent and crawl through the pipe system."
|
|
||||||
set category = "Alien"
|
|
||||||
handle_ventcrawl()
|
|
||||||
50
code/modules/mob/living/carbon/alien/progression.dm
Normal file
50
code/modules/mob/living/carbon/alien/progression.dm
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/mob/living/carbon/alien/verb/evolve()
|
||||||
|
|
||||||
|
set name = "Evolve"
|
||||||
|
set desc = "Evolve into your adult form."
|
||||||
|
set category = "Abilities"
|
||||||
|
|
||||||
|
if(stat != CONSCIOUS)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!adult_form)
|
||||||
|
verbs -= /mob/living/carbon/alien/verb/evolve
|
||||||
|
return
|
||||||
|
|
||||||
|
if(handcuffed || legcuffed)
|
||||||
|
src << "\red You cannot evolve when you are cuffed."
|
||||||
|
return
|
||||||
|
|
||||||
|
if(amount_grown < max_grown)
|
||||||
|
src << "\red You are not fully grown."
|
||||||
|
return
|
||||||
|
|
||||||
|
// confirm_evolution() handles choices and other specific requirements.
|
||||||
|
var/new_species = confirm_evolution()
|
||||||
|
if(!new_species || !adult_form )
|
||||||
|
return
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/adult = new adult_form(get_turf(src))
|
||||||
|
adult.set_species(new_species)
|
||||||
|
show_evolution_blurb()
|
||||||
|
|
||||||
|
if(mind)
|
||||||
|
mind.transfer_to(adult)
|
||||||
|
else
|
||||||
|
adult.key = src.key
|
||||||
|
|
||||||
|
for (var/obj/item/W in src.contents)
|
||||||
|
src.drop_from_inventory(W)
|
||||||
|
|
||||||
|
for(var/datum/language/L in languages)
|
||||||
|
adult.add_language(L.name)
|
||||||
|
del(src)
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/update_progression()
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/confirm_evolution()
|
||||||
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/proc/show_evolution_blurb()
|
||||||
|
return
|
||||||
@@ -1,68 +1,34 @@
|
|||||||
/mob/living/carbon/alien/say(var/message)
|
/mob/living/carbon/alien/say(var/message)
|
||||||
|
var/verb = "says"
|
||||||
if (silent)
|
var/message_range = world.view
|
||||||
return
|
|
||||||
|
if(client)
|
||||||
if (length(message) >= 2)
|
if(client.prefs.muted & MUTE_IC)
|
||||||
if (department_radio_keys[copytext(message, 1, 3)] == "alientalk")
|
src << "\red You cannot speak in IC (Muted)."
|
||||||
message = copytext(message, 3)
|
return
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
|
||||||
if (stat == 2)
|
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||||
return say_dead(message)
|
|
||||||
else
|
if(stat == 2)
|
||||||
alien_talk(message)
|
return say_dead(message)
|
||||||
else
|
|
||||||
if (copytext(message, 1, 2) != "*" && !stat)
|
var/datum/language/speaking = null
|
||||||
playsound(loc, "hiss", 25, 1, 1)//So aliens can hiss while they hiss yo/N
|
|
||||||
return ..(message)
|
if(length(message) >= 2)
|
||||||
else
|
var/channel_prefix = copytext(message, 1 ,3)
|
||||||
|
if(languages.len)
|
||||||
/mob/living/proc/alien_talk(var/message)
|
for(var/datum/language/L in languages)
|
||||||
|
if(lowertext(channel_prefix) == ":[L.key]")
|
||||||
log_say("[key_name(src)] : [message]")
|
verb = L.speech_verb
|
||||||
message = trim(message)
|
speaking = L
|
||||||
|
break
|
||||||
if (!message)
|
|
||||||
return
|
if(speaking)
|
||||||
|
message = trim(copytext(message,3))
|
||||||
var/message_a = say_quote(message)
|
|
||||||
var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
message = capitalize(trim_left(message))
|
||||||
for (var/mob/living/S in player_list)
|
|
||||||
if(!S.stat)
|
if(!message || stat)
|
||||||
if(S.alien_talk_understand)
|
return
|
||||||
if(S.alien_talk_understand == alien_talk_understand)
|
|
||||||
S.show_message(rendered, 2)
|
..(message, speaking, verb, null, null, message_range, null)
|
||||||
else if (S.hivecheck())
|
|
||||||
S.show_message(rendered, 2)
|
|
||||||
|
|
||||||
var/list/listening = hearers(1, src)
|
|
||||||
listening -= src
|
|
||||||
listening += src
|
|
||||||
|
|
||||||
var/list/heard = list()
|
|
||||||
for (var/mob/M in listening)
|
|
||||||
if(!istype(M, /mob/living/carbon/alien) && !M.alien_talk_understand)
|
|
||||||
heard += M
|
|
||||||
|
|
||||||
|
|
||||||
if (length(heard))
|
|
||||||
var/message_b
|
|
||||||
|
|
||||||
message_b = "hsssss"
|
|
||||||
message_b = say_quote(message_b)
|
|
||||||
message_b = "<i>[message_b]</i>"
|
|
||||||
|
|
||||||
rendered = "<i><span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span></i>"
|
|
||||||
|
|
||||||
for (var/mob/M in heard)
|
|
||||||
M.show_message(rendered, 2)
|
|
||||||
|
|
||||||
message = say_quote(message)
|
|
||||||
|
|
||||||
rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
|
|
||||||
|
|
||||||
for (var/mob/M in player_list)
|
|
||||||
if (istype(M, /mob/new_player))
|
|
||||||
continue
|
|
||||||
if (M.stat > 1)
|
|
||||||
M.show_message(rendered, 2)
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
//XCOM alien code
|
|
||||||
//By Xerif (Donated by the Foundation project, ss13.org)
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/special
|
|
||||||
has_fine_manipulation = 1
|
|
||||||
var/xcom_state
|
|
||||||
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
spawn (1)
|
|
||||||
var/datum/reagents/R = new/datum/reagents(100)
|
|
||||||
reagents = R
|
|
||||||
R.my_atom = src
|
|
||||||
|
|
||||||
mind = new()
|
|
||||||
mind.key = key
|
|
||||||
mind.special_role = "Special Xeno"
|
|
||||||
|
|
||||||
name = "[name] ([rand(1, 1000)])"
|
|
||||||
real_name = name
|
|
||||||
|
|
||||||
src.stand_icon = new /icon('xcomalien.dmi', xcom_state)
|
|
||||||
src.lying_icon = new /icon('xcomalien.dmi', xcom_state)
|
|
||||||
src.icon = src.stand_icon
|
|
||||||
|
|
||||||
remove_special_verbs()
|
|
||||||
|
|
||||||
rebuild_appearance()
|
|
||||||
|
|
||||||
death(gibbed)
|
|
||||||
..()
|
|
||||||
spawn(5)
|
|
||||||
gib()
|
|
||||||
|
|
||||||
Stat()
|
|
||||||
statpanel("Status")
|
|
||||||
if (src.client && src.client.holder)
|
|
||||||
stat(null, "([x], [y], [z])")
|
|
||||||
|
|
||||||
stat(null, "Intent: [src.a_intent]")
|
|
||||||
stat(null, "Move Mode: [src.m_intent]")
|
|
||||||
|
|
||||||
if (src.client.statpanel == "Status")
|
|
||||||
if (src.internal)
|
|
||||||
if (!src.internal.air_contents)
|
|
||||||
del(src.internal)
|
|
||||||
else
|
|
||||||
stat("Internal Atmosphere Info", src.internal.name)
|
|
||||||
stat("Tank Pressure", src.internal.air_contents.return_pressure())
|
|
||||||
stat("Distribution Pressure", src.internal.distribute_pressure)
|
|
||||||
return
|
|
||||||
|
|
||||||
alien_talk()
|
|
||||||
if(istype(src, /mob/living/carbon/alien/humanoid/special/etheral))
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
if(istype(src, /mob/living/carbon/alien/humanoid/special/sectoid))
|
|
||||||
..()
|
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/special/proc/xcom_attack()
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/special/proc/remove_special_verbs()
|
|
||||||
verbs -= /mob/living/carbon/alien/humanoid/verb/plant
|
|
||||||
verbs -= /mob/living/carbon/alien/humanoid/verb/ActivateHuggers
|
|
||||||
verbs -= /mob/living/carbon/alien/humanoid/verb/whisp
|
|
||||||
verbs -= /mob/living/carbon/alien/humanoid/verb/transfer_plasma
|
|
||||||
verbs -= /mob/living/carbon/alien/humanoid/verb/corrode
|
|
||||||
return
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
/mob/living/carbon/alien/humanoid/special/snakeman
|
|
||||||
name = "Snakeman"
|
|
||||||
desc = "This race developed in an extremely hostile environment. They are extremely tough and can resist extreme temperature variations. Their mobility depends on a snake-like giant \"foot\" which protects all the vital organs. "
|
|
||||||
xcom_state = "snake"
|
|
||||||
|
|
||||||
movement_delay()
|
|
||||||
return 4
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/special/snakeman/verb/lay_egg(mob/living/carbon/human/M as mob)
|
|
||||||
set name = "Impregnate"
|
|
||||||
set desc = "Lays an egg on a corpse, allowing the egg to feed."
|
|
||||||
set category = "Snakeman"
|
|
||||||
|
|
||||||
set src = view(0)
|
|
||||||
|
|
||||||
if(stat)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!M)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!M.client)
|
|
||||||
src << "This being is missing a brain."
|
|
||||||
return
|
|
||||||
|
|
||||||
visible_message("[src] extends a probiscis and stabs it into [M]")
|
|
||||||
|
|
||||||
if (!do_mob(usr, M, 50))
|
|
||||||
usr << "\red The injection of the egg has been interrupted!"
|
|
||||||
return
|
|
||||||
|
|
||||||
if(M.client)
|
|
||||||
M.client.mob = new/mob/living/carbon/alien/humanoid/special/snakeman(new/obj/effect/snake_egg(src.loc))
|
|
||||||
visible_message("[src] injects [M] with an egg.")
|
|
||||||
visible_message("The egg absorbs [M]")
|
|
||||||
M.mutations |= NOCLONE
|
|
||||||
M.update_body()
|
|
||||||
M.death()
|
|
||||||
else
|
|
||||||
src << "This being is missing a brain."
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/effect/snake_egg
|
|
||||||
name = "Egg"
|
|
||||||
icon = 'icons/mob/alien.dmi'
|
|
||||||
icon_state = "egg"
|
|
||||||
density = 1
|
|
||||||
anchored = 1
|
|
||||||
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
|
|
||||||
spawn(300)
|
|
||||||
for(var/mob/M in src)
|
|
||||||
M.loc = src.loc
|
|
||||||
icon_state = "egg_hatched"
|
|
||||||
density = 0
|
|
||||||
return
|
|
||||||
22
code/modules/mob/living/carbon/alien/update_icons.dm
Normal file
22
code/modules/mob/living/carbon/alien/update_icons.dm
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/mob/living/carbon/alien/regenerate_icons()
|
||||||
|
overlays = list()
|
||||||
|
update_icons()
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/update_icons()
|
||||||
|
|
||||||
|
var/state = 0
|
||||||
|
if(amount_grown > max_grown*0.75)
|
||||||
|
state = 2
|
||||||
|
else if(amount_grown > max_grown*0.25)
|
||||||
|
state = 1
|
||||||
|
|
||||||
|
if(stat == DEAD)
|
||||||
|
icon_state = "[initial(icon_state)][state]_dead"
|
||||||
|
else if (handcuffed || legcuffed)
|
||||||
|
icon_state = "[initial(icon_state)][state]_cuff"
|
||||||
|
else if (stunned)
|
||||||
|
icon_state = "[initial(icon_state)][state]_stun"
|
||||||
|
else if(lying || resting)
|
||||||
|
icon_state = "[initial(icon_state)][state]_sleep"
|
||||||
|
else
|
||||||
|
icon_state = "[initial(icon_state)][state]"
|
||||||
@@ -132,7 +132,6 @@
|
|||||||
src.brainmob.real_name = src.brainmob.name
|
src.brainmob.real_name = src.brainmob.name
|
||||||
src.brainmob.loc = src
|
src.brainmob.loc = src
|
||||||
src.brainmob.container = src
|
src.brainmob.container = src
|
||||||
src.brainmob.robot_talk_understand = 1
|
|
||||||
src.brainmob.stat = 0
|
src.brainmob.stat = 0
|
||||||
src.brainmob.silent = 0
|
src.brainmob.silent = 0
|
||||||
dead_mob_list -= src.brainmob
|
dead_mob_list -= src.brainmob
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//TODO: Convert this over for languages.
|
||||||
/mob/living/carbon/brain/say(var/message)
|
/mob/living/carbon/brain/say(var/message)
|
||||||
if (silent)
|
if (silent)
|
||||||
return
|
return
|
||||||
@@ -5,11 +6,6 @@
|
|||||||
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
|
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
|
||||||
return //No MMI, can't speak, bucko./N
|
return //No MMI, can't speak, bucko./N
|
||||||
else
|
else
|
||||||
if ((department_radio_keys[copytext(message, 1, 3)] == "binary") && (container && istype(container, /obj/item/device/mmi/posibrain)))
|
|
||||||
message = copytext(message, 3)
|
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
|
||||||
robot_talk(message)
|
|
||||||
return
|
|
||||||
if(prob(emp_damage*4))
|
if(prob(emp_damage*4))
|
||||||
if(prob(10))//10% chane to drop the message entirely
|
if(prob(10))//10% chane to drop the message entirely
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -224,7 +224,11 @@
|
|||||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \
|
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \
|
||||||
"<span class='notice'>You shake [src] trying to wake [t_him] up!")
|
"<span class='notice'>You shake [src] trying to wake [t_him] up!")
|
||||||
else
|
else
|
||||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [t_him] feel better!</span>", \
|
var/mob/living/carbon/human/H = M
|
||||||
|
if(istype(H))
|
||||||
|
H.species.hug(H,src)
|
||||||
|
else
|
||||||
|
M.visible_message("<span class='notice'>[M] hugs [src] to make [t_him] feel better!</span>", \
|
||||||
"<span class='notice'>You hug [src] to make [t_him] feel better!</span>")
|
"<span class='notice'>You hug [src] to make [t_him] feel better!</span>")
|
||||||
|
|
||||||
AdjustParalysis(-3)
|
AdjustParalysis(-3)
|
||||||
@@ -427,7 +431,7 @@
|
|||||||
//Brain slug proc for voluntary removal of control.
|
//Brain slug proc for voluntary removal of control.
|
||||||
/mob/living/carbon/proc/release_control()
|
/mob/living/carbon/proc/release_control()
|
||||||
|
|
||||||
set category = "Alien"
|
set category = "Abilities"
|
||||||
set name = "Release Control"
|
set name = "Release Control"
|
||||||
set desc = "Release control of your host's body."
|
set desc = "Release control of your host's body."
|
||||||
|
|
||||||
@@ -447,7 +451,7 @@
|
|||||||
|
|
||||||
//Brain slug proc for tormenting the host.
|
//Brain slug proc for tormenting the host.
|
||||||
/mob/living/carbon/proc/punish_host()
|
/mob/living/carbon/proc/punish_host()
|
||||||
set category = "Alien"
|
set category = "Abilities"
|
||||||
set name = "Torment host"
|
set name = "Torment host"
|
||||||
set desc = "Punish your host with agony."
|
set desc = "Punish your host with agony."
|
||||||
|
|
||||||
@@ -470,7 +474,7 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/mob/living/carbon/proc/spawn_larvae()
|
/mob/living/carbon/proc/spawn_larvae()
|
||||||
set category = "Alien"
|
set category = "Abilities"
|
||||||
set name = "Reproduce"
|
set name = "Reproduce"
|
||||||
set desc = "Spawn several young."
|
set desc = "Spawn several young."
|
||||||
|
|
||||||
@@ -491,4 +495,4 @@
|
|||||||
|
|
||||||
else
|
else
|
||||||
src << "You do not have enough chemicals stored to reproduce."
|
src << "You do not have enough chemicals stored to reproduce."
|
||||||
return
|
return
|
||||||
39
code/modules/mob/living/carbon/carbon_powers.dm
Normal file
39
code/modules/mob/living/carbon/carbon_powers.dm
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
//TODO: Consider renaming carbon/monkey to carbon/small.
|
||||||
|
|
||||||
|
/mob/living/carbon/proc/fertilize_plant()
|
||||||
|
|
||||||
|
set category = "Abilities"
|
||||||
|
set name = "Fertilize plant"
|
||||||
|
set desc = "Turn your food into nutrients for plants."
|
||||||
|
|
||||||
|
var/list/trays = list()
|
||||||
|
for(var/obj/machinery/portable_atmospherics/hydroponics/tray in range(1))
|
||||||
|
if(tray.nutrilevel < 10 && src.Adjacent(tray))
|
||||||
|
trays += tray
|
||||||
|
|
||||||
|
var/obj/machinery/portable_atmospherics/hydroponics/target = input("Select a tray:") as null|anything in trays
|
||||||
|
|
||||||
|
if(!src || !target || target.nutrilevel == 10) return //Sanity check.
|
||||||
|
|
||||||
|
src.nutrition -= ((10-target.nutrilevel)*5)
|
||||||
|
target.nutrilevel = 10
|
||||||
|
src.visible_message("\red [src] secretes a trickle of green liquid, refilling [target]'s nutrient tray.","\red You secrete a trickle of green liquid from your tail, refilling [target]'s nutrient tray.")
|
||||||
|
|
||||||
|
/mob/living/carbon/proc/eat_weeds()
|
||||||
|
|
||||||
|
set category = "Abilities"
|
||||||
|
set name = "Eat Weeds"
|
||||||
|
set desc = "Clean the weeds out of soil or a hydroponics tray."
|
||||||
|
|
||||||
|
var/list/trays = list()
|
||||||
|
for(var/obj/machinery/portable_atmospherics/hydroponics/tray in range(1))
|
||||||
|
if(tray.weedlevel > 0 && src.Adjacent(tray))
|
||||||
|
trays += tray
|
||||||
|
|
||||||
|
var/obj/machinery/portable_atmospherics/hydroponics/target = input("Select a tray:") as null|anything in trays
|
||||||
|
|
||||||
|
if(!src || !target || target.weedlevel == 0) return //Sanity check.
|
||||||
|
|
||||||
|
src.reagents.add_reagent("nutriment", target.weedlevel)
|
||||||
|
target.weedlevel = 0
|
||||||
|
src.visible_message("\red [src] begins rooting through [target], ripping out weeds and eating them noisily.","\red You begin rooting through [target], ripping out weeds and eating them noisily.")
|
||||||
92
code/modules/mob/living/carbon/human/alien/alien.dm
Normal file
92
code/modules/mob/living/carbon/human/alien/alien.dm
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
proc/create_new_xenomorph(var/alien_caste,var/target)
|
||||||
|
|
||||||
|
target = get_turf(target)
|
||||||
|
if(!target || !alien_caste) return
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/new_alien = new(target)
|
||||||
|
new_alien.set_species("Xenomorph [alien_caste]")
|
||||||
|
return new_alien
|
||||||
|
|
||||||
|
/mob/living/carbon/human/xdrone/New(var/new_loc)
|
||||||
|
h_style = "Bald"
|
||||||
|
..(new_loc, "Xenomorph Drone")
|
||||||
|
|
||||||
|
/mob/living/carbon/human/xsentinel/New(var/new_loc)
|
||||||
|
h_style = "Bald"
|
||||||
|
..(new_loc, "Xenomorph Sentinel")
|
||||||
|
|
||||||
|
/mob/living/carbon/human/xhunter/New(var/new_loc)
|
||||||
|
h_style = "Bald"
|
||||||
|
..(new_loc, "Xenomorph Hunter")
|
||||||
|
|
||||||
|
/mob/living/carbon/human/xqueen/New(var/new_loc)
|
||||||
|
h_style = "Bald"
|
||||||
|
..(new_loc, "Xenomorph Queen")
|
||||||
|
|
||||||
|
/mob/living/carbon/human/Stat()
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
// I feel like we should generalize/condense down all the various icon-rendering antag procs.
|
||||||
|
/*----------------------------------------
|
||||||
|
Proc: AddInfectionImages()
|
||||||
|
Des: Gives the client of the alien an image on each infected mob.
|
||||||
|
----------------------------------------*/
|
||||||
|
/mob/living/carbon/human/proc/AddInfectionImages()
|
||||||
|
if (client)
|
||||||
|
for (var/mob/living/C in mob_list)
|
||||||
|
if(C.status_flags & XENO_HOST)
|
||||||
|
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
|
||||||
|
|
||||||
|
/*----------------------------------------
|
||||||
|
Proc: RemoveInfectionImages()
|
||||||
|
Des: Removes all infected images from the alien.
|
||||||
|
----------------------------------------*/
|
||||||
|
/mob/living/carbon/human/proc/RemoveInfectionImages()
|
||||||
|
if (client)
|
||||||
|
for(var/image/I in client.images)
|
||||||
|
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||||
|
del(I)
|
||||||
|
return
|
||||||
|
|
||||||
|
/* TODO: Convert this over.
|
||||||
|
/mob/living/carbon/human/alien/show_inv(mob/user as mob)
|
||||||
|
|
||||||
|
user.set_machine(src)
|
||||||
|
var/dat = {"
|
||||||
|
<B><HR><FONT size=3>[name]</FONT></B>
|
||||||
|
<BR><HR>
|
||||||
|
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
|
||||||
|
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
|
||||||
|
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
|
||||||
|
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
|
||||||
|
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
|
||||||
|
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||||
|
<BR>"}
|
||||||
|
user << browse(dat, text("window=mob[name];size=340x480"))
|
||||||
|
onclose(user, "mob[name]")
|
||||||
|
return
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* TODO: Convert this over.
|
||||||
|
/mob/living/carbon/human/alien/queen/large
|
||||||
|
icon = 'icons/mob/alienqueen.dmi'
|
||||||
|
icon_state = "queen_s"
|
||||||
|
pixel_x = -16
|
||||||
|
|
||||||
|
/mob/living/carbon/human/alien/queen/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
|
||||||
|
overlays.Cut()
|
||||||
|
if(lying)
|
||||||
|
if(resting) icon_state = "queen_sleep"
|
||||||
|
else icon_state = "queen_l"
|
||||||
|
for(var/image/I in overlays_lying)
|
||||||
|
overlays += I
|
||||||
|
else
|
||||||
|
icon_state = "queen_s"
|
||||||
|
for(var/image/I in overlays_standing)
|
||||||
|
overlays += I*/
|
||||||
@@ -1,143 +1,159 @@
|
|||||||
// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability
|
// 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)
|
// It functions almost identically (see code/datums/diseases/alien_embryo.dm)
|
||||||
|
|
||||||
/obj/item/alien_embryo
|
/obj/item/alien_embryo
|
||||||
name = "alien embryo"
|
name = "alien embryo"
|
||||||
desc = "All slimy and yuck."
|
desc = "All slimy and yuck."
|
||||||
icon = 'icons/mob/alien.dmi'
|
icon = 'icons/mob/alien.dmi'
|
||||||
icon_state = "larva0_dead"
|
icon_state = "larva0_dead"
|
||||||
var/mob/living/affected_mob
|
var/mob/living/affected_mob
|
||||||
var/stage = 0
|
var/stage = 0
|
||||||
|
|
||||||
/obj/item/alien_embryo/New()
|
/obj/item/alien_embryo/New()
|
||||||
if(istype(loc, /mob/living))
|
if(istype(loc, /mob/living))
|
||||||
affected_mob = loc
|
affected_mob = loc
|
||||||
processing_objects.Add(src)
|
processing_objects.Add(src)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
AddInfectionImages(affected_mob)
|
AddInfectionImages(affected_mob)
|
||||||
else
|
else
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/item/alien_embryo/Del()
|
/obj/item/alien_embryo/Del()
|
||||||
if(affected_mob)
|
if(affected_mob)
|
||||||
affected_mob.status_flags &= ~(XENO_HOST)
|
affected_mob.status_flags &= ~(XENO_HOST)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
RemoveInfectionImages(affected_mob)
|
RemoveInfectionImages(affected_mob)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/alien_embryo/process()
|
/obj/item/alien_embryo/process()
|
||||||
if(!affected_mob) return
|
if(!affected_mob) return
|
||||||
if(loc != affected_mob)
|
if(loc != affected_mob)
|
||||||
affected_mob.status_flags &= ~(XENO_HOST)
|
affected_mob.status_flags &= ~(XENO_HOST)
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
RemoveInfectionImages(affected_mob)
|
RemoveInfectionImages(affected_mob)
|
||||||
affected_mob = null
|
affected_mob = null
|
||||||
return
|
return
|
||||||
|
|
||||||
if(stage < 5 && prob(3))
|
if(stage < 5 && prob(3))
|
||||||
stage++
|
stage++
|
||||||
spawn(0)
|
spawn(0)
|
||||||
RefreshInfectionImage(affected_mob)
|
RefreshInfectionImage(affected_mob)
|
||||||
|
|
||||||
switch(stage)
|
switch(stage)
|
||||||
if(2, 3)
|
if(2, 3)
|
||||||
if(prob(1))
|
if(prob(1))
|
||||||
affected_mob.emote("sneeze")
|
affected_mob.emote("sneeze")
|
||||||
if(prob(1))
|
if(prob(1))
|
||||||
affected_mob.emote("cough")
|
affected_mob.emote("cough")
|
||||||
if(prob(1))
|
if(prob(1))
|
||||||
affected_mob << "\red Your throat feels sore."
|
affected_mob << "\red Your throat feels sore."
|
||||||
if(prob(1))
|
if(prob(1))
|
||||||
affected_mob << "\red Mucous runs down the back of your throat."
|
affected_mob << "\red Mucous runs down the back of your throat."
|
||||||
if(4)
|
if(4)
|
||||||
if(prob(1))
|
if(prob(1))
|
||||||
affected_mob.emote("sneeze")
|
affected_mob.emote("sneeze")
|
||||||
if(prob(1))
|
if(prob(1))
|
||||||
affected_mob.emote("cough")
|
affected_mob.emote("cough")
|
||||||
if(prob(2))
|
if(prob(2))
|
||||||
affected_mob << "\red Your muscles ache."
|
affected_mob << "\red Your muscles ache."
|
||||||
if(prob(20))
|
if(prob(20))
|
||||||
affected_mob.take_organ_damage(1)
|
affected_mob.take_organ_damage(1)
|
||||||
if(prob(2))
|
if(prob(2))
|
||||||
affected_mob << "\red Your stomach hurts."
|
affected_mob << "\red Your stomach hurts."
|
||||||
if(prob(20))
|
if(prob(20))
|
||||||
affected_mob.adjustToxLoss(1)
|
affected_mob.adjustToxLoss(1)
|
||||||
affected_mob.updatehealth()
|
affected_mob.updatehealth()
|
||||||
if(5)
|
if(5)
|
||||||
affected_mob << "\red You feel something tearing its way out of your stomach..."
|
affected_mob << "\red You feel something tearing its way out of your stomach..."
|
||||||
affected_mob.adjustToxLoss(10)
|
affected_mob.adjustToxLoss(10)
|
||||||
affected_mob.updatehealth()
|
affected_mob.updatehealth()
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
AttemptGrow()
|
AttemptGrow()
|
||||||
|
|
||||||
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||||
var/list/candidates = get_alien_candidates()
|
var/list/candidates = get_alien_candidates()
|
||||||
var/picked = null
|
var/picked = null
|
||||||
|
|
||||||
// To stop clientless larva, we will check that our host has a client
|
// 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
|
// 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
|
// 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.
|
// to 2, so we don't do a process heavy check everytime.
|
||||||
|
|
||||||
if(candidates.len)
|
if(candidates.len)
|
||||||
picked = pick(candidates)
|
picked = pick(candidates)
|
||||||
else if(affected_mob.client)
|
else if(affected_mob.client)
|
||||||
picked = affected_mob.key
|
picked = affected_mob.key
|
||||||
else
|
else
|
||||||
stage = 4 // Let's try again later.
|
stage = 4 // Let's try again later.
|
||||||
return
|
return
|
||||||
|
|
||||||
if(affected_mob.lying)
|
if(affected_mob.lying)
|
||||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
|
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie")
|
||||||
else
|
else
|
||||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
||||||
spawn(6)
|
spawn(6)
|
||||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||||
new_xeno.key = picked
|
new_xeno.key = picked
|
||||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||||
if(gib_on_success)
|
if(gib_on_success)
|
||||||
affected_mob.gib()
|
affected_mob.gib()
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/*----------------------------------------
|
/*----------------------------------------
|
||||||
Proc: RefreshInfectionImage()
|
Proc: RefreshInfectionImage()
|
||||||
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
|
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
|
||||||
----------------------------------------*/
|
----------------------------------------*/
|
||||||
/obj/item/alien_embryo/proc/RefreshInfectionImage()
|
/obj/item/alien_embryo/proc/RefreshInfectionImage()
|
||||||
for(var/mob/living/carbon/alien/alien in player_list)
|
|
||||||
if(alien.client)
|
for(var/mob/living/carbon/alien in player_list)
|
||||||
for(var/image/I in alien.client.images)
|
|
||||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
if(!locate(/datum/organ/internal/xenos/hivenode) in alien.internal_organs)
|
||||||
del(I)
|
continue
|
||||||
for(var/mob/living/L in mob_list)
|
|
||||||
if(iscorgi(L) || iscarbon(L))
|
if(alien.client)
|
||||||
if(L.status_flags & XENO_HOST)
|
for(var/image/I in alien.client.images)
|
||||||
var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[stage]")
|
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||||
alien.client.images += I
|
del(I)
|
||||||
|
for(var/mob/living/L in mob_list)
|
||||||
/*----------------------------------------
|
if(iscorgi(L) || iscarbon(L))
|
||||||
Proc: AddInfectionImages(C)
|
if(L.status_flags & XENO_HOST)
|
||||||
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
|
var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[stage]")
|
||||||
----------------------------------------*/
|
alien.client.images += I
|
||||||
/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
|
|
||||||
if(C)
|
/*----------------------------------------
|
||||||
for(var/mob/living/carbon/alien/alien in player_list)
|
Proc: AddInfectionImages(C)
|
||||||
if(alien.client)
|
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
|
||||||
if(C.status_flags & XENO_HOST)
|
----------------------------------------*/
|
||||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]")
|
/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
|
||||||
alien.client.images += I
|
if(C)
|
||||||
|
|
||||||
/*----------------------------------------
|
for(var/mob/living/carbon/alien in player_list)
|
||||||
Proc: RemoveInfectionImage(C)
|
|
||||||
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
|
if(!locate(/datum/organ/internal/xenos/hivenode) in alien.internal_organs)
|
||||||
----------------------------------------*/
|
continue
|
||||||
|
|
||||||
/obj/item/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C)
|
if(alien.client)
|
||||||
if(C)
|
if(C.status_flags & XENO_HOST)
|
||||||
for(var/mob/living/carbon/alien/alien in player_list)
|
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]")
|
||||||
if(alien.client)
|
alien.client.images += I
|
||||||
for(var/image/I in alien.client.images)
|
|
||||||
if(I.loc == C)
|
/*----------------------------------------
|
||||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
Proc: RemoveInfectionImage(C)
|
||||||
|
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
|
||||||
|
----------------------------------------*/
|
||||||
|
|
||||||
|
/obj/item/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C)
|
||||||
|
|
||||||
|
if(C)
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/alien in player_list)
|
||||||
|
|
||||||
|
if(!locate(/datum/organ/internal/xenos/hivenode) in alien.internal_organs)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if(alien.client)
|
||||||
|
for(var/image/I in alien.client.images)
|
||||||
|
if(I.loc == C)
|
||||||
|
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||||
del(I)
|
del(I)
|
||||||
@@ -1,241 +1,239 @@
|
|||||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||||
|
|
||||||
//TODO: Make these simple_animals
|
//TODO: Make these simple_animals
|
||||||
|
|
||||||
var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone
|
var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone
|
||||||
var/const/MAX_IMPREGNATION_TIME = 150
|
var/const/MAX_IMPREGNATION_TIME = 150
|
||||||
|
|
||||||
var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle
|
var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle
|
||||||
var/const/MAX_ACTIVE_TIME = 400
|
var/const/MAX_ACTIVE_TIME = 400
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger
|
/obj/item/clothing/mask/facehugger
|
||||||
name = "alien"
|
name = "alien"
|
||||||
desc = "It has some sort of a tube at the end of its tail."
|
desc = "It has some sort of a tube at the end of its tail."
|
||||||
icon = 'icons/mob/alien.dmi'
|
icon = 'icons/mob/alien.dmi'
|
||||||
icon_state = "facehugger"
|
icon_state = "facehugger"
|
||||||
item_state = "facehugger"
|
item_state = "facehugger"
|
||||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
||||||
body_parts_covered = FACE|EYES
|
body_parts_covered = FACE|EYES
|
||||||
throw_range = 5
|
throw_range = 5
|
||||||
|
|
||||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||||
|
var/sterile = 0
|
||||||
var/sterile = 0
|
var/strength = 5
|
||||||
|
var/attached = 0
|
||||||
var/strength = 5
|
|
||||||
|
/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens
|
||||||
var/attached = 0
|
attack_hand(user)
|
||||||
|
return
|
||||||
/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens
|
|
||||||
if(isalien(user))
|
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||||
attack_hand(user)
|
|
||||||
return
|
if((stat == CONSCIOUS && !sterile))
|
||||||
else
|
Attach(user)
|
||||||
..()
|
return
|
||||||
return
|
else
|
||||||
|
..()
|
||||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
return
|
||||||
if((stat == CONSCIOUS && !sterile) && !isalien(user))
|
|
||||||
Attach(user)
|
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
||||||
return
|
..()
|
||||||
else
|
user.drop_from_inventory(src)
|
||||||
..()
|
Attach(M)
|
||||||
return
|
|
||||||
|
/obj/item/clothing/mask/facehugger/New()
|
||||||
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
if(aliens_allowed)
|
||||||
..()
|
..()
|
||||||
user.drop_from_inventory(src)
|
else
|
||||||
Attach(M)
|
del(src)
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/New()
|
/obj/item/clothing/mask/facehugger/examine()
|
||||||
if(aliens_allowed)
|
..()
|
||||||
..()
|
switch(stat)
|
||||||
else
|
if(DEAD,UNCONSCIOUS)
|
||||||
del(src)
|
usr << "\red \b [src] is not moving."
|
||||||
|
if(CONSCIOUS)
|
||||||
/obj/item/clothing/mask/facehugger/examine()
|
usr << "\red \b [src] seems to be active."
|
||||||
..()
|
if (sterile)
|
||||||
switch(stat)
|
usr << "\red \b It looks like the proboscis has been removed."
|
||||||
if(DEAD,UNCONSCIOUS)
|
return
|
||||||
usr << "\red \b [src] is not moving."
|
|
||||||
if(CONSCIOUS)
|
/obj/item/clothing/mask/facehugger/attackby()
|
||||||
usr << "\red \b [src] seems to be active."
|
Die()
|
||||||
if (sterile)
|
return
|
||||||
usr << "\red \b It looks like the proboscis has been removed."
|
|
||||||
return
|
/obj/item/clothing/mask/facehugger/bullet_act()
|
||||||
|
Die()
|
||||||
/obj/item/clothing/mask/facehugger/attackby()
|
return
|
||||||
Die()
|
|
||||||
return
|
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
|
if(exposed_temperature > 300)
|
||||||
/obj/item/clothing/mask/facehugger/bullet_act()
|
Die()
|
||||||
Die()
|
return
|
||||||
return
|
|
||||||
|
/obj/item/clothing/mask/facehugger/equipped(mob/M)
|
||||||
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
Attach(M)
|
||||||
if(exposed_temperature > 300)
|
|
||||||
Die()
|
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
|
||||||
return
|
HasProximity(target)
|
||||||
|
return
|
||||||
/obj/item/clothing/mask/facehugger/equipped(mob/M)
|
|
||||||
Attach(M)
|
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
|
||||||
|
if(stat == CONSCIOUS)
|
||||||
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
|
HasProximity(finder)
|
||||||
HasProximity(target)
|
return 1
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
|
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
||||||
if(stat == CONSCIOUS)
|
if(CanHug(AM))
|
||||||
HasProximity(finder)
|
Attach(AM)
|
||||||
return 1
|
|
||||||
return
|
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
|
||||||
|
..()
|
||||||
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
if(stat == CONSCIOUS)
|
||||||
if(CanHug(AM))
|
icon_state = "[initial(icon_state)]_thrown"
|
||||||
Attach(AM)
|
spawn(15)
|
||||||
|
if(icon_state == "[initial(icon_state)]_thrown")
|
||||||
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
|
icon_state = "[initial(icon_state)]"
|
||||||
..()
|
|
||||||
if(stat == CONSCIOUS)
|
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
||||||
icon_state = "[initial(icon_state)]_thrown"
|
..()
|
||||||
spawn(15)
|
if(stat == CONSCIOUS)
|
||||||
if(icon_state == "[initial(icon_state)]_thrown")
|
icon_state = "[initial(icon_state)]"
|
||||||
icon_state = "[initial(icon_state)]"
|
Attach(hit_atom)
|
||||||
|
throwing = 0
|
||||||
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
|
||||||
..()
|
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||||
if(stat == CONSCIOUS)
|
|
||||||
icon_state = "[initial(icon_state)]"
|
if((!iscorgi(M) && !iscarbon(M)))
|
||||||
Attach(hit_atom)
|
return
|
||||||
throwing = 0
|
|
||||||
|
if(attached)
|
||||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
return
|
||||||
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
|
|
||||||
return
|
var/mob/living/carbon/C = M
|
||||||
if(attached)
|
if(istype(C) && locate(/datum/organ/internal/xenos/hivenode) in C.internal_organs)
|
||||||
return
|
return
|
||||||
else
|
|
||||||
attached++
|
attached++
|
||||||
spawn(MAX_IMPREGNATION_TIME)
|
spawn(MAX_IMPREGNATION_TIME)
|
||||||
attached = 0
|
attached = 0
|
||||||
|
|
||||||
var/mob/living/L = M //just so I don't need to use :
|
var/mob/living/L = M //just so I don't need to use :
|
||||||
|
|
||||||
if(loc == L) return
|
if(loc == L) return
|
||||||
if(stat != CONSCIOUS) return
|
if(stat != CONSCIOUS) return
|
||||||
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||||
|
|
||||||
L.visible_message("\red \b [src] leaps at [L]'s face!")
|
L.visible_message("\red \b [src] leaps at [L]'s face!")
|
||||||
|
|
||||||
if(ishuman(L))
|
if(ishuman(L))
|
||||||
var/mob/living/carbon/human/H = L
|
var/mob/living/carbon/human/H = L
|
||||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||||
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
|
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
|
||||||
Die()
|
Die()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(iscarbon(M))
|
if(iscarbon(M))
|
||||||
var/mob/living/carbon/target = L
|
var/mob/living/carbon/target = L
|
||||||
|
|
||||||
if(target.wear_mask)
|
if(target.wear_mask)
|
||||||
if(prob(20)) return
|
if(prob(20)) return
|
||||||
var/obj/item/clothing/W = target.wear_mask
|
var/obj/item/clothing/W = target.wear_mask
|
||||||
if(!W.canremove) return
|
if(!W.canremove) return
|
||||||
target.drop_from_inventory(W)
|
target.drop_from_inventory(W)
|
||||||
|
|
||||||
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
||||||
|
|
||||||
target.equip_to_slot(src, slot_wear_mask)
|
target.equip_to_slot(src, slot_wear_mask)
|
||||||
|
|
||||||
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||||
else if (iscorgi(M))
|
else if (iscorgi(M))
|
||||||
var/mob/living/simple_animal/corgi/C = M
|
var/mob/living/simple_animal/corgi/corgi = M
|
||||||
src.loc = C
|
src.loc = corgi
|
||||||
C.facehugger = src
|
corgi.facehugger = src
|
||||||
C.wear_mask = src
|
corgi.wear_mask = src
|
||||||
//C.regenerate_icons()
|
//C.regenerate_icons()
|
||||||
|
|
||||||
GoIdle() //so it doesn't jump the people that tear it off
|
GoIdle() //so it doesn't jump the people that tear it off
|
||||||
|
|
||||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||||
Impregnate(L)
|
Impregnate(L)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
|
/obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob)
|
||||||
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
|
if(!target || target.wear_mask != src || target.stat == DEAD) //was taken off or something
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!sterile)
|
if(!sterile)
|
||||||
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
|
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
|
||||||
new /obj/item/alien_embryo(target)
|
new /obj/item/alien_embryo(target)
|
||||||
target.status_flags |= XENO_HOST
|
target.status_flags |= XENO_HOST
|
||||||
|
|
||||||
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
|
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
|
||||||
|
|
||||||
Die()
|
Die()
|
||||||
icon_state = "[initial(icon_state)]_impregnated"
|
icon_state = "[initial(icon_state)]_impregnated"
|
||||||
|
|
||||||
if(iscorgi(target))
|
if(iscorgi(target))
|
||||||
var/mob/living/simple_animal/corgi/C = target
|
var/mob/living/simple_animal/corgi/C = target
|
||||||
src.loc = get_turf(C)
|
src.loc = get_turf(C)
|
||||||
C.facehugger = null
|
C.facehugger = null
|
||||||
else
|
else
|
||||||
target.visible_message("\red \b [src] violates [target]'s face!")
|
target.visible_message("\red \b [src] violates [target]'s face!")
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/proc/GoActive()
|
/obj/item/clothing/mask/facehugger/proc/GoActive()
|
||||||
if(stat == DEAD || stat == CONSCIOUS)
|
if(stat == DEAD || stat == CONSCIOUS)
|
||||||
return
|
return
|
||||||
|
|
||||||
stat = CONSCIOUS
|
stat = CONSCIOUS
|
||||||
icon_state = "[initial(icon_state)]"
|
icon_state = "[initial(icon_state)]"
|
||||||
|
|
||||||
/* for(var/mob/living/carbon/alien/alien in world)
|
return
|
||||||
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = src, icon_state = "facehugger_active")
|
|
||||||
activeIndicator.override = 1
|
/obj/item/clothing/mask/facehugger/proc/GoIdle()
|
||||||
if(alien && alien.client)
|
if(stat == DEAD || stat == UNCONSCIOUS)
|
||||||
alien.client.images += activeIndicator */
|
return
|
||||||
|
|
||||||
return
|
/* RemoveActiveIndicators() */
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/proc/GoIdle()
|
stat = UNCONSCIOUS
|
||||||
if(stat == DEAD || stat == UNCONSCIOUS)
|
icon_state = "[initial(icon_state)]_inactive"
|
||||||
return
|
|
||||||
|
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
|
||||||
/* RemoveActiveIndicators() */
|
GoActive()
|
||||||
|
return
|
||||||
stat = UNCONSCIOUS
|
|
||||||
icon_state = "[initial(icon_state)]_inactive"
|
/obj/item/clothing/mask/facehugger/proc/Die()
|
||||||
|
if(stat == DEAD)
|
||||||
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
|
return
|
||||||
GoActive()
|
|
||||||
return
|
/* RemoveActiveIndicators() */
|
||||||
|
|
||||||
/obj/item/clothing/mask/facehugger/proc/Die()
|
icon_state = "[initial(icon_state)]_dead"
|
||||||
if(stat == DEAD)
|
stat = DEAD
|
||||||
return
|
|
||||||
|
src.visible_message("\red \b[src] curls up into a ball!")
|
||||||
/* RemoveActiveIndicators() */
|
|
||||||
|
return
|
||||||
icon_state = "[initial(icon_state)]_dead"
|
|
||||||
stat = DEAD
|
/proc/CanHug(var/mob/M)
|
||||||
|
|
||||||
src.visible_message("\red \b[src] curls up into a ball!")
|
if(iscorgi(M))
|
||||||
|
return 1
|
||||||
return
|
|
||||||
|
if(!iscarbon(M))
|
||||||
/proc/CanHug(var/mob/M)
|
return 0
|
||||||
|
|
||||||
if(iscorgi(M))
|
var/mob/living/carbon/C = M
|
||||||
return 1
|
if(istype(C) && locate(/datum/organ/internal/xenos/hivenode) in C.internal_organs)
|
||||||
|
return 0
|
||||||
if(!iscarbon(M) || isalien(M))
|
|
||||||
return 0
|
if(ishuman(C))
|
||||||
var/mob/living/carbon/C = M
|
var/mob/living/carbon/human/H = C
|
||||||
if(ishuman(C))
|
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||||
var/mob/living/carbon/human/H = C
|
return 0
|
||||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
return 1
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user