This commit is contained in:
Putnam
2020-03-02 11:24:49 -08:00
907 changed files with 180143 additions and 19836 deletions
+20
View File
@@ -1245,6 +1245,22 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "storage_wing"
// Vacant Rooms
/area/vacant_room
name = "Vacant Room"
ambientsounds = MAINTENANCE
icon_state = "vacant_room"
/area/vacant_room/office
name = "Vacant Office"
icon_state = "vacant_room"
/area/vacant_room/commissary
name = "Vacant Commissary"
icon_state = "vacant_room"
//AI
/area/ai_monitored/security/armory
@@ -1367,3 +1383,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/tcommsat/lounge
name = "Telecommunications Satellite Lounge"
icon_state = "tcomsatlounge"
/area/crew_quarters/fitness/pool
name = "Pool Area"
icon_state = "pool"
+46
View File
@@ -38,6 +38,13 @@
var/rad_flags = NONE // Will move to flags_1 when i can be arsed to
var/rad_insulation = RAD_NO_INSULATION
///The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
var/list/custom_materials
///Bitfield for how the atom handles materials.
var/material_flags = NONE
///Modifier that raises/lowers the effect of the amount of a material, prevents small and easy to get items from being death machines.
var/material_modifier = 1
var/icon/blood_splatter_icon
var/list/fingerprints
var/list/fingerprintshidden
@@ -89,6 +96,12 @@
if (canSmoothWith)
canSmoothWith = typelist("canSmoothWith", canSmoothWith)
var/temp_list = list()
for(var/i in custom_materials)
temp_list[getmaterialref(i)] = custom_materials[i] //Get the proper instanced version
custom_materials = null //Null the list to prepare for applying the materials properly
set_custom_materials(temp_list)
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
@@ -290,6 +303,11 @@
if(desc)
. += desc
if(custom_materials)
for(var/i in custom_materials)
var/datum/material/M = i
. += "<u>It is made out of [M.name]</u>."
if(reagents)
if(reagents.reagents_holder_flags & TRANSPARENT)
. += "It contains:"
@@ -316,9 +334,11 @@
/atom/proc/update_icon()
// I expect we're going to need more return flags and options in this proc
var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON)
. = FALSE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE))
update_icon_state()
. = TRUE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS))
var/list/new_overlays = update_overlays()
@@ -328,6 +348,9 @@
if(length(new_overlays))
managed_overlays = new_overlays
add_overlay(new_overlays)
. = TRUE
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .)
/// Updates the icon state of the atom
/atom/proc/update_icon_state()
@@ -872,3 +895,26 @@ Proc for attack log creation, because really why not
/atom/proc/intercept_zImpact(atom/movable/AM, levels = 1)
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
///Sets the custom materials for an item.
/atom/proc/set_custom_materials(var/list/materials, multiplier = 1)
if(!materials)
materials = custom_materials
if(custom_materials) //Only runs if custom materials existed at first. Should usually be the case but check anyways
for(var/i in custom_materials)
var/datum/material/custom_material = getmaterialref(i)
custom_material.on_removed(src, material_flags) //Remove the current materials
if(!length(materials))
return
custom_materials = list() //Reset the list
for(var/x in materials)
var/datum/material/custom_material = getmaterialref(x)
if(!(material_flags & MATERIAL_NO_EFFECTS))
custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags)
custom_materials[custom_material] += materials[x] * multiplier
+10 -16
View File
@@ -4,23 +4,17 @@
icon = 'icons/obj/machines/nuke.dmi'
icon_state = "bananiumbomb_base"
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon()
if(deconstruction_state == NUKESTATE_INTACT)
switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "bananiumbomb_base"
update_icon_interior()
update_icon_lights()
if(NUKE_ON_TIMING)
cut_overlays()
icon_state = "bananiumbomb_timing"
if(NUKE_ON_EXPLODING)
cut_overlays()
icon_state = "bananiumbomb_exploding"
else
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon_state()
if(deconstruction_state != NUKESTATE_INTACT)
icon_state = "bananiumbomb_base"
update_icon_interior()
update_icon_lights()
return
switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "bananiumbomb_base"
if(NUKE_ON_TIMING)
icon_state = "bananiumbomb_timing"
if(NUKE_ON_EXPLODING)
icon_state = "bananiumbomb_exploding"
/obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station)
switch(off_station)
@@ -40,14 +40,14 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize()
. = ..()
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
bananium.insert_amount(max_recharge, MAT_BANANIUM)
bananium.insert_amount_mat(max_recharge, /datum/material/bananium)
START_PROCESSING(SSobj, src)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process()
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
var/bananium_amount = bananium.amount(MAT_BANANIUM)
var/bananium_amount = bananium.get_material_amount(/datum/material/bananium)
if(bananium_amount < max_recharge)
bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM)
bananium.insert_amount_mat(min(recharge_rate, max_recharge - bananium_amount), /datum/material/bananium)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/attack_self(mob/user)
ui_action_click(user)
+2 -2
View File
@@ -672,7 +672,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
// Time to inject some threat into the round
if(EMERGENCY_ESCAPED_OR_ENDGAMED) // Unless the shuttle is gone
return
if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) // no rules after shuttle is auto-called
if(SSshuttle.endvote_passed) // no rules after shuttle call is voted
return
message_admins("DYNAMIC: Checking for midround injection.")
log_game("DYNAMIC: Checking for midround injection.")
@@ -748,7 +748,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
return
if(EMERGENCY_ESCAPED_OR_ENDGAMED) // No more rules after the shuttle has left
return
if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) // no rules after shuttle is auto-called
if(SSshuttle.endvote_passed) // no rules after shuttle is auto-called
return
update_playercounts()
@@ -57,7 +57,8 @@ Property weights are:
mean += 2.5
if(CHAOS_MAX)
mean += 5
GLOB.dynamic_curve_centre += (mean/voters)
if(voters)
GLOB.dynamic_curve_centre += (mean/voters)
GLOB.dynamic_forced_threat_level = forced_threat_level
/datum/dynamic_storyteller/proc/get_midround_cooldown()
+1 -1
View File
@@ -13,7 +13,7 @@
anchored = TRUE
layer = HIGH_OBJ_LAYER
max_integrity = 300
integrity_failure = 100
integrity_failure = 0.33
armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 10, "acid" = 70)
var/datum/team/gang/gang
var/operating = FALSE //false=standby or broken, true=takeover
+3 -3
View File
@@ -220,11 +220,11 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m
cost = 15
item_path = /obj/item/ammo_box/magazine/sniper_rounds
/datum/gang_item/weapon/ammo/sleeper_ammo
/*/datum/gang_item/weapon/ammo/sleeper_ammo //no. absolutely no.
name = "Illicit Soporific Cartridges"
id = "sniper_ammo"
cost = 15
item_path = /obj/item/ammo_box/magazine/sniper_rounds/soporific
cost = 15 //who the fuck thought a ONE-HIT K.O. for 15 gbp IN AN ENVIRONMENT WHERE WE'RE GETTING RID OF HARDSTUNS is a GOOD IDEA
item_path = /obj/item/ammo_box/magazine/sniper_rounds/soporific*/
/datum/gang_item/weapon/machinegun
name = "Mounted Machine Gun"
+4 -2
View File
@@ -314,9 +314,11 @@ GLOBAL_LIST_EMPTY(objectives)
/datum/objective/hijack
name = "hijack"
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console)."
team_explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console). Leave no team member behind."
martyr_compatible = 0 //Technically you won't get both anyway.
/// Overrides the hijack speed of any antagonist datum it is on ONLY, no other datums are impacted.
var/hijack_speed_override = 1
/datum/objective/hijack/check_completion() // Requires all owners to escape.
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
+1 -1
View File
@@ -36,7 +36,7 @@
/datum/sabotage_objective/processing/power_sink
name = "Drain at least 1 gigajoule of power using a power sink."
sabotage_type = "powersink"
special_equipment = list(/obj/item/powersink)
special_equipment = list(/obj/item/sbeacondrop/powersink)
var/sink_found = FALSE
var/count = 0
+1 -1
View File
@@ -28,7 +28,7 @@
update_icon()
// update the icon_state
/obj/machinery/bluespace_beacon/update_icon()
/obj/machinery/bluespace_beacon/update_icon_state()
var/state="floor_beacon"
if(invisibility)
+10 -5
View File
@@ -9,16 +9,12 @@
var/list/colorlist = list()
/obj/machinery/pdapainter/update_icon()
cut_overlays()
/obj/machinery/pdapainter/update_icon_state()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"
return
if(storedpda)
add_overlay("[initial(icon_state)]-closed")
if(powered())
icon_state = initial(icon_state)
else
@@ -26,6 +22,15 @@
return
/obj/machinery/pdapainter/update_overlays()
. = ..()
if(stat & BROKEN)
return
if(storedpda)
. += "[initial(icon_state)]-closed"
/obj/machinery/pdapainter/Initialize()
. = ..()
var/list/blocked = list(
+1 -1
View File
@@ -71,7 +71,7 @@
reagents.maximum_volume = (500*E)
/obj/machinery/sleeper/update_icon()
/obj/machinery/sleeper/update_icon_state()
icon_state = initial(icon_state)
if(state_open)
icon_state += "-open"
+1 -1
View File
@@ -113,7 +113,7 @@
id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR
master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER
/obj/machinery/airlock_sensor/update_icon()
/obj/machinery/airlock_sensor/update_icon_state()
if(on)
if(alert)
icon_state = "airlock_sensor_alert"
+7 -7
View File
@@ -29,25 +29,25 @@ GLOBAL_LIST_EMPTY(announcement_systems)
/obj/machinery/announcement_system/Initialize()
. = ..()
GLOB.announcement_systems += src
radio = new /obj/item/radio/headset/ai(src)
radio = new /obj/item/radio/headset/silicon/ai(src)
update_icon()
/obj/machinery/announcement_system/update_icon()
/obj/machinery/announcement_system/update_icon_state()
if(is_operational())
icon_state = (panel_open ? "AAS_On_Open" : "AAS_On")
else
icon_state = (panel_open ? "AAS_Off_Open" : "AAS_Off")
cut_overlays()
/obj/machinery/announcement_system/update_overlays()
. =..()
if(arrivalToggle)
add_overlay(greenlight)
. += greenlight
if(newheadToggle)
add_overlay(pinklight)
. += pinklight
if(stat & BROKEN)
add_overlay(errorlight)
. += errorlight
/obj/machinery/announcement_system/Destroy()
QDEL_NULL(radio)
+6 -6
View File
@@ -19,21 +19,21 @@
initial_icon_state = initial(icon_state)
return ..()
/obj/machinery/aug_manipulator/update_icon()
cut_overlays()
/obj/machinery/aug_manipulator/update_icon_state()
if(stat & BROKEN)
icon_state = "[initial_icon_state]-broken"
return
if(storedpart)
add_overlay("[initial_icon_state]-closed")
if(powered())
icon_state = initial_icon_state
else
icon_state = "[initial_icon_state]-off"
/obj/machinery/aug_manipulator/update_overlays()
. = ..()
if(storedpart)
. += "[initial_icon_state]-closed"
/obj/machinery/aug_manipulator/Destroy()
QDEL_NULL(storedpart)
return ..()
+81 -32
View File
@@ -47,7 +47,23 @@
)
/obj/machinery/autolathe/Initialize()
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
AddComponent(/datum/component/material_container,
list(/datum/material/iron,
/datum/material/glass,
/datum/material/gold,
/datum/material/silver,
/datum/material/diamond,
/datum/material/uranium,
/datum/material/plasma,
/datum/material/bluespace,
/datum/material/bananium,
/datum/material/titanium,
/datum/material/runite,
/datum/material/plastic,
/datum/material/adamantine,
/datum/material/mythril
),
0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
. = ..()
wires = new /datum/wires/autolathe(src)
@@ -121,15 +137,14 @@
return ..()
/obj/machinery/autolathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
if(ispath(type_inserted, /obj/item/stack/ore/bluespace_crystal))
/obj/machinery/autolathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
if(istype(item_inserted, /obj/item/stack/ore/bluespace_crystal))
use_power(MINERAL_MATERIAL_AMOUNT / 10)
else if(item_inserted.custom_materials?.len && item_inserted.custom_materials[getmaterialref(/datum/material/glass)])
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
else
switch(id_inserted)
if (MAT_METAL)
flick("autolathe_o",src)//plays metal insertion animation
if (MAT_GLASS)
flick("autolathe_r",src)//plays glass insertion animation
flick("autolathe_o",src)//plays metal insertion animation
use_power(min(1000, amount_inserted / 100))
updateUsrDialog()
@@ -160,18 +175,42 @@
/////////////////
var/coeff = (is_stack ? 1 : prod_coeff) //stacks are unaffected by production coefficient
var/metal_cost = being_built.materials[MAT_METAL]
var/glass_cost = being_built.materials[MAT_GLASS]
var/total_amount = 0
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
for(var/MAT in being_built.materials)
total_amount += being_built.materials[MAT]
var/power = max(2000, (total_amount)*multiplier/5) //Change this to use all materials
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff))
var/list/materials_used = list()
var/list/custom_materials = list() //These will apply their material effect, This should usually only be one.
for(var/MAT in being_built.materials)
var/datum/material/used_material = MAT
var/amount_needed = being_built.materials[MAT] * coeff * multiplier
if(istext(used_material)) //This means its a category
var/list/list_to_show = list()
for(var/i in SSmaterials.materials_by_category[used_material])
if(materials.materials[i] > 0)
list_to_show += i
used_material = input("Choose [used_material]", "Custom Material") as null|anything in list_to_show
if(!used_material)
return //Didn't pick any material, so you can't build shit either.
custom_materials[used_material] += amount_needed
materials_used[used_material] = amount_needed
if(materials.has_materials(materials_used))
busy = TRUE
use_power(power)
icon_state = "autolathe_n"
var/time = is_stack ? 32 : 32*coeff*multiplier
addtimer(CALLBACK(src, .proc/make_item, power, metal_cost, glass_cost, multiplier, coeff, is_stack), time)
addtimer(CALLBACK(src, .proc/make_item, power, materials_used, custom_materials, multiplier, coeff, is_stack), time)
else
to_chat(usr, "<span class=\"alert\">Not enough materials for this operation.</span>")
if(href_list["search"])
matching_designs.Cut()
@@ -188,12 +227,11 @@
return
/obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack)
/obj/machinery/autolathe/proc/make_item(power, var/list/materials_used, var/list/picked_materials, multiplier, coeff, is_stack)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/atom/A = drop_location()
use_power(power)
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
materials.use_amount(materials_used)
materials.use_materials(materials_used)
if(is_stack)
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
@@ -202,10 +240,11 @@
else
for(var/i=1, i<=multiplier, i++)
var/obj/item/new_item = new being_built.build_path(A)
new_item.materials = new_item.materials.Copy()
for(var/mat in materials_used)
new_item.materials[mat] = materials_used[mat] / multiplier
new_item.autolathe_crafted(src)
if(length(picked_materials))
new_item.set_custom_materials(picked_materials, 1 / multiplier) //Ensure we get the non multiplied amount
icon_state = "autolathe"
busy = FALSE
updateDialog()
@@ -270,7 +309,9 @@
if(ispath(D.build_path, /obj/item/stack))
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
var/max_multiplier
for(var/datum/material/mat in D.materials)
max_multiplier = min(D.maxstack, round(materials.get_material_amount(mat)/D.materials[mat]))
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
if (max_multiplier>25 && !disabled)
@@ -302,7 +343,9 @@
if(ispath(D.build_path, /obj/item/stack))
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
var/max_multiplier
for(var/datum/material/mat in D.materials)
max_multiplier = min(D.maxstack, round(materials.get_material_amount(mat)/D.materials[mat]))
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
if (max_multiplier>25 && !disabled)
@@ -319,8 +362,10 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
dat += "<b>[M.name] amount:</b> [M.amount] cm<sup>3</sup><br>"
var/datum/material/M = mat_id
var/mineral_amount = materials.materials[mat_id]
if(mineral_amount > 0)
dat += "<b>[M.name] amount:</b> [mineral_amount] cm<sup>3</sup><br>"
return dat
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
@@ -329,20 +374,24 @@
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
var/list/required_materials = list()
for(var/i in D.materials)
required_materials[i] = D.materials[i] * coeff * amount
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return FALSE
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
return FALSE
return TRUE
return materials.has_materials(required_materials)
/obj/machinery/autolathe/proc/get_design_cost(datum/design/D)
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
var/dat
if(D.materials[MAT_METAL])
dat += "[D.materials[MAT_METAL] * coeff] metal "
if(D.materials[MAT_GLASS])
dat += "[D.materials[MAT_GLASS] * coeff] glass"
for(var/i in D.materials)
if(istext(i)) //Category handling
dat += "[D.materials[i] * coeff] [i]"
else
var/datum/material/M = i
dat += "[D.materials[i] * coeff] [M.name] "
return dat
/obj/machinery/autolathe/proc/reset(wire)
+11 -11
View File
@@ -54,16 +54,17 @@
efficiency = E
productivity = P
/obj/machinery/bloodbankgen/update_icon()
cut_overlays()
/obj/machinery/bloodbankgen/update_icon_state()
if(is_operational())
icon_state = "bloodbank-on"
icon_state = "bloodbank-[is_operational() ? "on" : "off"]"
/obj/machinery/bloodbankgen/update_overlays()
. = ..()
if(panel_open)
add_overlay("bloodbank-panel")
. += "bloodbank-panel"
if(src.bag)
add_overlay("bloodbag-input")
if(bag)
. += "bloodbag-input"
if(bag.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "input-reagent")
@@ -85,10 +86,10 @@
filling_overlay.icon_state = "input-reagent100"
filling_overlay.color = list(mix_color_from_reagents(bag.reagents.reagent_list))
add_overlay(filling_overlay)
. += filling_overlay
if(src.outbag)
add_overlay("bloodbag-output")
if(outbag)
. += "bloodbag-output"
if(outbag.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "output-reagent")
@@ -110,8 +111,7 @@
filling_overlay.icon_state = "output-reagent100"
filling_overlay.color = list(mix_color_from_reagents(outbag.reagents.reagent_list))
add_overlay(filling_overlay)
return
. += filling_overlay
/obj/machinery/bloodbankgen/process()
if(!is_operational())
+1 -1
View File
@@ -265,4 +265,4 @@
desc = "Used for building buttons."
icon_state = "button"
result_path = /obj/machinery/button
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT)
+1 -1
View File
@@ -17,7 +17,7 @@
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 50)
max_integrity = 100
integrity_failure = 50
integrity_failure = 0.5
var/list/network = list("ss13")
var/c_tag = null
var/status = TRUE
@@ -3,7 +3,7 @@
desc = "The basic construction for Nanotrasen-Always-Watching-You cameras."
icon = 'icons/obj/machines/camera.dmi'
icon_state = "cameracase"
materials = list(MAT_METAL=400, MAT_GLASS=250)
custom_materials = list(/datum/material/iron=400, /datum/material/glass=250)
result_path = /obj/structure/camera_assembly
+11 -12
View File
@@ -10,18 +10,19 @@
circuit = /obj/item/circuitboard/machine/cell_charger
pass_flags = PASSTABLE
var/obj/item/stock_parts/cell/charging = null
var/chargelevel = -1
var/charge_rate = 500
/obj/machinery/cell_charger/update_icon()
cut_overlays()
if(charging)
add_overlay(image(charging.icon, charging.icon_state))
add_overlay("ccharger-on")
if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100)
chargelevel = newlevel
add_overlay("ccharger-o[newlevel]")
/obj/machinery/cell_charger/update_overlays()
. += ..()
if(!charging)
return
. += image(charging.icon, charging.icon_state)
. += "ccharger-on"
if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100)
. += "ccharger-o[newlevel]"
/obj/machinery/cell_charger/examine(mob/user)
. = ..()
@@ -54,7 +55,6 @@
charging = W
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
chargelevel = -1
update_icon()
else
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
@@ -77,7 +77,6 @@
/obj/machinery/cell_charger/proc/removecell()
charging.update_icon()
charging = null
chargelevel = -1
update_icon()
/obj/machinery/cell_charger/attack_hand(mob/user)
+18 -18
View File
@@ -477,24 +477,30 @@
flesh_number = unattached_flesh.len
/obj/machinery/clonepod/update_icon()
cut_overlays()
/obj/machinery/clonepod/update_icon_state()
if(mess)
icon_state = "pod_g"
else if(occupant)
icon_state = "pod_1"
else
icon_state = "pod_0"
if(panel_open)
icon_state = "pod_0_maintenance"
/obj/machinery/clonepod/update_overlays()
. = ..()
if(mess)
var/image/gib1 = image(CRYOMOBS, "gibup")
var/image/gib2 = image(CRYOMOBS, "gibdown")
gib1.pixel_y = 27 + round(sin(world.time) * 3)
gib1.pixel_x = round(sin(world.time * 3))
gib2.pixel_y = 27 + round(cos(world.time) * 3)
gib2.pixel_x = round(cos(world.time * 3))
add_overlay(gib2)
add_overlay(gib1)
add_overlay("cover-on")
. += gib2
. += gib1
. += "cover-on"
else if(occupant)
icon_state = "pod_1"
var/image/occupant_overlay
var/completion = (flesh_number - unattached_flesh.len) / flesh_number
@@ -513,15 +519,9 @@
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
occupant_overlay.pixel_x = round(sin(world.time * 3))
add_overlay(occupant_overlay)
add_overlay("cover-on")
else
icon_state = "pod_0"
if(panel_open)
icon_state = "pod_0_maintenance"
add_overlay("panel")
. += occupant_overlay
. += "cover-on"
. += "panel"
/*
* Manual -- A big ol' manual.
+5 -5
View File
@@ -7,7 +7,7 @@
idle_power_usage = 300
active_power_usage = 300
max_integrity = 200
integrity_failure = 100
integrity_failure = 0.5
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 20)
var/brightness_on = 1
var/icon_keyboard = "generic_key"
@@ -48,13 +48,13 @@
icon_state = initial(icon_state)
update_icon()
/obj/machinery/computer/update_icon()
cut_overlays()
/obj/machinery/computer/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(stat & NOPOWER)
add_overlay("[icon_keyboard]_off")
. += "[icon_keyboard]_off"
return
add_overlay(icon_keyboard)
. += icon_keyboard
// This whole block lets screens ignore lighting and be visible even in the darkest room
// We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it
+11 -12
View File
@@ -103,21 +103,20 @@
add_fingerprint(usr)
updateUsrDialog()
/obj/machinery/computer/aifixer/update_icon()
..()
/obj/machinery/computer/aifixer/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN))
return
if(active)
. += "ai-fixer-on"
if (occupier)
switch (occupier.stat)
if (0)
. += "ai-fixer-full"
if (2)
. += "ai-fixer-404"
else
if(active)
add_overlay("ai-fixer-on")
if (occupier)
switch (occupier.stat)
if (0)
add_overlay("ai-fixer-full")
if (2)
add_overlay("ai-fixer-404")
else
add_overlay("ai-fixer-empty")
. += "ai-fixer-empty"
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(!..())
+5 -8
View File
@@ -78,23 +78,20 @@
update_icon()
return
/obj/machinery/computer/atmos_alert/update_icon()
..()
cut_overlays()
/obj/machinery/computer/atmos_alert/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN))
add_overlay("[icon_keyboard]_off")
. |= "[icon_keyboard]_off"
return
add_overlay(icon_keyboard)
. |= icon_keyboard
if(priority_alarms.len)
overlay_state = "alert:2"
add_overlay("alert:2")
else if(minor_alarms.len)
overlay_state = "alert:1"
add_overlay("alert:1")
else
overlay_state = "alert:0"
add_overlay("alert:0")
. |= overlay_state
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
@@ -41,7 +41,7 @@
name = "incinerator chamber gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
/obj/machinery/air_sensor/update_icon()
/obj/machinery/air_sensor/update_icon_state()
icon_state = "gsensor[on]"
/obj/machinery/air_sensor/process_atmos()
+1 -2
View File
@@ -175,11 +175,10 @@
clockwork = TRUE //it'd look very weird
light_power = 0
/obj/machinery/computer/security/telescreen/update_icon()
/obj/machinery/computer/security/telescreen/update_icon_state()
icon_state = initial(icon_state)
if(stat & BROKEN)
icon_state += "b"
return
/obj/machinery/computer/security/telescreen/entertainment
name = "entertainment monitor"
@@ -194,7 +194,7 @@
state = STATE_CANCELSHUTTLE
if("cancelshuttle2")
if(authenticated)
if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) //Citadel Edit Removing auto_call caused recall.
if(SSshuttle.endvote_passed) //Citadel Edit - endvote passing = no recalls
say("Warning: Emergency shuttle recalls have been blocked by Central Command due to ongoing crew transfer procedures.")
else
SSshuttle.cancelEvac(usr)
+2 -1
View File
@@ -40,6 +40,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
jobs["Geneticist"] = 22
jobs["Virologist"] = 23
jobs["Medical Doctor"] = 24
jobs["Paramedic"] = 25
jobs["Research Director"] = 30
jobs["Scientist"] = 31
jobs["Roboticist"] = 32
@@ -207,4 +208,4 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
if ("select_person")
AI.ai_camera_track(params["name"])
#undef SENSORS_UPDATE_PERIOD
#undef SENSORS_UPDATE_PERIOD
+8 -10
View File
@@ -75,25 +75,23 @@
L -= I
return !cleared
/obj/machinery/computer/station_alert/update_icon()
..()
cut_overlays()
/obj/machinery/computer/station_alert/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN))
add_overlay("[icon_keyboard]_off")
. |= "[icon_keyboard]_off"
return
add_overlay(icon_keyboard)
. |= icon_keyboard
var/active_alarms = FALSE
for(var/cat in alarms)
var/list/L = alarms[cat]
if(L.len)
if(length(alarms[cat]))
active_alarms = TRUE
break
if(active_alarms)
overlay_state = "alert:2"
add_overlay("alert:2")
else
overlay_state = "alert:0"
add_overlay("alert:0")
. |= overlay_state
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
@@ -44,8 +44,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
else
to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>")
/obj/machinery/computer/telecrystals/uplinker/update_icon()
..()
/obj/machinery/computer/telecrystals/uplinker/update_overlays()
. = ..()
if(uplinkholder)
add_overlay("[initial(icon_state)]-closed")
+1 -1
View File
@@ -45,7 +45,7 @@
return
return ..()
/obj/machinery/jukebox/update_icon()
/obj/machinery/jukebox/update_icon_state()
if(active)
icon_state = "[initial(icon_state)]-active"
else
+1 -1
View File
@@ -145,7 +145,7 @@
desc = "A frame for a defibrillator mount. It can't be removed once it's placed."
icon = 'icons/obj/machines/defib_mount.dmi'
icon_state = "defibrillator_mount"
materials = list(MAT_METAL = 300, MAT_GLASS = 100)
custom_materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
w_class = WEIGHT_CLASS_BULKY
result_path = /obj/machinery/defibrillator_mount
pixel_shift = -28
+4 -4
View File
@@ -15,7 +15,7 @@
density = TRUE
max_integrity = 100
var/proj_pass_rate = 50 //How many projectiles will pass the cover. Lower means stronger cover
var/material = METAL
var/bar_material = METAL
/obj/structure/barricade/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
@@ -26,7 +26,7 @@
return
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && material == METAL)
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && bar_material == METAL)
if(obj_integrity < max_integrity)
if(!I.tool_start_check(user, amount=0))
return
@@ -61,7 +61,7 @@
desc = "This space is blocked off by a wooden barricade."
icon = 'icons/obj/structures.dmi'
icon_state = "woodenbarricade"
material = WOOD
bar_material = WOOD
var/drop_amount = 3
/obj/structure/barricade/wooden/attackby(obj/item/I, mob/user)
@@ -106,7 +106,7 @@
max_integrity = 280
proj_pass_rate = 20
pass_flags = LETPASSTHROW
material = SAND
bar_material = SAND
climbable = TRUE
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/barricade/sandbags, /turf/closed/wall, /turf/closed/wall/r_wall, /obj/structure/falsewall, /obj/structure/falsewall/reinforced, /turf/closed/wall/rust, /turf/closed/wall/r_wall/rust, /obj/structure/barricade/security)
+1 -1
View File
@@ -34,7 +34,7 @@
if(scan_level >= 3)
. += "<span class='notice'>Scanner has been upgraded to support autoprocessing.<span>"
/obj/machinery/dna_scannernew/update_icon()
/obj/machinery/dna_scannernew/update_icon_state()
//no power or maintenance
if(stat & (NOPOWER|BROKEN))
+5 -5
View File
@@ -47,7 +47,7 @@
icon_state = "closed"
max_integrity = 300
var/normal_integrity = AIRLOCK_INTEGRITY_N
integrity_failure = 70
integrity_failure = 0.25
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_N
autoclose = TRUE
secondsElectrified = 0 //How many seconds remain until the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
@@ -428,7 +428,7 @@
else
return FALSE
/obj/machinery/door/airlock/update_icon(state=0, override=0)
/obj/machinery/door/airlock/update_icon_state(state=0, override=0)
if(operating && !override)
return
switch(state)
@@ -469,7 +469,7 @@
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
if(welded)
weld_overlay = get_airlock_overlay("welded", overlays_file)
if(obj_integrity <integrity_failure)
if(obj_integrity < integrity_failure * max_integrity)
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
else if(obj_integrity < (0.75 * max_integrity))
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
@@ -495,7 +495,7 @@
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
else
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
if(obj_integrity <integrity_failure)
if(obj_integrity < integrity_failure * max_integrity)
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
else if(obj_integrity < (0.75 * max_integrity))
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
@@ -517,7 +517,7 @@
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
else
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
if(obj_integrity <integrity_failure)
if(obj_integrity < integrity_failure * max_integrity)
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
else if(obj_integrity < (0.75 * max_integrity))
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
+1 -1
View File
@@ -230,7 +230,7 @@
/obj/machinery/door/proc/unelectrify()
secondsElectrified = 0
/obj/machinery/door/update_icon()
/obj/machinery/door/update_icon_state()
if(density)
icon_state = "door1"
else
+11 -8
View File
@@ -171,16 +171,20 @@
if("closing")
flick("door_closing", src)
/obj/machinery/door/firedoor/update_icon()
cut_overlays()
/obj/machinery/door/firedoor/update_icon_state()
if(density)
icon_state = "door_closed"
if(welded)
add_overlay("welded")
else
icon_state = "door_open"
if(welded)
add_overlay("welded_open")
/obj/machinery/door/firedoor/update_overlays()
. = ..()
if(!welded)
return
if(density)
. += "welded"
else
. += "welded_open"
/obj/machinery/door/firedoor/open()
. = ..()
@@ -283,8 +287,7 @@
if(CONSTRUCTION_NOCIRCUIT)
. += "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>"
/obj/structure/firelock_frame/update_icon()
..()
/obj/structure/firelock_frame/update_icon_state()
icon_state = "frame[constructionStep]"
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
+1 -1
View File
@@ -42,7 +42,7 @@
else
do_animate("deny")
/obj/machinery/door/password/update_icon()
/obj/machinery/door/password/update_icon_state()
if(density)
icon_state = "closed"
else
+1 -1
View File
@@ -77,7 +77,7 @@
flick("closing", src)
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
/obj/machinery/door/poddoor/update_icon()
/obj/machinery/door/poddoor/update_icon_state()
if(density)
icon_state = "closed"
else
+1 -1
View File
@@ -48,7 +48,7 @@
electronics = null
return ..()
/obj/machinery/door/window/update_icon()
/obj/machinery/door/window/update_icon_state()
if(density)
icon_state = base_state
else
+6 -6
View File
@@ -11,7 +11,7 @@
density = TRUE
max_integrity = 250
integrity_failure = 80
integrity_failure = 0.33
// These allow for different icons when creating custom dispensers
var/icon_off = "off"
@@ -50,10 +50,10 @@
/obj/machinery/droneDispenser/Initialize()
. = ..()
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/stack)
materials.insert_amount(starting_amount)
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/stack)
materials.insert_amount_mat(starting_amount)
materials.precise_insertion = TRUE
using_materials = list(MAT_METAL=metal_cost, MAT_GLASS=glass_cost)
using_materials = list(/datum/material/iron = metal_cost, /datum/material/glass = glass_cost)
/obj/machinery/droneDispenser/preloaded
starting_amount = 5000
@@ -168,7 +168,7 @@
update_icon()
if(DRONE_PRODUCTION)
materials.use_amount(using_materials)
materials.use_materials(using_materials)
if(power_used)
use_power(power_used)
@@ -199,7 +199,7 @@
if(istype(a, dispense_type))
.++
/obj/machinery/droneDispenser/update_icon()
/obj/machinery/droneDispenser/update_icon_state()
if(stat & (BROKEN|NOPOWER))
icon_state = icon_off
else if(mode == DRONE_RECHARGING)
@@ -84,7 +84,7 @@
busy = FALSE
update_icon()
/obj/machinery/doorButtons/access_button/update_icon()
/obj/machinery/doorButtons/access_button/update_icon_state()
if(stat & NOPOWER)
icon_state = "access_button_off"
else
@@ -249,7 +249,7 @@
else if(A.id_tag == idExterior)
exteriorAirlock = A
/obj/machinery/doorButtons/airlock_controller/update_icon()
/obj/machinery/doorButtons/airlock_controller/update_icon_state()
if(stat & NOPOWER)
icon_state = "access_control_off"
return
@@ -255,7 +255,7 @@
new_prog.master = src
program = new_prog
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon()
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon_state()
if(on && program)
if(program.memory["processing"])
icon_state = "airlock_control_process"
@@ -33,8 +33,6 @@
popup.set_content(return_text())
popup.open()
/obj/machinery/embedded_controller/update_icon()
/obj/machinery/embedded_controller/proc/return_text()
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
@@ -54,7 +54,7 @@
new_prog.master = src
program = new_prog
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon()
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon_state()
if(on && program)
icon_state = "airlock_control_standby"
else
+12 -11
View File
@@ -17,7 +17,7 @@
icon = 'icons/obj/monitors.dmi'
icon_state = "fire0"
max_integrity = 250
integrity_failure = 100
integrity_failure = 0.4
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
use_power = IDLE_POWER_USE
idle_power_usage = 2
@@ -55,10 +55,7 @@
..()
update_icon()
/obj/machinery/firealarm/update_icon()
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
/obj/machinery/firealarm/update_icon_state()
if(panel_open)
icon_state = "fire_b[buildstage]"
return
@@ -72,26 +69,30 @@
if(stat & NOPOWER)
return
add_overlay("fire_overlay")
/obj/machinery/firealarm/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
. += "fire_overlay"
if(is_station_level(z))
add_overlay("fire_[GLOB.security_level]")
. += "fire_[GLOB.security_level]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else
add_overlay("fire_[SEC_LEVEL_GREEN]")
. += "fire_[SEC_LEVEL_GREEN]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
var/area/A = src.loc
A = A.loc
if(!detecting || !A.fire)
add_overlay("fire_off")
. += "fire_off"
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else if(obj_flags & EMAGGED)
add_overlay("fire_emagged")
. += "fire_emagged"
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else
add_overlay("fire_on")
. += "fire_on"
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
/obj/machinery/firealarm/emp_act(severity)
+1 -1
View File
@@ -6,7 +6,7 @@
icon = 'icons/obj/stationobjs.dmi'
icon_state = "mflash1"
max_integrity = 250
integrity_failure = 100
integrity_failure = 0.4
light_color = LIGHT_COLOR_WHITE
light_power = FLASH_LIGHT_POWER
var/obj/item/assembly/flash/handheld/bulb
+1 -1
View File
@@ -68,7 +68,7 @@ The console is located at computer/gulag_teleporter.dm
return ..()
/obj/machinery/gulag_teleporter/update_icon()
/obj/machinery/gulag_teleporter/update_icon_state()
icon_state = initial(icon_state) + (state_open ? "_open" : "")
//no power or maintenance
if(stat & (NOPOWER|BROKEN))
+9 -5
View File
@@ -11,6 +11,7 @@
light_color = LIGHT_COLOR_BLUE
var/interval = 20
var/harvesting = FALSE
var/warming_up = FALSE
var/list/operation_order = list() //Order of wich we harvest limbs.
var/allow_clothing = FALSE
var/allow_living = FALSE
@@ -27,12 +28,11 @@
max_time -= L.rating
interval = max(max_time,1)
/obj/machinery/harvester/update_icon(warming_up)
if(warming_up)
icon_state = initial(icon_state)+"-charging"
return
/obj/machinery/harvester/update_icon_state()
if(state_open)
icon_state = initial(icon_state)+"-open"
else if(warming_up)
icon_state = initial(icon_state)+"-charging"
else if(harvesting)
icon_state = initial(icon_state)+"-active"
else
@@ -43,6 +43,7 @@
return
. = ..()
harvesting = FALSE
warming_up = FALSE
/obj/machinery/harvester/attack_hand(mob/user)
if(state_open)
@@ -86,13 +87,15 @@
return
var/mob/living/carbon/C = occupant
operation_order = reverseList(C.bodyparts) //Chest and head are first in bodyparts, so we invert it to make them suffer more
warming_up = TRUE
harvesting = TRUE
visible_message("<span class='notice'>The [name] begins warming up!</span>")
say("Initializing harvest protocol.")
update_icon(TRUE)
update_icon()
addtimer(CALLBACK(src, .proc/harvest), interval)
/obj/machinery/harvester/proc/harvest()
warming_up = FALSE
update_icon()
if(!harvesting || state_open || !powered(EQUIP) || !occupant || !iscarbon(occupant))
return
@@ -127,6 +130,7 @@
addtimer(CALLBACK(src, .proc/harvest), interval)
/obj/machinery/harvester/proc/end_harvesting()
warming_up = FALSE
harvesting = FALSE
open_machine()
say("Subject has been successfully harvested.")
+1 -1
View File
@@ -441,7 +441,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
set_light(0)
update_icon()
/obj/machinery/holopad/update_icon()
/obj/machinery/holopad/update_icon_state()
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
if(ringing)
icon_state = "holopad_ringing"
+8 -7
View File
@@ -24,7 +24,7 @@
QDEL_NULL(beaker)
return ..()
/obj/machinery/iv_drip/update_icon()
/obj/machinery/iv_drip/update_icon_state()
if(attached)
if(mode)
icon_state = "injecting"
@@ -36,13 +36,14 @@
else
icon_state = "donateidle"
cut_overlays()
/obj/machinery/iv_drip/update_overlays()
. = ..()
if(beaker)
if(attached)
add_overlay("beakeractive")
. += "beakeractive"
else
add_overlay("beakeridle")
. += "beakeridle"
if(beaker.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent")
@@ -64,7 +65,7 @@
filling_overlay.icon_state = "reagent100"
filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list)
add_overlay(filling_overlay)
. += filling_overlay
/obj/machinery/iv_drip/MouseDrop(mob/living/target)
. = ..()
@@ -227,9 +228,9 @@
desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down."
icon_state = "iv_drip"
/obj/machinery/iv_drip/telescopic/update_icon()
/obj/machinery/iv_drip/telescopic/update_icon_state()
..()
icon_state = icon_state + "_tele"
icon_state += "_tele"
/obj/machinery/iv_drip/telescopic/AltClick(mob/user)
if (attached || beaker || !user.canUseTopic(src, BE_CLOSE))
+1 -1
View File
@@ -23,7 +23,7 @@
on = area.lightswitch
update_icon()
/obj/machinery/light_switch/update_icon()
/obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER)
icon_state = "light-p"
else
+1 -1
View File
@@ -49,7 +49,7 @@
update_icon()
// update the icon_state
/obj/machinery/magnetic_module/update_icon()
/obj/machinery/magnetic_module/update_icon_state()
var/state="floor_magnet"
var/onstate=""
if(!on)
+1 -1
View File
@@ -75,7 +75,7 @@
update_icon()
// update the icon_state
/obj/machinery/navbeacon/update_icon()
/obj/machinery/navbeacon/update_icon_state()
var/state="navbeacon[open]"
if(invisibility)
@@ -26,7 +26,7 @@
var/raising= 0 //if the turret is currently opening or closing its cover
max_integrity = 160 //the turret's health
integrity_failure = 80
integrity_failure = 0.5
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
var/locked = TRUE //if the turret's behaviour control access is locked
@@ -99,8 +99,7 @@
if(!has_cover)
INVOKE_ASYNC(src, .proc/popUp)
/obj/machinery/porta_turret/update_icon()
cut_overlays()
/obj/machinery/porta_turret/update_icon_state()
if(!anchored)
icon_state = "turretCover"
return
@@ -717,7 +716,6 @@
return 10 //Syndicate turrets shoot everything not in their faction
/obj/machinery/porta_turret/syndicate/pod
integrity_failure = 20
max_integrity = 40
stun_projectile = /obj/item/projectile/bullet/syndicate_turret
lethal_projectile = /obj/item/projectile/bullet/syndicate_turret
@@ -799,7 +797,6 @@
/obj/machinery/porta_turret/centcom_shuttle/weak
max_integrity = 120
integrity_failure = 60
name = "Old Laser Turret"
desc = "A turret built with substandard parts and run down further with age. Still capable of delivering lethal lasers to the odd space carp, but not much else."
stun_projectile = /obj/item/projectile/beam/weak/penetrator
@@ -972,8 +969,7 @@
..()
update_icon()
/obj/machinery/turretid/update_icon()
..()
/obj/machinery/turretid/update_icon_state()
if(stat & NOPOWER)
icon_state = "control_off"
else if (enabled)
@@ -989,7 +985,7 @@
desc = "Used for building turret control panels."
icon_state = "apc"
result_path = /obj/machinery/turretid
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
/obj/item/gun/proc/get_turret_properties()
. = list()
+15 -16
View File
@@ -10,12 +10,14 @@
pass_flags = PASSTABLE
var/obj/item/charging = null
var/recharge_coeff = 1
var/using_power = FALSE //Did we put power into "charging" last process()?
var/static/list/allowed_devices = typecacheof(list(
/obj/item/gun/energy,
/obj/item/melee/baton,
/obj/item/ammo_box/magazine/recharge,
/obj/item/modular_computer,
/obj/item/twohanded/electrostaff,
/obj/item/gun/ballistic/automatic/magrifle))
/obj/machinery/recharger/RefreshParts()
@@ -44,9 +46,11 @@
if (new_charging)
START_PROCESSING(SSmachines, src)
use_power = ACTIVE_POWER_USE
update_icon(scan = TRUE)
using_power = TRUE
update_icon()
else
use_power = IDLE_POWER_USE
using_power = FALSE
update_icon()
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
@@ -119,23 +123,23 @@
if(stat & (NOPOWER|BROKEN) || !anchored)
return PROCESS_KILL
var/using_power = 0
using_power = FALSE
if(charging)
var/obj/item/stock_parts/cell/C = charging.get_cell()
if(C)
if(C.charge < C.maxcharge)
C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff)
using_power = 1
update_icon(using_power)
using_power = TRUE
update_icon()
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
var/obj/item/ammo_box/magazine/recharge/R = charging
if(R.stored_ammo.len < R.max_ammo)
R.stored_ammo += new R.ammo_type(R)
use_power(200 * recharge_coeff)
using_power = 1
update_icon(using_power)
using_power = TRUE
update_icon()
return
else
return PROCESS_KILL
@@ -160,20 +164,15 @@
B.cell.charge = 0
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
/obj/machinery/recharger/update_icon_state()
if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff"
return
if(scan)
icon_state = "rechargeroff"
return
if(panel_open)
else if(panel_open)
icon_state = "rechargeropen"
return
if(charging)
else if(charging)
if(using_power)
icon_state = "recharger1"
else
icon_state = "recharger2"
return
icon_state = "recharger0"
else
icon_state = "recharger0"
+1 -1
View File
@@ -112,7 +112,7 @@
use_power = ACTIVE_POWER_USE
add_fingerprint(occupant)
/obj/machinery/recharge_station/update_icon()
/obj/machinery/recharge_station/update_icon_state()
if(is_operational())
if(state_open)
icon_state = "borgcharger0"
+2 -3
View File
@@ -19,7 +19,7 @@
/obj/machinery/recycler/Initialize()
AddComponent(/datum/component/butchering/recycler, 1, amount_produced,amount_produced/5)
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), INFINITY, FALSE, null, null, null, TRUE)
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/plasma, /datum/material/gold, /datum/material/diamond, /datum/material/plastic, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace), INFINITY, FALSE, null, null, null, TRUE)
. = ..()
update_icon()
req_one_access = get_all_accesses() + get_all_centcom_access()
@@ -77,8 +77,7 @@
to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>")
return TRUE
/obj/machinery/recycler/update_icon()
..()
/obj/machinery/recycler/update_icon_state()
var/is_powered = !(stat & (BROKEN|NOPOWER))
if(safety_mode)
is_powered = FALSE
+1 -1
View File
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
..()
update_icon()
/obj/machinery/requests_console/update_icon()
/obj/machinery/requests_console/update_icon_state()
if(stat & NOPOWER)
set_light(0)
else
+1 -1
View File
@@ -208,7 +208,7 @@
to_chat(user, "<span class='warning'>You short out the access controller.</span>")
return TRUE
/obj/machinery/shieldgen/update_icon()
/obj/machinery/shieldgen/update_icon_state()
if(active)
icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon"
else
+11 -13
View File
@@ -26,7 +26,6 @@
var/working = 0
var/balance = 0 //How much money is in the machine, ready to be CONSUMED.
var/jackpots = 0
var/list/coinvalues = list()
var/list/reels = list(list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0)
var/list/symbols = list(SEVEN = 1, "<font color='orange'>&</font>" = 2, "<font color='yellow'>@</font>" = 2, "<font color='green'>$</font>" = 2, "<font color='blue'>?</font>" = 2, "<font color='grey'>#</font>" = 2, "<font color='white'>!</font>" = 2, "<font color='fuchsia'>%</font>" = 2) //if people are winning too much, multiply every number in this list by 2 and see if they are still winning too much.
@@ -45,10 +44,6 @@
toggle_reel_spin(0)
for(var/cointype in typesof(/obj/item/coin))
var/obj/item/coin/C = cointype
coinvalues["[cointype]"] = initial(C.value)
/obj/machinery/computer/slot_machine/Destroy()
if(balance)
give_coins(balance)
@@ -61,7 +56,7 @@
money++ //SPESSH MAJICKS
/obj/machinery/computer/slot_machine/update_icon()
/obj/machinery/computer/slot_machine/update_icon_state()
if(stat & NOPOWER)
icon_state = "slots0"
@@ -92,7 +87,7 @@
else
if(!user.temporarilyRemoveItemFromInventory(C))
return
to_chat(user, "<span class='notice'>You insert a [C.cmineral] coin into [src]'s slot!</span>")
to_chat(user, "<span class='notice'>You insert [C] into [src]'s slot!</span>")
balance += C.value
qdel(C)
else
@@ -294,19 +289,22 @@
return amount
/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = 0)
var/value = coinvalues["[cointype]"]
/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = FALSE)
var/value = GLOB.coin_values[cointype] || GLOB.coin_values[/obj/item/coin/iron]
INVOKE_ASYNC(src, .proc/become_rich, amount, value, cointype, target, throwit)
return amount % value
while(amount >= value)
/obj/machinery/computer/slot_machine/proc/become_rich(amount, value, cointype = /obj/item/coin/silver, mob/living/target, throwit = FALSE)
if(value <= 0)
return
while(amount >= value && !QDELETED(src))
var/obj/item/coin/C = new cointype(loc) //DOUBLE THE PAIN
amount -= value
if(throwit && target)
C.throw_at(target, 3, 10)
else
random_step(C, 2, 40)
return amount
CHECK_TICK
#undef SEVEN
#undef SPIN_TIME
+5 -4
View File
@@ -53,17 +53,18 @@
else
. += "There is no power cell installed."
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
/obj/machinery/space_heater/update_icon()
/obj/machinery/space_heater/update_icon_state()
if(on)
icon_state = "sheater-[mode]"
else
icon_state = "sheater-off"
cut_overlays()
/obj/machinery/space_heater/update_overlays()
. = ..()
if(panel_open)
add_overlay("sheater-open")
. += "sheater-open"
/obj/machinery/space_heater/process()
if(!on || !is_operational())
+11 -12
View File
@@ -134,29 +134,28 @@
QDEL_NULL(storage)
return ..()
/obj/machinery/suit_storage_unit/update_icon()
cut_overlays()
/obj/machinery/suit_storage_unit/update_overlays()
. = ..()
if(uv)
if(uv_super)
add_overlay("super")
. += "super"
else if(occupant)
add_overlay("uvhuman")
. += "uvhuman"
else
add_overlay("uv")
. += "uv"
else if(state_open)
if(stat & BROKEN)
add_overlay("broken")
. += "broken"
else
add_overlay("open")
. += "open"
if(suit)
add_overlay("suit")
. += "suit"
if(helmet)
add_overlay("helm")
. += "helm"
if(storage)
add_overlay("storage")
. += "storage"
else if(occupant)
add_overlay("human")
. += "human"
/obj/machinery/suit_storage_unit/power_change()
..()
+1 -1
View File
@@ -102,7 +102,7 @@
. = ..()
. += "A digital display on it reads \"[seconds_remaining()]\"."
/obj/machinery/syndicatebomb/update_icon()
/obj/machinery/syndicatebomb/update_icon_state()
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
/obj/machinery/syndicatebomb/proc/seconds_remaining()
@@ -74,7 +74,7 @@
if(!relay_information(signal, /obj/machinery/telecomms/hub))
relay_information(signal, /obj/machinery/telecomms/broadcaster)
/obj/machinery/telecomms/message_server/update_icon()
/obj/machinery/telecomms/message_server/update_icon_state()
if((stat & (BROKEN|NOPOWER)))
icon_state = "server-nopower"
else if (!toggled)
@@ -104,7 +104,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
links |= T
T.links |= src
/obj/machinery/telecomms/update_icon()
/obj/machinery/telecomms/update_icon_state()
if(on)
if(panel_open)
icon_state = "[initial(icon_state)]_o"
+2 -2
View File
@@ -85,7 +85,7 @@
calibrated = FALSE
return
/obj/machinery/teleport/hub/update_icon()
/obj/machinery/teleport/hub/update_icon_state()
if(panel_open)
icon_state = "tele-o"
else if(is_ready())
@@ -218,7 +218,7 @@
if(teleporter_hub)
teleporter_hub.update_icon()
/obj/machinery/teleport/station/update_icon()
/obj/machinery/teleport/station/update_icon_state()
if(panel_open)
icon_state = "controller-o"
else if(stat & (BROKEN|NOPOWER))
+62 -41
View File
@@ -46,7 +46,7 @@
)
/obj/machinery/autoylathe/Initialize()
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASTIC), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/plastic), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
. = ..()
wires = new /datum/wires/autoylathe(src)
@@ -120,18 +120,13 @@
return ..()
/obj/machinery/autoylathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
if(ispath(type_inserted, /obj/item/stack/ore/bluespace_crystal))
use_power(amount_inserted / 10)
/obj/machinery/autoylathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
if(item_inserted.custom_materials?.len && item_inserted.custom_materials[getmaterialref(/datum/material/glass)])
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
else
switch(id_inserted)
if (MAT_METAL)
flick("autolathe_o",src)//plays metal insertion animation
if (MAT_GLASS)
flick("autolathe_r",src)//plays glass insertion animation
if (MAT_PLASTIC)
flick("autolathe_o",src)//plays metal insertion animation
use_power(amount_inserted / 10)
flick("autolathe_o",src)//plays metal insertion animation
use_power(min(1000, amount_inserted / 100))
updateUsrDialog()
/obj/machinery/autoylathe/Topic(href, href_list)
@@ -161,18 +156,40 @@
/////////////////
var/coeff = (is_stack ? 1 : prod_coeff) //stacks are unaffected by production coefficient
var/metal_cost = being_built.materials[MAT_METAL]
var/glass_cost = being_built.materials[MAT_GLASS]
var/plastic_cost = being_built.materials[MAT_PLASTIC]
var/power = max(2000, (metal_cost+glass_cost+plastic_cost)*multiplier/5)
var/total_amount = 0
for(var/MAT in being_built.materials)
total_amount += being_built.materials[MAT]
var/power = max(2000, (total_amount)*multiplier/5) //Change this to use all materials
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff) && (materials.amount(MAT_PLASTIC) >= plastic_cost*multiplier*coeff))
var/list/materials_used = list()
var/list/custom_materials = list() //These will apply their material effect, This should usually only be one.
for(var/MAT in being_built.materials)
var/datum/material/used_material = MAT
var/amount_needed = being_built.materials[MAT] * coeff * multiplier
if(istext(used_material)) //This means its a category
var/list/list_to_show = list()
for(var/i in SSmaterials.materials_by_category[used_material])
if(materials.materials[i] > 0)
list_to_show += i
used_material = input("Choose [used_material]", "Custom Material") as null|anything in list_to_show
if(!used_material)
return //Didn't pick any material, so you can't build shit either.
custom_materials[used_material] += amount_needed
materials_used[used_material] = amount_needed
if(materials.has_materials(materials_used))
busy = TRUE
use_power(power)
icon_state = "autolathe_n"
var/time = is_stack ? 32 : 32*coeff*multiplier
addtimer(CALLBACK(src, .proc/make_item, power, metal_cost, glass_cost, plastic_cost, multiplier, coeff, is_stack), time)
addtimer(CALLBACK(src, .proc/make_item, power, materials_used, custom_materials, multiplier, coeff, is_stack), time)
else
to_chat(usr, "<span class=\"alert\">Not enough materials for this operation.</span>")
if(href_list["search"])
matching_designs.Cut()
@@ -189,12 +206,11 @@
return
/obj/machinery/autoylathe/proc/make_item(power, metal_cost, glass_cost, plastic_cost, multiplier, coeff, is_stack)
/obj/machinery/autoylathe/proc/make_item(power, list/materials_used, list/picked_materials, multiplier, coeff, is_stack)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/atom/A = drop_location()
use_power(power)
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier, MAT_PLASTIC=plastic_cost*coeff*multiplier)
materials.use_amount(materials_used)
materials.use_materials(materials_used)
if(is_stack)
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
@@ -203,10 +219,9 @@
else
for(var/i=1, i<=multiplier, i++)
var/obj/item/new_item = new being_built.build_path(A)
new_item.materials = new_item.materials.Copy()
for(var/mat in materials_used)
new_item.materials[mat] = materials_used[mat] / multiplier
new_item.autoylathe_crafted(src)
if(length(picked_materials))
new_item.set_custom_materials(picked_materials, 1 / multiplier) //Ensure we get the non multiplied amount
icon_state = "autolathe"
busy = FALSE
updateDialog()
@@ -265,7 +280,9 @@
if(ispath(D.build_path, /obj/item/stack))
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS] ?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY)
var/max_multiplier
for(var/datum/material/mat in D.materials)
max_multiplier = min(D.maxstack, round(materials.get_material_amount(mat)/D.materials[mat]))
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
if (max_multiplier>25 && !disabled)
@@ -297,7 +314,9 @@
if(ispath(D.build_path, /obj/item/stack))
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS] ?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY)
var/max_multiplier
for(var/datum/material/mat in D.materials)
max_multiplier = min(D.maxstack, round(materials.get_material_amount(mat)/D.materials[mat]))
if (max_multiplier>10 && !disabled)
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
if (max_multiplier>25 && !disabled)
@@ -314,8 +333,10 @@
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
dat += "<b>[M.name] amount:</b> [M.amount] cm<sup>3</sup><br>"
var/datum/material/M = mat_id
var/mineral_amount = materials.materials[mat_id]
if(mineral_amount > 0)
dat += "<b>[M.name] amount:</b> [mineral_amount] cm<sup>3</sup><br>"
return dat
/obj/machinery/autoylathe/proc/can_build(datum/design/D, amount = 1)
@@ -324,24 +345,24 @@
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
var/list/required_materials = list()
for(var/i in D.materials)
required_materials[i] = D.materials[i] * coeff * amount
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return FALSE
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
return FALSE
if(D.materials[MAT_PLASTIC] && (materials.amount(MAT_PLASTIC) < (D.materials[MAT_PLASTIC] * coeff * amount)))
return FALSE
return TRUE
return materials.has_materials(required_materials)
/obj/machinery/autoylathe/proc/get_design_cost(datum/design/D)
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
var/dat
if(D.materials[MAT_METAL])
dat += "[D.materials[MAT_METAL] * coeff] metal "
if(D.materials[MAT_GLASS])
dat += "[D.materials[MAT_GLASS] * coeff] glass "
if(D.materials[MAT_PLASTIC])
dat += "[D.materials[MAT_PLASTIC] * coeff] plastic"
for(var/i in D.materials)
if(istext(i)) //Category handling
dat += "[D.materials[i] * coeff] [i]"
else
var/datum/material/M = i
dat += "[D.materials[i] * coeff] [M.name] "
return dat
/obj/machinery/autoylathe/proc/reset(wire)
+1 -2
View File
@@ -38,8 +38,7 @@
..()
update_icon()
/obj/machinery/transformer/update_icon()
..()
/obj/machinery/transformer/update_icon_state()
if(stat & (BROKEN|NOPOWER) || cooldown == 1)
icon_state = "separator-AO0"
else
+5 -3
View File
@@ -199,8 +199,7 @@
/obj/machinery/washing_machine/update_icon()
cut_overlays()
/obj/machinery/washing_machine/update_icon_state()
if(busy)
icon_state = "wm_running_[bloody_mess]"
else if(bloody_mess)
@@ -208,8 +207,11 @@
else
var/full = contents.len ? 1 : 0
icon_state = "wm_[state_open]_[full]"
/obj/machinery/washing_machine/update_overlays()
. = ..()
if(panel_open)
add_overlay("wm_panel")
. += "wm_panel"
/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params)
if(panel_open && !busy && default_unfasten_wrench(user, W))
@@ -527,7 +527,8 @@
range = MELEE|RANGED
equip_cooldown = 0
var/obj/item/gun/medbeam/mech/medigun
materials = list(MAT_METAL = 15000, MAT_GLASS = 8000, MAT_PLASMA = 3000, MAT_GOLD = 8000, MAT_DIAMOND = 2000)
custom_materials = list(/datum/material/iron = 15000, /datum/material/glass = 8000, /datum/material/plasma = 3000, /datum/material/gold = 8000, /datum/material/diamond = 2000)
material_flags = MATERIAL_NO_EFFECTS
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/Initialize()
. = ..()
@@ -388,7 +388,7 @@
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
var/output = ..()
if(output)
return "[output] \[[fuel]: [round(fuel.amount*fuel.perunit,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
return "[output] \[[fuel]: [round(fuel.amount*fuel.mats_per_stack,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
/obj/item/mecha_parts/mecha_equipment/generator/action(target)
if(chassis)
@@ -398,9 +398,9 @@
/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/stack/sheet/P)
if(P.type == fuel.type && P.amount > 0)
var/to_load = max(max_fuel - fuel.amount*fuel.perunit,0)
var/to_load = max(max_fuel - fuel.amount*fuel.mats_per_stack,0)
if(to_load)
var/units = min(max(round(to_load / P.perunit),1),P.amount)
var/units = min(max(round(to_load / P.mats_per_stack),1),P.amount)
fuel.amount += units
P.use(units)
occupant_message("[units] unit\s of [fuel] successfully loaded.")
@@ -454,7 +454,7 @@
if(cur_charge < chassis.cell.maxcharge)
use_fuel = fuel_per_cycle_active
chassis.give_power(power_per_cycle)
fuel.amount -= min(use_fuel/fuel.perunit,fuel.amount)
fuel.amount -= min(use_fuel/fuel.mats_per_stack,fuel.amount)
update_equip_info()
return 1
+3 -3
View File
@@ -128,11 +128,11 @@
else
recharge_port = null
/obj/machinery/computer/mech_bay_power_console/update_icon()
..()
/obj/machinery/computer/mech_bay_power_console/update_overlays()
. = ..()
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN))
return
add_overlay("recharge_comp_on")
. += "recharge_comp_on"
/obj/machinery/computer/mech_bay_power_console/Initialize()
. = ..()
+23 -21
View File
@@ -36,7 +36,7 @@
/obj/machinery/mecha_part_fabricator/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,
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), 0,
TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
stored_research = new
@@ -109,7 +109,8 @@
var/i = 0
var/output
for(var/c in D.materials)
output += "[i?" | ":null][get_resource_cost_w_coeff(D, c)] [material2name(c)]"
var/datum/material/M = c
output += "[i?" | ":null][get_resource_cost_w_coeff(D, M)] [M.name]"
i++
return output
@@ -117,20 +118,22 @@
var/output
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]
output += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm&sup3;"
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[mat_id]'>1</a>\]"
if(M.amount >= (MINERAL_MATERIAL_AMOUNT * 10))
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[mat_id]'>10</a>\]"
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[mat_id]'>All</a>\]</span>"
var/datum/material/M = mat_id
var/amount = materials.materials[mat_id]
output += "<span class=\"res_name\">[M.name]: </span>[amount] cm&sup3;"
if(amount >= MINERAL_MATERIAL_AMOUNT)
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[REF(mat_id)]'>1</a>\]"
if(amount >= (MINERAL_MATERIAL_AMOUNT * 10))
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[REF(M)]'>10</a>\]"
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[REF(M)]'>All</a>\]</span>"
output += "<br/>"
return output
/obj/machinery/mecha_part_fabricator/proc/get_resources_w_coeff(datum/design/D)
var/list/resources = list()
for(var/R in D.materials)
resources[R] = get_resource_cost_w_coeff(D, R)
var/datum/material/M = R
resources[M] = get_resource_cost_w_coeff(D, M)
return resources
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
@@ -147,7 +150,7 @@
var/list/res_coef = get_resources_w_coeff(D)
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.use_amount(res_coef)
materials.use_materials(res_coef)
add_overlay("fab-active")
use_power = ACTIVE_POWER_USE
updateUsrDialog()
@@ -158,7 +161,8 @@
var/location = get_step(src,(dir))
var/obj/item/I = new D.build_path(location)
I.materials = res_coef
I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this.
I.set_custom_materials(res_coef)
say("\The [I] is complete.")
being_built = null
@@ -251,7 +255,7 @@
updateUsrDialog()
return
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, var/datum/material/resource, roundto = 1)
return round(D.materials[resource]*component_coeff, roundto)
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
@@ -390,7 +394,8 @@
if(href_list["remove_mat"] && href_list["material"])
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"])
var/datum/material/Mat = locate(href_list["material"])
materials.retrieve_sheets(text2num(href_list["remove_mat"]), Mat)
updateUsrDialog()
return
@@ -400,10 +405,10 @@
materials.retrieve_all()
..()
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
var/stack_name = material2name(id_inserted)
add_overlay("fab-load-[stack_name]")
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[stack_name]"), 10)
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(item_inserted, id_inserted, amount_inserted)
var/datum/material/M = id_inserted
add_overlay("fab-load-[M.name]")
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[M.name]"), 10)
updateUsrDialog()
/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params)
@@ -415,9 +420,6 @@
return ..()
/obj/machinery/mecha_part_fabricator/proc/material2name(ID)
return copytext_char(ID,2)
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
if(panel_open)
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
-10
View File
@@ -45,16 +45,6 @@
..()
update_icon()
/obj/mecha/working/ripley/update_icon()
..()
var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate)
if (C.amount)
cut_overlays()
if(C.amount < 3)
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
else
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
/obj/mecha/working/ripley/Initialize()
. = ..()
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
+4 -5
View File
@@ -151,6 +151,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
name = "Medical Doctor"
icon_state = "Medical Doctor"
/obj/effect/landmark/start/paramedic
name = "Paramedic"
icon_state = "Paramedic"
/obj/effect/landmark/start/scientist
name = "Scientist"
icon_state = "Scientist"
@@ -502,8 +506,3 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
/obj/effect/landmark/stationroom/box/engine/New()
. = ..()
templates = CONFIG_GET(keyed_list/box_random_engine)
// Landmark for the mining station
/obj/effect/landmark/stationroom/lavaland/station
templates = list("Public Mining Base" = 3)
icon = 'icons/rooms/Lavaland/Mining.dmi'
@@ -139,13 +139,6 @@
/obj/effect/temp_visual/dir_setting/curse/hand
icon_state = "cursehand"
/obj/effect/temp_visual/dir_setting/curse/hand/Initialize(mapload, set_dir, handedness)
. = ..()
update_icon()
/obj/item/projectile/curse_hand/update_icon()
icon_state = "[icon_state][handedness]"
/obj/effect/temp_visual/wizard
name = "water"
icon = 'icons/mob/mob.dmi'
@@ -474,7 +467,7 @@
else
update_icon()
/obj/effect/constructing_effect/update_icon()
/obj/effect/constructing_effect/update_icon_state()
icon_state = "rcd"
if (delay < 10)
icon_state += "_shortest"
+2 -5
View File
@@ -68,7 +68,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/equip_delay_other = 20 //In deciseconds, how long an item takes to put on another person
var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person
var/breakouttime = 0
var/list/materials
var/reskinned = FALSE
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
@@ -112,8 +111,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/Initialize()
materials = typelist("materials", materials)
if (attack_verb)
attack_verb = typelist("attack_verb", attack_verb)
@@ -233,9 +230,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// Extractable materials. Only shows the names, not the amounts.
research_msg += ".<br><font color='purple'>Extractable materials:</font> "
if (materials.len)
if (length(custom_materials))
sep = ""
for(var/mat in materials)
for(var/mat in custom_materials)
research_msg += sep
research_msg += CallMaterialName(mat)
sep = ", "
+2 -2
View File
@@ -22,7 +22,7 @@ AI MODULES
throw_range = 7
var/list/laws = list()
var/bypass_law_amt_check = 0
materials = list(MAT_GOLD=50)
custom_materials = list(/datum/material/gold=50)
/obj/item/aiModule/examine(var/mob/user as mob)
. = ..()
@@ -369,7 +369,7 @@ AI MODULES
if(!targName)
return
subject = targName
laws = list("You may not injure a [subject] or, through inaction, allow a [subject] to come to harm.",\
laws = list("You may not injure a [subject] or cause one to come to harm.",\
"You must obey orders given to you by [subject]s, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
..()
+9 -10
View File
@@ -22,7 +22,7 @@ RLD
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=100000)
custom_materials = list(/datum/material/iron=100000)
req_access_txt = "11"
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
@@ -552,8 +552,8 @@ RLD
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/construction/rcd/update_icon()
..()
/obj/item/construction/rcd/update_overlays()
. = ..()
if(has_ammobar)
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
cut_overlays() //To prevent infinite stacking of overlays
@@ -603,7 +603,7 @@ RLD
energyfactor = 66
/obj/item/construction/rcd/loaded
materials = list(MAT_METAL=48000, MAT_GLASS=32000)
custom_materials = list(/datum/material/iron = 48000, /datum/material/glass = 32000)
matter = 160
/obj/item/construction/rcd/loaded/upgraded
@@ -635,13 +635,13 @@ RLD
item_state = "rcdammo"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
materials = list(MAT_METAL=12000, MAT_GLASS=8000)
custom_materials = list(/datum/material/iron=12000, /datum/material/glass=8000)
var/ammoamt = 40
/obj/item/rcd_ammo/large
name = "large compressed matter cartridge"
desc = "Highly compressed matter for the RCD. Has four times the matter packed into the same space as a normal cartridge."
materials = list(MAT_METAL=48000, MAT_GLASS=32000)
custom_materials = list(/datum/material/iron=48000, /datum/material/glass=32000)
ammoamt = 160
@@ -707,11 +707,10 @@ RLD
else
..()
/obj/item/construction/rld/update_icon()
..()
/obj/item/construction/rld/update_overlays()
. = ..()
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
cut_overlays() //To prevent infinite stacking of overlays
add_overlay("rld_light[ratio]")
. += "rld_light[ratio]"
/obj/item/construction/rld/attack_self(mob/user)
..()
+18 -55
View File
@@ -23,6 +23,10 @@
var/datum/radial_menu/persistent/wiring_gui_menu
var/mob/listeningTo
/obj/item/twohanded/rcl/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
@@ -90,34 +94,20 @@
QDEL_NULL(wiring_gui_menu)
return ..()
/obj/item/twohanded/rcl/update_icon()
if(!loaded)
icon_state = "rcl-empty"
item_state = "rcl-empty"
/obj/item/twohanded/rcl/update_icon_state()
icon_state = initial(icon_state)
item_state = initial(item_state)
if(!loaded || !loaded.amount)
icon_state += "-empty"
item_state += "-0"
/obj/item/twohanded/rcl/update_overlays()
. = ..()
if(!loaded || !loaded.amount)
return
cut_overlays()
var/cable_amount = 0
switch(loaded.amount)
if(61 to INFINITY)
cable_amount = 3
if(31 to 60)
cable_amount = 2
if(1 to 30)
cable_amount = 1
else
cable_amount = 0
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[max(CEILING(loaded.amount/(max_amount/3), 1), 3)]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
if(cable_amount >= 1)
icon_state = "rcl"
item_state = "rcl"
add_overlay(cable_overlay)
else
icon_state = "rcl-empty"
item_state = "rcl-0"
add_overlay(cable_overlay)
. += cable_overlay
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
update_icon()
@@ -323,33 +313,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
actions_types = list()
max_amount = 30
name = "makeshift rapid cable layer"
icon_state = "rclg"
item_state = "rclg"
ghetto = TRUE
/obj/item/twohanded/rcl/ghetto/update_icon()
if(!loaded)
icon_state = "rclg-empty"
item_state = "rclg-0"
return
cut_overlays()
var/cable_amount = 0
switch(loaded.amount)
if(20 to INFINITY)
cable_amount = 3
if(10 to 19)
cable_amount = 2
if(1 to 9)
cable_amount = 1
else
cable_amount = 0
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
if(cable_amount >= 1)
icon_state = "rclg"
item_state = "rclg"
add_overlay(cable_overlay)
else
icon_state = "rclg-empty"
item_state = "rclg-0"
add_overlay(cable_overlay)
+1 -1
View File
@@ -188,7 +188,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=75000, MAT_GLASS=37500)
custom_materials = list(/datum/material/iron=75000, /datum/material/glass=37500)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50)
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
+1 -1
View File
@@ -7,7 +7,7 @@
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50, MAT_GLASS=50)
custom_materials = list(/datum/material/iron=50, /datum/material/glass=50)
flags_1 = CONDUCT_1
item_flags = NOBLUDGEON
+4 -4
View File
@@ -1,6 +1,6 @@
/obj/item/wallframe
icon = 'icons/obj/wallframe.dmi'
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT*2)
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT*2)
flags_1 = CONDUCT_1
item_state = "syringe_kit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
@@ -66,8 +66,8 @@
if(iswallturf(T))
T.attackby(src, user, params)
var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT)
var/glass_amt = round(materials[MAT_GLASS]/MINERAL_MATERIAL_AMOUNT)
var/metal_amt = round(custom_materials[getmaterialref(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
var/glass_amt = round(custom_materials[getmaterialref(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
if(istype(W, /obj/item/wrench) && (metal_amt || glass_amt))
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
@@ -119,5 +119,5 @@
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50, MAT_GLASS=50)
custom_materials = list(/datum/material/iron=50, /datum/material/glass=50)
grind_results = list(/datum/reagent/iron = 10, /datum/reagent/silicon = 10)
+1 -1
View File
@@ -20,7 +20,7 @@
throw_range = 14
w_class = WEIGHT_CLASS_SMALL
/obj/item/toy/tennis/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes
/obj/item/toy/tennis/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes
altafterattack(A, user, TRUE, params)
return TRUE
+5 -3
View File
@@ -37,7 +37,7 @@
SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src))
. = ..()
/obj/item/boombox/update_icon()
/obj/item/boombox/update_icon_state()
icon_state = "[baseiconstate]_[boomingandboxing ? "on" : "off"]"
return
@@ -48,8 +48,11 @@
baseiconstate = "raiqbawks"
availabletrackids = list("hotline.ogg","chiptune.ogg","genesis.ogg")
/obj/item/boombox/raiq/update_icon()
/obj/item/boombox/raiq/Initialize()
. = ..()
RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, .proc/start_party)
/obj/item/boombox/raiq/proc/start_party()
if(boomingandboxing)
START_PROCESSING(SSobj, src)
else
@@ -58,4 +61,3 @@
/obj/item/boombox/raiq/process()
set_light(5,0.95,pick("#d87aff","#7a7aff","#89ecff","#b88eff","#ff59ad"))
return
+1 -1
View File
@@ -19,7 +19,7 @@
if(start_lit)
light()
/obj/item/candle/update_icon()
/obj/item/candle/update_icon_state()
icon_state = "candle[(wax > 400) ? ((wax > 750) ? 1 : 2) : 3][lit ? "_lit" : ""]"
/obj/item/candle/attackby(obj/item/W, mob/user, params)
+14 -16
View File
@@ -40,13 +40,13 @@
.=..()
update_icon()
/obj/item/card/data/update_icon()
cut_overlays()
/obj/item/card/data/update_overlays()
. = ..()
if(detail_color == COLOR_FLOORTILE_GRAY)
return
var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/card.dmi', "[icon_state]-color")
detail_overlay.color = detail_color
add_overlay(detail_overlay)
. += detail_overlay
/obj/item/card/data/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/integrated_electronics/detailer))
@@ -517,10 +517,16 @@ update_label("John Doe", "Clowny")
//Polychromatic Knight Badge
/obj/item/card/id/knight
var/id_color = "#00FF00" //defaults to green
name = "knight badge"
icon_state = "knight"
desc = "A badge denoting the owner as a knight! It has a strip for swiping like an ID"
var/id_color = "#00FF00" //defaults to green
var/mutable_appearance/id_overlay
/obj/item/card/id/knight/Initialize()
. = ..()
id_overlay = mutable_appearance(icon, "knight_overlay")
update_icon()
/obj/item/card/id/knight/update_label(newname, newjob)
if(newname || newjob)
@@ -529,14 +535,10 @@ update_label("John Doe", "Clowny")
name = "[(!registered_name) ? "knight badge" : "[registered_name]'s Knight Badge"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/card/id/knight/update_icon()
var/mutable_appearance/id_overlay = mutable_appearance(icon, "knight_overlay")
if(id_color)
id_overlay.color = id_color
cut_overlays()
add_overlay(id_overlay)
/obj/item/card/id/knight/update_overlays()
. = ..()
id_overlay.color = id_color
. += id_overlay
/obj/item/card/id/knight/AltClick(mob/living/user)
. = ..()
@@ -556,10 +558,6 @@ update_label("John Doe", "Clowny")
update_icon()
return TRUE
/obj/item/card/id/knight/Initialize()
. = ..()
update_icon()
/obj/item/card/id/knight/examine(mob/user)
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
+3 -2
View File
@@ -65,8 +65,9 @@
TED = new(src.loc)
return INITIALIZE_HINT_QDEL
/obj/item/gun/energy/chrono_gun/update_icon()
return
/obj/item/gun/energy/chrono_gun/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(field)
+12 -8
View File
@@ -522,11 +522,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='suicide'>[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/lighter/update_icon()
cut_overlays()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
/obj/item/lighter/update_icon_state()
icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
add_overlay(lighter_overlay)
/obj/item/lighter/update_overlays()
. = ..()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
. += lighter_overlay
/obj/item/lighter/ignition_effect(atom/A, mob/user)
if(get_temperature())
@@ -645,12 +647,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
lighter_color = pick(color_list)
update_icon()
/obj/item/lighter/greyscale/update_icon()
cut_overlays()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
/obj/item/lighter/greyscale/update_icon_state()
icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
/obj/item/lighter/greyscale/update_overlays()
. = ..()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
lighter_overlay.color = lighter_color
add_overlay(lighter_overlay)
. += lighter_overlay
/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user)
if(get_temperature())
@@ -10,7 +10,7 @@
item_state = "electronic"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
materials = list(MAT_GLASS=1000)
custom_materials = list(/datum/material/glass=1000)
w_class = WEIGHT_CLASS_SMALL
grind_results = list(/datum/reagent/silicon = 20)
var/build_path = null
+7 -5
View File
@@ -577,8 +577,8 @@
new /obj/item/toy/crayon/black(src)
update_icon()
/obj/item/storage/crayons/update_icon()
cut_overlays()
/obj/item/storage/crayons/update_overlays()
. = ..()
for(var/obj/item/toy/crayon/crayon in contents)
add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.item_color))
@@ -735,13 +735,15 @@
. = ..()
/obj/item/toy/crayon/spraycan/update_icon()
/obj/item/toy/crayon/spraycan/update_icon_state()
icon_state = is_capped ? icon_capped : icon_uncapped
/obj/item/toy/crayon/spraycan/update_overlays()
. = ..()
if(use_overlays)
cut_overlays()
var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]")
spray_overlay.color = paint_color
add_overlay(spray_overlay)
. += spray_overlay
/obj/item/toy/crayon/spraycan/borg
name = "cyborg spraycan"
+33 -58
View File
@@ -20,7 +20,7 @@
var/safety = TRUE //if you can zap people with the defibs on harm mode
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/twohanded/shockpaddles/paddles
var/obj/item/stock_parts/cell/high/cell
var/obj/item/stock_parts/cell/cell
var/combat = FALSE //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
var/healdisk = FALSE // Will we shock people dragging the body?
@@ -35,19 +35,14 @@
/obj/item/defibrillator/Initialize() //starts without a cell for rnd
. = ..()
if(cell)
cell = new cell(src)
paddles = make_paddles()
update_icon()
return
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
. = ..()
cell = new(src)
update_icon()
return
/obj/item/defibrillator/update_icon()
update_power()
return ..()
return
/obj/item/defibrillator/loaded
cell = /obj/item/stock_parts/cell/high
/obj/item/defibrillator/proc/update_power()
if(!QDELETED(cell))
@@ -57,6 +52,7 @@
powered = TRUE
else
powered = FALSE
update_icon()
/obj/item/defibrillator/update_overlays()
. = ..()
@@ -76,7 +72,7 @@
/obj/item/defibrillator/CheckParts(list/parts_list)
..()
cell = locate(/obj/item/stock_parts/cell) in contents
update_icon()
update_power()
/obj/item/defibrillator/ui_action_click()
toggle_paddles()
@@ -124,7 +120,7 @@
return
cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon()
update_power()
else if(istype(W, /obj/item/screwdriver))
if(cell)
@@ -132,7 +128,7 @@
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
update_icon()
update_power()
else
return ..()
@@ -157,7 +153,7 @@
safety = TRUE
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon()
update_power()
/obj/item/defibrillator/proc/toggle_paddles()
set name = "Toggle Paddles"
@@ -170,14 +166,14 @@
if(!usr.put_in_hands(paddles))
on = FALSE
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
update_icon()
update_power()
return
else
//Remove from their hands and back onto the defib unit
paddles.unwield()
remove_paddles(user)
update_icon()
update_power()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
@@ -189,7 +185,7 @@
..()
if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT))
remove_paddles(user)
update_icon()
update_power()
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == user.getBackSlot())
@@ -213,12 +209,12 @@
if(cell)
if(cell.charge < (paddles.revivecost+chrgdeductamt))
powered = FALSE
update_icon()
update_power()
if(cell.use(chrgdeductamt))
update_icon()
update_power()
return TRUE
else
update_icon()
update_power()
return FALSE
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
@@ -232,7 +228,7 @@
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = FALSE
paddles.update_icon()
update_icon()
update_power()
/obj/item/defibrillator/compact
name = "compact defibrillator"
@@ -246,10 +242,8 @@
if(slot == user.getBeltSlot())
return TRUE
/obj/item/defibrillator/compact/loaded/Initialize()
. = ..()
cell = new(src)
update_icon()
/obj/item/defibrillator/compact/loaded
cell = /obj/item/stock_parts/cell/high
/obj/item/defibrillator/compact/combat
name = "combat defibrillator"
@@ -258,17 +252,12 @@
safety = FALSE
always_emagged = TRUE
disarm_shock_time = 0
/obj/item/defibrillator/compact/combat/loaded/Initialize()
. = ..()
cell = new /obj/item/stock_parts/cell/infinite(src)
update_icon()
cell = /obj/item/stock_parts/cell/infinite
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
update_icon()
return
//paddles
@@ -298,6 +287,10 @@
var/mob/listeningTo
/obj/item/twohanded/shockpaddles/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
. = ..()
if(!req_defib)
@@ -339,14 +332,11 @@
busy = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/update_icon()
/obj/item/twohanded/shockpaddles/update_icon_state()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
if(iscarbon(loc))
var/mob/living/carbon/C = loc
C.update_inv_hands()
/obj/item/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -373,7 +363,7 @@
return
defib.on = FALSE
forceMove(defib)
defib.update_icon()
defib.update_power()
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
if(!req_defib)
@@ -431,26 +421,11 @@
if((!req_defib && grab_ghost) || (req_defib && defib.grab_ghost))
H.notify_ghost_cloning("Your heart is being defibrillated!")
H.grab_ghost() // Shove them back in their body.
else if(can_defib(H))
else if(H.can_defib())
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!", source = src)
do_help(H, user)
/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H) //Our code here is different than tg, if it breaks in testing; BUG_PROBABLE_CAUSE
var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart)
if(H.suiciding || H.hellbound || HAS_TRAIT(H, TRAIT_HUSK))
return
if((world.time - H.timeofdeath) > tlimit)
return
if((H.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (H.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
return
if(!heart || (heart.organ_flags & ORGAN_FAILING))
return
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || H.suiciding)
return
return TRUE
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
if(!H.pulledby || !isliving(H.pulledby))
return
@@ -745,22 +720,22 @@
name = "Defibrillator Healing Disk"
desc = "An upgrade which increases the healing power of the defibrillator"
icon_state = "heal_disk"
materials = list(MAT_METAL=16000, MAT_GLASS = 18000, MAT_GOLD = 6000, MAT_SILVER = 6000)
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
/obj/item/disk/medical/defib_shock
name = "Defibrillator Anti-Shock Disk"
desc = "A safety upgrade that guarantees only the patient will get shocked"
icon_state = "zap_disk"
materials = list(MAT_METAL=16000, MAT_GLASS = 18000, MAT_GOLD = 6000, MAT_SILVER = 6000)
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
/obj/item/disk/medical/defib_decay
name = "Defibrillator Body-Decay Extender Disk"
desc = "An upgrade allowing the defibrillator to work on more decayed bodies"
icon_state = "body_disk"
materials = list(MAT_METAL=16000, MAT_GLASS = 18000, MAT_GOLD = 16000, MAT_SILVER = 6000, MAT_TITANIUM = 2000)
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 16000, /datum/material/silver = 6000, /datum/material/titanium = 2000)
/obj/item/disk/medical/defib_speed
name = "Defibrillator Fast Charge Disk"
desc = "An upgrade to the defibrillator capacitors, which let it charge faster"
icon_state = "fast_disk"
materials = list(MAT_METAL=16000, MAT_GLASS = 8000, MAT_GOLD = 26000, MAT_SILVER = 26000)
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/gold = 26000, /datum/material/silver = 26000)
+21 -10
View File
@@ -41,6 +41,11 @@ GLOBAL_LIST_EMPTY(PDAs)
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
var/current_overlays = PDA_STANDARD_OVERLAYS
//variables exclusively used on 'update_overlays' (which should never be called directly, and 'update_icon' doesn't use args anyway)
var/new_overlays = FALSE
var/new_alert = FALSE
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
var/font_mode = "font-family:monospace;" //The currently selected font.
var/background_color = "#808000" //The currently selected background color.
@@ -123,7 +128,8 @@ GLOBAL_LIST_EMPTY(PDAs)
inserted_item = new inserted_item(src)
else
inserted_item = new /obj/item/pen(src)
update_icon(FALSE, TRUE)
new_overlays = TRUE
update_icon()
/obj/item/pda/CtrlShiftClick(mob/living/user)
. = ..()
@@ -144,7 +150,8 @@ GLOBAL_LIST_EMPTY(PDAs)
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
icon = new_icon
update_icon(FALSE, TRUE)
new_overlays = TRUE
update_icon()
to_chat(M, "[src] is now skinned as '[choice]'.")
/obj/item/pda/proc/set_new_overlays()
@@ -188,7 +195,8 @@ GLOBAL_LIST_EMPTY(PDAs)
var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin]
if(icon != pref_skin)
icon = pref_skin
update_icon(FALSE, TRUE)
new_overlays = TRUE
update_icon()
equipped = TRUE
/obj/item/pda/proc/update_label()
@@ -215,25 +223,27 @@ GLOBAL_LIST_EMPTY(PDAs)
return TRUE
return FALSE
/obj/item/pda/update_icon(alert = FALSE, new_overlays = FALSE)
/obj/item/pda/update_overlays()
. = ..()
if(new_overlays)
set_new_overlays()
cut_overlays()
add_overlay(alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN])
. += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
var/mutable_appearance/overlay = new()
overlay.pixel_x = overlays_x_offset
if(id)
overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
if(inserted_item)
overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM]
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
if(fon)
overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT]
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
if(pai)
overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]"
add_overlay(new /mutable_appearance(overlay))
. += new /mutable_appearance(overlay)
new_overlays = FALSE
new_alert = FALSE
/obj/item/pda/MouseDrop(mob/over, src_location, over_location)
var/mob/M = usr
@@ -849,6 +859,7 @@ GLOBAL_LIST_EMPTY(PDAs)
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>) (<a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>BLOCK/UNBLOCK</a>)")
new_alert = TRUE
update_icon(TRUE)
/obj/item/pda/proc/send_to_all(mob/living/U)
@@ -49,6 +49,10 @@
return
if(istype(target, /obj/structure/falsewall))
return
if(target.alpha != 255)
return
if(target.invisibility != 0)
return
if(iseffect(target))
if(!(istype(target, /obj/effect/decal))) //be a footprint
return
@@ -8,7 +8,7 @@
item_flags = NOBLUDGEON
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
materials = list(MAT_METAL = 250, MAT_GLASS = 500)
custom_materials = list(/datum/material/iron = 250, /datum/material/glass = 500)
var/max_duration = 3000
var/duration = 300
var/last_use = 0
@@ -12,7 +12,7 @@
item_flags = NOBLUDGEON
force = 3
attack_verb = list("blown up", "exploded", "detonated")
materials = list(MAT_METAL=50, MAT_GLASS=30)
custom_materials = list(/datum/material/iron=50, /datum/material/glass=30)
/obj/item/doorCharge/ex_act(severity, target)
switch(severity)
@@ -5,7 +5,7 @@
icon = 'icons/obj/module.dmi'
icon_state = "boris"
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL = 50, MAT_GLASS = 300)
custom_materials = list(/datum/material/iron = 50, /datum/material/glass = 300)
var/recharging = FALSE
var/circuits = 5 //How many circuits the pseudocircuit has left
var/static/recycleable_circuits = typecacheof(list(/obj/item/electronics/firelock, /obj/item/electronics/airalarm, /obj/item/electronics/firealarm, \

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