Skip to content

Commit

Permalink
More Bug-B-Gone applied
Browse files Browse the repository at this point in the history
Stops infinite research points from scanning null artifacts
Fixes data disks making artifacts that dont work
You can now "squeeze" held artifacts to touch them
Made artifact manip wand more obvious what it does.
Added new titles: 'Artificer' and 'Cheif Artificer' to titles [With ooks permission]
  • Loading branch information
V2LenKagamine committed Sep 2, 2024
1 parent 7ec30ef commit ba8ea4b
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 33 deletions.
10 changes: 6 additions & 4 deletions monkestation/code/modules/art_sci_overrides/activators/range.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/datum/artifact_activator/range
name = "Generic Range Trigger"
//the upper range of the weapon basically between amount, and upper_range

var/upper_range = 0
///Hint range goes like amount - hint_range to upper_range + hint_range
var/hint_range = 0
Expand All @@ -12,7 +12,6 @@

/datum/artifact_activator/range/setup(potency)
. = ..()
upper_range = amount + (hint_range * 2)

/datum/artifact_activator/range/force
name = "Physical Trauma"
Expand All @@ -23,6 +22,9 @@
hint_texts = list("You almost want to start hitting things.", "A good whack might fix this.")
discovered_text = "Activated by Kinetic Energy"

/datum/artifact_activator/range/force/New()
base_trigger_amount = rand(2,highest_trigger_amount)

/datum/artifact_activator/range/heat
name = "Heat Sensisty"
required_stimuli = STIMULUS_HEAT
Expand All @@ -32,7 +34,7 @@
discovered_text = "Activated by Thermal Energy"

/datum/artifact_activator/range/heat/New()
base_trigger_amount = rand(350, 750)
base_trigger_amount = rand(350, highest_trigger_amount)

/datum/artifact_activator/range/shock
name = "Electrical Charged"
Expand All @@ -43,7 +45,7 @@
discovered_text = "Activated by Electrical Energy"

/datum/artifact_activator/range/shock/New()
base_trigger_amount = rand(400, 1200)
base_trigger_amount = rand(400, highest_trigger_amount)

/datum/artifact_activator/range/radiation
name = "Radioactivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
var/deactivation_message
var/deactivation_sound
var/mutable_appearance/act_effect
///Have we been xray scanned at least once?
var/researched = FALSE

///we store our analysis form var here
var/obj/item/sticker/analysis_form/analysis
Expand Down Expand Up @@ -208,7 +210,7 @@
if(ispath(new_activator))
created = new new_activator()
else
created = new_activator
created = new new_activator.type
activators += created
if(forced_potency > 0 )
created.setup(forced_potency)
Expand All @@ -218,7 +220,7 @@
///changes the fault of the artifact, returns TRUE/FALSE based on success.
/datum/component/artifact/proc/change_fault(datum/artifact_fault/new_fault)
if(new_fault)
return force_replace_fault(new_fault)
return force_replace_fault(new_fault.type)
else
qdel(chosen_fault)
chosen_fault = new new_fault
Expand All @@ -238,7 +240,7 @@
if(ispath(effect))
added = new effect //We need it now, becasue for some reason we cant read the lists from just the raw datum.
else
added = effect //Skip the checks, just add it.
added = new effect.type //Skip the checks, just add it.
artifact_effects += added
added.our_artifact = src
added.setup()
Expand Down Expand Up @@ -366,11 +368,7 @@
if(istype(listed_activator, /datum/artifact_activator/range))
var/datum/artifact_activator/range/ranged_activator = listed_activator
//if we fail the range check check if we are in hint range to send out the hint
if(!ISINRANGE(stimuli_value, ranged_activator.amount, ranged_activator.upper_range))
if(!ISINRANGE(stimuli_value, ranged_activator.amount - ranged_activator.hint_range, ranged_activator.upper_range + ranged_activator.hint_range))
continue
if(!prob(ranged_activator.hint_prob))
continue
if(stimuli_value < ranged_activator.amount)
continue
correct_trigger = TRUE
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
///Called on process() IF the artifact is active.
/datum/artifact_effect/proc/effect_process()
return
///Called when the artifact is destroyed
///Called when the artifact/effect is destroyed is destroyed
/datum/artifact_effect/proc/on_destroy(atom/source)
return
///Util, can be called to activate, then de-activate the artifact as a whole swiftly. Wont Re activate already active artifacts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
our_aura = owner.AddComponent( \
/datum/component/aura_healing, \
range = 5, \
brute_heal = 0.7, \
burn_heal = 0.7, \
toxin_heal = 0.7, \
suffocation_heal = 0.7, \
stamina_heal = 0.7, \
brute_heal = 1, \
burn_heal = 1, \
toxin_heal = 1, \
suffocation_heal = 1, \
stamina_heal = 1, \
clone_heal = 0.2, \
simple_heal = 0.7, \
simple_heal = 1, \
organ_healing = organ_healing, \
healing_color = "#375637", \
)
Expand All @@ -77,10 +77,10 @@
if(iscarbon(owner))
if(owner.health < owner.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(owner), "#375637")
owner.adjustBruteLoss(-0.7)
owner.adjustFireLoss(-0.7)
owner.adjustToxLoss(-0.7, forced = TRUE) //Because Slime People are people too
owner.adjustOxyLoss(-0.7, forced = TRUE)
owner.stamina.adjust(0.7)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -0.7)
owner.adjustBruteLoss(-1)
owner.adjustFireLoss(-1)
owner.adjustToxLoss(-1, forced = TRUE) //Because Slime People are people too
owner.adjustOxyLoss(-1, forced = TRUE)
owner.stamina.adjust(1)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1)
owner.adjustCloneLoss(-0.25) //Becasue apparently clone damage is the bastion of all health
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
color = COLOR_BLACK
our_artifact.holder.light_system = COMPLEX_LIGHT //We need this to avoid a crash for wrong lighting system.
our_artifact.holder.set_light(range, round(range*1.25),power,l_color = color,l_on = FALSE)
our_artifact.holder.set_light_range_power_color(range, power, color)
potency += (range + power) * 2

