Merge branch 'master' into SpaceRuins

This commit is contained in:
BlackMajor
2020-02-24 19:47:52 +13:00
595 changed files with 9743 additions and 4428 deletions
+1 -1
View File
@@ -714,7 +714,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
AI_Interact = !AI_Interact
if(mob && IsAdminGhost(mob))
mob.has_unlimited_silicon_privilege = AI_Interact
mob.silicon_privileges = AI_Interact ? ALL : NONE
log_admin("[key_name(usr)] has [AI_Interact ? "activated" : "deactivated"] Admin AI Interact")
message_admins("[key_name_admin(usr)] has [AI_Interact ? "activated" : "deactivated"] their AI interaction")
@@ -14,7 +14,8 @@ GLOBAL_LIST_EMPTY(antagonists)
var/list/objectives = list()
var/antag_memory = ""//These will be removed with antag datum
var/antag_moodlet //typepath of moodlet that the mob will gain with their status
var/can_hijack = HIJACK_NEUTRAL //If these antags are alone on shuttle hijack happens.
/// If above 0, this is the multiplier for the speed at which we hijack the shuttle. Do not directly read, use hijack_speed().
var/hijack_speed = 0
//Antag panel properties
var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
@@ -229,6 +230,13 @@ GLOBAL_LIST_EMPTY(antagonists)
return
antag_memory = new_memo
/// Gets how fast we can hijack the shuttle, return 0 for can not hijack. Defaults to hijack_speed var, override for custom stuff like buffing hijack speed for hijack objectives or something.
/datum/antagonist/proc/hijack_speed()
var/datum/objective/hijack/H = locate() in objectives
if(!isnull(H?.hijack_speed_override))
return H.hijack_speed_override
return hijack_speed
//This one is created by admin tools for custom objectives
/datum/antagonist/custom
antagpanel_category = "Custom"
@@ -286,10 +286,10 @@
var/mob/living/L = owner.current
level_bloodcost = maxBloodVolume * 0.2
//If the blood volume of the bloodsucker is lower than the cost to level up, return and inform the bloodsucker
//TODO: Make this into a radial, or perhaps a tgui next UI
// Purchase Power Prompt
var/list/options = list()
var/list/options = list()
for(var/pickedpower in typesof(/datum/action/bloodsucker))
var/datum/action/bloodsucker/power = pickedpower
// If I don't own it, and I'm allowed to buy it.
@@ -170,7 +170,7 @@
// Warn Feeder about Witnesses...
var/was_unnoticed = TRUE
for(var/mob/living/M in viewers(notice_range, owner))
if(M != owner && M != target && iscarbon(M) && M.mind && !M.has_unlimited_silicon_privilege && !M.eye_blind && !M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
if(M != owner && M != target && iscarbon(M) && M.mind && !M.silicon_privileges && !M.eye_blind && !M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
was_unnoticed = FALSE
break
if(was_unnoticed)
@@ -28,9 +28,9 @@
to_chat(owner, "<span class='warning'>Your coffin has been destroyed!</span>")
return FALSE
return TRUE
/datum/action/bloodsucker/gohome/proc/flicker_lights(var/flicker_range, var/beat_volume)
for(var/obj/machinery/light/L in view(flicker_range, get_turf(owner)))
for(var/obj/machinery/light/L in view(flicker_range, get_turf(owner)))
playsound(get_turf(owner), 'sound/effects/singlebeat.ogg', beat_volume, 1)
@@ -45,7 +45,7 @@
flicker_lights(4, 40)
sleep(50)
flicker_lights(4, 60)
for(var/obj/machinery/light/L in view(6, get_turf(owner)))
for(var/obj/machinery/light/L in view(6, get_turf(owner)))
L.flicker(5)
playsound(get_turf(owner), 'sound/effects/singlebeat.ogg', 60, 1)
// ( STEP TWO: Lights OFF? )
@@ -56,7 +56,7 @@
if(!owner)
return
// SEEN?: (effects ONLY if there are witnesses! Otherwise you just POOF)
var/am_seen = FALSE // Do Effects (seen by anyone)
var/drop_item = FALSE // Drop Stuff (seen by non-vamp)
if(isturf(owner.loc)) // Only check if I'm not in a Locker or something.
@@ -65,7 +65,7 @@
if(T && T.lighting_object && T.get_lumcount()>= 0.1)
// B) Check for Viewers
for(var/mob/living/M in viewers(get_turf(owner)))
if(M != owner && isliving(M) && M.mind && !M.has_unlimited_silicon_privilege && !M.eye_blind) // M.client <--- add this in after testing!
if(M != owner && isliving(M) && M.mind && !M.silicon_privileges && !M.eye_blind) // M.client <--- add this in after testing!
am_seen = TRUE
if (!M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
drop_item = TRUE
@@ -95,12 +95,12 @@
puff.effect_type = /obj/effect/particle_effect/smoke/vampsmoke
puff.set_up(3, 0, get_turf(owner))
puff.start()
//STEP FIVE: Create animal at prev location
var/mob/living/simple_animal/SA = pick(/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/retaliate/bat) //prob(300) /mob/living/simple_animal/mouse,
new SA (owner.loc)
// TELEPORT: Move to Coffin & Close it!
do_teleport(owner, bloodsuckerdatum.coffin, no_effects = TRUE, forced = TRUE, channel = TELEPORT_CHANNEL_QUANTUM)
do_teleport(owner, bloodsuckerdatum.coffin, no_effects = TRUE, forced = TRUE, channel = TELEPORT_CHANNEL_QUANTUM)
user.resting = TRUE
user.Stun(30,1)
// CLOSE LID: If fail, force me in.
@@ -112,4 +112,4 @@
bloodsuckerdatum.coffin.update_icon()
// Lock Coffin
bloodsuckerdatum.coffin.LockMe(owner)
@@ -14,6 +14,9 @@
message_Trigger = ""//"Whom will you subvert to your will?"
bloodsucker_can_buy = TRUE
must_be_capacitated = TRUE
var/list/hit //current hit, set while power is in use as we can't pass the list as an extra calling argument in registersignal.
/// If set, uses this speed in deciseconds instead of world.tick_lag
var/speed_override
/datum/action/bloodsucker/targeted/haste/CheckCanUse(display_error)
. = ..()
@@ -43,43 +46,46 @@
return TRUE
/datum/action/bloodsucker/targeted/haste/FireTargetedPower(atom/A)
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
// This is a non-async proc to make sure the power is "locked" until this finishes.
hit = list()
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/on_move)
var/mob/living/user = owner
var/turf/T = isturf(A) ? A : get_turf(A)
// Pulled? Not anymore.
owner.pulledby = null
// Step One: Heatseek toward Target's Turf
walk_to(owner, T, 0, 0.01, 20) // NOTE: this runs in the background! to cancel it, you need to use walk(owner.current,0), or give them a new path.
user.pulledby?.stop_pulling()
// Go to target turf
// DO NOT USE WALK TO.
playsound(get_turf(owner), 'sound/weapons/punchmiss.ogg', 25, 1, -1)
var/safety = 20
while(get_turf(owner) != T && safety > 0 && !(isliving(target) && target.Adjacent(owner)))
user.canmove = FALSE //Dont move while doing the thing, or itll break
safety --
// Did I get knocked down?
if(owner && owner.incapacitated(ignore_restraints=TRUE, ignore_grab=TRUE))// owner.incapacitated())
// We're gonna cancel. But am I on the ground? Spin me!
if(user.resting)
var/send_dir = get_dir(owner, T)
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
owner.spin(10)
var/safety = get_dist(user, T) * 3 + 1
var/consequetive_failures = 0
var/speed = isnull(speed_override)? world.tick_lag : speed_override
while(--safety && (get_turf(user) != T))
var/success = step_towards(user, T) //This does not try to go around obstacles.
if(!success)
success = step_to(user, T) //this does
if(!success)
if(++consequetive_failures >= 3) //if 3 steps don't work
break //just stop
else
consequetive_failures = 0
if(user.resting)
user.setDir(turn(user.dir, 90)) //down? spin2win :^)
if(user.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE)) //actually down? stop.
break
// Spin/Stun people we pass.
//var/mob/living/newtarget = locate(/mob/living) in oview(1, owner)
var/list/mob/living/foundtargets = list()
for(var/mob/living/newtarget in oview(1, owner))
if (newtarget && newtarget != target && !(newtarget in foundtargets))//!newtarget.IsKnockdown())
if (rand(0, 5) < level_current)
playsound(get_turf(newtarget), "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
newtarget.Knockdown(10 + level_current * 5)
if(newtarget.IsStun())
newtarget.spin(10,1)
if (rand(0,4))
newtarget.drop_all_held_items()
foundtargets += newtarget
sleep(1)
if(user)
user.update_canmove() //Let the poor guy move again
if(success) //don't sleep if we failed to move.
sleep(speed)
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
hit = null
user.update_canmove()
/datum/action/bloodsucker/targeted/haste/DeactivatePower(mob/living/user = owner, mob/living/target)
..() // activate = FALSE
user.update_canmove()
/datum/action/bloodsucker/targeted/haste/proc/on_move()
for(var/mob/living/L in dview(1, get_turf(owner)))
if(!hit[L] && (L != owner))
hit[L] = TRUE
playsound(L, "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
L.Knockdown(10 + level_current * 5, override_hardstun = 0.1)
L.spin(10, 1)
@@ -54,8 +54,8 @@
REMOVE_TRAIT(user, TRAIT_VIRUSIMMUNE, "bloodsucker")
var/obj/item/organ/heart/vampheart/H = user.getorganslot(ORGAN_SLOT_HEART)
var/obj/item/organ/eyes/vassal/bloodsucker/E = user.getorganslot(ORGAN_SLOT_EYES)
E.flash_protect = 0
E.flash_protect = 0
// WE ARE ALIVE! //
bloodsuckerdatum.poweron_masquerade = TRUE
while(bloodsuckerdatum && ContinueActive(user))
@@ -5,7 +5,6 @@
var/special_role = ROLE_BROTHER
var/datum/team/brother_team/team
antag_moodlet = /datum/mood_event/focused
can_hijack = HIJACK_HIJACKER
/datum/antagonist/brother/create_team(datum/team/brother_team/new_team)
if(!new_team)
@@ -120,7 +120,7 @@
hierophant_network.Grant(current)
current.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
if(G.active && ishuman(current))
if(G && G.active && ishuman(current))
current.add_overlay(mutable_appearance('icons/effects/genetics.dmi', "servitude", -MUTATIONS_LAYER))
/datum/antagonist/clockcult/remove_innate_effects(mob/living/mob_override)
@@ -174,9 +174,12 @@
log_admin("[key_name(admin)] has made [new_owner.current] into a servant of Ratvar.")
/datum/antagonist/clockcult/admin_remove(mob/user)
remove_servant_of_ratvar(owner.current, TRUE)
message_admins("[key_name_admin(user)] has removed clockwork servant status from [owner.current].")
log_admin("[key_name(user)] has removed clockwork servant status from [owner.current].")
var/mob/target = owner.current
if(!target)
return
remove_servant_of_ratvar(target, TRUE)
message_admins("[key_name_admin(user)] has removed clockwork servant status from [target].")
log_admin("[key_name(user)] has removed clockwork servant status from [target].")
/datum/antagonist/clockcult/get_admin_commands()
. = ..()
+10 -3
View File
@@ -143,7 +143,7 @@
//Cult Blood Spells
/datum/action/innate/cult/blood_spell/stun
name = "Stun"
desc = "A potent spell that will stun and mute victims upon contact."
desc = "A potent spell that will stun and mute victims upon contact. When the cult ascends, so does the spell, it burns and throws back the victim!"
button_icon_state = "hand"
magic_path = "/obj/item/melee/blood_magic/stun"
health_cost = 10
@@ -437,8 +437,15 @@
else
target.visible_message("<span class='warning'>[L] starts to glow in a halo of light!</span>", \
"<span class='userdanger'>A feeling of warmth washes over you, rays of holy light surround your body and protect you from the flash of light!</span>")
else
if(!iscultist(L))
else // cult doesn't stun any longer when halos are out, instead it does burn damage + knockback!
var/datum/antagonist/cult/user_antag = user.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
if(user_antag.cult_team.cult_ascendent)
if(!iscultist(L))
L.adjustFireLoss(20)
if(L.move_resist < MOVE_FORCE_STRONG)
var/atom/throw_target = get_edge_target_turf(L, user.dir)
L.throw_at(throw_target, 7, 1, user)
else if(!iscultist(L))
L.Knockdown(160)
L.adjustStaminaLoss(140) //Ensures hard stamcrit
L.flash_act(1,1)
@@ -5,49 +5,49 @@ is currently following.
*/
GLOBAL_LIST_INIT(disease_ability_singletons, list(
new /datum/disease_ability/action/cough,
new /datum/disease_ability/action/sneeze,
new /datum/disease_ability/action/infect,
new /datum/disease_ability/symptom/mild/cough,
new /datum/disease_ability/symptom/mild/sneeze,
new /datum/disease_ability/symptom/medium/shedding,
new /datum/disease_ability/symptom/medium/beard,
new /datum/disease_ability/symptom/medium/hallucigen,
new /datum/disease_ability/symptom/medium/choking,
new /datum/disease_ability/symptom/medium/confusion,
new /datum/disease_ability/symptom/medium/vomit,
new /datum/disease_ability/symptom/medium/voice_change,
new /datum/disease_ability/symptom/medium/visionloss,
new /datum/disease_ability/symptom/medium/deafness,
new /datum/disease_ability/symptom/powerful/narcolepsy,
new /datum/disease_ability/symptom/medium/fever,
new /datum/disease_ability/symptom/medium/shivering,
new /datum/disease_ability/symptom/medium/headache,
new /datum/disease_ability/symptom/medium/nano_boost,
new /datum/disease_ability/symptom/medium/nano_destroy,
new /datum/disease_ability/symptom/medium/viraladaptation,
new /datum/disease_ability/symptom/medium/viralevolution,
new /datum/disease_ability/symptom/medium/vitiligo,
new /datum/disease_ability/symptom/medium/revitiligo,
new /datum/disease_ability/symptom/medium/itching,
new /datum/disease_ability/symptom/medium/heal/weight_loss,
new /datum/disease_ability/symptom/medium/heal/sensory_restoration,
new /datum/disease_ability/symptom/medium/heal/mind_restoration,
new /datum/disease_ability/symptom/powerful/fire,
new /datum/disease_ability/symptom/powerful/flesh_eating,
// new /datum/disease_ability/symptom/powerful/genetic_mutation,
new /datum/disease_ability/symptom/powerful/inorganic_adaptation,
new /datum/disease_ability/symptom/powerful/heal/starlight,
new /datum/disease_ability/symptom/powerful/heal/oxygen,
new /datum/disease_ability/symptom/powerful/heal/chem,
new /datum/disease_ability/symptom/powerful/heal/metabolism,
new /datum/disease_ability/symptom/powerful/heal/dark,
new /datum/disease_ability/symptom/powerful/heal/water,
new /datum/disease_ability/symptom/powerful/heal/plasma,
new /datum/disease_ability/symptom/powerful/heal/radiation,
new /datum/disease_ability/symptom/powerful/heal/coma,
new /datum/disease_ability/symptom/powerful/youth
))
new /datum/disease_ability/action/cough,
new /datum/disease_ability/action/sneeze,
new /datum/disease_ability/action/infect,
new /datum/disease_ability/symptom/mild/cough,
new /datum/disease_ability/symptom/mild/sneeze,
new /datum/disease_ability/symptom/medium/shedding,
new /datum/disease_ability/symptom/medium/beard,
new /datum/disease_ability/symptom/medium/hallucigen,
new /datum/disease_ability/symptom/medium/choking,
new /datum/disease_ability/symptom/medium/confusion,
new /datum/disease_ability/symptom/medium/vomit,
new /datum/disease_ability/symptom/medium/voice_change,
new /datum/disease_ability/symptom/medium/visionloss,
new /datum/disease_ability/symptom/medium/deafness,
new /datum/disease_ability/symptom/powerful/narcolepsy,
new /datum/disease_ability/symptom/medium/fever,
new /datum/disease_ability/symptom/medium/shivering,
new /datum/disease_ability/symptom/medium/headache,
new /datum/disease_ability/symptom/medium/nano_boost,
new /datum/disease_ability/symptom/medium/nano_destroy,
new /datum/disease_ability/symptom/medium/viraladaptation,
new /datum/disease_ability/symptom/medium/viralevolution,
new /datum/disease_ability/symptom/medium/disfiguration,
new /datum/disease_ability/symptom/medium/polyvitiligo,
new /datum/disease_ability/symptom/medium/itching,
new /datum/disease_ability/symptom/medium/heal/weight_loss,
new /datum/disease_ability/symptom/medium/heal/sensory_restoration,
new /datum/disease_ability/symptom/medium/heal/mind_restoration,
new /datum/disease_ability/symptom/powerful/fire,
new /datum/disease_ability/symptom/powerful/flesh_eating,
new /datum/disease_ability/symptom/powerful/genetic_mutation,
new /datum/disease_ability/symptom/powerful/inorganic_adaptation,
new /datum/disease_ability/symptom/powerful/heal/starlight,
new /datum/disease_ability/symptom/powerful/heal/oxygen,
new /datum/disease_ability/symptom/powerful/heal/chem,
new /datum/disease_ability/symptom/powerful/heal/metabolism,
new /datum/disease_ability/symptom/powerful/heal/dark,
new /datum/disease_ability/symptom/powerful/heal/water,
new /datum/disease_ability/symptom/powerful/heal/plasma,
new /datum/disease_ability/symptom/powerful/heal/radiation,
new /datum/disease_ability/symptom/powerful/heal/coma,
new /datum/disease_ability/symptom/powerful/youth
))
/datum/disease_ability
var/name
@@ -57,7 +57,7 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
var/short_desc = ""
var/long_desc = ""
var/stat_block = ""
var/threshold_block = list()
var/threshold_block = ""
var/category = ""
var/list/symptoms
@@ -76,7 +76,7 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
resistance += initial(S.resistance)
stage_speed += initial(S.stage_speed)
transmittable += initial(S.transmittable)
threshold_block += initial(S.threshold_desc)
threshold_block += "<br><br>[initial(S.threshold_desc)]"
stat_block = "Resistance: [resistance]<br>Stealth: [stealth]<br>Stage Speed: [stage_speed]<br>Transmissibility: [transmittable]<br><br>"
if(symptoms.len == 1) //lazy boy's dream
name = initial(S.name)
@@ -106,10 +106,8 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
for(var/T in symptoms)
var/datum/symptom/S = new T()
SD.symptoms += S
S.OnAdd(SD)
if(SD.processing)
if(S.Start(SD))
S.next_activation = world.time + rand(S.symptom_delay_min * 10, S.symptom_delay_max * 10)
S.Start(SD)
SD.Refresh()
for(var/T in actions)
var/datum/action/A = new T()
@@ -136,7 +134,6 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
var/datum/symptom/S = locate(T) in SD.symptoms
if(S)
SD.symptoms -= S
S.OnRemove(SD)
if(SD.processing)
S.End(SD)
qdel(S)
@@ -296,7 +293,6 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
cost = 8
category = "Symptom (Strong+)"
/******MILD******/
/datum/disease_ability/symptom/mild/cough
@@ -377,11 +373,11 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
/datum/disease_ability/symptom/medium/viralevolution
symptoms = list(/datum/symptom/viralevolution)
/datum/disease_ability/symptom/medium/vitiligo
symptoms = list(/datum/symptom/vitiligo)
/datum/disease_ability/symptom/medium/polyvitiligo
symptoms = list(/datum/symptom/polyvitiligo)
/datum/disease_ability/symptom/medium/revitiligo
symptoms = list(/datum/symptom/revitiligo)
/datum/disease_ability/symptom/medium/disfiguration
symptoms = list(/datum/symptom/disfiguration)
/datum/disease_ability/symptom/medium/itching
symptoms = list(/datum/symptom/itching)
@@ -409,11 +405,9 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
/datum/disease_ability/symptom/powerful/flesh_eating
symptoms = list(/datum/symptom/flesh_eating)
/*
/datum/disease_ability/symptom/powerful/genetic_mutation
symptoms = list(/datum/symptom/genetic_mutation)
cost = 8
*/
/datum/disease_ability/symptom/powerful/inorganic_adaptation
symptoms = list(/datum/symptom/inorganic_adaptation)
@@ -457,4 +451,4 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list(
/datum/disease_ability/symptom/powerful/heal/coma
symptoms = list(/datum/symptom/heal/coma)
short_desc = "Cause victims to fall into a healing coma when hurt."
long_desc = "Cause victims to fall into a healing coma when hurt."
long_desc = "Cause victims to fall into a healing coma when hurt."
-1
View File
@@ -12,7 +12,6 @@
var/list/name_source
show_in_antagpanel = FALSE
antag_moodlet = /datum/mood_event/focused
can_hijack = HIJACK_PREVENT
/datum/antagonist/ert/on_gain()
update_name()
@@ -3,7 +3,7 @@
var/obj/item/claymore/highlander/sword
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
can_hijack = HIJACK_HIJACKER
hijack_speed = 2 //if you kill everyone and actually haev a hand to hijack with, you win??
/datum/antagonist/highlander/apply_innate_effects(mob/living/mob_override)
var/mob/living/L = owner.current || mob_override
-7
View File
@@ -8,11 +8,6 @@
var/give_objectives = TRUE
var/give_equipment = TRUE
/datum/antagonist/ninja/New()
if(helping_station)
can_hijack = HIJACK_PREVENT
. = ..()
/datum/antagonist/ninja/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
update_ninja_icons_added(M)
@@ -135,8 +130,6 @@
adj = "objectiveless"
else
return
if(helping_station)
can_hijack = HIJACK_PREVENT
new_owner.assigned_role = ROLE_NINJA
new_owner.special_role = ROLE_NINJA
new_owner.add_antag_datum(src)
@@ -8,7 +8,6 @@
var/always_new_team = FALSE //If not assigned a team by default ops will try to join existing ones, set this to TRUE to always create new team.
var/send_to_spawnpoint = TRUE //Should the user be moved to default spawnpoint.
var/nukeop_outfit = /datum/outfit/syndicate
can_hijack = HIJACK_HIJACKER //Alternative way to wipe out the station.
/datum/antagonist/nukeop/proc/update_synd_icons_added(mob/living/M)
var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS]
@@ -4,7 +4,6 @@
show_in_antagpanel = FALSE
var/datum/objective/mission
var/datum/team/ert/ert_team
can_hijack = HIJACK_PREVENT
/datum/antagonist/official/greet()
to_chat(owner, "<B><font size=3 color=red>You are a CentCom Official.</font></B>")
@@ -9,7 +9,7 @@
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=600, MAT_GLASS=200)
custom_materials = list(/datum/material/iron=600, /datum/material/glass=200)
var/uses = 2
/obj/item/overthrow_converter/proc/convert(mob/living/carbon/human/target, mob/living/carbon/human/user) // Should probably also delete any mindshield implant. Not sure.
+2 -2
View File
@@ -4,7 +4,7 @@
desc = "A shell of swarmer that was completely powered down. It can no longer activate itself."
icon = 'icons/mob/swarmer.dmi'
icon_state = "swarmer_unactivated"
materials = list(MAT_METAL=10000, MAT_GLASS=4000)
custom_materials = list(/datum/material/iron=10000, /datum/material/glass=4000)
/obj/effect/mob_spawn/swarmer
name = "unactivated swarmer"
@@ -191,7 +191,7 @@
return 0
/obj/item/IntegrateAmount() //returns the amount of resources gained when eating this item
if(materials[MAT_METAL] || materials[MAT_GLASS])
if(custom_materials[getmaterialref(/datum/material/iron)] || custom_materials[getmaterialref(/datum/material/glass)])
return 1
return ..()
@@ -13,7 +13,7 @@
var/should_give_codewords = TRUE
var/should_equip = TRUE
var/traitor_kind = TRAITOR_HUMAN //Set on initial assignment
can_hijack = HIJACK_HIJACKER
hijack_speed = 0.5 //10 seconds per hijack stage by default
/datum/antagonist/traitor/on_gain()
if(owner.current && isAI(owner.current))
@@ -60,6 +60,7 @@
message = GLOB.syndicate_code_response_regex.Replace(message, "<span class='red'>$1</span>")
hearing_args[HEARING_RAW_MESSAGE] = message
// needs to be refactored to base /datum/antagonist sometime..
/datum/antagonist/traitor/proc/add_objective(datum/objective/O)
objectives += O
@@ -2,7 +2,6 @@
name = "Wishgranter Avatar"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
can_hijack = HIJACK_HIJACKER
/datum/antagonist/wishgranter/proc/forge_objectives()
var/datum/objective/hijack/hijack = new
@@ -12,7 +12,6 @@
var/move_to_lair = TRUE
var/outfit_type = /datum/outfit/wizard
var/wiz_age = WIZARD_AGE_MIN /* Wizards by nature cannot be too young. */
can_hijack = HIJACK_HIJACKER
/datum/antagonist/wizard/on_gain()
register()
+1 -1
View File
@@ -12,7 +12,7 @@
icon_state = ""
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=100)
custom_materials = list(/datum/material/iron=100)
throwforce = 2
throw_speed = 3
throw_range = 7
+2 -2
View File
@@ -8,7 +8,7 @@
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 300, MAT_GLASS = 300)
custom_materials = list(/datum/material/iron = 300, /datum/material/glass = 300)
crit_fail = FALSE //Is the flash burnt out?
light_color = LIGHT_COLOR_WHITE
light_power = FLASH_LIGHT_POWER
@@ -267,7 +267,7 @@
throw_speed = 2
throw_range = 3
w_class = WEIGHT_CLASS_BULKY
materials = list(MAT_GLASS=7500, MAT_METAL=1000)
custom_materials = list(/datum/material/glass=7500, /datum/material/iron=1000)
attack_verb = list("shoved", "bashed")
block_chance = 50
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
+1 -1
View File
@@ -2,7 +2,7 @@
name = "health sensor"
desc = "Used for scanning and monitoring health."
icon_state = "health"
materials = list(MAT_METAL=800, MAT_GLASS=200)
custom_materials = list(/datum/material/iron=800, /datum/material/glass=200)
attachable = TRUE
secured = FALSE
+1 -1
View File
@@ -2,7 +2,7 @@
name = "igniter"
desc = "A small electronic device able to ignite combustible substances."
icon_state = "igniter"
materials = list(MAT_METAL=500, MAT_GLASS=50)
custom_materials = list(/datum/material/iron=500, /datum/material/glass=50)
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
heat = 1000
+1 -1
View File
@@ -2,7 +2,7 @@
name = "infrared emitter"
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
icon_state = "infrared"
materials = list(MAT_METAL=1000, MAT_GLASS=500)
custom_materials = list(/datum/material/iron=1000, /datum/material/glass=500)
is_position_sensitive = TRUE
var/on = FALSE
+1 -1
View File
@@ -3,7 +3,7 @@
desc = "A handy little spring-loaded trap for catching pesty rodents."
icon_state = "mousetrap"
item_state = "mousetrap"
materials = list(MAT_METAL=100)
custom_materials = list(/datum/material/iron=100)
attachable = TRUE
var/armed = FALSE
+1 -1
View File
@@ -2,7 +2,7 @@
name = "playback device"
desc = "A small electronic device able to record a voice sample, and repeat that sample when it receive a signal."
icon_state = "radio"
materials = list(MAT_METAL=500, MAT_GLASS=50)
custom_materials = list(/datum/material/iron = 500, /datum/material/glass = 50)
flags_1 = HEAR_1
attachable = TRUE
verb_say = "beeps"
+1 -1
View File
@@ -2,7 +2,7 @@
name = "proximity sensor"
desc = "Used for scanning and alerting when someone enters a certain proximity."
icon_state = "prox"
materials = list(MAT_METAL=800, MAT_GLASS=200)
custom_materials = list(/datum/material/iron=800, /datum/material/glass=200)
attachable = TRUE
var/scanning = FALSE
+1 -1
View File
@@ -5,7 +5,7 @@
item_state = "signaler"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
materials = list(MAT_METAL=400, MAT_GLASS=120)
custom_materials = list(/datum/material/iron=400, /datum/material/glass=120)
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
attachable = TRUE
+1 -1
View File
@@ -2,7 +2,7 @@
name = "timer"
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
icon_state = "timer"
materials = list(MAT_METAL=500, MAT_GLASS=50)
custom_materials = list(/datum/material/iron=500, /datum/material/glass=50)
attachable = TRUE
var/timing = FALSE
+1 -1
View File
@@ -7,7 +7,7 @@
name = "voice analyzer"
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
icon_state = "voice"
materials = list(MAT_METAL=500, MAT_GLASS=50)
custom_materials = list(/datum/material/iron=500, /datum/material/glass=50)
flags_1 = HEAR_1
attachable = TRUE
verb_say = "beeps"
@@ -72,7 +72,7 @@
power_channel = ENVIRON
req_access = list(ACCESS_ATMOSPHERICS)
max_integrity = 250
integrity_failure = 80
integrity_failure = 0.33
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
resistance_flags = FIRE_PROOF
@@ -229,7 +229,7 @@
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] the interface.</span>"
/obj/machinery/airalarm/ui_status(mob/user)
if(user.has_unlimited_silicon_privilege && aidisabled)
if(hasSiliconAccessInArea(user) && aidisabled)
to_chat(user, "AI control has been disabled.")
else if(!shorted)
return ..()
@@ -245,7 +245,7 @@
/obj/machinery/airalarm/ui_data(mob/user)
var/data = list(
"locked" = locked,
"siliconUser" = user.has_unlimited_silicon_privilege || hasSiliconAccessInArea(user),
"siliconUser" = hasSiliconAccessInArea(user),
"emagged" = (obj_flags & EMAGGED ? 1 : 0),
"danger_level" = danger_level,
)
@@ -288,7 +288,7 @@
"danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure)
))
if(!locked || user.has_unlimited_silicon_privilege || hasSiliconAccessInArea(user))
if(!locked || hasSiliconAccessInArea(user, PRIVILEDGES_SILICON|PRIVILEDGES_DRONE))
data["vents"] = list()
for(var/id_tag in A.air_vent_names)
var/long_name = A.air_vent_names[id_tag]
@@ -368,12 +368,14 @@
/obj/machinery/airalarm/ui_act(action, params)
if(..() || buildstage != 2)
return
if((locked && !usr.has_unlimited_silicon_privilege && !hasSiliconAccessInArea(usr)) || (usr.has_unlimited_silicon_privilege && aidisabled))
var/silicon_access = hasSiliconAccessInArea(usr)
var/bot_priviledges = silicon_access || (usr.silicon_privileges & PRIVILEDGES_DRONE)
if((locked && !bot_priviledges) || (silicon_access && aidisabled))
return
var/device_id = params["id_tag"]
switch(action)
if("lock")
if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN))
if(bot_priviledges && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
. = TRUE
if("power", "toggle_filter", "widenet", "scrubbing")
@@ -19,7 +19,7 @@
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 50)
max_integrity = 250
integrity_failure = 100
integrity_failure = 0.4
pressure_resistance = 7 * ONE_ATMOSPHERE
var/temperature_resistance = 1000 + T0C
var/starter_temp
@@ -122,7 +122,7 @@
icon = 'icons/obj/economy.dmi'
icon_state = "rupee"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_GLASS = 500)
custom_materials = list(/datum/material/glass = 500)
/obj/item/rupee/New()
var/newcolor = color2hex(pick(10;"green", 5;"blue", 3;"red", 1;"purple"))
+3 -12
View File
@@ -24,13 +24,13 @@
export_types = list(/obj/structure/ore_box)
/datum/export/large/crate/wood
cost = 140 //
cost = 140
unit_name = "wooden crate"
export_types = list(/obj/structure/closet/crate/wooden)
exclude_types = list()
/datum/export/large/barrel
cost = 500 //150 to make meaning proffit of 350
cost = 300 //double the wooden cost of a coffin.
unit_name = "wooden barrel"
export_types = list(/obj/structure/fermenting_barrel)
@@ -40,19 +40,11 @@
export_types = list(/obj/structure/closet/crate/coffin)
/datum/export/large/reagent_dispenser
cost = 100 // +0-400 depending on amount of reagents left
var/contents_cost = 400
/datum/export/large/reagent_dispenser/get_cost(obj/O)
var/obj/structure/reagent_dispensers/D = O
var/ratio = D.reagents.total_volume / D.reagents.maximum_volume
return ..() + round(contents_cost * ratio)
cost = 100
/datum/export/large/reagent_dispenser/water
unit_name = "watertank"
export_types = list(/obj/structure/reagent_dispensers/watertank)
contents_cost = 200
/datum/export/large/reagent_dispenser/fuel
unit_name = "fueltank"
@@ -60,7 +52,6 @@
/datum/export/large/reagent_dispenser/beer
unit_name = "beer keg"
contents_cost = 700
export_types = list(/obj/structure/reagent_dispensers/beerkeg)
/datum/export/large/pipedispenser
+34 -22
View File
@@ -15,16 +15,13 @@
if(!isitem(O))
return 0
var/obj/item/I = O
if(!(material_id in I.materials))
if(!(getmaterialref(material_id) in I.custom_materials))
return 0
var/amount = I.materials[material_id]
var/amount = I.custom_materials[getmaterialref(material_id)]
if(istype(I, /obj/item/stack))
var/obj/item/stack/S = I
amount *= S.amount
if(istype(I, /obj/item/stack/ore))
amount *= 0.8 // Station's ore redemption equipment is really goddamn good.
if(istype(I, /obj/item/stack/ore))
amount *= 0.8 // Station's ore redemption equipment is really goddamn good.
return round(amount/MINERAL_MATERIAL_AMOUNT)
@@ -32,53 +29,48 @@
/datum/export/material/bananium
cost = 500
material_id = MAT_BANANIUM
material_id = /datum/material/bananium
message = "cm3 of bananium"
/datum/export/material/diamond
cost = 250
material_id = MAT_DIAMOND
material_id = /datum/material/diamond
message = "cm3 of diamonds"
/datum/export/material/plasma
cost = 100
material_id = MAT_PLASMA
material_id = /datum/material/plasma
message = "cm3 of plasma"
/datum/export/material/uranium
cost = 50
material_id = MAT_URANIUM
material_id = /datum/material/uranium
message = "cm3 of uranium"
/datum/export/material/gold
cost = 60
material_id = MAT_GOLD
material_id = /datum/material/gold
message = "cm3 of gold"
/datum/export/material/silver
cost = 25
material_id = MAT_SILVER
material_id = /datum/material/silver
message = "cm3 of silver"
/datum/export/material/titanium
cost = 60
material_id = MAT_TITANIUM
material_id = /datum/material/titanium
message = "cm3 of titanium"
/datum/export/material/plastitanium
cost = 165 // plasma + titanium costs
material_id = MAT_TITANIUM // code can only check for one material_id; plastitanium is half plasma, half titanium
message = "cm3 of plastitanium"
/datum/export/material/plastic
cost = 5
material_id = MAT_PLASTIC
material_id = /datum/material/plastic
message = "cm3 of plastic"
/datum/export/material/metal
cost = 3
message = "cm3 of metal"
material_id = MAT_METAL
material_id = /datum/material/iron
export_types = list(
/obj/item/stack/sheet/metal, /obj/item/stack/tile/plasteel,
/obj/item/stack/rods, /obj/item/stack/ore, /obj/item/coin)
@@ -86,6 +78,26 @@
/datum/export/material/glass
cost = 3
message = "cm3 of glass"
material_id = MAT_GLASS
material_id = /datum/material/glass
export_types = list(/obj/item/stack/sheet/glass, /obj/item/stack/ore,
/obj/item/shard)
/datum/export/material/adamantine
cost = 300
material_id = /datum/material/adamantine
message = "cm3 of adamantine"
/datum/export/material/mythril
cost = 1000
material_id = /datum/material/mythril
message = "cm3 of mythril"
/datum/export/material/bscrystal
cost = 150
message = "cm3 of bluespace crystals"
material_id = /datum/material/bluespace
/datum/export/material/runite
cost = 300
message = "cm3 of runite"
material_id = /datum/material/runite
+14 -10
View File
@@ -67,16 +67,26 @@
message = "of plasteel"
export_types = list(/obj/item/stack/sheet/plasteel)
/datum/export/material/plastitanium
cost = 165 // plasma + titanium costs
export_types = list(/obj/item/stack/sheet/mineral/plastitanium)
message = "of plastitanium"
/datum/export/material/plastitanium_glass
cost = 168 // plasma + titanium + glass costs
export_types = list(/obj/item/stack/sheet/plastitaniumglass)
message = "of plastitanium glass"
// 1 glass + 0.5 metal, cost is rounded up.
/datum/export/stack/rglass
cost = 6
message = "of reinforced glass"
export_types = list(/obj/item/stack/sheet/rglass)
/datum/export/stack/bscrystal
cost = 150
message = "of bluespace crystals"
export_types = list(/obj/item/stack/sheet/bluespace_crystal)
/datum/export/stack/plastitanium
cost = 165 // plasma + titanium costs
message = "of plastitanium"
export_types = list(/obj/item/stack/sheet/mineral/plastitanium)
/datum/export/stack/wood
cost = 15
@@ -129,12 +139,6 @@
message = "of alien alloy"
export_types = list(/obj/item/stack/sheet/mineral/abductor)
/datum/export/stack/adamantine
unit_name = "bar"
cost = 250
message = "of adamantine"
export_types = list(/obj/item/stack/sheet/mineral/adamantine)
/datum/export/stack/bone
cost = 20
message = "of bones"
+25
View File
@@ -199,6 +199,31 @@
unit_name = "advanced shotgun shell"
export_types = list(/obj/item/ammo_casing/shotgun/dragonsbreath, /obj/item/ammo_casing/shotgun/meteorslug, /obj/item/ammo_casing/shotgun/pulseslug, /obj/item/ammo_casing/shotgun/frag12, /obj/item/ammo_casing/shotgun/ion, /obj/item/ammo_casing/shotgun/laserslug)
/////////////////////////
//Bow and Arrows/////////
/////////////////////////
/datum/export/weapon/bows
cost = 450
unit_name = "bow"
export_types = list(/obj/item/gun/ballistic/bow)
/datum/export/weapon/arrows
cost = 150
unit_name = "arrow"
export_types = list(/obj/item/ammo_casing/caseless/arrow, /obj/item/ammo_casing/caseless/arrow/bone, /obj/item/ammo_casing/caseless/arrow/ashen)
/datum/export/weapon/bow_teaching
cost = 500
unit_name = "stone tablets"
export_types = list(/obj/item/book/granter/crafting_recipe/bone_bow)
/datum/export/weapon/quiver
cost = 100
unit_name = "quiver"
export_types = list(/obj/item/storage/belt/quiver)
/////////////////////////
//The Traitor Sell Outs//
/////////////////////////
+3 -1
View File
@@ -97,7 +97,7 @@
var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location?
var/list/data = list()
data["locked"] = locked//swipe an ID to unlock
data["siliconUser"] = user.has_unlimited_silicon_privilege
data["siliconUser"] = hasSiliconAccessInArea(user)
data["beaconzone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui
data["usingBeacon"] = usingBeacon //is the mode set to deliver to the beacon or the cargobay?
data["canBeacon"] = !usingBeacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location?
@@ -183,6 +183,7 @@
LZ = pick(empty_turfs)
if (SO.pack.cost <= SSshuttle.points && LZ)//we need to call the cost check again because of the CHECK_TICK call
SSshuttle.points -= SO.pack.cost
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
. = TRUE
update_icon()
@@ -196,6 +197,7 @@
CHECK_TICK
if(empty_turfs && empty_turfs.len)
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
SSblackbox.record_feedback("nested tally", "cargo_imports", MAX_EMAG_ROCKETS, list("[SO.pack.cost * 0.72]", "[SO.pack.name]"))
SO.generateRequisition(get_turf(src))
for(var/i in 1 to MAX_EMAG_ROCKETS)
var/LZ = pick(empty_turfs)
+1 -1
View File
@@ -2,7 +2,7 @@
var/name = "Crate"
var/group = ""
var/hidden = FALSE //Aka emag only
var/contraband = FALSE //Hacking the console with a multitool
var/contraband = FALSE //Requires a hacked console UNLESS DropPodOnly = TRUE, in which case it requires an emag
var/cost = 700 // Minimum cost, or infinite points are possible.
var/access = FALSE //What access does the Crate itself need?
var/access_any = FALSE //Do we care about access?
+3 -4
View File
@@ -178,7 +178,7 @@
/datum/supply_pack/security/armory/russian
name = "Russian Surplus Crate"
desc = "Hello Comrade, we have the most modern russian military equipment the black market can offer, for the right price of course. Sadly we couldnt remove the lock so it requires Armory access to open."
cost = 5000
cost = 7500
contraband = TRUE
contains = list(/obj/item/reagent_containers/food/snacks/rationpack,
/obj/item/ammo_box/a762,
@@ -192,12 +192,11 @@
/obj/item/clothing/mask/russian_balaclava,
/obj/item/clothing/head/helmet/rus_ushanka,
/obj/item/clothing/suit/armor/vest/russian_coat,
/obj/item/gun/ballistic/shotgun/boltaction,
/obj/item/gun/ballistic/shotgun/boltaction)
crate_name = "surplus military crate"
/datum/supply_pack/security/armory/russian/fill(obj/structure/closet/crate/C)
for(var/i in 1 to 10)
for(var/i in 1 to 5)
var/item = pick(contains)
new item(C)
@@ -218,7 +217,7 @@
crate_name = "swat crate"
/datum/supply_pack/security/armory/swattasers //Lesser AEG tbh
name = "SWAT tatical tasers Crate"
name = "SWAT tactical tasers Crate"
desc = "Contains two tactical energy gun, these guns are able to tase, disable and lethal as well as hold a seclight. Requires Armory access to open."
cost = 7000
contains = list(/obj/item/gun/energy/e_gun/stun,
@@ -63,6 +63,7 @@
/obj/item/toy/cards/deck/syndicate,
/obj/item/reagent_containers/food/drinks/bottle/absinthe,
/obj/item/clothing/under/syndicate/tacticool,
/obj/item/clothing/under/syndicate/skirt,
/obj/item/clothing/under/syndicate,
/obj/item/suppressor,
/obj/item/storage/fancy/cigarettes/cigpack_syndicate,
+1 -1
View File
@@ -130,7 +130,7 @@
/datum/supply_pack/emergency/bomb
name = "Explosive Emergency Crate"
desc = "Science gone bonkers? Beeping behind the airlock? Buy now and be the hero the station des... I mean needs! (Time not included.)"
desc = "Science gone bonkers? Beeping behind the airlock? Buy now and become the hero the station des... I mean needs! Time not included, but a full bomb suit and hood, as well as a mask and defusal kit are! Non-Nuclear ordnances only."
cost = 1500
contains = list(/obj/item/clothing/head/bomb_hood,
/obj/item/clothing/suit/bomb_suit,
+2 -1
View File
@@ -88,6 +88,7 @@
/obj/item/clothing/mask/gas,
/obj/item/clothing/suit/space/hardsuit/medical)
crate_name = "medical hardsuit"
crate_type = /obj/structure/closet/crate/secure/medical
/datum/supply_pack/medical/supplies
name = "Medical Supplies Crate"
@@ -125,7 +126,7 @@
/obj/item/reagent_containers/medspray/synthflesh,
/obj/item/reagent_containers/medspray/sterilizine)
crate_name = "medco surgery tools"
crate_type = /obj/structure/closet/crate/medical
crate_type = /obj/structure/closet/crate/secure/medical
/datum/supply_pack/medical/surgery
name = "Surgical Supplies Crate"
+2 -1
View File
@@ -193,6 +193,7 @@
/obj/item/reagent_containers/food/snacks/meat/slab/bear,
/obj/item/reagent_containers/food/snacks/meat/slab/xeno,
/obj/item/reagent_containers/food/snacks/meat/slab/spider,
/obj/item/reagent_containers/food/snacks/meat/rawcrab,
/obj/item/reagent_containers/food/snacks/meat/rawbacon,
/obj/item/reagent_containers/food/snacks/spiderleg,
/obj/item/reagent_containers/food/snacks/carpmeat,
@@ -327,7 +328,7 @@
/datum/supply_pack/organic/seeds
name = "Seeds Crate"
desc = "Big things have small beginnings. Contains thirteen different seeds."
desc = "Big things have small beginnings. Contains fourteen different seeds."
cost = 1250
contains = list(/obj/item/seeds/chili,
/obj/item/seeds/berry,
+4 -4
View File
@@ -84,7 +84,7 @@
/datum/supply_pack/science/glasswork
name = "Glass Blower Kit Crate"
desc = "Learn and make glassworks of usefull things for a profit! Contains glassworking tools and blowing rods. Glass not included."
desc = "Learn and make glassworks of useful things for a profit! Contains glassworking tools and blowing rods. Glass not included."
cost = 1000
contains = list(/obj/item/glasswork/glasskit,
/obj/item/glasswork/glasskit,
@@ -111,9 +111,9 @@
/datum/supply_pack/science/nuke_b_gone
name = "Nuke Defusal Kit"
desc = "Contains set of tools to defuse a nuke."
cost = 7500 //Usefull for traitors/nukies that fucked up
cost = 7500 //Useful for traitors/nukies that fucked up
dangerous = TRUE
DropPodOnly = TRUE
hidden = TRUE
contains = list(/obj/item/nuke_core_container/nt,
/obj/item/screwdriver/nuke/nt,
/obj/item/paper/guides/nt/nuke_instructions)
@@ -194,7 +194,7 @@
/datum/supply_pack/science/supermater
name = "Supermatter Extraction Tools Crate"
desc = "Contains a set of tools to extract a sliver of supermatter. Consult your CE today!"
cost = 7500 //Usefull for traitors that fucked up
cost = 7500 //Useful for traitors that fucked up
hidden = TRUE
contains = list(/obj/item/nuke_core_container/supermatter,
/obj/item/scalpel/supermatter,
+1 -1
View File
@@ -103,7 +103,7 @@
desc = "An old russian Minutemen crate, comes with a full russian outfit, a mosin and a stripper clip."
contraband = TRUE
access = FALSE
cost = 5500 //
cost = 6500 //
contains = list(/obj/item/clothing/suit/armor/navyblue/russian,
/obj/item/clothing/shoes/combat,
/obj/item/clothing/head/ushanka,
+3 -3
View File
@@ -737,13 +737,13 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
message_admins("<span class='adminnotice'>Proxy Detection: [key_name_admin(src)] IP intel rated [res.intel*100]% likely to be a Proxy/VPN.</span>")
ip_intel = res.intel
/client/Click(atom/object, atom/location, control, params)
/client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE)
var/ab = FALSE
var/list/L = params2list(params)
if (object && object == middragatom && L["left"])
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
var/mcl = CONFIG_GET(number/minute_click_limit)
if (!holder && mcl)
if (!holder && !ignore_spam && mcl)
var/minute = round(world.time, 600)
if (!clicklimiter)
clicklimiter = new(LIMITER_SIZE)
@@ -768,7 +768,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
return
var/scl = CONFIG_GET(number/second_click_limit)
if (!holder && scl)
if (!holder && !ignore_spam && scl)
var/second = round(world.time, 10)
if (!clicklimiter)
clicklimiter = new(LIMITER_SIZE)
+1 -1
View File
@@ -2,7 +2,7 @@
name = "clothing"
resistance_flags = FLAMMABLE
max_integrity = 200
integrity_failure = 80
integrity_failure = 0.4
var/damaged_clothes = 0 //similar to machine's BROKEN stat and structure's broken var
var/flash_protect = 0 //What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS
var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect
+2 -2
View File
@@ -8,7 +8,7 @@
strip_delay = 20
equip_delay_other = 25
resistance_flags = NONE
materials = list(MAT_GLASS = 250)
custom_materials = list(/datum/material/glass = 250)
var/vision_flags = 0
var/darkness_view = 2//Base human is 2
var/invis_view = SEE_INVISIBLE_LIVING //admin only for now
@@ -286,7 +286,7 @@
icon_state = "welding-g"
item_state = "welding-g"
actions_types = list(/datum/action/item_action/toggle)
materials = list(MAT_METAL = 250)
custom_materials = list(/datum/material/iron = 250)
flash_protect = 2
tint = 2
visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT
+8
View File
@@ -237,6 +237,14 @@
icon_state = "knight_red"
item_state = "knight_red"
/obj/item/clothing/head/helmet/knight/greyscale
name = "knight helmet"
desc = "A classic medieval helmet, if you hold it upside down you could see that it's actually a bucket."
icon_state = "knight_greyscale"
item_state = "knight_greyscale"
armor = list("melee" = 35, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40)
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR //Can change color and add prefix
/obj/item/clothing/head/helmet/skull
name = "skull helmet"
desc = "An intimidating tribal helmet, it doesn't look very comfortable."
+1 -1
View File
@@ -19,7 +19,7 @@
icon_state = "welding"
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
item_state = "welding"
materials = list(MAT_METAL=1750, MAT_GLASS=400)
custom_materials = list(/datum/material/iron=1750, /datum/material/glass=400)
flash_protect = 2
tint = 2
armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 60)
+1 -1
View File
@@ -25,7 +25,7 @@
name = "welding mask"
desc = "A gas mask with built-in welding goggles and a face shield. Looks like a skull - clearly designed by a nerd."
icon_state = "weldingmask"
materials = list(MAT_METAL=4000, MAT_GLASS=2000)
custom_materials = list(/datum/material/iron=4000, /datum/material/glass=2000)
flash_protect = 2
tint = 2
armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 55)
+4 -4
View File
@@ -10,7 +10,7 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize()
. = ..()
AddComponent(/datum/component/material_container, list(MAT_BANANIUM), 200000, TRUE, /obj/item/stack)
AddComponent(/datum/component/material_container, list(/datum/material/bananium), 200000, TRUE, /obj/item/stack)
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75)
if(always_noslip)
clothing_flags |= NOSLIP
@@ -19,7 +19,7 @@
. = ..()
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
if(on)
if(bananium.amount(MAT_BANANIUM) < 100)
if(bananium.get_material_amount(/datum/material/bananium) < 100)
on = !on
if(!always_noslip)
clothing_flags &= ~NOSLIP
@@ -27,7 +27,7 @@
to_chat(loc, "<span class='warning'>You ran out of bananium!</span>")
else
new /obj/item/grown/bananapeel/specialpeel(get_step(src,turn(usr.dir, 180))) //honk
bananium.use_amount_type(100, MAT_BANANIUM)
bananium.use_amount_mat(100, /datum/material/bananium)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user)
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
@@ -43,7 +43,7 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user)
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
if(bananium.amount(MAT_BANANIUM))
if(bananium.get_material_amount(/datum/material/bananium))
on = !on
update_icon()
to_chat(user, "<span class='notice'>You [on ? "activate" : "deactivate"] the prototype shoes.</span>")
+8
View File
@@ -261,6 +261,14 @@
icon_state = "knight_red"
item_state = "knight_red"
/obj/item/clothing/suit/armor/riot/knight/greyscale
name = "knight armour"
desc = "A classic suit of armour, able to be made from many different materials."
icon_state = "knight_greyscale"
item_state = "knight_greyscale"
armor = list("melee" = 35, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 10, "rad" = 10, "fire" = 40, "acid" = 40)
material_flags = MATERIAL_ADD_PREFIX //Can change color and add prefix
/obj/item/clothing/suit/armor/vest/durathread
name = "makeshift vest"
desc = "A vest made of durathread with strips of leather acting as trauma plates."
+5 -5
View File
@@ -105,7 +105,7 @@
desc = "A bronze medal."
icon_state = "bronze"
item_color = "bronze"
materials = list(MAT_METAL=1000)
custom_materials = list(/datum/material/iron=1000)
resistance_flags = FIRE_PROOF
var/medaltype = "medal" //Sprite used for medalbox
var/commended = FALSE
@@ -190,7 +190,7 @@
icon_state = "silver"
item_color = "silver"
medaltype = "medal-silver"
materials = list(MAT_SILVER=1000)
custom_materials = list(/datum/material/silver=1000)
/obj/item/clothing/accessory/medal/silver/valor
name = "medal of valor"
@@ -206,7 +206,7 @@
icon_state = "gold"
item_color = "gold"
medaltype = "medal-gold"
materials = list(MAT_GOLD=1000)
custom_materials = list(/datum/material/gold=1000)
/obj/item/clothing/accessory/medal/gold/captain
name = "medal of captaincy"
@@ -217,7 +217,7 @@
name = "old medal of captaincy"
desc = "A rustic badge pure gold, has been through hell and back by the looks, the syndcate have been after these by the looks of it for generations..."
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 10) //Pure gold
materials = list(MAT_GOLD=2000)
custom_materials = list(/datum/material/gold=2000)
/obj/item/clothing/accessory/medal/gold/heroism
name = "medal of exceptional heroism"
@@ -230,7 +230,7 @@
item_color = "plasma"
medaltype = "medal-plasma"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = -10, "acid" = 0) //It's made of plasma. Of course it's flammable.
materials = list(MAT_PLASMA=1000)
custom_materials = list(/datum/material/plasma=1000)
/obj/item/clothing/accessory/medal/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
@@ -202,7 +202,7 @@
force = 1
throwforce = 1
amount_per_transfer_from_this = 5
materials = list(MAT_METAL=100)
custom_materials = list(/datum/material/iron=100)
possible_transfer_amounts = list()
volume = 5
flags_1 = CONDUCT_1
@@ -218,7 +218,7 @@
force = 14
throwforce = 10
amount_per_transfer_from_this = 20
materials = list(MAT_GOLD=1000)
custom_materials = list(/datum/material/gold=1000)
volume = 150
/obj/item/reagent_containers/food/drinks/trophy/silver_cup
@@ -229,7 +229,7 @@
force = 10
throwforce = 8
amount_per_transfer_from_this = 15
materials = list(MAT_SILVER=800)
custom_materials = list(/datum/material/silver=800)
volume = 100
/obj/item/reagent_containers/food/drinks/trophy/bronze_cup
@@ -240,7 +240,7 @@
force = 5
throwforce = 4
amount_per_transfer_from_this = 10
materials = list(MAT_METAL=400)
custom_materials = list(/datum/material/iron=400)
volume = 25
///////////////////////////////////////////////Drinks/////////////////////////////////////////
@@ -400,7 +400,7 @@
name = "shaker"
desc = "A metal shaker to mix drinks in."
icon_state = "shaker"
materials = list(MAT_METAL=1500)
custom_materials = list(/datum/material/iron=1500)
amount_per_transfer_from_this = 10
volume = 100
isGlass = FALSE
@@ -409,7 +409,7 @@
name = "flask"
desc = "Every good spaceman knows it's a good idea to bring along a couple of pints of whiskey wherever they go."
icon_state = "flask"
materials = list(MAT_METAL=250)
custom_materials = list(/datum/material/iron=250)
volume = 60
isGlass = FALSE
@@ -417,7 +417,7 @@
name = "captain's flask"
desc = "A gold flask belonging to the captain."
icon_state = "flask_gold"
materials = list(MAT_GOLD=500)
custom_materials = list(/datum/material/gold=500)
/obj/item/reagent_containers/food/drinks/flask/det
name = "detective's flask"
@@ -6,7 +6,7 @@
icon_state = "glass_empty"
amount_per_transfer_from_this = 10
volume = 50
materials = list(MAT_GLASS=500)
custom_materials = list(/datum/material/glass=500)
max_integrity = 20
spillable = TRUE
resistance_flags = ACID_PROOF
@@ -45,7 +45,7 @@
amount_per_transfer_from_this = 15
possible_transfer_amounts = list()
volume = 15
materials = list(MAT_GLASS=100)
custom_materials = list(/datum/material/glass=100)
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change(changetype)
cut_overlays()
@@ -293,7 +293,7 @@
icon = 'icons/obj/food/soupsalad.dmi'
icon_state = "bowl"
reagent_flags = OPENCONTAINER
materials = list(MAT_GLASS = 500)
custom_materials = list(/datum/material/glass = 500)
w_class = WEIGHT_CLASS_NORMAL
/obj/item/reagent_containers/glass/bowl/attackby(obj/item/I,mob/user, params)
@@ -325,7 +325,7 @@
/obj/item/reagent_containers/food/snacks/corndog
name = "corndog plate"
desc = "A plate with two small corn dogs, with two dimples of ketchup and mustard to dip them in."
icon_state = "dorndog"
icon_state = "corndog"
trash = /obj/item/trash/plate/alt
tastes = list("hotdog" = 2, "mustard and ketchup" = 1, "fryed bread" = 1)
bonus_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/nutriment/vitamin = 2, /datum/reagent/consumable/mustard = 5, /datum/reagent/consumable/ketchup = 5)
@@ -359,4 +359,4 @@
list_reagents = list(/datum/reagent/consumable/nutriment = 8, /datum/reagent/consumable/nutriment/vitamin = 2, /datum/reagent/consumable/bbqsauce = 5)
bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
tastes = list("meat" = 3, "smokey sauce" = 1)
foodtype = MEAT
foodtype = MEAT
@@ -53,7 +53,8 @@
H.adjust_blurriness(1)
H.visible_message("<span class='warning'>[H] is creamed by [src]!</span>", "<span class='userdanger'>You've been creamed by [src]!</span>")
playsound(H, "desceration", 50, TRUE)
reagents.trans_to(H,15) //Cream pie combat
if(!H.is_mouth_covered())
reagents.trans_to(H,15) //Cream pie combat
if(!H.creamed) // one layer at a time
H.add_overlay(creamoverlay)
H.creamed = TRUE
@@ -319,7 +319,7 @@
/obj/machinery/icecream_vat/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
if(beaker)
beaker.forceMove(drop_location())
if(user && Adjacent(user) && !issiliconoradminghost(user))
if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(beaker)
if(new_beaker)
beaker = new_beaker
@@ -309,8 +309,8 @@
var/metal = 0
for(var/obj/item/O in ingredients)
O.microwave_act(src)
if(O.materials[MAT_METAL])
metal += O.materials[MAT_METAL]
if(O.custom_materials?.len)
metal += O.custom_materials[getmaterialref(/datum/material/iron)]
if(metal)
spark()
@@ -101,6 +101,10 @@
required_reagents = list(/datum/reagent/blood = 5, /datum/reagent/medicine/cryoxadone = 1)
mob_react = FALSE
/datum/chemical_reaction/synthmeat/synthblood
id = "synthmeat_synthblood"
required_reagents = list(/datum/reagent/blood/synthetics = 5, /datum/reagent/medicine/cryoxadone = 1)
/datum/chemical_reaction/synthmeat/on_reaction(datum/reagents/holder, multiplier)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= multiplier, i++)
+5 -5
View File
@@ -196,7 +196,7 @@
dat += "<A href='?src=[REF(src)];create=[D.id];amount=5'>x5</A>"
if(ispath(D.build_path, /obj/item/stack))
dat += "<A href='?src=[REF(src)];create=[D.id];amount=10'>x10</A>"
dat += "([D.materials[MAT_BIOMASS]/efficiency])<br>"
dat += "([D.materials[getmaterialref(/datum/material/biomass)]/efficiency])<br>"
dat += "</div>"
else
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
@@ -232,15 +232,15 @@
else
menustat = "void"
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = 1)
if(materials.len != 1 || materials[1] != MAT_BIOMASS)
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = TRUE)
if(materials.len != 1 || materials[1] != getmaterialref(/datum/material/biomass))
return FALSE
if (materials[MAT_BIOMASS]*multiplier/efficiency > points)
if (materials[getmaterialref(/datum/material/biomass)]*multiplier/efficiency > points)
menustat = "nopoints"
return FALSE
else
if(remove_points)
points -= materials[MAT_BIOMASS]*multiplier/efficiency
points -= materials[getmaterialref(/datum/material/biomass)]*multiplier/efficiency
update_icon()
updateUsrDialog()
return TRUE
+1 -1
View File
@@ -418,7 +418,7 @@
name = "plant data disk"
desc = "A disk for storing plant genetic data."
icon_state = "datadisk_hydro"
materials = list(MAT_METAL=30, MAT_GLASS=10)
custom_materials = list(/datum/material/iron=30, /datum/material/glass=10)
var/datum/plant_gene/gene
var/read_only = 0 //Well, it's still a floppy disk
obj_flags = UNIQUE_RENAME
+3 -3
View File
@@ -9,7 +9,7 @@
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
slot_flags = ITEM_SLOT_BELT
materials = list(MAT_METAL=30, MAT_GLASS=20)
custom_materials = list(/datum/material/iron=30, /datum/material/glass=20)
// *************************************
// Hydroponics Tools
@@ -57,7 +57,7 @@
force = 5
throwforce = 7
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50)
custom_materials = list(/datum/material/iron=50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
hitsound = 'sound/weapons/bladeslice.ogg'
@@ -79,7 +79,7 @@
throwforce = 15
throw_speed = 3
throw_range = 4
materials = list(MAT_METAL = 15000)
custom_materials = list(/datum/material/iron = 15000)
attack_verb = list("chopped", "torn", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
@@ -9,7 +9,7 @@
icon = 'icons/obj/assemblies/electronic_setups.dmi'
icon_state = "setup_small"
item_flags = NOBLUDGEON
materials = list() // To be filled later
custom_materials = null // To be filled later
datum_flags = DF_USE_TAG
var/list/assembly_components = list()
var/list/ckeys_allowed_to_scan = list() // Players who built the circuit can scan it as a ghost.
@@ -95,9 +95,9 @@
D.open()
/obj/item/electronic_assembly/Initialize()
LAZYSET(custom_materials, /datum/material/iron, round((max_complexity + max_components) * 0.25) * SScircuit.cost_multiplier)
.=..()
START_PROCESSING(SScircuit, src)
materials[MAT_METAL] = round((max_complexity + max_components) / 4) * SScircuit.cost_multiplier
//sets up diagnostic hud view
prepare_huds()
@@ -4,7 +4,7 @@
icon = 'icons/obj/assemblies/electronic_components.dmi'
icon_state = "template"
w_class = WEIGHT_CLASS_TINY
materials = list() // To be filled later
custom_materials = null // To be filled later
var/obj/item/electronic_assembly/assembly // Reference to the assembly holding this circuit, if any.
var/extended_desc
var/list/inputs = list()
@@ -84,7 +84,7 @@ a creative player the means to solve many problems. Circuits are held inside an
setup_io(inputs, /datum/integrated_io, inputs_default, IC_INPUT)
setup_io(outputs, /datum/integrated_io, outputs_default, IC_OUTPUT)
setup_io(activators, /datum/integrated_io/activate, null, IC_ACTIVATOR)
materials[MAT_METAL] = w_class * SScircuit.cost_multiplier
LAZYSET(custom_materials, /datum/material/iron, w_class * SScircuit.cost_multiplier)
. = ..()
/obj/item/integrated_circuit/proc/on_data_written() //Override this for special behaviour when new data gets pushed to the circuit.
@@ -33,7 +33,8 @@
/obj/item/integrated_circuit_printer/Initialize()
. = ..()
AddComponent(/datum/component/material_container, list(MAT_METAL), MINERAL_MATERIAL_AMOUNT * 25, TRUE, list(/obj/item/stack, /obj/item/integrated_circuit, /obj/item/electronic_assembly))
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(/datum/material/iron), MINERAL_MATERIAL_AMOUNT * 25, TRUE, list(/obj/item/stack, /obj/item/integrated_circuit, /obj/item/electronic_assembly))
materials.precise_insertion = TRUE
/obj/item/integrated_circuit_printer/proc/print_program(mob/user)
if(!cloning)
@@ -189,16 +190,16 @@
var/cost = 400
if(ispath(build_type, /obj/item/electronic_assembly))
var/obj/item/electronic_assembly/E = SScircuit.cached_assemblies[build_type]
cost = E.materials[MAT_METAL]
cost = E.custom_materials[getmaterialref(/datum/material/iron)]
else if(ispath(build_type, /obj/item/integrated_circuit))
var/obj/item/integrated_circuit/IC = SScircuit.cached_components[build_type]
cost = IC.materials[MAT_METAL]
cost = IC.custom_materials[getmaterialref(/datum/material/iron)]
else if(!(build_type in SScircuit.circuit_fabricator_recipe_list["Tools"]))
return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(!debug && !materials.use_amount_type(cost, MAT_METAL))
if(!debug && !materials.use_amount_mat(cost, /datum/material/iron))
to_chat(usr, "<span class='warning'>You need [cost] metal to build that!</span>")
return TRUE
@@ -270,14 +271,14 @@
return
else if(fast_clone)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(debug || materials.use_amount_type(program["metal_cost"], MAT_METAL))
if(debug || materials.use_amount_mat(program["metal_cost"], /datum/material/iron))
cloning = TRUE
print_program(usr)
else
to_chat(usr, "<span class='warning'>You need [program["metal_cost"]] metal to build that!</span>")
else
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(!materials.use_amount_type(program["metal_cost"], MAT_METAL))
if(!materials.use_amount_mat(program["metal_cost"], /datum/material/iron))
to_chat(usr, "<span class='warning'>You need [program["metal_cost"]] metal to build that!</span>")
return
var/cloning_time = round(program["metal_cost"] / 15)
@@ -295,7 +296,7 @@
to_chat(usr, "<span class='notice'>Cloning has been canceled. Metal cost has been refunded.</span>")
cloning = FALSE
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.use_amount_type(-program["metal_cost"], MAT_METAL) //use negative amount to regain the cost
materials.use_amount_mat(-program["metal_cost"], /datum/material/iron) //use negative amount to regain the cost
interact(usr)
@@ -260,7 +260,7 @@
blocks["max_space"] = assembly.max_components
// Start keeping track of total metal cost
blocks["metal_cost"] = assembly.materials[MAT_METAL]
blocks["metal_cost"] = assembly.custom_materials[getmaterialref(/datum/material/iron)]
// Block 2. Components.
@@ -291,7 +291,7 @@
// Update estimated assembly complexity, taken space and material cost
blocks["complexity"] += component.complexity
blocks["used_space"] += component.size
blocks["metal_cost"] += component.materials[MAT_METAL]
blocks["metal_cost"] += component.custom_materials[getmaterialref(/datum/material/iron)]
// Check if the assembly requires printer upgrades
if(!(component.spawn_flags & IC_SPAWN_DEFAULT))
@@ -1090,6 +1090,7 @@
"Titanium" = IC_PINTYPE_NUMBER,
"Bluespace Mesh" = IC_PINTYPE_NUMBER,
"Biomass" = IC_PINTYPE_NUMBER,
"Plastic" = IC_PINTYPE_NUMBER
)
activators = list(
"scan" = IC_PINTYPE_PULSE_IN,
@@ -1098,7 +1099,7 @@
)
spawn_flags = IC_SPAWN_RESEARCH
power_draw_per_use = 40
var/list/mtypes = list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE, MAT_BIOMASS)
var/list/mtypes = list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/biomass, /datum/material/plastic)
/obj/item/integrated_circuit/input/matscan/do_work()
@@ -1108,10 +1109,9 @@
if(!mt) //Invalid input
return
if(H in view(T)) // This is a camera. It can't examine thngs,that it can't see.
for(var/I in 1 to mtypes.len)
var/datum/material/M = mt.materials[mtypes[I]]
if(M)
set_pin_data(IC_OUTPUT, I, M.amount)
for(var/I in mtypes)
if(I in mt.materials)
set_pin_data(IC_OUTPUT, I, mt.materials[I])
else
set_pin_data(IC_OUTPUT, I, null)
push_data()
@@ -373,6 +373,7 @@
"Bluespace Mesh" = IC_PINTYPE_NUMBER,
"Bananium" = IC_PINTYPE_NUMBER,
"Titanium" = IC_PINTYPE_NUMBER,
"Plastic" = IC_PINTYPE_NUMBER
)
outputs = list(
"self ref" = IC_PINTYPE_REF,
@@ -386,7 +387,8 @@
"Solid Plasma" = IC_PINTYPE_NUMBER,
"Bluespace Mesh" = IC_PINTYPE_NUMBER,
"Bananium" = IC_PINTYPE_NUMBER,
"Titanium" = IC_PINTYPE_NUMBER
"Titanium" = IC_PINTYPE_NUMBER,
"Plastic" = IC_PINTYPE_NUMBER
)
activators = list(
"insert sheet" = IC_PINTYPE_PULSE_IN,
@@ -400,13 +402,11 @@
power_draw_per_use = 40
ext_cooldown = 1
cooldown_per_use = 10
var/list/mtypes = list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE)
var/list/mtypes = list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/uranium, /datum/material/plasma, /datum/material/bluespace, /datum/material/bananium, /datum/material/titanium, /datum/material/plastic)
/obj/item/integrated_circuit/manipulation/matman/Initialize()
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
FALSE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.max_amount =100000
mtypes, 100000, FALSE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
.=..()
@@ -414,9 +414,10 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
set_pin_data(IC_OUTPUT, 2, materials.total_amount)
for(var/I in 1 to mtypes.len)
var/datum/material/M = materials.materials[mtypes[I]]
var/datum/material/M = materials.materials[getmaterialref(I)]
var/amount = materials[M]
if(M)
set_pin_data(IC_OUTPUT, I+2, M.amount)
set_pin_data(IC_OUTPUT, I+2, amount)
push_data()
/obj/item/integrated_circuit/manipulation/matman/proc/is_insertion_ready(mob/user)
@@ -435,7 +436,7 @@
if(!S)
activate_pin(4)
return
if(materials.insert_stack(S, CLAMP(get_pin_data(IC_INPUT, 2),0,100), multiplier = 1) )
if(materials.insert_item(S, CLAMP(get_pin_data(IC_INPUT, 2),0,100), multiplier = 1) )
AfterMaterialInsert()
activate_pin(3)
else
@@ -451,7 +452,7 @@
continue
if(!mt) //Invalid input
if(U>0)
if(materials.retrieve_amount(U, mtypes[I], T))
if(materials.retrieve_sheets(U, getmaterialref(mtypes[I]), T))
suc = TRUE
else
if(mt.transer_amt_to(materials, U, mtypes[I]))
@@ -19,6 +19,9 @@
if(possible_a_intents)
a_intent_change(INTENT_HARM)
return
if ("V")
lay_down()
return
return ..()
+1 -1
View File
@@ -79,4 +79,4 @@
if("Alt")
toggle_move_intent()
return
return ..()
return ..()
+1 -1
View File
@@ -138,7 +138,7 @@
/datum/language_holder/synthetic
languages = list(/datum/language/common)
shadow_languages = list(/datum/language/common, /datum/language/machine, /datum/language/draconic, /datum/language/slime)
shadow_languages = list(/datum/language/common, /datum/language/machine, /datum/language/draconic, /datum/language/slime, /datum/language/dwarf)
/datum/language_holder/empty
languages = list()
+2 -2
View File
@@ -53,7 +53,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
Unit | Condition | Status | Direction | Distance<br>"
for(var/PDT in turrets)
var/obj/machinery/porta_turret/aux_base/T = PDT
var/integrity = max((T.obj_integrity-T.integrity_failure)/(T.max_integrity-T.integrity_failure)*100, 0)
var/integrity = max((T.obj_integrity-T.integrity_failure * T.max_integrity)/(T.max_integrity-T.integrity_failure * max_integrity)*100, 0)
var/status
if(T.stat & BROKEN)
status = "<span class='bad'>ERROR</span>"
@@ -151,7 +151,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
if(!is_mining_level(T.z))
return BAD_ZLEVEL
var/list/colony_turfs = base_dock.return_ordered_turfs(T.x,T.y,T.z,base_dock.dir)
for(var/i in 1 to colony_turfs.len)
CHECK_TICK
@@ -16,7 +16,7 @@
throwforce = 5
throw_speed = 4
armour_penetration = 10
materials = list(MAT_METAL=1150, MAT_GLASS=2075)
custom_materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("smashed", "crushed", "cleaved", "chopped", "pulped")
sharpness = IS_SHARP
@@ -11,7 +11,7 @@
lefthand_file = 'icons/mob/inhands/equipment/mining_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
custom_materials = list(/datum/material/iron=2000) //one sheet, but where can you make them?
tool_behaviour = TOOL_MINING
toolspeed = 1
usesound = list('sound/effects/picaxe1.ogg', 'sound/effects/picaxe2.ogg', 'sound/effects/picaxe3.ogg')
@@ -46,7 +46,7 @@
throwforce = 7
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=1000)
custom_materials = list(/datum/material/iron=1000)
/obj/item/pickaxe/silver
name = "silver-plated pickaxe"
@@ -55,7 +55,7 @@
toolspeed = 0.5 //mines faster than a normal pickaxe, bought from mining vendor
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
force = 17
materials = list(MAT_SILVER=4000)
custom_materials = list(/datum/material/silver=4000)
/obj/item/pickaxe/diamond
name = "diamond-tipped pickaxe"
@@ -64,7 +64,7 @@
toolspeed = 0.3
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
force = 19
materials = list(MAT_DIAMOND=4000)
custom_materials = list(/datum/material/diamond=4000)
/obj/item/pickaxe/plasteel
name = "plasteel-tipped pickaxe"
@@ -72,7 +72,7 @@
toolspeed = 0.5
desc = "A pickaxe with a plasteel pick head. Less robust at cracking rock walls and digging up dirt than the titanium pickaxe, but better at cracking open skulls."
force = 19
materials = list(MAT_METAL=2000, MAT_PLASMA=2000)
custom_materials = list(/datum/material/iron=2000, /datum/material/plasma=2000)
/obj/item/pickaxe/titanium
name = "titanium-tipped pickaxe"
@@ -80,7 +80,7 @@
toolspeed = 0.3
desc = "A pickaxe with a titanium pick head. Extremely robust at cracking rock walls and digging up dirt, but less than the plasteel pickaxe at cracking open skulls."
force = 17
materials = list(MAT_TITANIUM=4000)
custom_materials = list(/datum/material/titanium=4000)
/obj/item/pickaxe/drill
name = "mining drill"
@@ -141,7 +141,7 @@
throwforce = 4
item_state = "shovel"
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=350)
custom_materials = list(/datum/material/iron=350)
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
sharpness = IS_SHARP
@@ -166,5 +166,5 @@
toolspeed = 0.5
force = 5
throwforce = 7
materials = list(MAT_METAL=50)
custom_materials = list(/datum/material/iron=50)
w_class = WEIGHT_CLASS_SMALL
@@ -114,28 +114,28 @@
name = "Kinetic Accelerator Offensive Mining Explosion Mod"
desc = "A device which causes kinetic accelerators to fire AoE blasts that destroy rock and damage creatures."
id = "hyperaoemod"
materials = list(MAT_METAL = 7000, MAT_GLASS = 3000, MAT_SILVER = 3000, MAT_GOLD = 3000, MAT_DIAMOND = 4000)
materials = list(/datum/material/iron = 7000, /datum/material/glass = 3000, /datum/material/silver = 3000, /datum/material/gold = 3000, /datum/material/diamond = 4000)
build_path = /obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
/datum/design/unique_modkit/rapid_repeater
name = "Kinetic Accelerator Rapid Repeater Mod"
desc = "A device which greatly reduces a kinetic accelerator's cooldown on striking a living target or rock, but greatly increases its base cooldown."
id = "repeatermod"
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_URANIUM = 8000, MAT_BLUESPACE = 2000)
materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/uranium = 8000, /datum/material/bluespace = 2000)
build_path = /obj/item/borg/upgrade/modkit/cooldown/repeater
/datum/design/unique_modkit/resonator_blast
name = "Kinetic Accelerator Resonator Blast Mod"
desc = "A device which causes kinetic accelerators to fire shots that leave and detonate resonator blasts."
id = "resonatormod"
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_SILVER = 5000, MAT_URANIUM = 5000)
materials = list(/datum/material/iron = 5000, /datum/material/glass = 5000, /datum/material/silver = 5000, /datum/material/uranium = 5000)
build_path = /obj/item/borg/upgrade/modkit/resonator_blasts
/datum/design/unique_modkit/bounty
name = "Kinetic Accelerator Death Syphon Mod"
desc = "A device which causes kinetic accelerators to permanently gain damage against creature types killed with it."
id = "bountymod"
materials = list(MAT_METAL = 4000, MAT_SILVER = 4000, MAT_GOLD = 4000, MAT_BLUESPACE = 4000)
materials = list(/datum/material/iron = 4000, /datum/material/silver = 4000, /datum/material/gold = 4000, /datum/material/bluespace = 4000)
reagents_list = list("blood" = 40)
build_path = /obj/item/borg/upgrade/modkit/bounty
+20 -20
View File
@@ -47,8 +47,10 @@
add_fingerprint(usr)
if(href_list["material"])
machine.selected_material = href_list["material"]
machine.selected_alloy = null
var/datum/material/new_material = locate(href_list["material"])
if(istype(new_material))
machine.selected_material = new_material
machine.selected_alloy = null
if(href_list["alloy"])
machine.selected_material = null
@@ -75,15 +77,16 @@
density = TRUE
var/obj/machinery/mineral/CONSOLE = null
var/on = FALSE
var/selected_material = MAT_METAL
var/datum/material/selected_material = null
var/selected_alloy = null
var/datum/techweb/stored_research
/obj/machinery/mineral/processing_unit/Initialize()
. = ..()
proximity_monitor = new(src, 1)
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, TRUE, /obj/item/stack)
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace), INFINITY, TRUE, /obj/item/stack)
stored_research = new /datum/techweb/specialized/autounlocking/smelter
selected_material = getmaterialref(/datum/material/iron)
/obj/machinery/mineral/processing_unit/Destroy()
CONSOLE = null
@@ -108,13 +111,13 @@
/obj/machinery/mineral/processing_unit/proc/get_machine_data()
var/dat = "<b>Smelter control console</b><br><br>"
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
dat += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm&sup3;"
if (selected_material == mat_id)
for(var/datum/material/M in materials.materials)
var/amount = materials.materials[M]
dat += "<span class=\"res_name\">[M.name]: </span>[amount] cm&sup3;"
if (selected_material == M)
dat += " <i>Smelting</i>"
else
dat += " <A href='?src=[REF(CONSOLE)];material=[mat_id]'><b>Not Smelting</b></A> "
dat += " <A href='?src=[REF(CONSOLE)];material=[REF(M)]'><b>Not Smelting</b></A> "
dat += "<br>"
dat += "<br><br>"
@@ -153,14 +156,14 @@
/obj/machinery/mineral/processing_unit/proc/smelt_ore()
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/datum/material/mat = materials.materials[selected_material]
var/datum/material/mat = selected_material
if(mat)
var/sheets_to_remove = (mat.amount >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(mat.amount / MINERAL_MATERIAL_AMOUNT)
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
if(!sheets_to_remove)
on = FALSE
else
var/out = get_step(src, output_dir)
materials.retrieve_sheets(sheets_to_remove, selected_material, out)
materials.retrieve_sheets(sheets_to_remove, mat, out)
/obj/machinery/mineral/processing_unit/proc/smelt_alloy()
@@ -176,7 +179,7 @@
return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.use_amount(alloy.materials, amount)
materials.use_materials(alloy.materials, amount)
generate_mineral(alloy.build_path)
@@ -188,14 +191,11 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/mat_id in D.materials)
var/M = D.materials[mat_id]
var/datum/material/smelter_mat = materials.materials[mat_id]
for(var/mat_cat in D.materials)
var/required_amount = D.materials[mat_cat]
var/amount = materials.materials[mat_cat]
if(!M || !smelter_mat)
return FALSE
build_amount = min(build_amount, round(smelter_mat.amount / M))
build_amount = min(build_amount, round(amount / required_amount))
return build_amount
+34 -28
View File
@@ -15,9 +15,9 @@
layer = BELOW_OBJ_LAYER
var/points = 0
var/ore_pickup_rate = 15
var/sheet_per_ore = 1
var/ore_multiplier = 1
var/point_upgrade = 1
var/list/ore_values = list(MAT_GLASS = 1, MAT_METAL = 1, MAT_PLASMA = 15, MAT_SILVER = 16, MAT_GOLD = 18, MAT_TITANIUM = 30, MAT_URANIUM = 30, MAT_DIAMOND = 50, MAT_BLUESPACE = 50, MAT_BANANIUM = 60)
var/list/ore_values = list(/datum/material/glass = 1, /datum/material/iron = 1, /datum/material/plasma = 15, /datum/material/silver = 16, /datum/material/gold = 18, /datum/material/titanium = 30, /datum/material/uranium = 30, /datum/material/diamond = 50, /datum/material/bluespace = 50, /datum/material/bananium = 60)
var/message_sent = FALSE
var/list/ore_buffer = list()
var/datum/techweb/stored_research
@@ -31,26 +31,27 @@
/obj/machinery/mineral/ore_redemption/Destroy()
QDEL_NULL(stored_research)
materials = null
return ..()
/obj/machinery/mineral/ore_redemption/RefreshParts()
var/ore_pickup_rate_temp = 15
var/point_upgrade_temp = 1
var/sheet_per_ore_temp = 1
var/ore_multiplier_temp = 1
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
sheet_per_ore_temp = 0.65 + (0.35 * B.rating)
ore_multiplier_temp = 0.65 + (0.35 * B.rating)
for(var/obj/item/stock_parts/manipulator/M in component_parts)
ore_pickup_rate_temp = 15 * M.rating
for(var/obj/item/stock_parts/micro_laser/L in component_parts)
point_upgrade_temp = 0.65 + (0.35 * L.rating)
ore_pickup_rate = ore_pickup_rate_temp
point_upgrade = point_upgrade_temp
sheet_per_ore = sheet_per_ore_temp
ore_multiplier = round(ore_multiplier_temp, 0.01)
/obj/machinery/mineral/ore_redemption/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Smelting <b>[sheet_per_ore]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"
. += "<span class='notice'>The status display reads: Smelting <b>[ore_multiplier]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
var/datum/component/material_container/mat_container = materials.mat_container
@@ -70,13 +71,13 @@
if(!material_amount)
qdel(O) //no materials, incinerate it
else if(!mat_container.has_space(material_amount * sheet_per_ore * O.amount)) //if there is no space, eject it
else if(!mat_container.has_space(material_amount * O.amount)) //if there is no space, eject it
unload_mineral(O)
else
var/mats = O.materials & mat_container.materials
var/mats = O.custom_materials & mat_container.materials
var/amount = O.amount
mat_container.insert_item(O, sheet_per_ore) //insert it
mat_container.insert_item(O, ore_multiplier) //insert it
materials.silo_log(src, "smelted", amount, "ores", mats)
qdel(O)
@@ -87,14 +88,14 @@
var/build_amount = 0
for(var/mat_id in D.materials)
var/M = D.materials[mat_id]
var/datum/material/redemption_mat = mat_container.materials[mat_id]
for(var/mat in D.materials)
var/amount = D.materials[mat]
var/datum/material/redemption_mat_amount = mat_container.materials[mat]
if(!M || !redemption_mat)
if(!amount || !redemption_mat_amount)
return FALSE
var/smeltable_sheets = FLOOR(redemption_mat.amount / M, 1)
var/smeltable_sheets = FLOOR(redemption_mat_amount / amount, 1)
if(!smeltable_sheets)
return FALSE
@@ -124,9 +125,9 @@
var/has_minerals = FALSE
for(var/mat_id in mat_container.materials)
var/datum/material/M = mat_container.materials[mat_id]
var/mineral_amount = M.amount / MINERAL_MATERIAL_AMOUNT
for(var/mat in mat_container.materials)
var/datum/material/M = mat
var/mineral_amount = mat_container.materials[mat] / MINERAL_MATERIAL_AMOUNT
if(mineral_amount)
has_minerals = TRUE
msg += "[capitalize(M.name)]: [mineral_amount] sheets<br>"
@@ -202,10 +203,12 @@
data["materials"] = list()
var/datum/component/material_container/mat_container = materials.mat_container
if (mat_container)
for(var/mat_id in mat_container.materials)
var/datum/material/M = mat_container.materials[mat_id]
var/sheet_amount = M.amount ? M.amount / MINERAL_MATERIAL_AMOUNT : "0"
data["materials"] += list(list("name" = M.name, "id" = M.id, "amount" = sheet_amount, "value" = ore_values[M.id] * point_upgrade))
for(var/mat in mat_container.materials)
var/datum/material/M = mat
var/amount = mat_container.materials[M]
var/sheet_amount = amount / MINERAL_MATERIAL_AMOUNT
var/ref = REF(M)
data["materials"] += list(list("name" = M.name, "id" = ref, "amount" = sheet_amount, "value" = ore_values[M.type]))
data["alloys"] = list()
for(var/v in stored_research.researched_designs)
@@ -251,16 +254,18 @@
if("Release")
if(!mat_container)
return
if(materials.on_hold())
to_chat(usr, "<span class='warning'>Mineral access is on hold, please contact the quartermaster.</span>")
else if(!allowed(usr)) //Check the ID inside, otherwise check the user
to_chat(usr, "<span class='warning'>Required access not found.</span>")
else
var/mat_id = params["id"]
if(!mat_container.materials[mat_id])
var/datum/material/mat = locate(params["id"])
var/amount = mat_container.materials[mat]
if(!amount)
return
var/datum/material/mat = mat_container.materials[mat_id]
var/stored_amount = mat.amount / MINERAL_MATERIAL_AMOUNT
var/stored_amount = CEILING(amount / MINERAL_MATERIAL_AMOUNT, 0.1)
if(!stored_amount)
return
@@ -272,9 +277,10 @@
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
var/sheets_to_remove = round(min(desired,50,stored_amount))
var/count = mat_container.retrieve_sheets(sheets_to_remove, mat_id, get_step(src, output_dir))
var/count = mat_container.retrieve_sheets(sheets_to_remove, mat, get_step(src, output_dir))
var/list/mats = list()
mats[mat_id] = MINERAL_MATERIAL_AMOUNT
mats[mat] = MINERAL_MATERIAL_AMOUNT
materials.silo_log(src, "released", -count, "sheets", mats)
//Logging deleted for quick coding
return TRUE
@@ -315,7 +321,7 @@
else
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
var/amount = round(min(desired,50,smelt_amount))
mat_container.use_amount(alloy.materials, amount)
mat_container.use_materials(alloy.materials, amount)
materials.silo_log(src, "released", -amount, "sheets", alloy.materials)
var/output
if(ispath(alloy.build_path, /obj/item/stack/sheet))
+13 -8
View File
@@ -16,7 +16,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
/obj/machinery/ore_silo/Initialize(mapload)
. = ..()
AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC),
list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace, /datum/material/plastic),
INFINITY,
FALSE,
/obj/item/stack,
@@ -34,6 +34,8 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/datum/component/remote_materials/mats = C
mats.disconnect_from(src)
connected = null
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_all()
@@ -49,7 +51,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
if(!istype(I) || (I.flags_1 & HOLOGRAM_1) || (I.item_flags & NO_MAT_REDEMPTION))
to_chat(user, "<span class='warning'>[M] won't accept [I]!</span>")
return
var/item_mats = I.materials & materials.materials
var/item_mats = I.custom_materials & materials.materials
if(!length(item_mats))
to_chat(user, "<span class='warning'>[I] does not contain sufficient materials to be accepted by [M].</span>")
return
@@ -75,15 +77,17 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/list/ui = list("<head><title>Ore Silo</title></head><body><div class='statusDisplay'><h2>Stored Material:</h2>")
var/any = FALSE
for(var/M in materials.materials)
var/datum/material/mat = materials.materials[M]
var/sheets = round(mat.amount) / MINERAL_MATERIAL_AMOUNT
var/datum/material/mat = M
var/amount = materials.materials[M]
var/sheets = round(amount) / MINERAL_MATERIAL_AMOUNT
var/ref = REF(M)
if (sheets)
if (sheets >= 1)
ui += "<a href='?src=[REF(src)];ejectsheet=[mat.id];eject_amt=1'>Eject</a>"
ui += "<a href='?src=[REF(src)];ejectsheet=[ref];eject_amt=1'>Eject</a>"
else
ui += "<span class='linkOff'>Eject</span>"
if (sheets >= 20)
ui += "<a href='?src=[REF(src)];ejectsheet=[mat.id];eject_amt=20'>20x</a>"
ui += "<a href='?src=[REF(src)];ejectsheet=[ref];eject_amt=20'>20x</a>"
else
ui += "<span class='linkOff'>20x</span>"
ui += "<b>[mat.name]</b>: [sheets] sheets<br>"
@@ -148,7 +152,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
updateUsrDialog()
return TRUE
else if(href_list["ejectsheet"])
var/eject_sheet = href_list["ejectsheet"]
var/datum/material/eject_sheet = locate(href_list["ejectsheet"])
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/count = materials.retrieve_sheets(text2num(href_list["eject_amt"]), eject_sheet, drop_location())
var/list/matlist = list()
@@ -227,8 +231,9 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/list/msg = list("([timestamp]) <b>[machine_name]</b> in [area_name]<br>[action] [abs(amount)]x [noun]<br>")
var/sep = ""
for(var/key in materials)
var/datum/material/M = key
var/val = round(materials[key]) / MINERAL_MATERIAL_AMOUNT
msg += sep
sep = ", "
msg += "[amount < 0 ? "-" : "+"][val] [copytext(key, length(key[1]) + 1)]"
msg += "[amount < 0 ? "-" : "+"][val] [M.name]"
formatted = msg.Join()
+7 -2
View File
@@ -86,6 +86,11 @@
proximity_monitor = new(src, 1)
materials = AddComponent(/datum/component/remote_materials, "stacking", mapload, FALSE, mapload && force_connect)
/obj/machinery/mineral/stacking_machine/Destroy()
CONSOLE = null
materials = null
return ..()
/obj/machinery/mineral/stacking_machine/HasProximity(atom/movable/AM)
if(istype(AM, /obj/item/stack/sheet) && AM.loc == get_step(src, input_dir))
process_sheet(AM)
@@ -107,9 +112,9 @@
qdel(inp)
if(materials.silo && !materials.on_hold()) //Dump the sheets to the silo
var/matlist = storage.materials & materials.mat_container.materials
var/matlist = storage.custom_materials & materials.mat_container.materials
if (length(matlist))
var/inserted = materials.mat_container.insert_stack(storage)
var/inserted = materials.mat_container.insert_item(storage)
materials.silo_log(src, "collected", inserted, "sheets", matlist)
if (QDELETED(storage))
stack_list -= key
+4 -7
View File
@@ -122,13 +122,10 @@
to_chat(usr, "<span class='warning'>Error: Insufficient credits for [prize.equipment_name] on [I]!</span>")
flick(icon_deny, src)
else
if (I.mining_points -= prize.cost)
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
new prize.equipment_path(src.loc)
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
else
to_chat(usr, "<span class='warning'>Error: Transaction failure, please try again later!</span>")
flick(icon_deny, src)
I.mining_points -= prize.cost
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
new prize.equipment_path(src.loc)
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
else
to_chat(usr, "<span class='warning'>Error: An ID with a registered account is required!</span>")
flick(icon_deny, src)
+44 -23
View File
@@ -8,14 +8,28 @@
density = TRUE
var/newCoins = 0 //how many coins the machine made in it's last load
var/processing = FALSE
var/chosen = MAT_METAL //which material will be used to make coins
var/chosen = /datum/material/iron //which material will be used to make coins
var/coinsToProduce = 10
speed_process = TRUE
/obj/machinery/mineral/mint/Initialize()
. = ..()
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_URANIUM, MAT_DIAMOND, MAT_BANANIUM), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
AddComponent(/datum/component/material_container, list(
/datum/material/iron,
/datum/material/plasma,
/datum/material/silver,
/datum/material/gold,
/datum/material/uranium,
/datum/material/titanium,
/datum/material/diamond,
/datum/material/bananium,
/datum/material/adamantine,
/datum/material/mythril,
/datum/material/plastic,
/datum/material/runite
), MINERAL_MATERIAL_AMOUNT * 50, FALSE, /obj/item/stack)
chosen = getmaterialref(chosen)
/obj/machinery/mineral/mint/process()
var/turf/T = get_step(src, input_dir)
@@ -24,7 +38,9 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/obj/item/stack/sheet/O in T)
materials.insert_stack(O, O.amount)
var/inserted = materials.insert_item(O)
if(inserted)
qdel(O)
/obj/machinery/mineral/mint/attack_hand(mob/user)
. = ..()
@@ -33,17 +49,17 @@
var/dat = "<b>Coin Press</b><br>"
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
if(!M.amount && chosen != mat_id)
for(var/datum/material/M in materials.materials)
var/amount = materials.get_material_amount(M)
if(!amount && chosen != M)
continue
dat += "<br><b>[M.name] amount:</b> [M.amount] cm<sup>3</sup> "
if (chosen == mat_id)
dat += "<br><b>[M.name] amount:</b> [amount] cm<sup>3</sup> "
if (chosen == M)
dat += "<b>Chosen</b>"
else
dat += "<A href='?src=[REF(src)];choose=[mat_id]'>Choose</A>"
dat += "<A href='?src=[REF(src)];choose=[REF(M)]'>Choose</A>"
var/datum/material/M = materials.materials[chosen]
var/datum/material/M = chosen
dat += "<br><br>Will produce [coinsToProduce] [lowertext(M.name)] coins if enough materials are available.<br>"
dat += "<A href='?src=[REF(src)];chooseAmt=-10'>-10</A> "
@@ -67,22 +83,24 @@
return
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(href_list["choose"])
if(materials.materials[href_list["choose"]])
chosen = href_list["choose"]
var/datum/material/new_material = locate(href_list["choose"])
if(istype(new_material))
chosen = new_material
if(href_list["chooseAmt"])
coinsToProduce = CLAMP(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
updateUsrDialog()
if(href_list["makeCoins"])
var/temp_coins = coinsToProduce
processing = TRUE
icon_state = "coinpress1"
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
var/datum/material/M = materials.materials[chosen]
if(!M || !M.coin_type)
var/datum/material/M = chosen
if(!M)
updateUsrDialog()
return
while(coinsToProduce > 0 && materials.use_amount_type(coin_mat, chosen))
create_coins(M.coin_type)
while(coinsToProduce > 0 && materials.use_amount_mat(coin_mat, chosen))
create_coins()
coinsToProduce--
newCoins++
src.updateUsrDialog()
@@ -94,12 +112,15 @@
src.updateUsrDialog()
return
/obj/machinery/mineral/mint/proc/create_coins(P)
/obj/machinery/mineral/mint/proc/create_coins()
var/turf/T = get_step(src,output_dir)
var/temp_list = list()
temp_list[chosen] = 400
if(T)
var/obj/item/O = new P(src)
var/obj/item/storage/bag/money/M = locate(/obj/item/storage/bag/money, T)
if(!M)
M = new /obj/item/storage/bag/money(src)
unload_mineral(M)
O.forceMove(M)
var/obj/item/O = new /obj/item/coin(src)
var/obj/item/storage/bag/money/B = locate(/obj/item/storage/bag/money, T)
O.set_custom_materials(temp_list)
if(!B)
B = new /obj/item/storage/bag/money(src)
unload_mineral(B)
O.forceMove(B)
+84 -113
View File
@@ -17,6 +17,7 @@
var/points = 0 //How many points this ore gets you from the ore redemption machine
var/refined_type = null //What this ore defaults to being refined into
novariants = TRUE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
mats_per_stack = MINERAL_MATERIAL_AMOUNT
var/list/stack_overlays
/obj/item/stack/ore/update_icon()
@@ -69,7 +70,8 @@
item_state = "Uranium ore"
singular_name = "uranium ore chunk"
points = 30
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/uranium=MINERAL_MATERIAL_AMOUNT)
material_flags = MATERIAL_NO_EFFECTS
refined_type = /obj/item/stack/sheet/mineral/uranium
/obj/item/stack/ore/iron
@@ -78,7 +80,7 @@
item_state = "Iron ore"
singular_name = "iron ore chunk"
points = 1
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/metal
/obj/item/stack/ore/glass
@@ -87,17 +89,17 @@
item_state = "Glass ore"
singular_name = "sand pile"
points = 1
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/glass
w_class = WEIGHT_CLASS_TINY
GLOBAL_LIST_INIT(sand_recipes, list(\
new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50)\
))
new/datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50),\
))
/obj/item/stack/ore/glass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.sand_recipes
/obj/item/stack/ore/glass/get_main_recipes()
. = ..()
. += GLOB.sand_recipes
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(..() || !ishuman(hit_atom))
@@ -135,21 +137,20 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Plasma ore"
singular_name = "plasma ore chunk"
points = 15
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/plasma
/obj/item/stack/ore/plasma/welder_act(mob/living/user, obj/item/I)
to_chat(user, "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>")
return TRUE
/obj/item/stack/ore/silver
name = "silver ore"
icon_state = "Silver ore"
item_state = "Silver ore"
singular_name = "silver ore chunk"
points = 16
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/silver=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/silver
/obj/item/stack/ore/gold
@@ -158,7 +159,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
icon_state = "Gold ore"
singular_name = "gold ore chunk"
points = 18
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/gold=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/gold
/obj/item/stack/ore/diamond
@@ -167,7 +168,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Diamond ore"
singular_name = "diamond ore chunk"
points = 50
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/diamond=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/diamond
/obj/item/stack/ore/bananium
@@ -176,7 +177,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Bananium ore"
singular_name = "bananium ore chunk"
points = 60
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/bananium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/bananium
/obj/item/stack/ore/titanium
@@ -185,7 +186,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
item_state = "Titanium ore"
singular_name = "titanium ore chunk"
points = 50
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/titanium
/obj/item/stack/ore/slag
@@ -313,17 +314,33 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/coin
icon = 'icons/obj/economy.dmi'
name = "coin"
icon_state = "coin__heads"
icon_state = "coin"
flags_1 = CONDUCT_1
force = 1
throwforce = 2
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/iron = 400)
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
var/string_attached
var/list/sideslist = list("heads","tails")
var/cmineral = null
var/cooldown = 0
var/value = 1
var/value
var/coinflip
item_flags = NO_MAT_REDEMPTION //You know, it's kind of a problem that money is worth more extrinsicly than intrinsically in this universe.
/obj/item/coin/Initialize()
. = ..()
coinflip = pick(sideslist)
icon_state = "coin_[coinflip]"
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/coin/set_custom_materials(list/materials, multiplier = 1)
. = ..()
value = 0
for(var/i in custom_materials)
var/datum/material/M = i
value += M.value_per_unit * custom_materials[M]
/obj/item/coin/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] contemplates suicide with \the [src]!</span>")
@@ -342,101 +359,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
else
user.visible_message("<span class='suicide'>\the [src] lands on [coinflip]! [user] keeps on living!</span>")
/obj/item/coin/Initialize()
. = ..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/coin/examine(mob/user)
. = ..()
if(value)
. += "<span class='info'>It's worth [value] credit\s.</span>"
/obj/item/coin/gold
name = "gold coin"
cmineral = "gold"
icon_state = "coin_gold_heads"
value = 50
materials = list(MAT_GOLD = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/gold = 4)
/obj/item/coin/silver
name = "silver coin"
cmineral = "silver"
icon_state = "coin_silver_heads"
value = 20
materials = list(MAT_SILVER = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/silver = 4)
/obj/item/coin/diamond
name = "diamond coin"
cmineral = "diamond"
icon_state = "coin_diamond_heads"
value = 500
materials = list(MAT_DIAMOND = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/carbon = 4)
/obj/item/coin/iron
name = "iron coin"
cmineral = "iron"
icon_state = "coin_iron_heads"
value = 1
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/iron = 4)
/obj/item/coin/plasma
name = "plasma coin"
cmineral = "plasma"
icon_state = "coin_plasma_heads"
value = 100
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/toxin/plasma = 4)
/obj/item/coin/uranium
name = "uranium coin"
cmineral = "uranium"
icon_state = "coin_uranium_heads"
value = 80
materials = list(MAT_URANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/uranium = 4)
/obj/item/coin/bananium
name = "bananium coin"
cmineral = "bananium"
icon_state = "coin_bananium_heads"
value = 1000 //makes the clown cry
materials = list(MAT_BANANIUM = MINERAL_MATERIAL_AMOUNT*0.2)
grind_results = list(/datum/reagent/consumable/banana = 4)
/obj/item/coin/adamantine
name = "adamantine coin"
cmineral = "adamantine"
icon_state = "coin_adamantine_heads"
value = 1500
/obj/item/coin/mythril
name = "mythril coin"
cmineral = "mythril"
icon_state = "coin_mythril_heads"
value = 3000
/obj/item/coin/twoheaded
cmineral = "iron"
icon_state = "coin_iron_heads"
desc = "Hey, this coin's the same on both sides!"
sideslist = list("heads")
materials = list(MAT_METAL = MINERAL_MATERIAL_AMOUNT*0.2)
value = 1
grind_results = list(/datum/reagent/iron = 4)
/obj/item/coin/antagtoken
name = "antag token"
icon_state = "coin_valid_valid"
cmineral = "valid"
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
sideslist = list("valid", "salad")
value = 0
grind_results = list(/datum/reagent/consumable/sodiumchloride = 4)
. += "<span class='info'>It's worth [value] credit\s.</span>"
/obj/item/coin/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/cable_coil))
@@ -470,10 +395,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
if(string_attached) //does the coin have a wire attached
to_chat(user, "<span class='warning'>The coin won't flip very well with something attached!</span>" )
return FALSE//do not flip the coin
coinflip = pick(sideslist)
cooldown = world.time + 15
flick("coin_[cmineral]_flip", src)
icon_state = "coin_[cmineral]_[coinflip]"
flick("coin_[coinflip]_flip", src)
coinflip = pick(sideslist)
icon_state = "coin_[coinflip]"
playsound(user.loc, 'sound/items/coinflip.ogg', 50, 1)
var/oldloc = loc
sleep(15)
@@ -483,5 +408,51 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
"<span class='italics'>You hear the clattering of loose change.</span>")
return TRUE//did the coin flip? useful for suicide_act
/obj/item/coin/gold
custom_materials = list(/datum/material/gold = 400)
/obj/item/coin/silver
custom_materials = list(/datum/material/silver = 400)
/obj/item/coin/diamond
custom_materials = list(/datum/material/diamond = 400)
/obj/item/coin/plasma
custom_materials = list(/datum/material/plasma = 400)
/obj/item/coin/uranium
custom_materials = list(/datum/material/uranium = 400)
/obj/item/coin/titanium
custom_materials = list(/datum/material/titanium = 400)
/obj/item/coin/bananium
custom_materials = list(/datum/material/bananium = 400)
/obj/item/coin/adamantine
custom_materials = list(/datum/material/adamantine = 400)
/obj/item/coin/mythril
custom_materials = list(/datum/material/mythril = 400)
/obj/item/coin/plastic
custom_materials = list(/datum/material/plastic = 400)
/obj/item/coin/runite
custom_materials = list(/datum/material/runite = 400)
/obj/item/coin/twoheaded
desc = "Hey, this coin's the same on both sides!"
sideslist = list("heads")
/obj/item/coin/antagtoken
name = "antag token"
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
icon_state = "coin_valid"
custom_materials = list(/datum/material/plastic = 400)
sideslist = list("valid", "salad")
material_flags = NONE
/obj/item/coin/iron
#undef ORESTACK_OVERLAYS_MAX
+4
View File
@@ -18,6 +18,10 @@
else
return ..()
/obj/structure/ore_box/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, 0.01) //please datum mats no more cancer
/obj/structure/ore_box/crowbar_act(mob/living/user, obj/item/I)
if(I.use_tool(src, user, 50, volume=50))
user.visible_message("[user] pries \the [src] apart.",
+1 -1
View File
@@ -6,7 +6,7 @@
var/preferred_form = null
if(IsAdminGhost(src))
has_unlimited_silicon_privilege = 1
silicon_privileges = ALL
if(client.prefs.unlock_content)
preferred_form = client.prefs.ghost_form
+24 -1
View File
@@ -834,12 +834,31 @@
update_inv_handcuffed()
update_hud_handcuffed()
/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))
return
if((world.time - timeofdeath) > tlimit)
return
if((getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
return
if(!heart || (heart.organ_flags & ORGAN_FAILING))
return
var/obj/item/organ/brain/BR = getorgan(/obj/item/organ/brain)
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || suiciding)
return
return TRUE
/mob/living/carbon/fully_heal(admin_revive = FALSE)
if(reagents)
reagents.clear_reagents()
var/obj/item/organ/brain/B = getorgan(/obj/item/organ/brain)
if(B)
B.brain_death = FALSE
for(var/O in internal_organs)
var/obj/item/organ/organ = O
organ.setOrganDamage(0)
for(var/thing in diseases)
var/datum/disease/D = thing
if(D.severity != DISEASE_SEVERITY_POSITIVE)
@@ -852,7 +871,8 @@
qdel(R)
update_handcuffed()
if(reagents)
reagents.addiction_list = list()
for(var/addi in reagents.addiction_list)
reagents.remove_addiction(addi)
cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
..()
// heal ears after healing traits, since ears check TRAIT_DEAF trait
@@ -987,3 +1007,6 @@
return TRUE
if(isclothing(wear_mask) && (wear_mask.clothing_flags & SCAN_REAGENTS))
return TRUE
/mob/living/carbon/can_hold_items()
return TRUE
@@ -1,6 +1,7 @@
/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
if(!forced && hit_percent <= 0)
return 0

Some files were not shown because too many files have changed in this diff Show More