Merge pull request #12087 from Ghommie/Ghommie-cit718
Fixing more issues.
This commit is contained in:
@@ -88,6 +88,7 @@
|
|||||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||||
|
|
||||||
INVOKE_ASYNC(GLOBAL_PROC, /proc/init_ref_coin_values) //so the current procedure doesn't sleep because of UNTIL()
|
INVOKE_ASYNC(GLOBAL_PROC, /proc/init_ref_coin_values) //so the current procedure doesn't sleep because of UNTIL()
|
||||||
|
INVOKE_ASYNC(GLOBAL_PROC, /proc/setupGenetics)
|
||||||
|
|
||||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||||
//if no list/L is provided, one is created.
|
//if no list/L is provided, one is created.
|
||||||
@@ -113,3 +114,25 @@
|
|||||||
UNTIL(C.flags_1 & INITIALIZED_1) //we want to make sure the value is calculated and not null.
|
UNTIL(C.flags_1 & INITIALIZED_1) //we want to make sure the value is calculated and not null.
|
||||||
GLOB.coin_values[path] = C.value
|
GLOB.coin_values[path] = C.value
|
||||||
qdel(C)
|
qdel(C)
|
||||||
|
|
||||||
|
/proc/setupGenetics()
|
||||||
|
var/list/mutations = subtypesof(/datum/mutation/human)
|
||||||
|
shuffle_inplace(mutations)
|
||||||
|
for(var/A in subtypesof(/datum/generecipe))
|
||||||
|
var/datum/generecipe/GR = A
|
||||||
|
GLOB.mutation_recipes[initial(GR.required)] = initial(GR.result)
|
||||||
|
for(var/i in 1 to LAZYLEN(mutations))
|
||||||
|
var/path = mutations[i] //byond gets pissy when we do it in one line
|
||||||
|
var/datum/mutation/human/B = new path ()
|
||||||
|
B.alias = "Mutation #[i]"
|
||||||
|
GLOB.all_mutations[B.type] = B
|
||||||
|
GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks)
|
||||||
|
if(B.locked)
|
||||||
|
continue
|
||||||
|
if(B.quality == POSITIVE)
|
||||||
|
GLOB.good_mutations |= B
|
||||||
|
else if(B.quality == NEGATIVE)
|
||||||
|
GLOB.bad_mutations |= B
|
||||||
|
else if(B.quality == MINOR_NEGATIVE)
|
||||||
|
GLOB.not_good_mutations |= B
|
||||||
|
CHECK_TICK
|
||||||
@@ -16,7 +16,6 @@ SUBSYSTEM_DEF(atoms)
|
|||||||
|
|
||||||
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
||||||
GLOB.fire_overlay.appearance_flags = RESET_COLOR
|
GLOB.fire_overlay.appearance_flags = RESET_COLOR
|
||||||
setupGenetics() //to set the mutations' sequence.
|
|
||||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||||
InitializeAtoms()
|
InitializeAtoms()
|
||||||
return ..()
|
return ..()
|
||||||
@@ -107,28 +106,6 @@ SUBSYSTEM_DEF(atoms)
|
|||||||
old_initialized = SSatoms.old_initialized
|
old_initialized = SSatoms.old_initialized
|
||||||
BadInitializeCalls = SSatoms.BadInitializeCalls
|
BadInitializeCalls = SSatoms.BadInitializeCalls
|
||||||
|
|
||||||
/datum/controller/subsystem/atoms/proc/setupGenetics()
|
|
||||||
var/list/mutations = subtypesof(/datum/mutation/human)
|
|
||||||
shuffle_inplace(mutations)
|
|
||||||
for(var/A in subtypesof(/datum/generecipe))
|
|
||||||
var/datum/generecipe/GR = A
|
|
||||||
GLOB.mutation_recipes[initial(GR.required)] = initial(GR.result)
|
|
||||||
for(var/i in 1 to LAZYLEN(mutations))
|
|
||||||
var/path = mutations[i] //byond gets pissy when we do it in one line
|
|
||||||
var/datum/mutation/human/B = new path ()
|
|
||||||
B.alias = "Mutation #[i]"
|
|
||||||
GLOB.all_mutations[B.type] = B
|
|
||||||
GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks)
|
|
||||||
if(B.locked)
|
|
||||||
continue
|
|
||||||
if(B.quality == POSITIVE)
|
|
||||||
GLOB.good_mutations |= B
|
|
||||||
else if(B.quality == NEGATIVE)
|
|
||||||
GLOB.bad_mutations |= B
|
|
||||||
else if(B.quality == MINOR_NEGATIVE)
|
|
||||||
GLOB.not_good_mutations |= B
|
|
||||||
CHECK_TICK
|
|
||||||
|
|
||||||
/datum/controller/subsystem/atoms/proc/InitLog()
|
/datum/controller/subsystem/atoms/proc/InitLog()
|
||||||
. = ""
|
. = ""
|
||||||
for(var/path in BadInitializeCalls)
|
for(var/path in BadInitializeCalls)
|
||||||
|
|||||||
@@ -53,6 +53,11 @@
|
|||||||
using_power = FALSE
|
using_power = FALSE
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
/obj/machinery/recharger/Exited(atom/movable/M, atom/newloc)
|
||||||
|
. = ..()
|
||||||
|
if(charging == M)
|
||||||
|
setCharging()
|
||||||
|
|
||||||
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
|
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
|
||||||
if(istype(G, /obj/item/wrench))
|
if(istype(G, /obj/item/wrench))
|
||||||
if(charging)
|
if(charging)
|
||||||
@@ -111,13 +116,11 @@
|
|||||||
charging.update_icon()
|
charging.update_icon()
|
||||||
charging.forceMove(drop_location())
|
charging.forceMove(drop_location())
|
||||||
user.put_in_hands(charging)
|
user.put_in_hands(charging)
|
||||||
setCharging(null)
|
|
||||||
|
|
||||||
/obj/machinery/recharger/attack_tk(mob/user)
|
/obj/machinery/recharger/attack_tk(mob/user)
|
||||||
if(charging)
|
if(charging)
|
||||||
charging.update_icon()
|
charging.update_icon()
|
||||||
charging.forceMove(drop_location())
|
charging.forceMove(drop_location())
|
||||||
setCharging(null)
|
|
||||||
|
|
||||||
/obj/machinery/recharger/process()
|
/obj/machinery/recharger/process()
|
||||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
if((flags_inv & HIDEACCESSORY) || (A.flags_inv & HIDEACCESSORY))
|
if((flags_inv & HIDEACCESSORY) || (A.flags_inv & HIDEACCESSORY))
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', "attached_accessory.icon_state")
|
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', attached_accessory.icon_state)
|
||||||
accessory_overlay.alpha = attached_accessory.alpha
|
accessory_overlay.alpha = attached_accessory.alpha
|
||||||
accessory_overlay.color = attached_accessory.color
|
accessory_overlay.color = attached_accessory.color
|
||||||
|
|
||||||
|
|||||||
@@ -75,31 +75,31 @@
|
|||||||
apply_healing_core(target, user)
|
apply_healing_core(target, user)
|
||||||
|
|
||||||
/obj/item/organ/regenerative_core/proc/apply_healing_core(atom/target, mob/user)
|
/obj/item/organ/regenerative_core/proc/apply_healing_core(atom/target, mob/user)
|
||||||
if(ishuman(target))
|
if(!user || !ishuman(target))
|
||||||
var/mob/living/carbon/human/H = target
|
return
|
||||||
if(inert)
|
var/mob/living/carbon/human/H = target
|
||||||
to_chat(user, "<span class='notice'>[src] has decayed and can no longer be used to heal.</span>")
|
if(inert)
|
||||||
return
|
to_chat(user, "<span class='notice'>[src] has decayed and can no longer be used to heal.</span>")
|
||||||
else
|
return
|
||||||
if(H.stat == DEAD)
|
if(H.stat == DEAD)
|
||||||
to_chat(user, "<span class='notice'>[src] are useless on the dead.</span>")
|
to_chat(user, "<span class='notice'>[src] are useless on the dead.</span>")
|
||||||
return
|
return
|
||||||
if(H != user)
|
if(H != user)
|
||||||
H.visible_message("[user] forces [H] to apply [src]... [H.p_they()] quickly regenerate all injuries!")
|
H.visible_message("[user] forces [H] to apply [src]... [H.p_they()] quickly regenerate all injuries!")
|
||||||
SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "other"))
|
SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "other"))
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='notice'>You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.</span>")
|
to_chat(user, "<span class='notice'>You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.</span>")
|
||||||
SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self"))
|
SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self"))
|
||||||
if(AmBloodsucker(H))
|
if(AmBloodsucker(H))
|
||||||
H.revive(full_heal = FALSE)
|
H.revive(full_heal = FALSE)
|
||||||
else
|
else
|
||||||
H.revive(full_heal = TRUE)
|
H.revive(full_heal = TRUE)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
user.log_message("[user] used [src] to heal [H]! Wake the fuck up, Samurai!", LOG_ATTACK, color="green") //Logging for 'old' style legion core use, when clicking on a sprite of yourself or another.
|
user.log_message("[user] used [src] to heal [H == user ? "[H.p_them()]self" : H]! Wake the fuck up, Samurai!", LOG_ATTACK, color="green") //Logging for 'old' style legion core use, when clicking on a sprite of yourself or another.
|
||||||
|
|
||||||
/obj/item/organ/regenerative_core/attack_self(mob/user) //Knouli's first hack! Allows for the use of the core in hand rather than needing to click on the target, yourself, to selfheal. Its a rip of the proc just above - but skips on distance check and only uses 'user' rather than 'target'
|
/obj/item/organ/regenerative_core/attack_self(mob/user) //Knouli's first hack! Allows for the use of the core in hand rather than needing to click on the target, yourself, to selfheal. Its a rip of the proc just above - but skips on distance check and only uses 'user' rather than 'target'
|
||||||
. = ..()
|
. = ..()
|
||||||
apply_healing_core(user)
|
apply_healing_core(user, user)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
/obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||||
|
|||||||
Reference in New Issue
Block a user