/datum/artifact_effect/lamp/effect_touched(mob/user)
our_artifact.holder.set_light_on(!our_artifact.holder.light_on) //toggle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
research_value = 250

var/static/list/obj/item/toy/plush/plushies = list()

COOLDOWN_DECLARE(plushiefact)

/datum/artifact_effect/plushie/effect_activate(silent)
if(!length(plushies))
plushies = typecacheof(/obj/item/toy/plush,ignore_root_path = TRUE) //I am not responsible for if this is a bad idea.
if(!COOLDOWN_FINISHED(src,plushiefact))
return
var/obj/item/toy/plush/boi_path = pick(plushies)
var/obj/item/toy/plush/boi = new boi_path
boi.forceMove(our_artifact.holder.loc)
Expand All @@ -22,3 +27,4 @@
var/datum/component/ghost_object_control/spiritholder = boi.GetComponent(/datum/component/ghost_object_control)
if(!(spiritholder.bound_spirit))
spiritholder.request_control(0.6)
COOLDOWN_START(src,plushiefact,3 MINUTE)
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ ARTIFACT_SETUP(/obj/item/stock_parts/cell/artifact, SSobj, null, /datum/artifact
. = FALSE
if(assoc_comp.active)
return ..()

/obj/item/stock_parts/cell/artifact/attack_self(mob/user, modifiers)
. = ..()
to_chat(user,span_notice("You squeeze the [src] tightly."))
on_artifact_touched(src,user,modifiers)
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@

ARTIFACT_SETUP(/obj/item/gun/magic/artifact, SSobj, null, /datum/artifact_effect/gun, ARTIFACT_SIZE_SMALL)

/obj/item/gun/magic/artifact/attack_self(mob/user, modifiers)
. = ..()
to_chat(user,span_notice("You squeeze the [src] tightly."))
on_artifact_touched(src,user,modifiers)

/obj/item/gun/magic/artifact/can_shoot()
return assoc_comp.active

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@

ARTIFACT_SETUP(/obj/item/artifact_item, SSobj, null, null, ARTIFACT_SIZE_SMALL)

/obj/item/artifact_item/attack_self(mob/user, modifiers)
. = ..()
to_chat(user,span_notice("You squeeze the [src] tightly."))
on_artifact_touched(src,user,modifiers)


/obj/item/artifact_item_tiny
//This is literally just an artifact, but s m o l for item generation of traits that require it.

Expand All @@ -25,3 +31,7 @@ ARTIFACT_SETUP(/obj/item/artifact_item, SSobj, null, null, ARTIFACT_SIZE_SMALL)

ARTIFACT_SETUP(/obj/item/artifact_item_tiny, SSobj, null, null, ARTIFACT_SIZE_TINY)

/obj/item/artifact_item_tiny/attack_self(mob/user, modifiers)
. = ..()
to_chat(user,span_notice("You squeeze the [src] tightly."))
on_artifact_touched(src,user,modifiers)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/artifact_summon_wand
name = "artifact manipulation wand"
desc = "A one-use device capable of summoning an artifact from... somewhere. Using the item will change if the artifact should be a blank artifact or a random one. Slap an artifact with it to modify it with the inserted disk."
desc = "A one-use device capable of summoning an artifact from... somewhere.Use the item in hand to change modes. Right Click a disk onto it to load the disk. Right Click the item to attempt to summon an artifact, or slap an existing one to modify it."
icon = 'icons/obj/device.dmi'
icon_state = "memorizer2"
inhand_icon_state = "electronic"
Expand Down Expand Up @@ -100,6 +100,19 @@
. = ..()
if(slotted_disk)
. += span_notice("Contains [slotted_disk]")
switch (selected_mode)
if(0)
. += span_notice("Will currently try to summon a random artifact.")
if(1)
. += span_notice("Will currently try to summon a blank artifact")
if(2)
. += span_notice("Will currently try to copy the disk to a new or existing artifact.")
if(3)
. += span_notice("Will currently try to copy the disk activator to a new or existing artifact.")
if(4)
. += span_notice("Will currently try to copy the disk fault to a new or existing artifact.")
if(5)
. += span_notice("Will currently try to copy the disk effect to a new or existing artifact.")

/obj/item/artifact_summon_wand/attack_atom(atom/attacked_atom, mob/living/user, params)
var/datum/component/artifact/art_comp = attacked_atom.GetComponent(/datum/component/artifact)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

ARTIFACT_SETUP(/obj/item/melee/artifact, SSobj, null, /datum/artifact_effect/melee, ARTIFACT_SIZE_SMALL)

/obj/item/melee/artifact/attack_self(mob/user, modifiers)
. = ..()
to_chat(user,span_notice("You squeeze the [src] tightly."))
on_artifact_touched(src,user,modifiers)

/obj/item/melee/artifact/afterattack(mob/living/victim, mob/user, proximity)
if(!istype(victim) || !assoc_comp.active || !COOLDOWN_FINISHED(src,special_cooldown) || !special || !proximity)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,30 +165,28 @@
artifact.freebies = 0 //No more freebies, you know what it does now.
artifact.fault_discovered = TRUE
research_added += artifact.chosen_fault.research_value
stored_research.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = artifact.chosen_fault.research_value))
if(artifact.chosen_fault)
last_results = list("ARTIFACT FAULT DISCOVERED: [artifact.chosen_fault.name]", "SIZE: [artifact.artifact_size < ARTIFACT_SIZE_LARGE ? "SMALL" : "LARGE" ]")
else
research_added += 2500
stored_research.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = 2500))
last_results = list("FLAWLESS ARTIFACT. NO FAULTS.", "SIZE: [artifact.artifact_size < ARTIFACT_SIZE_LARGE ? "SMALL" : "LARGE" ]")
if(length(artifact.discovered_effects) != length(artifact.artifact_effects))
for(var/datum/artifact_effect/eff in artifact.artifact_effects)
artifact.discovered_effects += eff.type
research_added += eff.research_value
stored_research.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = eff.research_value))
last_results += "ARTIFACT EFFECTS REVEALED."
if(!length(artifact.artifact_effects))
last_results += "MUNDANE ARTIFACT DETECTED. NO NOTEABLE EFFECTS."
if(length(artifact.activators) != length(artifact.activators))
for(var/datum/artifact_activator/activator in artifact.activators)
artifact.discovered_activators += activator.type
stored_research.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = activator.research_value))
research_added += activator.research_value
last_results += "ARTIFACT ACTIVATORS REVEALED."
last_results+= "WARNING: ARTIFACT FAULT NOW ACTIVE."
if(research_added > 0 )
if(research_added > 0 && !artifact.researched)
artifact.researched = TRUE
src.visible_message(span_notice("The [src] blares: ") + span_robot("ARTIFACT RESEARCHED:[research_added] ADDED TO LINKED CONSOLE"))
stored_research.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = research_added))
if(our_disk && destroy_artifact_mode)
destructive_scan_artifact(artifact)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
"Biorobotics Director",
"Research Supervisor",
"Chief Science Officer",
"Chief Artificer",
)

/datum/job/roboticist
Expand All @@ -318,6 +319,7 @@
"Xenoarchaeologist",
"Research Assistant",
"Graduate Student",
"Artificer"
)

/datum/job/security_officer
Expand Down

0 comments on commit ba8ea4b

Please sign in to comment.