mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-14 09:28:26 +01:00
Merge pull request #11578 from Ghommie/Ghommie-cit636
Fixing owner not being set in mutation/on_aquiring.
This commit is contained in:
@@ -408,7 +408,7 @@
|
||||
/mob/living/LaserEyes(atom/A, params)
|
||||
changeNext_move(CLICK_CD_RANGE)
|
||||
|
||||
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc )
|
||||
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam(loc)
|
||||
LE.icon = 'icons/effects/genetics.dmi'
|
||||
LE.icon_state = "eyelasers"
|
||||
playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/override = 0
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
override += HM.on_attack_hand(src, A, proximity)
|
||||
override += HM.on_attack_hand(A, proximity)
|
||||
|
||||
if(override)
|
||||
return
|
||||
@@ -93,7 +93,7 @@
|
||||
return
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_ranged_attack(src, A, mouseparams)
|
||||
HM.on_ranged_attack(A, mouseparams)
|
||||
|
||||
if(isturf(A) && get_dist(src,A) <= 1)
|
||||
src.Move_Pulled(A)
|
||||
|
||||
@@ -51,45 +51,46 @@
|
||||
if(copymut && istype(copymut, /datum/mutation/human))
|
||||
copy_mutation(copymut)
|
||||
|
||||
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(!owner || !istype(owner) || owner.stat == DEAD || (src in owner.dna.mutations))
|
||||
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/H)
|
||||
if(!H || !istype(H) || H.stat == DEAD || (src in H.dna.mutations))
|
||||
return TRUE
|
||||
if(species_allowed.len && !species_allowed.Find(owner.dna.species.id))
|
||||
if(species_allowed.len && !species_allowed.Find(H.dna.species.id))
|
||||
return TRUE
|
||||
if(health_req && owner.health < health_req)
|
||||
if(health_req && H.health < health_req)
|
||||
return TRUE
|
||||
if(limb_req && !owner.get_bodypart(limb_req))
|
||||
if(limb_req && !H.get_bodypart(limb_req))
|
||||
return TRUE
|
||||
dna = owner.dna
|
||||
owner = H
|
||||
dna = H.dna
|
||||
dna.mutations += src
|
||||
if(text_gain_indication)
|
||||
to_chat(owner, text_gain_indication)
|
||||
to_chat(H, text_gain_indication)
|
||||
if(visual_indicators.len)
|
||||
var/list/mut_overlay = list(get_visual_indicator(owner))
|
||||
if(owner.overlays_standing[layer_used])
|
||||
mut_overlay = owner.overlays_standing[layer_used]
|
||||
mut_overlay |= get_visual_indicator(owner)
|
||||
owner.remove_overlay(layer_used)
|
||||
owner.overlays_standing[layer_used] = mut_overlay
|
||||
owner.apply_overlay(layer_used)
|
||||
var/list/mut_overlay = list(get_visual_indicator())
|
||||
if(H.overlays_standing[layer_used])
|
||||
mut_overlay = H.overlays_standing[layer_used]
|
||||
mut_overlay |= get_visual_indicator()
|
||||
H.remove_overlay(layer_used)
|
||||
H.overlays_standing[layer_used] = mut_overlay
|
||||
H.apply_overlay(layer_used)
|
||||
|
||||
grant_spell(owner)
|
||||
grant_spell()
|
||||
if(!modified)
|
||||
addtimer(CALLBACK(src, .proc/modify, 5)) //gonna want children calling ..() to run first
|
||||
|
||||
/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/proc/get_visual_indicator()
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
/datum/mutation/human/proc/on_attack_hand(atom/target, proximity)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
|
||||
/datum/mutation/human/proc/on_ranged_attack(atom/target, mouseparams)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_move(mob/living/carbon/human/owner, new_loc)
|
||||
/datum/mutation/human/proc/on_move(atom/new_loc)
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/proc/on_life()
|
||||
return
|
||||
|
||||
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
|
||||
@@ -172,7 +173,7 @@
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/datum/mutation/human/proc/grant_spell(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/proc/grant_spell()
|
||||
if(!ispath(power) || !owner)
|
||||
return FALSE
|
||||
|
||||
@@ -180,4 +181,4 @@
|
||||
power.action_background_icon_state = "bg_tech_blue_on"
|
||||
power.panel = "Genetic"
|
||||
owner.AddSpell(power)
|
||||
return TRUE
|
||||
return TRUE
|
||||
@@ -90,7 +90,7 @@
|
||||
energy_coeff = 1
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/datum/mutation/human/void/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/void/on_life()
|
||||
if(!isturf(owner.loc))
|
||||
return
|
||||
if(prob((0.5+((100-dna.stability)/20))) * GET_MUTATION_SYNCHRONIZER(src)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))//-MUTATIONS_LAYER+1
|
||||
|
||||
/datum/mutation/human/antenna/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/antenna/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/mindreader
|
||||
@@ -103,5 +103,5 @@
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))
|
||||
|
||||
/datum/mutation/human/mindreader/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
return visual_indicators[type][1]
|
||||
/datum/mutation/human/mindreader/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/epilepsy/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/epilepsy/on_life()
|
||||
if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
|
||||
owner.visible_message("<span class='danger'>[owner] starts having a seizure!</span>", "<span class='userdanger'>You have a seizure!</span>")
|
||||
owner.Unconscious(200 * GET_MUTATION_POWER(src))
|
||||
@@ -57,7 +57,7 @@
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/cough/on_life()
|
||||
if(prob(5 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
|
||||
owner.drop_all_held_items()
|
||||
owner.emote("cough")
|
||||
@@ -143,7 +143,7 @@
|
||||
text_gain_indication = "<span class='danger'>You twitch.</span>"
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/tourettes/on_life()
|
||||
if(prob(10 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS && !owner.IsStun())
|
||||
owner.Stun(200)
|
||||
switch(rand(1, 3))
|
||||
@@ -237,7 +237,7 @@
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/fire/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/fire/on_life()
|
||||
if(prob((1+(100-dna.stability)/10)) * GET_MUTATION_SYNCHRONIZER(src))
|
||||
owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src))
|
||||
owner.IgniteMob()
|
||||
@@ -278,7 +278,7 @@
|
||||
text_gain_indication = "<span class='danger'>You feel screams echo through your mind...</span>"
|
||||
text_lose_indication = "<span class'notice'>The screaming in your mind fades.</span>"
|
||||
|
||||
/datum/mutation/human/paranoia/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/paranoia/on_life()
|
||||
if(prob(5) && owner.stat == CONSCIOUS)
|
||||
owner.emote("scream")
|
||||
owner.jitteriness = min(max(0, owner.jitteriness + 5), 30)
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
return
|
||||
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
||||
|
||||
/datum/mutation/human/chameleon/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/chameleon/on_life()
|
||||
owner.alpha = max(0, owner.alpha - 25)
|
||||
|
||||
/datum/mutation/human/chameleon/on_move(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/chameleon/on_move(atom/new_loc)
|
||||
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
||||
|
||||
/datum/mutation/human/chameleon/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
/datum/mutation/human/chameleon/on_attack_hand(atom/target, proximity)
|
||||
if(proximity) //stops tk from breaking chameleon
|
||||
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
||||
return
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "fire", -MUTATIONS_LAYER))
|
||||
|
||||
/datum/mutation/human/space_adaptation/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/space_adaptation/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/space_adaptation/on_acquiring(mob/living/carbon/human/owner)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
instability = 5
|
||||
difficulty = 8
|
||||
|
||||
/datum/mutation/human/radioactive/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/radioactive/on_life()
|
||||
radiation_pulse(owner, 20)
|
||||
|
||||
/datum/mutation/human/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You feel nervous.</span>"
|
||||
|
||||
/datum/mutation/human/nervousness/on_life(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/nervousness/on_life()
|
||||
if(prob(10))
|
||||
owner.stuttering = max(10, owner.stuttering)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
if(!(type in visual_indicators))
|
||||
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER))
|
||||
|
||||
/datum/mutation/human/telekinesis/get_visual_indicator(mob/living/carbon/human/owner)
|
||||
/datum/mutation/human/telekinesis/get_visual_indicator()
|
||||
return visual_indicators[type][1]
|
||||
|
||||
/datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
|
||||
target.attack_tk(owner)
|
||||
/datum/mutation/human/telekinesis/on_ranged_attack(atom/target, mouseparams)
|
||||
target.attack_tk(owner)
|
||||
|
||||
@@ -170,7 +170,8 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
|
||||
STR.max_items = 28
|
||||
|
||||
/obj/item/storage/toolbox/brass/prefilled/PopulateContents()
|
||||
new fabricator_type(src)
|
||||
if(fabricator_type)
|
||||
new fabricator_type(src)
|
||||
new /obj/item/screwdriver/brass(src)
|
||||
new /obj/item/wirecutters/brass(src)
|
||||
new /obj/item/wrench/brass(src)
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
M.Knockdown(40)
|
||||
M.adjustBruteLoss(60)
|
||||
Expand()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/proc/Expand()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
/mob/living/carbon/human/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_move(src, NewLoc)
|
||||
HM.on_move(NewLoc)
|
||||
|
||||
if(shoes && shoes.type != /obj/item/clothing/head/mob_holder/micro)
|
||||
if(!lying && !buckled)
|
||||
|
||||
+1
-1
@@ -324,7 +324,6 @@
|
||||
#include "code\datums\martial.dm"
|
||||
#include "code\datums\mind.dm"
|
||||
#include "code\datums\mutable_appearance.dm"
|
||||
#include "code\datums\mutations.dm"
|
||||
#include "code\datums\numbered_display.dm"
|
||||
#include "code\datums\outfit.dm"
|
||||
#include "code\datums\position_point_vector.dm"
|
||||
@@ -487,6 +486,7 @@
|
||||
#include "code\datums\mood_events\generic_positive_events.dm"
|
||||
#include "code\datums\mood_events\mood_event.dm"
|
||||
#include "code\datums\mood_events\needs_events.dm"
|
||||
#include "code\datums\mutations\_mutations.dm"
|
||||
#include "code\datums\mutations\actions.dm"
|
||||
#include "code\datums\mutations\antenna.dm"
|
||||
#include "code\datums\mutations\body.dm"
|
||||
|
||||
Reference in New Issue
Block a user