mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge remote-tracking branch 'upstream/master' into plasmamen-rework
# Conflicts: # code/modules/mob/living/carbon/human/update_icons.dm # icons/obj/device.dmi # paradise.dme
This commit is contained in:
@@ -29,6 +29,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
var/seedarkness = TRUE
|
||||
var/data_hud_seen = FALSE //this should one of the defines in __DEFINES/hud.dm
|
||||
var/ghost_orbit = GHOST_ORBIT_CIRCLE
|
||||
var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off
|
||||
|
||||
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
|
||||
set_invisibility(GLOB.observer_default_invisibility)
|
||||
@@ -236,6 +237,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return 1
|
||||
|
||||
/mob/dead/observer/Move(NewLoc, direct)
|
||||
update_parallax_contents()
|
||||
following = null
|
||||
setDir(direct)
|
||||
ghostimage.setDir(dir)
|
||||
@@ -417,6 +419,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
return
|
||||
|
||||
forceMove(pick(L))
|
||||
update_parallax_contents()
|
||||
following = null
|
||||
|
||||
/mob/dead/observer/verb/follow()
|
||||
@@ -511,6 +514,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
A.forceMove(T)
|
||||
M.update_parallax_contents()
|
||||
following = null
|
||||
return
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
|
||||
@@ -537,6 +542,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = 1
|
||||
to_chat(src, "<span class='warning'>You are dead! You have no mind to store memory!</span>")
|
||||
|
||||
|
||||
/mob/dead/observer/verb/toggle_health_scan()
|
||||
set name = "Toggle Health Scan"
|
||||
set desc = "Toggles whether you health-scan living beings on click"
|
||||
set category = "Ghost"
|
||||
|
||||
if(health_scan) //remove old huds
|
||||
to_chat(src, "<span class='notice'>Health scan disabled.</span>")
|
||||
health_scan = FALSE
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Health scan enabled.</span>")
|
||||
health_scan = TRUE
|
||||
|
||||
/mob/dead/observer/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
set category = "Ghost"
|
||||
@@ -761,14 +779,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
/mob/dead/observer/proc/incarnate_ghost()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/new_char = new(get_turf(src))
|
||||
client.prefs.copy_to(new_char)
|
||||
if(mind)
|
||||
mind.active = 1
|
||||
mind.active = TRUE
|
||||
mind.transfer_to(new_char)
|
||||
else
|
||||
new_char.key = key
|
||||
|
||||
return new_char
|
||||
|
||||
/mob/dead/observer/is_literate()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -338,18 +338,9 @@
|
||||
msg += "[p_they(TRUE)] [p_are()] mostly dessicated now, with only bones remaining of what used to be a person.\n"
|
||||
|
||||
if(hasHUD(user,"security"))
|
||||
var/perpname = "wot"
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/criminal = "None"
|
||||
|
||||
if(wear_id)
|
||||
var/obj/item/card/id/I = wear_id.GetID()
|
||||
if(I)
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = name
|
||||
else
|
||||
perpname = name
|
||||
|
||||
if(perpname)
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
@@ -361,18 +352,9 @@
|
||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=[UID()];secrecord=`'>\[View\]</a> <a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>\n"
|
||||
|
||||
if(hasHUD(user,"medical"))
|
||||
var/perpname = "wot"
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/medical = "None"
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
|
||||
@@ -711,17 +711,9 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/found_record = 0
|
||||
var/perpname = "wot"
|
||||
if(wear_id)
|
||||
var/obj/item/card/id/I = wear_id.GetID()
|
||||
if(I)
|
||||
perpname = I.registered_name
|
||||
else
|
||||
perpname = name
|
||||
else
|
||||
perpname = name
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
|
||||
if(perpname)
|
||||
if(perpname != "Unknown")
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
@@ -758,17 +750,9 @@
|
||||
if(hasHUD(usr,"security"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/read = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
@@ -790,24 +774,16 @@
|
||||
if(hasHUD(usr,"security"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/read = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"security"))
|
||||
read = 1
|
||||
if(length(R.fields["comments"]))
|
||||
if(LAZYLEN(R.fields["comments"]))
|
||||
for(var/c in R.fields["comments"])
|
||||
to_chat(usr, c)
|
||||
else
|
||||
@@ -821,15 +797,8 @@
|
||||
if(hasHUD(usr,"security"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
@@ -852,17 +821,8 @@
|
||||
if(hasHUD(usr,"medical"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
var/modified = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
@@ -887,17 +847,9 @@
|
||||
if(hasHUD(usr,"medical"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
var/read = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
@@ -920,24 +872,16 @@
|
||||
if(hasHUD(usr,"medical"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/read = 0
|
||||
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if(R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
read = 1
|
||||
if(length(R.fields["comments"]))
|
||||
if(LAZYLEN(R.fields["comments"]))
|
||||
for(var/c in R.fields["comments"])
|
||||
to_chat(usr, c)
|
||||
else
|
||||
@@ -951,15 +895,7 @@
|
||||
if(hasHUD(usr,"medical"))
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
var/perpname = "wot"
|
||||
if(wear_id)
|
||||
if(istype(wear_id,/obj/item/card/id))
|
||||
perpname = wear_id:registered_name
|
||||
else if(istype(wear_id,/obj/item/pda))
|
||||
var/obj/item/pda/tempPda = wear_id
|
||||
perpname = tempPda.owner
|
||||
else
|
||||
perpname = src.name
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
@@ -974,6 +910,9 @@
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
R.fields["comments"] += "Made by [U.name] (artificial intelligence) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
|
||||
if(href_list["lookitem"])
|
||||
var/obj/item/I = locate(href_list["lookitem"])
|
||||
@@ -1606,7 +1545,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
|
||||
//Check for arrest warrant
|
||||
if(judgebot.check_records)
|
||||
var/perpname = get_face_name(get_id_name())
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/datum/data/record/R = find_record("name", perpname, data_core.security)
|
||||
if(R && R.fields["criminal"])
|
||||
switch(R.fields["criminal"])
|
||||
@@ -1938,6 +1877,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
. = ..()
|
||||
. += "---"
|
||||
.["Set Species"] = "?_src_=vars;setspecies=[UID()]"
|
||||
.["Copy Outfit"] = "?_src_=vars;copyoutfit=[UID()]"
|
||||
.["Make AI"] = "?_src_=vars;makeai=[UID()]"
|
||||
.["Make cyborg"] = "?_src_=vars;makerobot=[UID()]"
|
||||
.["Make monkey"] = "?_src_=vars;makemonkey=[UID()]"
|
||||
|
||||
@@ -141,19 +141,19 @@ emp_act
|
||||
|
||||
if(l_hand && !istype(l_hand, /obj/item/clothing))
|
||||
var/final_block_chance = l_hand.block_chance - (Clamp((armour_penetration-l_hand.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
if(l_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
|
||||
if(l_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
|
||||
return 1
|
||||
if(r_hand && !istype(r_hand, /obj/item/clothing))
|
||||
var/final_block_chance = r_hand.block_chance - (Clamp((armour_penetration-r_hand.armour_penetration)/2,0,100)) + block_chance_modifier //Need to reset the var so it doesn't carry over modifications between attempts
|
||||
if(r_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
|
||||
if(r_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
|
||||
return 1
|
||||
if(wear_suit)
|
||||
var/final_block_chance = wear_suit.block_chance - (Clamp((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
|
||||
if(wear_suit.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
|
||||
if(wear_suit.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
|
||||
return 1
|
||||
if(w_uniform)
|
||||
var/final_block_chance = w_uniform.block_chance - (Clamp((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
|
||||
if(w_uniform.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
|
||||
if(w_uniform.hit_reaction(src, attack_text, final_block_chance, damage, attack_type, AM))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -525,4 +525,4 @@ emp_act
|
||||
if(head)
|
||||
to_chat(src, "<span class='danger'>Your [head.name] protects you from the [hot ? "hot" : "cold"] liquid!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -567,3 +567,10 @@
|
||||
return 0
|
||||
|
||||
return O.equip(src, visualsOnly)
|
||||
|
||||
//delete all equipment without dropping anything
|
||||
/mob/living/carbon/human/proc/delete_equipment()
|
||||
for(var/slot in get_all_slots())//order matters, dependant slots go first
|
||||
qdel(slot)
|
||||
for(var/obj/item/I in l_hand, r_hand)
|
||||
qdel(I)
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
/mob/living/carbon/human/SetStunned(amount, updating = 1, force = 0)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.stun_mod
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/SetWeakened(amount, updating = 1, force = 0)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.stun_mod
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/SetParalysis(amount, updating = 1, force = 0)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.stun_mod
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/SetSleeping(amount, updating = 1, no_alert = FALSE)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.stun_mod
|
||||
..()
|
||||
return ..()
|
||||
@@ -586,7 +586,8 @@ var/global/list/damage_icon_parts = list()
|
||||
standing.overlays += image("icon" = A.sprite_sheets[dna.species.name], "icon_state" = "[A.icon_state]")
|
||||
else
|
||||
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
|
||||
|
||||
standing.alpha = w_uniform.alpha
|
||||
standing.color = w_uniform.color
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
else
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform. //CHECK IF NECESARRY
|
||||
@@ -716,12 +717,13 @@ var/global/list/damage_icon_parts = list()
|
||||
l_ear.screen_loc = ui_l_ear //...draw the item in the inventory screen
|
||||
client.screen += l_ear //Either way, add the item to the HUD
|
||||
|
||||
var/t_type = l_ear.icon_state
|
||||
var/t_type = l_ear.item_state
|
||||
if(!t_type)
|
||||
t_type = l_ear.icon_state
|
||||
if(l_ear.icon_override)
|
||||
t_type = "[t_type]_l"
|
||||
overlays_standing[EARS_LAYER] = mutable_appearance(l_ear.icon_override, "[t_type]", layer = -EARS_LAYER)
|
||||
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[dna.species.name])
|
||||
t_type = "[t_type]_l"
|
||||
overlays_standing[EARS_LAYER] = mutable_appearance(l_ear.sprite_sheets[dna.species.name], "[t_type]", layer = -EARS_LAYER)
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = mutable_appearance('icons/mob/ears.dmi', "[t_type]", layer = -EARS_LAYER)
|
||||
@@ -732,12 +734,13 @@ var/global/list/damage_icon_parts = list()
|
||||
r_ear.screen_loc = ui_r_ear //...draw the item in the inventory screen
|
||||
client.screen += r_ear //Either way, add the item to the HUD
|
||||
|
||||
var/t_type = r_ear.icon_state
|
||||
var/t_type = r_ear.item_state
|
||||
if(!t_type)
|
||||
t_type = r_ear.icon_state
|
||||
if(r_ear.icon_override)
|
||||
t_type = "[t_type]_r"
|
||||
overlays_standing[EARS_LAYER] = mutable_appearance(r_ear.icon_override, "[t_type]", layer = -EARS_LAYER)
|
||||
else if(r_ear.sprite_sheets && r_ear.sprite_sheets[dna.species.name])
|
||||
t_type = "[t_type]_r"
|
||||
overlays_standing[EARS_LAYER] = mutable_appearance(r_ear.sprite_sheets[dna.species.name], "[t_type]", layer = -EARS_LAYER)
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = mutable_appearance('icons/mob/ears.dmi', "[t_type]", layer = -EARS_LAYER)
|
||||
@@ -769,6 +772,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "shoeblood")
|
||||
bloodsies.color = shoes.blood_color
|
||||
standing.overlays += bloodsies
|
||||
standing.alpha = shoes.alpha
|
||||
standing.color = shoes.color
|
||||
overlays_standing[SHOES_LAYER] = standing
|
||||
else
|
||||
if(feet_blood_DNA)
|
||||
@@ -819,6 +824,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "helmetblood")
|
||||
bloodsies.color = head.blood_color
|
||||
standing.overlays += bloodsies
|
||||
standing.alpha = head.alpha
|
||||
standing.color = head.color
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
apply_overlay(HEAD_LAYER)
|
||||
|
||||
@@ -886,6 +893,8 @@ var/global/list/damage_icon_parts = list()
|
||||
bloodsies.color = wear_suit.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
standing.alpha = wear_suit.alpha
|
||||
standing.color = wear_suit.color
|
||||
overlays_standing[SUIT_LAYER] = standing
|
||||
|
||||
apply_overlay(SUIT_LAYER)
|
||||
@@ -952,6 +961,9 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "maskblood")
|
||||
bloodsies.color = wear_mask.blood_color
|
||||
standing.overlays += bloodsies
|
||||
|
||||
standing.alpha = wear_mask.alpha
|
||||
standing.color = wear_mask.color
|
||||
overlays_standing[FACEMASK_LAYER] = standing
|
||||
apply_overlay(FACEMASK_LAYER)
|
||||
|
||||
@@ -974,6 +986,8 @@ var/global/list/damage_icon_parts = list()
|
||||
standing = mutable_appearance('icons/mob/back.dmi', "[back.icon_state]", layer = -BACK_LAYER)
|
||||
|
||||
//create the image
|
||||
standing.alpha = back.alpha
|
||||
standing.color = back.color
|
||||
overlays_standing[BACK_LAYER] = standing
|
||||
apply_overlay(BACK_LAYER)
|
||||
|
||||
@@ -1007,9 +1021,14 @@ var/global/list/damage_icon_parts = list()
|
||||
if(!t_state)
|
||||
t_state = r_hand.icon_state
|
||||
|
||||
var/mutable_appearance/I = mutable_appearance(r_hand.righthand_file, "[t_state]", layer = -R_HAND_LAYER)
|
||||
I = center_image(I, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension)
|
||||
overlays_standing[R_HAND_LAYER] = I
|
||||
var/mutable_appearance/standing
|
||||
if(r_hand.sprite_sheets && r_hand.sprite_sheets[dna.species.name])
|
||||
t_state = "[t_state]_r"
|
||||
standing = mutable_appearance(r_hand.sprite_sheets[dna.species.name], "[t_state]", layer = -R_HAND_LAYER)
|
||||
else
|
||||
standing = mutable_appearance(r_hand.righthand_file, "[t_state]", layer = -R_HAND_LAYER)
|
||||
standing = center_image(standing, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension)
|
||||
overlays_standing[R_HAND_LAYER] = standing
|
||||
apply_overlay(R_HAND_LAYER)
|
||||
|
||||
|
||||
@@ -1021,9 +1040,14 @@ var/global/list/damage_icon_parts = list()
|
||||
if(!t_state)
|
||||
t_state = l_hand.icon_state
|
||||
|
||||
var/mutable_appearance/I = mutable_appearance(l_hand.lefthand_file, "[t_state]", layer = -L_HAND_LAYER)
|
||||
I = center_image(I, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension)
|
||||
overlays_standing[L_HAND_LAYER] = I
|
||||
var/mutable_appearance/standing
|
||||
if(l_hand.sprite_sheets && l_hand.sprite_sheets[dna.species.name])
|
||||
t_state = "[t_state]_l"
|
||||
standing = mutable_appearance(l_hand.sprite_sheets[dna.species.name], "[t_state]", layer = -L_HAND_LAYER)
|
||||
else
|
||||
standing = mutable_appearance(l_hand.lefthand_file, "[t_state]", layer = -L_HAND_LAYER)
|
||||
standing = center_image(standing, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension)
|
||||
overlays_standing[L_HAND_LAYER] = standing
|
||||
apply_overlay(L_HAND_LAYER)
|
||||
|
||||
//human HUD updates for items in our inventory
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
break //Only count the first bedsheet
|
||||
if(drunk)
|
||||
comfort += 1 //Aren't naps SO much better when drunk?
|
||||
AdjustDrunk(1-0.0015*comfort) //reduce drunkenness ~6% per two seconds, when on floor.
|
||||
AdjustDrunk(-0.2*comfort) //reduce drunkenness while sleeping.
|
||||
if(comfort > 1 && prob(3))//You don't heal if you're just sleeping on the floor without a blanket.
|
||||
adjustBruteLoss(-1*comfort)
|
||||
adjustFireLoss(-1*comfort)
|
||||
|
||||
@@ -146,6 +146,44 @@
|
||||
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
/mob/living/carbon/slime/updatehealth(reason)
|
||||
. = ..()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/slime/proc/update_health_hud()
|
||||
if(hud_used)
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
if(stat != DEAD)
|
||||
switch(healthpercent)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "slime_health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "slime_health1"
|
||||
severity = 1
|
||||
if(60 to 80)
|
||||
healths.icon_state = "slime_health2"
|
||||
severity = 2
|
||||
if(40 to 60)
|
||||
healths.icon_state = "slime_health3"
|
||||
severity = 3
|
||||
if(20 to 40)
|
||||
healths.icon_state = "slime_health4"
|
||||
severity = 4
|
||||
if(0 to 20)
|
||||
healths.icon_state = "slime_health5"
|
||||
severity = 5
|
||||
if(-199 to 0)
|
||||
healths.icon_state = "slime_health6"
|
||||
severity = 6
|
||||
else
|
||||
healths.icon_state = "slime_health7"
|
||||
severity = 6
|
||||
if(severity > 0)
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
/mob/living/carbon/slime/adjustFireLoss(amount)
|
||||
..(-abs(amount)) // Heals them
|
||||
return
|
||||
|
||||
@@ -44,6 +44,22 @@
|
||||
if(BRAIN)
|
||||
return adjustBrainLoss(damage)
|
||||
|
||||
/mob/living/proc/get_damage_amount(damagetype = BRUTE)
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
return getBruteLoss()
|
||||
if(BURN)
|
||||
return getFireLoss()
|
||||
if(TOX)
|
||||
return getToxLoss()
|
||||
if(OXY)
|
||||
return getOxyLoss()
|
||||
if(CLONE)
|
||||
return getCloneLoss()
|
||||
if(STAMINA)
|
||||
return getStaminaLoss()
|
||||
|
||||
|
||||
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0, var/stamina = 0)
|
||||
if(blocked >= 100) return 0
|
||||
if(brute) apply_damage(brute, BRUTE, def_zone, blocked)
|
||||
@@ -309,4 +325,16 @@
|
||||
updatehealth("take overall damage")
|
||||
|
||||
/mob/living/proc/has_organic_damage()
|
||||
return (maxHealth - health)
|
||||
return (maxHealth - health)
|
||||
|
||||
//heal up to amount damage, in a given order
|
||||
/mob/living/proc/heal_ordered_damage(amount, list/damage_types)
|
||||
. = amount //we'll return the amount of damage healed
|
||||
for(var/i in damage_types)
|
||||
var/amount_to_heal = min(amount, get_damage_amount(i)) //heal only up to the amount of damage we have
|
||||
if(amount_to_heal)
|
||||
apply_damage_type(-amount_to_heal, i)
|
||||
amount -= amount_to_heal //remove what we healed from our current amount
|
||||
if(!amount)
|
||||
break
|
||||
. -= amount //if there's leftover healing, remove it from what we return
|
||||
@@ -256,8 +256,10 @@
|
||||
death()
|
||||
to_chat(src, "<span class='notice'>You have given up life and succumbed to death.</span>")
|
||||
|
||||
|
||||
/mob/living/proc/InCritical()
|
||||
return (health < HEALTH_THRESHOLD_CRIT && health > HEALTH_THRESHOLD_DEAD && stat == UNCONSCIOUS)
|
||||
|
||||
|
||||
/mob/living/ex_act(severity)
|
||||
..()
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
ai.camera_visibility(src)
|
||||
if(ai.client && !ai.multicam_on)
|
||||
ai.client.eye = src
|
||||
update_parallax_contents()
|
||||
//Holopad
|
||||
if(ai.master_multicam)
|
||||
ai.master_multicam.refresh_view()
|
||||
|
||||
@@ -235,6 +235,12 @@
|
||||
to_chat(user, "<span class='notice'>Body Temperature: ???</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
|
||||
robot_healthscan(user, M)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
proc/robot_healthscan(mob/user, mob/living/M)
|
||||
var/scan_type
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
scan_type = "robot"
|
||||
@@ -244,7 +250,7 @@
|
||||
to_chat(user, "<span class='warning'>You can't analyze non-robotic things!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
|
||||
|
||||
switch(scan_type)
|
||||
if("robot")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
@@ -308,5 +314,3 @@
|
||||
to_chat(user, "<span class='notice'>Internal Fluid Level:[H.blood_volume]/[H.max_blood]</span>")
|
||||
if(H.bleed_rate)
|
||||
to_chat(user, "<span class='warning'>Warning:External component leak detected!</span>")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -576,6 +576,8 @@ var/list/robot_verbs_default = list(
|
||||
/mob/living/silicon/robot/restrained()
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/InCritical()
|
||||
return low_power_mode
|
||||
|
||||
/mob/living/silicon/robot/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -883,6 +885,8 @@ var/list/robot_verbs_default = list(
|
||||
/mob/living/silicon/robot/attack_ghost(mob/user)
|
||||
if(wiresexposed)
|
||||
wires.Interact(user)
|
||||
else
|
||||
..() //this calls the /mob/living/attack_ghost proc for the ghost health/cyborg analyzer
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(obj/item/I)
|
||||
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob
|
||||
|
||||
@@ -337,4 +337,5 @@
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
/mob/living/silicon/can_hear()
|
||||
. = TRUE
|
||||
. = TRUE
|
||||
|
||||
|
||||
@@ -34,13 +34,29 @@
|
||||
holder_type = /obj/item/holder/mouse
|
||||
can_collar = 1
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
|
||||
var/chew_probability = 1
|
||||
|
||||
/mob/living/simple_animal/mouse/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/creatures/mousesqueak.ogg' = 1), 100)
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_action()
|
||||
if(prob(chew_probability))
|
||||
var/turf/simulated/floor/F = get_turf(src)
|
||||
if(istype(F) && !F.intact)
|
||||
var/obj/structure/cable/C = locate() in F
|
||||
if(C && prob(15))
|
||||
if(C.avail())
|
||||
visible_message("<span class='warning'>[src] chews through [C]. It's toast!</span>")
|
||||
playsound(src, 'sound/effects/sparks2.ogg', 100, 1)
|
||||
C.deconstruct()
|
||||
toast() // mmmm toasty.
|
||||
else
|
||||
C.deconstruct()
|
||||
visible_message("<span class='warning'>[src] chews through [C].</span>")
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_speech()
|
||||
..()
|
||||
..()
|
||||
if(prob(speak_chance))
|
||||
for(var/mob/M in view())
|
||||
M << squeak_sound
|
||||
@@ -98,7 +114,12 @@
|
||||
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
/mob/living/simple_animal/mouse/proc/toast()
|
||||
add_atom_colour("#3A3A3A", FIXED_COLOUR_PRIORITY)
|
||||
desc = "It's toast."
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
playsound(src, squeak_sound, 40, 1)
|
||||
. = ..(gibbed)
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
turns_per_move = 10
|
||||
icon = 'icons/mob/penguins.dmi'
|
||||
|
||||
/mob/living/simple_animal/pet/penguin/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/waddling)
|
||||
|
||||
/mob/living/simple_animal/pet/penguin/emperor
|
||||
name = "Emperor penguin"
|
||||
real_name = "penguin"
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
response_disarm = "shoos"
|
||||
response_harm = "stomps on"
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
var/colour = "grey"
|
||||
pass_flags = PASSTABLE
|
||||
var/colour = "grey"
|
||||
|
||||
/mob/living/simple_animal/slime/adult
|
||||
health = 200
|
||||
@@ -24,3 +24,37 @@
|
||||
/mob/living/simple_animal/slime/New()
|
||||
..()
|
||||
overlays += "aslime-:33"
|
||||
|
||||
/mob/living/simple_animal/slime/updatehealth(reason)
|
||||
. = ..()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/simple_animal/slime/proc/update_health_hud()
|
||||
if(hud_used)
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
switch(healthpercent)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "slime_health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "slime_health1"
|
||||
severity = 1
|
||||
if(60 to 80)
|
||||
healths.icon_state = "slime_health2"
|
||||
severity = 2
|
||||
if(40 to 60)
|
||||
healths.icon_state = "slime_health3"
|
||||
severity = 3
|
||||
if(20 to 40)
|
||||
healths.icon_state = "slime_health4"
|
||||
severity = 4
|
||||
if(1 to 20)
|
||||
healths.icon_state = "slime_health5"
|
||||
severity = 5
|
||||
else
|
||||
healths.icon_state = "slime_health7"
|
||||
severity = 6
|
||||
if(severity > 0)
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
@@ -1,100 +1,106 @@
|
||||
#define EGG_INCUBATION_TIME 120
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab
|
||||
name = "headslug"
|
||||
desc = "Absolutely not de-beaked or harmless. Keep away from corpses."
|
||||
name = "headcrab"
|
||||
desc = "A small parasitic creature that would like to connect with your brain stem."
|
||||
icon = 'icons/mob/headcrab.dmi'
|
||||
icon_state = "headcrab"
|
||||
icon_living = "headcrab"
|
||||
icon_dead = "headcrab_dead"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
health = 40
|
||||
maxHealth = 40
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = list("creature")
|
||||
robust_searching = 1
|
||||
stat_attack = 2
|
||||
obj_damage = 0
|
||||
environment_smash = 0
|
||||
speak_emote = list("squeaks")
|
||||
ventcrawler = 2
|
||||
var/datum/mind/origin
|
||||
var/egg_lain = 0
|
||||
melee_damage_upper = 10
|
||||
ranged = 1
|
||||
ranged_message = "leaps"
|
||||
ranged_cooldown_time = 40
|
||||
var/jumpdistance = 4
|
||||
var/jumpspeed = 1
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/creatures/headcrab_attack.ogg'
|
||||
speak_emote = list("hisses")
|
||||
var/is_zombie = 0
|
||||
stat_attack = 1 //so they continue to attack when they are on the ground.
|
||||
var/host_species = ""
|
||||
var/list/human_overlays = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/examine(mob/user)
|
||||
/mob/living/simple_animal/hostile/headcrab/Life(seconds, times_fired)
|
||||
if(!is_zombie && isturf(src.loc) && stat != DEAD)
|
||||
for(var/mob/living/carbon/human/H in oview(src, 1)) //Only for corpse right next to/on same tile
|
||||
if(H.stat == DEAD || (!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD))
|
||||
Zombify(H)
|
||||
break
|
||||
..()
|
||||
if(stat == DEAD)
|
||||
to_chat(desc = "It appears to be dead.")
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/proc/Infect(mob/living/carbon/victim)
|
||||
var/obj/item/organ/internal/body_egg/changeling_egg/egg = new(victim)
|
||||
egg.insert(victim)
|
||||
if(origin)
|
||||
egg.origin = origin
|
||||
else if(mind) // Let's make this a feature
|
||||
egg.origin = mind
|
||||
for(var/obj/item/organ/internal/I in src)
|
||||
I.loc = egg
|
||||
visible_message("<span class='warning'>[src] plants something in [victim]'s flesh!</span>", \
|
||||
"<span class='danger'>We inject our egg into [victim]'s body!</span>")
|
||||
egg_lain = 1
|
||||
/mob/living/simple_animal/hostile/headcrab/OpenFire(atom/A)
|
||||
if(check_friendly_fire)
|
||||
for(var/turf/T in getline(src,A)) // Not 100% reliable but this is faster than simulating actual trajectory
|
||||
for(var/mob/living/L in T)
|
||||
if(L == src || L == A)
|
||||
continue
|
||||
if(faction_check(L) && !attack_same)
|
||||
return
|
||||
visible_message("<span class='danger'><b>[src]</b> [ranged_message] at [A]!</span>")
|
||||
throw_at(A, jumpdistance, jumpspeed, spin = FALSE, diagonals_first = TRUE)
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/AttackingTarget()
|
||||
if(egg_lain)
|
||||
target.attack_animal(src)
|
||||
return
|
||||
if(iscarbon(target) && !issmall(target))
|
||||
// Changeling egg can survive in aliens!
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat == DEAD)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
to_chat(src, "<span class='userdanger'>A foreign presence repels us from this body. Perhaps we should try to infest another?</span>")
|
||||
return
|
||||
Infect(target)
|
||||
to_chat(src, "<span class='userdanger'>With our egg laid, our death approaches rapidly...</span>")
|
||||
spawn(100)
|
||||
death()
|
||||
return
|
||||
target.attack_animal(src)
|
||||
/mob/living/simple_animal/hostile/headcrab/proc/Zombify(mob/living/carbon/human/H)
|
||||
if(!H.check_death_method())
|
||||
H.death()
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
is_zombie = TRUE
|
||||
if(H.wear_suit)
|
||||
var/obj/item/clothing/suit/armor/A = H.wear_suit
|
||||
if(A.armor && A.armor["melee"])
|
||||
maxHealth += A.armor["melee"] //That zombie's got armor, I want armor!
|
||||
maxHealth += 50
|
||||
health = maxHealth
|
||||
name = "zombie"
|
||||
desc = "A corpse animated by the alien being on its head."
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 15
|
||||
ranged = 0
|
||||
icon = H.icon
|
||||
speak = list('sound/creatures/zombie_idle1.ogg','sound/creatures/zombie_idle2.ogg','sound/creatures/zombie_idle3.ogg')
|
||||
speak_chance = 50
|
||||
speak_emote = list("groans")
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/creatures/zombie_attack.ogg'
|
||||
icon_state = "zombie2_s"
|
||||
if(head_organ)
|
||||
head_organ.h_style = null
|
||||
H.update_hair()
|
||||
host_species = H.dna.species.name
|
||||
human_overlays = H.overlays
|
||||
update_icons()
|
||||
H.forceMove(src)
|
||||
visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg
|
||||
name = "changeling egg"
|
||||
desc = "Twitching and disgusting."
|
||||
origin_tech = "biotech=7" // You need to be really lucky to obtain it.
|
||||
var/datum/mind/origin
|
||||
var/time
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg/egg_process()
|
||||
// Changeling eggs grow in dead people
|
||||
time++
|
||||
if(time >= EGG_INCUBATION_TIME)
|
||||
Pop()
|
||||
remove(owner)
|
||||
/mob/living/simple_animal/hostile/headcrab/death()
|
||||
..()
|
||||
if(is_zombie)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg/proc/Pop()
|
||||
var/mob/living/carbon/human/monkey/M = new(owner)
|
||||
owner.stomach_contents += M
|
||||
|
||||
for(var/obj/item/organ/internal/I in src)
|
||||
I.insert(M, 1)
|
||||
/mob/living/simple_animal/hostile/headcrab/handle_automated_speech() // This way they have different screams when attacking, sometimes. Might be seen as sphagetthi code though.
|
||||
if(speak_chance)
|
||||
if(rand(0,200) < speak_chance)
|
||||
if(speak && speak.len)
|
||||
playsound(get_turf(src), pick(speak), 200, 1)
|
||||
|
||||
if(origin && origin.current && (origin.current.stat == DEAD))
|
||||
origin.transfer_to(M)
|
||||
if(!origin.changeling)
|
||||
M.make_changeling()
|
||||
if(origin.changeling.can_absorb_dna(M, owner))
|
||||
origin.changeling.absorb_dna(owner, M)
|
||||
/mob/living/simple_animal/hostile/headcrab/Destroy()
|
||||
if(contents)
|
||||
for(var/mob/M in contents)
|
||||
M.loc = get_turf(src)
|
||||
return ..()
|
||||
|
||||
var/datum/action/changeling/humanform/HF = new
|
||||
HF.Grant(M)
|
||||
for(var/power in origin.changeling.purchasedpowers)
|
||||
var/datum/action/changeling/S = power
|
||||
if(istype(S) && S.needs_button)
|
||||
S.Grant(M)
|
||||
M.key = origin.key
|
||||
owner.gib()
|
||||
|
||||
#undef EGG_INCUBATION_TIME
|
||||
/mob/living/simple_animal/hostile/headcrab/update_icons()
|
||||
..()
|
||||
if(is_zombie)
|
||||
overlays.Cut()
|
||||
overlays = human_overlays
|
||||
var/image/I = image('icons/mob/headcrab.dmi', icon_state = "headcrabpod")
|
||||
if(host_species == "Vox")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "headcrabpod_vox")
|
||||
else if(host_species == "Gray")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "headcrabpod_gray")
|
||||
overlays += I
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
#define EGG_INCUBATION_TIME 120
|
||||
|
||||
/mob/living/simple_animal/hostile/headslug
|
||||
name = "headslug"
|
||||
desc = "Absolutely not de-beaked or harmless. Keep away from corpses."
|
||||
icon_state = "headslug"
|
||||
icon_living = "headslug"
|
||||
icon_dead = "headslug_dead"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "chomps"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
faction = list("creature")
|
||||
robust_searching = 1
|
||||
stat_attack = 2
|
||||
obj_damage = 0
|
||||
environment_smash = 0
|
||||
speak_emote = list("squeaks")
|
||||
ventcrawler = 2
|
||||
var/datum/mind/origin
|
||||
var/egg_lain = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/headslug/examine(mob/user)
|
||||
..()
|
||||
if(stat == DEAD)
|
||||
to_chat(desc = "It appears to be dead.")
|
||||
|
||||
/mob/living/simple_animal/hostile/headslug/proc/Infect(mob/living/carbon/victim)
|
||||
var/obj/item/organ/internal/body_egg/changeling_egg/egg = new(victim)
|
||||
egg.insert(victim)
|
||||
if(origin)
|
||||
egg.origin = origin
|
||||
else if(mind) // Let's make this a feature
|
||||
egg.origin = mind
|
||||
for(var/obj/item/organ/internal/I in src)
|
||||
I.loc = egg
|
||||
visible_message("<span class='warning'>[src] plants something in [victim]'s flesh!</span>", \
|
||||
"<span class='danger'>We inject our egg into [victim]'s body!</span>")
|
||||
egg_lain = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/headslug/AttackingTarget()
|
||||
if(egg_lain)
|
||||
target.attack_animal(src)
|
||||
return
|
||||
if(iscarbon(target) && !issmall(target))
|
||||
// Changeling egg can survive in aliens!
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stat == DEAD)
|
||||
if(C.status_flags & XENO_HOST)
|
||||
to_chat(src, "<span class='userdanger'>A foreign presence repels us from this body. Perhaps we should try to infest another?</span>")
|
||||
return
|
||||
Infect(target)
|
||||
to_chat(src, "<span class='userdanger'>With our egg laid, our death approaches rapidly...</span>")
|
||||
spawn(100)
|
||||
death()
|
||||
return
|
||||
target.attack_animal(src)
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg
|
||||
name = "changeling egg"
|
||||
desc = "Twitching and disgusting."
|
||||
origin_tech = "biotech=7" // You need to be really lucky to obtain it.
|
||||
var/datum/mind/origin
|
||||
var/time
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg/egg_process()
|
||||
// Changeling eggs grow in dead people
|
||||
time++
|
||||
if(time >= EGG_INCUBATION_TIME)
|
||||
Pop()
|
||||
remove(owner)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg/proc/Pop()
|
||||
var/mob/living/carbon/human/monkey/M = new(owner)
|
||||
owner.stomach_contents += M
|
||||
|
||||
for(var/obj/item/organ/internal/I in src)
|
||||
I.insert(M, 1)
|
||||
|
||||
if(origin && origin.current && (origin.current.stat == DEAD))
|
||||
origin.transfer_to(M)
|
||||
if(!origin.changeling)
|
||||
M.make_changeling()
|
||||
if(origin.changeling.can_absorb_dna(M, owner))
|
||||
origin.changeling.absorb_dna(owner, M)
|
||||
|
||||
var/datum/action/changeling/humanform/HF = new
|
||||
HF.Grant(M)
|
||||
for(var/power in origin.changeling.purchasedpowers)
|
||||
var/datum/action/changeling/S = power
|
||||
if(istype(S) && S.needs_button)
|
||||
S.Grant(M)
|
||||
M.key = origin.key
|
||||
owner.gib()
|
||||
|
||||
#undef EGG_INCUBATION_TIME
|
||||
@@ -309,14 +309,18 @@
|
||||
else
|
||||
M.Goto(src,M.move_to_delay,M.minimum_distance)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/OpenFire(atom/A)
|
||||
/mob/living/simple_animal/hostile/proc/CheckFriendlyFire(atom/A)
|
||||
if(check_friendly_fire)
|
||||
for(var/turf/T in getline(src,A)) // Not 100% reliable but this is faster than simulating actual trajectory
|
||||
for(var/mob/living/L in T)
|
||||
if(L == src || L == A)
|
||||
continue
|
||||
if(faction_check(L) && !attack_same)
|
||||
return
|
||||
if(faction_check_mob(L) && !attack_same)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/OpenFire(atom/A)
|
||||
if(CheckFriendlyFire(A))
|
||||
return
|
||||
visible_message("<span class='danger'><b>[src]</b> [ranged_message] at [A]!</span>")
|
||||
|
||||
if(rapid)
|
||||
|
||||
@@ -37,6 +37,7 @@ Difficulty: Medium
|
||||
ranged = 1
|
||||
ranged_cooldown_time = 16
|
||||
pixel_x = -16
|
||||
crusher_loot = list(/obj/item/melee/energy/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator, /obj/item/crusher_trophy/miner_eye)
|
||||
loot = list(/obj/item/melee/energy/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator)
|
||||
wander = FALSE
|
||||
del_on_death = TRUE
|
||||
@@ -48,7 +49,7 @@ Difficulty: Medium
|
||||
var/guidance = FALSE
|
||||
deathmessage = "falls to the ground, decaying into glowing particles."
|
||||
death_sound = "bodyfall"
|
||||
|
||||
|
||||
/obj/item/gps/internal/miner
|
||||
icon_state = null
|
||||
gpstag = "Resonant Signal"
|
||||
|
||||
@@ -42,6 +42,7 @@ Difficulty: Hard
|
||||
ranged = 1
|
||||
pixel_x = -32
|
||||
del_on_death = 1
|
||||
crusher_loot = list(/obj/structure/closet/crate/necropolis/bubblegum/crusher)
|
||||
loot = list(/obj/structure/closet/crate/necropolis/bubblegum)
|
||||
var/charging = 0
|
||||
medal_type = BOSS_MEDAL_BUBBLEGUM
|
||||
|
||||
@@ -45,7 +45,8 @@ Difficulty: Very Hard
|
||||
del_on_death = 1
|
||||
medal_type = BOSS_MEDAL_COLOSSUS
|
||||
score_type = COLOSSUS_SCORE
|
||||
loot = list(/obj/machinery/anomalous_crystal/random, /obj/item/organ/internal/vocal_cords/colossus)
|
||||
crusher_loot = list(/obj/structure/closet/crate/necropolis/colossus/crusher)
|
||||
loot = list(/obj/structure/closet/crate/necropolis/colossus)
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
deathmessage = "disintegrates, leaving a glowing core in its wake."
|
||||
death_sound = 'sound/misc/demon_dies.ogg'
|
||||
|
||||
@@ -43,6 +43,7 @@ Difficulty: Medium
|
||||
move_to_delay = 10
|
||||
ranged = 1
|
||||
pixel_x = -16
|
||||
crusher_loot = list(/obj/structure/closet/crate/necropolis/dragon/crusher)
|
||||
loot = list(/obj/structure/closet/crate/necropolis/dragon)
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
var/swooping = 0
|
||||
@@ -271,6 +272,7 @@ Difficulty: Medium
|
||||
melee_damage_lower = 30
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
|
||||
loot = list()
|
||||
crusher_loot = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/lesser/grant_achievement(medaltype,scoretype)
|
||||
return
|
||||
@@ -53,6 +53,7 @@ Difficulty: Hard
|
||||
ranged_cooldown_time = 40
|
||||
aggro_vision_range = 23
|
||||
loot = list(/obj/item/hierophant_staff)
|
||||
crusher_loot = list(/obj/item/hierophant_staff, /obj/item/crusher_trophy/vortex_talisman)
|
||||
wander = FALSE
|
||||
var/burst_range = 3 //range on burst aoe
|
||||
var/beam_range = 5 //range on cross blast beams
|
||||
@@ -496,6 +497,7 @@ Difficulty: Hard
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "hierophant_blast"
|
||||
name = "vortex blast"
|
||||
layer = 3.9 // between LYING_MOB_LAYER and ABOVE_MOB_LAYER
|
||||
luminosity = 1
|
||||
desc = "Get out of the way!"
|
||||
duration = 9
|
||||
@@ -555,6 +557,37 @@ Difficulty: Hard
|
||||
playsound(M,'sound/weapons/sear.ogg', 50, 1, -4)
|
||||
M.take_damage(damage, BURN, 0, 0)
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall //smoothing and pooling were not friends, but pooling is dead.
|
||||
name = "vortex wall"
|
||||
icon = 'icons/turf/walls/hierophant_wall_temp.dmi'
|
||||
icon_state = "wall"
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
duration = 100
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall/New(loc, new_caster)
|
||||
..()
|
||||
queue_smooth_neighbors(src)
|
||||
queue_smooth(src)
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall/Destroy()
|
||||
queue_smooth_neighbors(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, turf/target)
|
||||
if(QDELETED(caster))
|
||||
return FALSE
|
||||
if(mover == caster.pulledby)
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(P.firer == caster)
|
||||
return TRUE
|
||||
if(mover == caster)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/effect/hierophant
|
||||
name = "hierophant rune"
|
||||
desc = "A powerful magic mark allowing whomever attunes themself to it to return to it at will."
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
/obj/structure/barricade,
|
||||
/obj/machinery/field,
|
||||
/obj/machinery/power/emitter)
|
||||
var/list/crusher_loot
|
||||
var/medal_type
|
||||
var/score_type = BOSS_SCORE
|
||||
var/elimination = 0
|
||||
@@ -43,6 +44,10 @@
|
||||
layer = LARGE_MOB_LAYER //Looks weird with them slipping under mineral walls and cameras and shit otherwise
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE // Easier to click on in melee, they're giant targets anyway
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/New()
|
||||
..()
|
||||
apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/Destroy()
|
||||
QDEL_NULL(internal_gps)
|
||||
. = ..()
|
||||
@@ -53,11 +58,17 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/death(gibbed)
|
||||
// this happens before the parent call because `del_on_death` may be set
|
||||
if(can_die() && !admin_spawned)
|
||||
feedback_set_details("megafauna_kills","[initial(name)]")
|
||||
var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
|
||||
if(C && crusher_loot && C.total_damage >= maxHealth * 0.6)
|
||||
spawn_crusher_loot()
|
||||
if(!elimination) //used so the achievment only occurs for the last legion to die.
|
||||
grant_achievement(medal_type,score_type)
|
||||
feedback_set_details("megafauna_kills","[initial(name)]")
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/proc/spawn_crusher_loot()
|
||||
loot = crusher_loot
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/AttackingTarget()
|
||||
..()
|
||||
if(isliving(target))
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
stat_attack = 1
|
||||
flying = TRUE
|
||||
robust_searching = 1
|
||||
crusher_loot = /obj/item/crusher_trophy/watcher_wing
|
||||
loot = list()
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1)
|
||||
|
||||
@@ -102,6 +103,8 @@
|
||||
light_power = 2.5
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
projectiletype = /obj/item/projectile/temp/basilisk/magmawing
|
||||
crusher_loot = /obj/item/crusher_trophy/blaster_tubes/magma_wing
|
||||
crusher_drop_mod = 60
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing
|
||||
name = "icewing watcher"
|
||||
@@ -114,6 +117,8 @@
|
||||
health = 170
|
||||
projectiletype = /obj/item/projectile/temp/basilisk/icewing
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable
|
||||
crusher_loot = /obj/item/crusher_trophy/watcher_wing/ice_wing
|
||||
crusher_drop_mod = 30
|
||||
|
||||
/obj/item/projectile/temp/basilisk/magmawing
|
||||
name = "scorching blast"
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
icon_dead = "goliath_dead"
|
||||
throw_message = "does nothing to the tough hide of the"
|
||||
pre_attack_icon = "goliath2"
|
||||
crusher_loot = /obj/item/crusher_trophy/goliath_tentacle
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2)
|
||||
loot = list()
|
||||
stat_attack = TRUE
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/AttackingTarget()
|
||||
OpenFire()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/spawn_crusher_loot()
|
||||
loot += crusher_loot //we don't butcher
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
. = ..(gibbed)
|
||||
@@ -231,6 +234,7 @@
|
||||
speak_emote = list("echoes")
|
||||
attack_sound = 'sound/weapons/pierce.ogg'
|
||||
throw_message = "bounces harmlessly off of"
|
||||
crusher_loot = /obj/item/crusher_trophy/legion_skull
|
||||
loot = list(/obj/item/organ/internal/hivelord_core/legion)
|
||||
brood_type = /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion
|
||||
del_on_death = 1
|
||||
@@ -403,7 +407,7 @@
|
||||
if(prob(95))
|
||||
head = /obj/item/clothing/head/helmet/gladiator
|
||||
else
|
||||
head = /obj/item/clothing/head/skullhelmet
|
||||
head = /obj/item/clothing/head/helmet/skull
|
||||
suit = /obj/item/clothing/suit/armor/bone
|
||||
if(prob(5))
|
||||
back = pickweight(list(/obj/item/twohanded/spear/bonespear = 3, /obj/item/twohanded/fireaxe/boneaxe = 2))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/
|
||||
/mob/living/simple_animal/hostile/asteroid
|
||||
vision_range = 2
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
@@ -13,12 +13,18 @@
|
||||
response_harm = "strikes"
|
||||
status_flags = 0
|
||||
a_intent = INTENT_HARM
|
||||
var/crusher_loot
|
||||
var/throw_message = "bounces off of"
|
||||
var/icon_aggro = null // for swapping to when we get aggressive
|
||||
var/fromtendril = FALSE
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
var/crusher_drop_mod = 25
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/New()
|
||||
..()
|
||||
apply_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/Aggro()
|
||||
..()
|
||||
@@ -46,3 +52,12 @@
|
||||
visible_message("<span class='notice'>The [T.name] [src.throw_message] [src.name]!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/death(gibbed)
|
||||
var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
|
||||
if(C && crusher_loot && prob((C.total_damage/maxHealth) * crusher_drop_mod)) //on average, you'll need to kill 4 creatures before getting the item
|
||||
spawn_crusher_loot()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/proc/spawn_crusher_loot()
|
||||
butcher_results[crusher_loot] = 1
|
||||
@@ -69,6 +69,7 @@
|
||||
desc = null //see examine()
|
||||
icon_state = "nether"
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
spawn_time = 600 //1 minute
|
||||
max_mobs = 15
|
||||
icon = 'icons/mob/nest.dmi'
|
||||
@@ -76,9 +77,9 @@
|
||||
mob_types = list(/mob/living/simple_animal/hostile/netherworld/migo, /mob/living/simple_animal/hostile/netherworld, /mob/living/simple_animal/hostile/netherworld/blankbody)
|
||||
faction = list("nether")
|
||||
|
||||
/mob/living/simple_animal/hostile/spawner/nether/Initialize()
|
||||
.=..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
/mob/living/simple_animal/hostile/spawner/nether/death()
|
||||
. = ..()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/spawner/nether/examine(mob/user)
|
||||
..()
|
||||
@@ -96,7 +97,8 @@
|
||||
"<span class='userdanger'>Touching the portal, you are quickly pulled through into a world of unimaginable horror!</span>")
|
||||
contents.Add(user)
|
||||
|
||||
/mob/living/simple_animal/hostile/spawner/nether/process()
|
||||
/mob/living/simple_animal/hostile/spawner/nether/Life()
|
||||
. = ..()
|
||||
for(var/mob/living/M in contents)
|
||||
if(M)
|
||||
playsound(src, 'sound/magic/demon_consume.ogg', 50, 1)
|
||||
|
||||
@@ -397,6 +397,9 @@
|
||||
// STUN
|
||||
|
||||
/mob/living/Stun(amount, updating = 1, force = 0)
|
||||
if(status_flags & CANSTUN || force)
|
||||
if(absorb_stun(amount, force))
|
||||
return FALSE
|
||||
return SetStunned(max(stunned, amount), updating, force)
|
||||
|
||||
/mob/living/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
@@ -434,6 +437,9 @@
|
||||
// WEAKEN
|
||||
|
||||
/mob/living/Weaken(amount, updating = 1, force = 0)
|
||||
if(status_flags & CANWEAKEN || force)
|
||||
if(absorb_stun(amount, force))
|
||||
return FALSE
|
||||
return SetWeakened(max(weakened, amount), updating, force)
|
||||
|
||||
/mob/living/SetWeakened(amount, updating = 1, force = 0)
|
||||
|
||||
@@ -369,7 +369,7 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
if(hud_used && hud_used.action_intent)
|
||||
hud_used.action_intent.icon_state = "[a_intent]"
|
||||
|
||||
else if(isrobot(src) || islarva(src) || isanimal(src))
|
||||
else if(isrobot(src) || islarva(src) || isanimal(src) || isAI(src))
|
||||
switch(input)
|
||||
if(INTENT_HELP)
|
||||
a_intent = INTENT_HELP
|
||||
@@ -569,7 +569,7 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
if(force)
|
||||
newname = clean_input("Pick a new name.", "Name Change", oldname, src)
|
||||
else
|
||||
newname = input("You are a [role]. Would you like to change your name to something else? (You have 3 minutes to select a new name.)", "Name Change", oldname, src)
|
||||
newname = clean_input("You are a [role]. Would you like to change your name to something else? (You have 3 minutes to select a new name.)", "Name Change", oldname, src)
|
||||
if(((world.time - time_passed) > 1800) && !force)
|
||||
alert(src, "Unfortunately, more than 3 minutes have passed for selecting your name. If you are a robot, use the Namepick verb; otherwise, adminhelp.", "Name Change")
|
||||
return //took too long
|
||||
|
||||
Reference in New Issue
Block a user