mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-05 15:04:21 +00:00
-Added Zelack's alien infection code. Aliens can now tell if someone is impregnated or not.
-Fixed a bug where a Cyborg could drop their module by clicking it on an operating table. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4561 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -15,6 +15,18 @@
|
||||
cure(0)
|
||||
return
|
||||
|
||||
/datum/disease/alien_embryo/New()
|
||||
..()
|
||||
/* Special Hud for xenos */
|
||||
spawn(0)
|
||||
if (affected_mob)
|
||||
AddInfectionImages(affected_mob)
|
||||
|
||||
/datum/disease/alien_embryo/cure(var/resistance=1)
|
||||
..()
|
||||
spawn(0)
|
||||
if (affected_mob)
|
||||
RemoveInfectionImages(affected_mob)
|
||||
|
||||
/datum/disease/alien_embryo
|
||||
name = "Unidentified Foreign Body"
|
||||
@@ -88,3 +100,51 @@
|
||||
gibbed = 1
|
||||
return
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: RefreshInfectionImage()
|
||||
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
|
||||
----------------------------------------*/
|
||||
/datum/disease/alien_embryo/proc/RefreshInfectionImage()
|
||||
spawn(0)
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
if (alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(I.icon_state == "infected")
|
||||
del(I)
|
||||
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
if (alien.client)
|
||||
for (var/mob/living/carbon/C in world)
|
||||
if(C)
|
||||
if (C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
alien.client.images += I
|
||||
return
|
||||
|
||||
/*----------------------------------------
|
||||
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.
|
||||
----------------------------------------*/
|
||||
/datum/disease/alien_embryo/proc/AddInfectionImages(var/mob/living/carbon/C)
|
||||
if (C)
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
if (alien.client)
|
||||
if (C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
alien.client.images += I
|
||||
return
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: RemoveInfectionImage(C)
|
||||
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
|
||||
----------------------------------------*/
|
||||
|
||||
/datum/disease/alien_embryo/proc/RemoveInfectionImages(var/mob/living/carbon/C)
|
||||
if (C)
|
||||
for (var/mob/living/carbon/alien/alien in world)
|
||||
if (alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(I.loc == C)
|
||||
if(I.icon_state == "infected")
|
||||
del(I)
|
||||
return
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
/obj/machinery/optable/process()
|
||||
check_victim()
|
||||
|
||||
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
if(ismob(W:affecting))
|
||||
|
||||
@@ -51,3 +51,29 @@
|
||||
// add some movement delay
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
return
|
||||
|
||||
|
||||
/*----------------------------------------
|
||||
Proc: AddInfectionImages()
|
||||
Des: Gives the client of the alien an image on each infected mob.
|
||||
----------------------------------------*/
|
||||
/mob/living/carbon/alien/proc/AddInfectionImages()
|
||||
if (client)
|
||||
for (var/mob/living/carbon/C in world)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected")
|
||||
client.images += I
|
||||
return
|
||||
|
||||
|
||||
/*----------------------------------------
|
||||
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(I.icon_state == "infected")
|
||||
del(I)
|
||||
return
|
||||
|
||||
|
||||
4
code/modules/mob/living/carbon/alien/login.dm
Normal file
4
code/modules/mob/living/carbon/alien/login.dm
Normal file
@@ -0,0 +1,4 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
AddInfectionImages()
|
||||
return
|
||||
4
code/modules/mob/living/carbon/alien/logout.dm
Normal file
4
code/modules/mob/living/carbon/alien/logout.dm
Normal file
@@ -0,0 +1,4 @@
|
||||
/mob/living/carbon/alien/humanoid/Logout()
|
||||
..()
|
||||
RemoveInfectionImages()
|
||||
return
|
||||
@@ -14,6 +14,9 @@
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/drop_item()
|
||||
return
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Reference in New Issue
Block a user