Merge branch 'master' into quickpatch-enzyme

This commit is contained in:
Hatterhat
2020-02-22 18:06:17 -06:00
committed by GitHub
457 changed files with 8610 additions and 4089 deletions
@@ -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.
@@ -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)
@@ -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
@@ -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"))
+34 -17
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,48 +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/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)
@@ -81,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
+4 -10
View File
@@ -83,10 +83,10 @@
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
@@ -139,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"
+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)
@@ -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
@@ -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()
+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]))
+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)
+79 -108
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,7 +89,7 @@
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
@@ -135,7 +137,7 @@ 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)
@@ -149,7 +151,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
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 +160,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 +169,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 +178,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 +187,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,18 +315,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
/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>")
if (!attack_self(user))
@@ -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.",
+21 -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
@@ -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
@@ -397,7 +397,7 @@
var/flavor = print_flavor_text(flavor_text)
if(flavor)
. += flavor
var/temp_flavor = print_flavor_text(flavor_text_2)
var/temp_flavor = print_flavor_text(flavor_text_2,TRUE)
if(temp_flavor)
. += temp_flavor
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
@@ -803,7 +803,7 @@
hud_used.staminas?.update_icon_state()
hud_used.staminabuffer?.update_icon_state()
/mob/living/carbon/human/fully_heal(admin_revive = 0)
/mob/living/carbon/human/fully_heal(admin_revive = FALSE)
if(admin_revive)
regenerate_limbs()
regenerate_organs()
@@ -1924,6 +1924,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
log_combat(user, target, "shoved", append_message)
/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-(blocked+armor))/100
hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100
if(!forced && hit_percent <= 0)
@@ -135,7 +135,7 @@
RegisterSignal(owner, COMSIG_CLICK_SHIFT, .proc/examinate_check)
RegisterSignal(src, COMSIG_ATOM_HEARER_IN_VIEW, .proc/include_owner)
RegisterSignal(owner, COMSIG_LIVING_REGENERATE_LIMBS, .proc/unlist_head)
RegisterSignal(owner, COMSIG_LIVING_FULLY_HEAL, .proc/retrieve_head)
RegisterSignal(owner, COMSIG_LIVING_REVIVE, .proc/retrieve_head)
/obj/item/dullahan_relay/proc/examinate_check(atom/source, mob/user)
if(user.client.eye == src)
@@ -148,8 +148,9 @@
/obj/item/dullahan_relay/proc/unlist_head(datum/source, noheal = FALSE, list/excluded_limbs)
excluded_limbs |= BODY_ZONE_HEAD // So we don't gib when regenerating limbs.
/obj/item/dullahan_relay/proc/retrieve_head(datum/source, admin_revive = FALSE)
if(admin_revive) //retrieving the owner's head for ahealing purposes.
//Retrieving the owner's head for better ahealing.
/obj/item/dullahan_relay/proc/retrieve_head(datum/source, full_heal, admin_revive)
if(admin_revive)
var/obj/item/bodypart/head/H = loc
var/turf/T = get_turf(owner)
if(H && istype(H) && T && !(H in owner.GetAllContents()))
@@ -213,6 +213,16 @@
PDA.f_lum = 0
PDA.update_icon()
visible_message("<span class='danger'>The light in [PDA] shorts out!</span>")
else if(istype(O, /obj/item/gun))
var/obj/item/gun/weapon = O
if(weapon.gun_light)
var/obj/item/flashlight/seclite/light = weapon.gun_light
light.forceMove(get_turf(weapon))
light.burn()
weapon.gun_light = null
weapon.update_gunlight()
QDEL_NULL(weapon.alight)
visible_message("<span class='danger'>[light] on [O] flickers out and disintegrates!</span>")
else
visible_message("<span class='danger'>[O] is disintegrated by [src]!</span>")
O.burn()
+8 -8
View File
@@ -482,7 +482,8 @@
med_hud_set_status()
//proc used to ressuscitate a mob
/mob/living/proc/revive(full_heal = 0, admin_revive = 0)
/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE)
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
if(full_heal)
fully_heal(admin_revive)
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
@@ -528,11 +529,6 @@
fire_stacks = 0
confused = 0
update_canmove()
var/datum/component/mood/mood = GetComponent(/datum/component/mood)
if (mood)
QDEL_LIST_ASSOC_VAL(mood.mood_events)
mood.sanity = SANITY_GREAT
mood.update_mood()
//Heal all organs
if(iscarbon(src))
var/mob/living/carbon/C = src
@@ -540,8 +536,6 @@
for(var/organ in C.internal_organs)
var/obj/item/organ/O = organ
O.setOrganDamage(0)
SEND_SIGNAL(src, COMSIG_LIVING_FULLY_HEAL, admin_revive)
//proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)
/mob/living/proc/can_be_revived()
@@ -552,6 +546,12 @@
/mob/living/proc/update_damage_overlays()
return
/mob/living/Crossed(atom/movable/AM)
. = ..()
for(var/i in get_equipped_items())
var/obj/item/item = i
SEND_SIGNAL(item, COMSIG_ITEM_WEARERCROSSED, AM)
/mob/living/Move(atom/newloc, direct)
if (buckled && buckled.loc != newloc) //not updating position
if (!buckled.anchored)
+1 -2
View File
@@ -2,7 +2,6 @@
name = "pAI"
icon = 'icons/mob/pai.dmi'
icon_state = "repairbot"
mouse_opacity = MOUSE_OPACITY_OPAQUE
density = FALSE
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_TINY
@@ -75,7 +74,7 @@
var/emitteroverloadcd = 100
var/radio_short = FALSE
var/radio_short_cooldown = 5 MINUTES
var/radio_short_cooldown = 3 MINUTES
var/radio_short_timerid
canmove = FALSE
@@ -56,7 +56,8 @@
if(P.stun)
fold_in(force = TRUE)
visible_message("<span class='warning'>The electrically-charged projectile disrupts [src]'s holomatrix, forcing [src] to fold in!</span>")
return ..()
. = ..()
return BULLET_ACT_FORCE_PIERCE
/mob/living/silicon/pai/stripPanelUnequip(obj/item/what, mob/who, where) //prevents stripping
to_chat(src, "<span class='warning'>Your holochassis stutters and warps intensely as you attempt to interact with the object, forcing you to cease lest the field fail.</span>")
@@ -97,8 +97,8 @@
var/obj/item/stack/S = I
if(is_type_in_list(S, list(/obj/item/stack/sheet/metal, /obj/item/stack/rods, /obj/item/stack/tile/plasteel)))
if(S.materials[MAT_METAL])
S.cost = S.materials[MAT_METAL] * 0.25
if(S.custom_materials?.len && S.custom_materials[getmaterialref(/datum/material/iron)])
S.cost = S.custom_materials[getmaterialref(/datum/material/iron)] * 0.25
S.source = get_or_create_estorage(/datum/robot_energy_storage/metal)
else if(istype(S, /obj/item/stack/sheet/glass))
@@ -127,7 +127,7 @@
S.source = get_or_create_estorage(/datum/robot_energy_storage/wrapping_paper)
if(S && S.source)
S.materials = list()
S.custom_materials = null
S.is_cyborg = 1
if(I.loc != src)
@@ -596,8 +596,8 @@
/obj/item/robot_module/peacekeeper/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>Under ASIMOV/CREWSIMOV, you are an enforcer of the PEACE and preventer of HUMAN/CREW HARM. \
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
to_chat(loc, "<span class='userdanger'>Under ASIMOV/CREWSIMOV, you are an enforcer of the PEACE. \
You are not a security module and you are expected to follow orders to the best of your abilities without causing harm. Space law means nothing to you.</span>")
/obj/item/robot_module/peacekeeper/be_transformed_to(obj/item/robot_module/old_module)
var/mob/living/silicon/robot/R = loc
@@ -0,0 +1,39 @@
/mob/living/simple_animal/hostile/dark_wizard
name = "Dark Wizard"
desc = "Killing amateurs since the dawn of times."
icon = 'icons/mob/simple_human.dmi'
icon_state = "dark_wizard"
icon_living = "dark_wizard"
move_to_delay = 10
projectiletype = /obj/item/projectile/temp/earth_bolt
projectilesound = 'sound/magic/ethereal_enter.ogg'
ranged = TRUE
ranged_message = "earth bolts"
ranged_cooldown_time = 20
maxHealth = 50
health = 50
harm_intent_damage = 5
obj_damage = 20
melee_damage_lower = 5
melee_damage_upper = 5
attacktext = "staves"
a_intent = INTENT_HARM
speak_emote = list("chants")
attack_sound = 'sound/weapons/bladeslice.ogg'
aggro_vision_range = 9
turns_per_move = 5
gold_core_spawnable = HOSTILE_SPAWN
faction = list(ROLE_WIZARD)
do_footstep = TRUE
weather_immunities = list("lava","ash")
minbodytemp = 0
maxbodytemp = INFINITY
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
loot = list(/obj/effect/decal/remains/human)
/obj/item/projectile/temp/earth_bolt
name = "earth_bolt"
icon_state = "declone"
damage = 4
damage_type = BURN
flag = "energy"
@@ -81,11 +81,13 @@
throw_message = "falls right through the strange body of the"
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
pass_flags = PASSTABLE
pass_flags = PASSTABLE | PASSMOB //they shouldn't get stuck behind hivelords.
density = FALSE
del_on_death = 1
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize()
. = ..()
AddComponent(/datum/component/swarming) //oh god not the bees
addtimer(CALLBACK(src, .proc/death), 100)
//Legion
@@ -174,7 +176,6 @@
speak_emote = list("echoes")
attack_sound = 'sound/weapons/pierce.ogg'
throw_message = "is shrugged off by"
pass_flags = PASSTABLE
del_on_death = TRUE
stat_attack = UNCONSCIOUS
robust_searching = 1
@@ -0,0 +1,91 @@
//shameless copies of carps.
/mob/living/simple_animal/hostile/shark
name = "Space Shark"
desc = "The best terror of the seas, next to the kraken."
icon_state = "shark"
icon_living = "shark"
icon = 'icons/mob/sharks.dmi'
icon_dead = "shark_dead"
icon_gib = "carp_gib"
environment_smash = 0
speak_chance = 0
turns_per_move = 3
butcher_results = list(/obj/item/reagent_containers/food/snacks/carpmeat = 3)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "hits"
speed = 0
maxHealth = 75
health = 75
harm_intent_damage = 18
melee_damage_lower = 18
melee_damage_upper = 18
attacktext = "maims"
attack_sound = 'sound/weapons/bite.ogg'
gold_core_spawnable = 1
//Space shark aren't affected by cold.
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
faction = list("shark")
/mob/living/simple_animal/hostile/shark/Process_Spacemove(var/movement_dir = 0)
return 1 //No drifting in space for space sharks....either!
/mob/living/simple_animal/hostile/shark/FindTarget()
. = ..()
if(.)
emote("me", 1, "growls at [.]!")
/mob/living/simple_animal/hostile/shark/AttackingTarget()
. =..()
var/mob/living/carbon/L = .
if(istype(L))
if(prob(25))
L.Knockdown(20)
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
/mob/living/simple_animal/hostile/shark/laser
name = "Laser-Shark"
desc = "NOW we've jumped the shark."
icon_state = "lasershark"
icon_living = "lasershark"
icon_dead = "lasershark_dead"
icon_gib = "carp_gib"
ranged = 1
retreat_distance = 3
minimum_distance = 0 //Between shots they can and will close in to nash
projectiletype = /obj/item/projectile/beam/laser/heavylaser
projectilesound = 'sound/weapons/lasercannonfire.ogg'
maxHealth = 50
health = 50
/mob/living/simple_animal/hostile/shark/kawaii
name = "Kawaii Shark"
desc = "Senpai~ Notice me.."
icon_state = "kawaiishark"
icon_living = "kawaiishark"
icon_dead = "kawaiishark_dead"
speak = list("Oh Senpai","Notice me senpai!","Oh my...","Kawaii~")
speak_emote = list("lovingly says","says")
speak_chance = 2
turns_per_move = 3
butcher_results = list(/mob/living/simple_animal/butterfly = 3)
maxHealth = 50
health = 50
maxbodytemp = INFINITY
harm_intent_damage = 0
melee_damage_lower = 0
melee_damage_upper = 0
attacktext = "violently hugs"
vision_range = 0
/mob/living/simple_animal/hostile/shark/kawaii/death()
say("Senpai, you noticed~!")
LoseAggro()
..()
walk(src, 0)
@@ -29,7 +29,7 @@
var/max_hardware_size = 0 // Maximal hardware w_class. Tablets/PDAs have 1, laptops 2, consoles 4.
var/steel_sheet_cost = 5 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
integrity_failure = 50
integrity_failure = 0.5
max_integrity = 100
armor = list("melee" = 0, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
@@ -203,7 +203,7 @@
/obj/item/modular_computer/examine(mob/user)
. = ..()
if(obj_integrity <= integrity_failure)
if(obj_integrity <= integrity_failure * max_integrity)
. += "<span class='danger'>It is heavily damaged!</span>"
else if(obj_integrity < max_integrity)
. += "<span class='warning'>It is damaged.</span>"
@@ -219,7 +219,7 @@
else
add_overlay(icon_state_menu)
if(obj_integrity <= integrity_failure)
if(obj_integrity <= integrity_failure * max_integrity)
add_overlay("bsod")
add_overlay("broken")
@@ -233,7 +233,7 @@
/obj/item/modular_computer/proc/turn_on(mob/user)
var/issynth = issilicon(user) // Robots and AIs get different activation messages.
if(obj_integrity <= integrity_failure)
if(obj_integrity <= integrity_failure * max_integrity)
if(issynth)
to_chat(user, "<span class='warning'>You send an activation signal to \the [src], but it responds with an error code. It must be damaged.</span>")
else
@@ -265,7 +265,7 @@
last_power_usage = 0
return 0
if(obj_integrity <= integrity_failure)
if(obj_integrity <= integrity_failure * max_integrity)
shutdown_computer()
return 0
@@ -65,7 +65,7 @@
else
add_overlay(screen_icon_state_menu)
if(cpu && cpu.obj_integrity <= cpu.integrity_failure)
if(cpu && cpu.obj_integrity <= cpu.integrity_failure * cpu.max_integrity)
add_overlay("bsod")
add_overlay("broken")
@@ -15,7 +15,7 @@
steel_sheet_cost = 10
light_strength = 2
max_integrity = 300
integrity_failure = 150
integrity_failure = 0.5
var/console_department = "" // Used in New() to set network tag according to our area.
/obj/machinery/modular_computer/console/buildable/Initialize()
@@ -4,7 +4,7 @@ GLOBAL_LIST_EMPTY(allCasters)
name = "newscaster frame"
desc = "Used to build newscasters, just secure to the wall."
icon_state = "newscaster"
materials = list(MAT_METAL=14000, MAT_GLASS=8000)
custom_materials = list(/datum/material/iron=14000, /datum/material/glass=8000)
result_path = /obj/machinery/newscaster
/obj/machinery/newscaster
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(allCasters)
verb_exclaim = "beeps"
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
max_integrity = 200
integrity_failure = 50
integrity_failure = 0.25
var/screen = 0
var/paper_remaining = 15
var/securityCaster = 0
+2 -2
View File
@@ -21,7 +21,7 @@
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=10)
custom_materials = list(/datum/material/iron=10)
pressure_resistance = 2
grind_results = list(/datum/reagent/iron = 2, /datum/reagent/iodine = 1)
var/colour = "black" //what colour the ink is!
@@ -79,7 +79,7 @@
throwforce = 5
throw_speed = 4
colour = "crimson"
materials = list(MAT_GOLD = 750)
custom_materials = list(/datum/material/gold = 750)
sharpness = IS_SHARP
resistance_flags = FIRE_PROOF
unique_reskin = list("Oak" = "pen-fountain-o",
+1 -1
View File
@@ -18,7 +18,7 @@
active_power_usage = 200
power_channel = EQUIP
max_integrity = 300
integrity_failure = 100
integrity_failure = 0.33
var/obj/item/paper/copy = null //what's in the copier!
var/obj/item/photo/photocopy = null
var/obj/item/documents/doccopy = null
+1 -1
View File
@@ -8,7 +8,7 @@
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=60)
custom_materials = list(/datum/material/iron=60)
item_color = "cargo"
pressure_resistance = 2
attack_verb = list("stamped")
+1 -1
View File
@@ -14,7 +14,7 @@
w_class = WEIGHT_CLASS_SMALL
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_NECK
materials = list(MAT_METAL = 50, MAT_GLASS = 150)
custom_materials = list(/datum/material/iron = 50, /datum/material/glass = 150)
var/flash_enabled = TRUE
var/state_on = "camera"
var/state_off = "camera_off"
+1 -1
View File
@@ -11,4 +11,4 @@
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
materials = list(MAT_METAL = 10, MAT_GLASS = 10)
custom_materials = list(/datum/material/iron = 10, /datum/material/glass = 10)

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