mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Facehugger to Full alien, all player controlled
This commit is contained in:
@@ -236,6 +236,8 @@
|
||||
else if(isalien(M)) //aliens
|
||||
if(islarva(M))
|
||||
M_job = "Alien larva"
|
||||
else if(isfacehugger(M))
|
||||
M_job = "Alien facehugger"
|
||||
else
|
||||
M_job = "Alien"
|
||||
else
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
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("queen") M.change_mob_type( /mob/living/carbon/alien/humanoid/queen/large , 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("human") M.change_mob_type( /mob/living/carbon/human/human , null, null, delmob )
|
||||
|
||||
@@ -210,7 +210,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
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("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen/large(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)
|
||||
|
||||
@@ -194,7 +194,7 @@ Des: Gives the client of the alien an image on each infected mob.
|
||||
if (client)
|
||||
for (var/mob/living/C in mob_list)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/obj/item/alien_embryo/A = locate() in C
|
||||
var/mob/living/carbon/alien/embryo/A = locate() in C
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]")
|
||||
client.images += I
|
||||
return
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// 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)
|
||||
|
||||
/obj/item/alien_embryo
|
||||
/mob/living/carbon/alien/embryo
|
||||
name = "alien embryo"
|
||||
desc = "All slimy and yuck."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
@@ -9,27 +9,30 @@
|
||||
var/mob/living/affected_mob
|
||||
var/stage = 0
|
||||
|
||||
/obj/item/alien_embryo/New()
|
||||
/mob/living/carbon/alien/embryo/New()
|
||||
if(istype(loc, /mob/living))
|
||||
affected_mob = loc
|
||||
processing_objects.Add(src)
|
||||
spawn(0)
|
||||
AddInfectionImages(affected_mob)
|
||||
if(name == "alien embryo")
|
||||
name = "alien embryo ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/item/alien_embryo/Del()
|
||||
/mob/living/carbon/alien/embryo/Del()
|
||||
if(affected_mob)
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
..()
|
||||
|
||||
/obj/item/alien_embryo/process()
|
||||
/mob/living/carbon/alien/embryo/Life()
|
||||
if(!affected_mob) return
|
||||
if(loc != affected_mob)
|
||||
world << "Problem in contents"
|
||||
affected_mob.status_flags &= ~(XENO_HOST)
|
||||
processing_objects.Remove(src)
|
||||
spawn(0)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
affected_mob = null
|
||||
@@ -70,12 +73,16 @@
|
||||
affected_mob.updatehealth()
|
||||
if(prob(50))
|
||||
AttemptGrow()
|
||||
..()
|
||||
|
||||
/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
/mob/living/carbon/alien/embryo/proc/AttemptGrow(var/gib_on_success = 1)
|
||||
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
||||
spawn(6)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
for(var/mob/M in contents)
|
||||
if(istype(M,/mob/living/carbon/alien/facehugger))
|
||||
new_xeno.key = M.key
|
||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||
if(gib_on_success)
|
||||
affected_mob.gib()
|
||||
@@ -85,7 +92,7 @@
|
||||
Proc: RefreshInfectionImage()
|
||||
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/RefreshInfectionImage()
|
||||
/mob/living/carbon/alien/embryo/proc/RefreshInfectionImage()
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
@@ -101,7 +108,7 @@ Des: Removes all infection images from aliens and places an infection image on a
|
||||
Proc: AddInfectionImages(C)
|
||||
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
|
||||
----------------------------------------*/
|
||||
/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
|
||||
/mob/living/carbon/alien/embryo/AddInfectionImages(var/mob/living/C)
|
||||
if(C)
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
@@ -114,7 +121,7 @@ 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)
|
||||
/mob/living/carbon/alien/embryo/RemoveInfectionImages(var/mob/living/C)
|
||||
if(C)
|
||||
for(var/mob/living/carbon/alien/alien in player_list)
|
||||
if(alien.client)
|
||||
|
||||
@@ -8,52 +8,79 @@ var/const/MAX_IMPREGNATION_TIME = 150
|
||||
var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle
|
||||
var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
/obj/item/clothing/mask/facehugger
|
||||
name = "alien"
|
||||
/obj/item/weapon/holder/facehugger
|
||||
name = "facehugger"
|
||||
desc = "It has some sort of a tube at the end of its tail."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "facehugger"
|
||||
item_state = "facehugger"
|
||||
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
origin_tech = "magnets=3;biotech=5"
|
||||
w_class = 1
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | MASKINTERNALS
|
||||
/*
|
||||
/obj/item/weapon/holder/facehugger/throw_at(atom/target, range, speed)
|
||||
..()
|
||||
icon_state = "[initial(icon_state)]_thrown"
|
||||
spawn(15)
|
||||
if(icon_state == "[initial(icon_state)]_thrown")
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
|
||||
/obj/item/weapon/holder/facehugger/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
Attach(hit_atom)
|
||||
*/
|
||||
|
||||
|
||||
/mob/living/carbon/alien/facehugger
|
||||
name = "alien facehugger"
|
||||
desc = "It has some sort of a tube at the end of its tail."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "facehugger"
|
||||
flags = FPRINT | TABLEPASS
|
||||
throw_range = 5
|
||||
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
|
||||
maxHealth = 5
|
||||
health = 5
|
||||
var/strength=5
|
||||
var/sterile = 0
|
||||
|
||||
var/strength = 5
|
||||
|
||||
var/attached = 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens
|
||||
if(isalien(user))
|
||||
attack_hand(user)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||
if((stat == CONSCIOUS && !sterile) && !isalien(user))
|
||||
Attach(user)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack(mob/living/M as mob, mob/user as mob)
|
||||
..()
|
||||
user.drop_from_inventory(src)
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/New()
|
||||
/mob/living/carbon/alien/facehugger/New()
|
||||
if(aliens_allowed)
|
||||
if(name == "alien facehugger")
|
||||
name = "alien facehugger ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
..()
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/examine()
|
||||
/mob/living/carbon/alien/facehugger/attack_hand(mob/living/carbon/M as mob)
|
||||
|
||||
//Let people pick the little buggers up.
|
||||
if(istype(M,/mob/living/carbon/alien/humanoid))
|
||||
var/mob/living/carbon/alien/humanoid/H = M
|
||||
if(H.a_intent == "help")
|
||||
var/obj/item/weapon/holder/facehugger/F = new(loc)
|
||||
src.loc = F
|
||||
F.name = loc.name
|
||||
F.attack_hand(H)
|
||||
H << "You scoop up [src]."
|
||||
src << "[H] scoops you up."
|
||||
return
|
||||
else if(istype(M,/mob/living/carbon/human))
|
||||
if(stat == CONSCIOUS && !sterile)
|
||||
Attach(M)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/facehugger/examine()
|
||||
..()
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
@@ -64,51 +91,33 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
usr << "\red \b It looks like the proboscis has been removed."
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attackby()
|
||||
Die()
|
||||
return
|
||||
/mob/living/carbon/alien/facehugger/verb/hide()
|
||||
set name = "Hide"
|
||||
set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
|
||||
set category = "Alien"
|
||||
|
||||
/obj/item/clothing/mask/facehugger/bullet_act()
|
||||
Die()
|
||||
return
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
Die()
|
||||
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)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/equipped(mob/M)
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/Crossed(atom/target)
|
||||
HasProximity(target)
|
||||
return
|
||||
/mob/living/carbon/alien/facehugger/verb/Attach(M as mob)
|
||||
set name = "Facehug"
|
||||
set desc = "Allows you to molest someone's mouth-hole in the hope of impregnating them with an embryo."
|
||||
set category = "Alien"
|
||||
|
||||
/obj/item/clothing/mask/facehugger/on_found(mob/finder as mob)
|
||||
if(stat == CONSCIOUS)
|
||||
HasProximity(finder)
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(CanHug(AM))
|
||||
Attach(AM)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]_thrown"
|
||||
spawn(15)
|
||||
if(icon_state == "[initial(icon_state)]_thrown")
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/clothing/mask/facehugger/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
Attach(hit_atom)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Attach(M as mob)
|
||||
if( (!iscorgi(M) && !iscarbon(M)) || isalien(M))
|
||||
return
|
||||
if(attached)
|
||||
@@ -130,7 +139,7 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.head && H.head.flags & HEADCOVERSMOUTH)
|
||||
H.visible_message("\red \b [src] smashes against [H]'s [H.head]!")
|
||||
Die()
|
||||
stat = 2
|
||||
return
|
||||
|
||||
if(iscarbon(M))
|
||||
@@ -144,37 +153,46 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
target.visible_message("\red \b [src] tears [W] off of [target]'s face!")
|
||||
|
||||
target.equip_to_slot(src, slot_wear_mask)
|
||||
var/obj/item/weapon/holder/facehugger/FH = new(loc)
|
||||
src.loc = FH
|
||||
FH.name = loc.name
|
||||
target.equip_to_slot(FH, slot_wear_mask)
|
||||
target.regenerate_icons()
|
||||
|
||||
if(!sterile) L.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
|
||||
else if (iscorgi(M))
|
||||
var/mob/living/simple_animal/corgi/C = M
|
||||
src.loc = C
|
||||
C.facehugger = src
|
||||
C.wear_mask = src
|
||||
//C.regenerate_icons()
|
||||
var/obj/item/weapon/holder/facehugger/FH = new(loc)
|
||||
src.loc = FH
|
||||
FH.name = loc.name
|
||||
FH.loc = C
|
||||
C.facehugger = FH
|
||||
C.wear_mask = FH
|
||||
C.regenerate_icons()
|
||||
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
spawn(rand(MIN_IMPREGNATION_TIME,MAX_IMPREGNATION_TIME))
|
||||
Impregnate(L)
|
||||
|
||||
return
|
||||
|
||||
/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
|
||||
/mob/living/carbon/alien/facehugger/proc/Impregnate(mob/living/target as mob)
|
||||
if(!target || !target.wear_mask || (!src in target.wear_mask.contents) || target.stat == DEAD) //was taken off or something
|
||||
world << "Something went wrong with the impregnation!"
|
||||
return
|
||||
|
||||
if(!sterile)
|
||||
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
|
||||
new /obj/item/alien_embryo(target)
|
||||
var/mob/living/carbon/alien/embryo/A = new /mob/living/carbon/alien/embryo(target)
|
||||
target.status_flags |= XENO_HOST
|
||||
|
||||
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
|
||||
|
||||
Die()
|
||||
loc = get_turf(target.loc)
|
||||
stat = 2
|
||||
icon_state = "[initial(icon_state)]_impregnated"
|
||||
|
||||
target.visible_message("\red \b [src] falls limp after violating [target]'s face!")
|
||||
A.key = src.key
|
||||
|
||||
if(iscorgi(target))
|
||||
var/mob/living/simple_animal/corgi/C = target
|
||||
src.loc = get_turf(C)
|
||||
@@ -183,46 +201,6 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
target.visible_message("\red \b [src] violates [target]'s face!")
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/GoActive()
|
||||
if(stat == DEAD || stat == CONSCIOUS)
|
||||
return
|
||||
|
||||
stat = CONSCIOUS
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/* for(var/mob/living/carbon/alien/alien in world)
|
||||
var/image/activeIndicator = image('icons/mob/alien.dmi', loc = src, icon_state = "facehugger_active")
|
||||
activeIndicator.override = 1
|
||||
if(alien && alien.client)
|
||||
alien.client.images += activeIndicator */
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/GoIdle()
|
||||
if(stat == DEAD || stat == UNCONSCIOUS)
|
||||
return
|
||||
|
||||
/* RemoveActiveIndicators() */
|
||||
|
||||
stat = UNCONSCIOUS
|
||||
icon_state = "[initial(icon_state)]_inactive"
|
||||
|
||||
spawn(rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME))
|
||||
GoActive()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/proc/Die()
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
/* RemoveActiveIndicators() */
|
||||
|
||||
icon_state = "[initial(icon_state)]_dead"
|
||||
stat = DEAD
|
||||
|
||||
src.visible_message("\red \b[src] curls up into a ball!")
|
||||
|
||||
return
|
||||
|
||||
/proc/CanHug(var/mob/M)
|
||||
|
||||
|
||||
@@ -30,6 +30,16 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/isfacehugger(A)
|
||||
if(istype(A, /mob/living/carbon/alien/facehugger))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/isembryo(A)
|
||||
if(istype(A, /mob/living/carbon/alien/embryo))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isslime(A)
|
||||
if(istype(A, /mob/living/carbon/slime))
|
||||
return 1
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/embryo = 0
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
for(var/mob/living/carbon/alien/embryo/A in target)
|
||||
embryo = 1
|
||||
break
|
||||
return ..() && embryo && target.op_stage.ribcage == 2
|
||||
@@ -179,7 +179,7 @@
|
||||
user.visible_message("\red [user] rips the larva out of [target]'s ribcage!",
|
||||
"You rip the larva out of [target]'s ribcage!")
|
||||
|
||||
for(var/obj/item/alien_embryo/A in target)
|
||||
for(var/mob/living/carbon/alien/embryo/A in target)
|
||||
A.loc = A.loc.loc
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user