Merge branch 'master' into Ghommie-cit679

This commit is contained in:
Ghom
2020-04-14 16:22:00 +02:00
committed by GitHub
208 changed files with 2331 additions and 1470 deletions
@@ -21,14 +21,13 @@ Doesn't work on other aliens/AI.*/
. = ..()
action = new(src)
/obj/effect/proc_holder/alien/Click()
if(!iscarbon(usr))
return 1
var/mob/living/carbon/user = usr
if(cost_check(check_turf,user))
/obj/effect/proc_holder/alien/Trigger(mob/living/carbon/user, skip_cost_check)
if(!istype(user))
return TRUE
if(!skip_cost_check || cost_check(check_turf,user))
if(fire(user) && user) // Second check to prevent runtimes when evolving
user.adjustPlasma(-plasma_cost)
return 1
return TRUE
/obj/effect/proc_holder/alien/on_gain(mob/living/carbon/user)
return
@@ -247,13 +247,13 @@
/proc/CanHug(mob/living/M)
if(!istype(M))
return 0
return FALSE
if(M.stat == DEAD)
return 0
return FALSE
if(M.getorgan(/obj/item/organ/alien/hivenode))
return 0
if(isvamp(M))
return 0
return FALSE
if(AmBloodsucker(M))
return FALSE
if(ismonkey(M))
return 1
@@ -262,9 +262,9 @@
if(ishuman(C) && !(SLOT_WEAR_MASK in C.dna.species.no_equip))
var/mob/living/carbon/human/H = C
if(H.is_mouth_covered(head_only = 1))
return 0
return 1
return 0
return FALSE
return TRUE
return FALSE
#undef MIN_ACTIVE_TIME
#undef MAX_ACTIVE_TIME
+1 -1
View File
@@ -854,7 +854,7 @@
/mob/living/carbon/proc/can_defib()
var/tlimit = DEFIB_TIME_LIMIT * 10
var/obj/item/organ/heart = getorgan(/obj/item/organ/heart)
if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK))
if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK) || AmBloodsucker(src))
return
if((world.time - timeofdeath) > tlimit)
return
@@ -469,7 +469,7 @@
var/cooldown = 150
var/last_teleport = 0
/datum/action/innate/unstable_teleport/IsAvailable()
/datum/action/innate/unstable_teleport/IsAvailable(silent = FALSE)
if(..())
if(world.time > last_teleport + cooldown)
return 1
@@ -43,7 +43,7 @@
C.faction |= "slime"
/datum/species/jelly/spec_life(mob/living/carbon/human/H)
if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for vampires
if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for blooduskers
return
if(!H.blood_volume)
H.blood_volume += 5
@@ -84,7 +84,7 @@
background_icon_state = "bg_alien"
required_mobility_flags = NONE
/datum/action/innate/regenerate_limbs/IsAvailable()
/datum/action/innate/regenerate_limbs/IsAvailable(silent = FALSE)
if(..())
var/mob/living/carbon/human/H = owner
var/list/limbs_to_heal = H.get_missing_limbs()
@@ -223,7 +223,7 @@
icon_icon = 'icons/mob/actions/actions_slime.dmi'
background_icon_state = "bg_alien"
/datum/action/innate/split_body/IsAvailable()
/datum/action/innate/split_body/IsAvailable(silent = FALSE)
if(..())
var/mob/living/carbon/human/H = owner
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
@@ -776,7 +776,7 @@
..()
species = _species
/datum/action/innate/use_extract/IsAvailable()
/datum/action/innate/use_extract/IsAvailable(silent = FALSE)
if(..())
if(species && species.current_extract && (world.time > species.extract_cooldown))
return TRUE
@@ -81,6 +81,9 @@
if(H.blood_volume >= BLOOD_VOLUME_MAXIMUM)
to_chat(H, "<span class='notice'>You're already full!</span>")
return
//This checks whether or not they are wearing a garlic clove on their neck
if(!blood_sucking_checks(victim, TRUE, FALSE))
return
if(victim.stat == DEAD)
to_chat(H, "<span class='notice'>You need a living victim!</span>")
return
@@ -92,6 +95,9 @@
to_chat(victim, "<span class='warning'>[H] tries to bite you, but stops before touching you!</span>")
to_chat(H, "<span class='warning'>[victim] is blessed! You stop just in time to avoid catching fire.</span>")
return
//Here we check now for both the garlic cloves on the neck and for blood in the victims bloodstream.
if(!blood_sucking_checks(victim, TRUE, TRUE))
return
if(!do_after(H, 30, target = victim))
return
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood
@@ -321,12 +321,16 @@ There are several things that need to be remembered:
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return
if(client && hud_used && hud_used.inv_slots[SLOT_BACK])
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv.update_icon()
update_mutant_bodyparts()
if(head)
head.screen_loc = ui_head
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += head
update_observer_view(head,1)
remove_overlay(HEAD_LAYER)
var/obj/item/clothing/head/H = head
var/alt_icon = H.mob_overlay_icon || 'icons/mob/clothing/head.dmi'
@@ -348,6 +352,7 @@ There are several things that need to be remembered:
head_overlay.pixel_y += dna.species.offset_features[OFFSET_HEAD][2]
overlays_standing[HEAD_LAYER] = head_overlay
apply_overlay(HEAD_LAYER)
update_mutant_bodyparts()
/mob/living/carbon/human/update_inv_belt()
remove_overlay(BELT_LAYER)
@@ -457,11 +462,16 @@ There are several things that need to be remembered:
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return
if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK])
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv.update_icon()
if(wear_mask)
wear_mask.screen_loc = ui_mask
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += wear_mask
update_observer_view(wear_mask,1)
var/obj/item/clothing/mask/M = wear_mask
remove_overlay(FACEMASK_LAYER)
var/alt_icon = M.mob_overlay_icon || 'icons/mob/clothing/mask.dmi'
@@ -515,22 +525,6 @@ There are several things that need to be remembered:
//human HUD updates for items in our inventory
//update whether our head item appears on our hud.
/mob/living/carbon/human/update_hud_head(obj/item/I)
I.screen_loc = ui_head
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += I
update_observer_view(I,1)
//update whether our mask item appears on our hud.
/mob/living/carbon/human/update_hud_wear_mask(obj/item/I)
I.screen_loc = ui_mask
if(client && hud_used && hud_used.hud_shown)
if(hud_used.inventory_shown)
client.screen += I
update_observer_view(I,1)
//update whether our neck item appears on our hud.
/mob/living/carbon/human/update_hud_neck(obj/item/I)
I.screen_loc = ui_neck
@@ -579,13 +573,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
/obj/item/proc/build_worn_icon(default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, override_state, style_flags = NONE, use_mob_overlay_icon = TRUE)
var/t_state
if(override_state)
t_state = override_state
else
if(isinhands && item_state)
t_state = item_state
else
t_state = icon_state
t_state = override_state || item_state || icon_state
//Find a valid icon file from variables+arguments
var/file2use
@@ -609,7 +597,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
//Get the overlays for this item when it's being worn
//eg: ammo counters, primed grenade flashes, etc.
var/list/worn_overlays = worn_overlays(isinhands, file2use, style_flags)
var/list/worn_overlays = worn_overlays(isinhands, file2use, t_state, style_flags)
if(worn_overlays && worn_overlays.len)
standing.overlays.Add(worn_overlays)
+7 -16
View File
@@ -90,9 +90,9 @@
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return
if(client && hud_used && hud_used.inv_slots[SLOT_WEAR_MASK])
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_WEAR_MASK]
inv.update_icon()
inv?.update_icon()
if(wear_mask)
if(!(head && (head.flags_inv & HIDEMASK)))
@@ -110,7 +110,7 @@
if(wear_neck)
if(!(head && (head.flags_inv & HIDENECK)))
overlays_standing[NECK_LAYER] = wear_neck.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = 'icons/mob/clothing/neck.dmi', override_state = wear_mask.icon_state)
overlays_standing[NECK_LAYER] = wear_neck.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = 'icons/mob/clothing/neck.dmi', override_state = wear_neck.icon_state)
update_hud_neck(wear_neck)
apply_overlay(NECK_LAYER)
@@ -118,9 +118,9 @@
/mob/living/carbon/update_inv_back()
remove_overlay(BACK_LAYER)
if(client && hud_used && hud_used.inv_slots[SLOT_BACK])
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_BACK]
inv.update_icon()
inv?.update_icon()
if(back)
overlays_standing[BACK_LAYER] = back.build_worn_icon(default_layer = BACK_LAYER, default_icon_file = 'icons/mob/clothing/back.dmi', override_state = back.icon_state)
@@ -134,9 +134,9 @@
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
return
if(client && hud_used && hud_used.inv_slots[SLOT_BACK])
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[SLOT_HEAD]
inv.update_icon()
inv?.update_icon()
if(head)
overlays_standing[HEAD_LAYER] = head.build_worn_icon(default_layer = HEAD_LAYER, default_icon_file = 'icons/mob/clothing/head.dmi', override_state = head.icon_state)
@@ -191,15 +191,6 @@
/mob/living/carbon/proc/update_hud_back(obj/item/I)
return
//Overlays for the worn overlay so you can overlay while you overlay
//eg: ammo counters, primed grenade flashing, etc.
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = list()
/mob/living/carbon/update_body()
update_body_parts()
+1 -1
View File
@@ -354,7 +354,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(cultslurring)
message = cultslur(message)
if(clockcultslurring)
message = CLOCK_CULT_SLUR(message)
@@ -400,10 +400,9 @@
action.button_icon_state = "wrap_[active]"
action.UpdateButtonIcon()
/obj/effect/proc_holder/wrap/Click()
if(!istype(usr, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
/obj/effect/proc_holder/wrap/Trigger(mob/living/simple_animal/hostile/poison/giant_spider/nurse/user)
if(!istype(user))
return TRUE
var/mob/living/simple_animal/hostile/poison/giant_spider/nurse/user = usr
activate(user)
return TRUE
@@ -444,7 +443,7 @@
check_flags = AB_CHECK_CONSCIOUS
button_icon_state = "lay_eggs"
/datum/action/innate/spider/lay_eggs/IsAvailable()
/datum/action/innate/spider/lay_eggs/IsAvailable(silent = FALSE)
if(..())
if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse))
return 0
@@ -508,7 +507,7 @@
desc = "Send a command to all living spiders."
button_icon_state = "command"
/datum/action/innate/spider/comm/IsAvailable()
/datum/action/innate/spider/comm/IsAvailable(silent = FALSE)
if(!istype(owner, /mob/living/simple_animal/hostile/poison/giant_spider/nurse/midwife))
return FALSE
return TRUE
@@ -11,6 +11,7 @@
speed = 0
maxHealth = 250
health = 250
blood_volume = 0
gender = NEUTER
mob_biotypes = NONE
@@ -11,7 +11,7 @@
background_icon_state = "bg_alien"
var/needs_growth = NO_GROWTH_NEEDED
/datum/action/innate/slime/IsAvailable()
/datum/action/innate/slime/IsAvailable(silent = FALSE)
if(..())
var/mob/living/simple_animal/slime/S = owner
if(needs_growth == GROWTH_NEEDED)
+1
View File
@@ -1,4 +1,5 @@
/mob/Logout()
SEND_SIGNAL(src, COMSIG_MOB_CLIENT_LOGOUT, client)
log_message("[key_name(src)] is no longer owning mob [src]([src.type])", LOG_OWNERSHIP)
SStgui.on_logout(src)
unset_machine()
+1 -1
View File
@@ -353,7 +353,7 @@
if(m_intent == MOVE_INTENT_RUN)
m_intent = MOVE_INTENT_WALK
else
if (HAS_TRAIT(src,TRAIT_NORUNNING)) // FULPSTATION 7/10/19 So you can't run during fortitude.
if (HAS_TRAIT(src,TRAIT_NORUNNING))
to_chat(src, "You find yourself unable to run.")
return FALSE
m_intent = MOVE_INTENT_RUN