mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Compile error resolution
This commit is contained in:
@@ -115,7 +115,7 @@
|
||||
if(!(mat_container_flags & MATCONTAINER_SILENT))
|
||||
to_chat(user, "<span class='warning'>[parent] won't accept [I]!</span>")
|
||||
return
|
||||
. = COMPONENT_NO_AFTERATTACK
|
||||
. = COMPONENT_CANCEL_ATTACK_CHAIN
|
||||
var/datum/callback/pc = precondition
|
||||
if(pc && !pc.Invoke(user))
|
||||
return
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
// It shouldn't be possible to add more matter than our max
|
||||
ASSERT((total_amount + (matter_per_sheet * sheets_to_use)) <= max_amount)
|
||||
|
||||
|
||||
// Use the amount of sheets from the stack
|
||||
if(!S.use(sheets_to_use))
|
||||
to_chat(user, "<span class='warning'>Something went wrong with your stack. Split it manually and try again.</span>")
|
||||
@@ -358,7 +358,7 @@
|
||||
if(materials[M] < (sheet_amt * SHEET_MATERIAL_AMOUNT))
|
||||
sheet_amt = round(materials[M] / SHEET_MATERIAL_AMOUNT)
|
||||
|
||||
var/obj/item/stack/S = M.stack_type
|
||||
var/obj/item/stack/S = M.stack_type
|
||||
var/max_stack_size = initial(S.max_amount)
|
||||
|
||||
var/count = 0
|
||||
|
||||
@@ -196,10 +196,13 @@
|
||||
|
||||
/datum/reagent/water/touch_obj(var/obj/O, var/amount)
|
||||
..()
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/cube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cube/cube = O
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
|
||||
if(!cube.wrapped)
|
||||
cube.Expand()
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/cube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cube/cube = O
|
||||
cube.Expand()
|
||||
else
|
||||
O.water_act(amount / 5)
|
||||
|
||||
|
||||
@@ -10,6 +10,21 @@
|
||||
var/artifact_id = ""
|
||||
var/effect_type = 0
|
||||
|
||||
var/req_type = /atom/movable
|
||||
|
||||
var/image/active_effect
|
||||
var/effect_icon = 'icons/effects/effects.dmi'
|
||||
var/effect_state = "sparkles"
|
||||
var/effect_color = "#ffffff"
|
||||
|
||||
// The last time the effect was toggled.
|
||||
var/last_activation = 0
|
||||
|
||||
/datum/artifact_effect/Destroy()
|
||||
if(master)
|
||||
master = null
|
||||
..()
|
||||
|
||||
/datum/artifact_effect/proc/get_master_holder() // Return the effectmaster's holder, if it is set to an effectmaster. Otherwise, master is the target object.
|
||||
if(istype(master))
|
||||
return master.holder
|
||||
|
||||
@@ -148,10 +148,12 @@
|
||||
cur_artifact = analysed
|
||||
|
||||
//if both effects are active, we can't harvest either
|
||||
if(cur_artifact.my_effect && cur_artifact.my_effect.activated && cur_artifact.secondary_effect && cur_artifact.secondary_effect.activated)
|
||||
var/list/active_effects = cur_artifact.artifact_master.get_active_effects()
|
||||
|
||||
if(active_effects.len > 1)
|
||||
atom_say("Cannot harvest. Source is emitting conflicting energy signatures.")
|
||||
return
|
||||
if(!cur_artifact.my_effect.activated && !(cur_artifact.secondary_effect && cur_artifact.secondary_effect.activated))
|
||||
else if(!active_effects.len)
|
||||
atom_say("Cannot harvest. No energy emitting from source.")
|
||||
return
|
||||
|
||||
@@ -163,34 +165,24 @@
|
||||
|
||||
//
|
||||
var/datum/artifact_effect/source_effect
|
||||
var/datum/artifact_effect/active_effect = active_effects[1]
|
||||
|
||||
//if we already have charge in the battery, we can only recharge it from the source artifact
|
||||
if(inserted_battery.stored_charge > 0)
|
||||
var/battery_matches_primary_id = 0
|
||||
if(inserted_battery.battery_effect && inserted_battery.battery_effect.artifact_id == cur_artifact.my_effect.artifact_id)
|
||||
if(inserted_battery.battery_effect && inserted_battery.battery_effect.artifact_id == cur_artifact.artifact_master.artifact_id)
|
||||
battery_matches_primary_id = 1
|
||||
if(battery_matches_primary_id && cur_artifact.my_effect.activated)
|
||||
if(battery_matches_primary_id && active_effect.activated)
|
||||
//we're good to recharge the primary effect!
|
||||
source_effect = cur_artifact.my_effect
|
||||
|
||||
var/battery_matches_secondary_id = 0
|
||||
if(inserted_battery.battery_effect && inserted_battery.battery_effect.artifact_id == cur_artifact.secondary_effect.artifact_id)
|
||||
battery_matches_secondary_id = 1
|
||||
if(battery_matches_secondary_id && cur_artifact.secondary_effect.activated)
|
||||
//we're good to recharge the secondary effect!
|
||||
source_effect = cur_artifact.secondary_effect
|
||||
source_effect = active_effect
|
||||
|
||||
if(!source_effect)
|
||||
atom_say("Cannot harvest. Battery is charged with a different energy signature.")
|
||||
else
|
||||
//we're good to charge either
|
||||
if(cur_artifact.my_effect.activated)
|
||||
if(active_effect.activated)
|
||||
//charge the primary effect
|
||||
source_effect = cur_artifact.my_effect
|
||||
|
||||
else if(cur_artifact.secondary_effect.activated)
|
||||
//charge the secondary effect
|
||||
source_effect = cur_artifact.secondary_effect
|
||||
source_effect = active_effect
|
||||
|
||||
|
||||
if(source_effect)
|
||||
|
||||
Reference in New Issue
Block a user