mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-28 23:58:31 +01:00
Merge remote-tracking branch 'PolarisSS13/master' into spriteadd
This commit is contained in:
@@ -790,13 +790,13 @@
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
return
|
||||
var/reason = sanitize(input("Please enter reason"))
|
||||
var/reason = sanitize(input("Please enter reason.") as null|message)
|
||||
if(!reason)
|
||||
M << "<font color='red'>You have been kicked from the server</font>"
|
||||
else
|
||||
M << "<font color='red'>You have been kicked from the server: [reason]</font>"
|
||||
log_admin("[key_name(usr)] booted [key_name(M)].")
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] booted [key_name_admin(M)].</font>", 1)
|
||||
return
|
||||
|
||||
to_chat(M, span("critical", "You have been kicked from the server: [reason]"))
|
||||
log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.")
|
||||
message_admins("<font color='blue'>[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'.</font>", 1)
|
||||
//M.client = null
|
||||
qdel(M.client)
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Code:
|
||||
var/obj/item/device/assembly/signaler/signaler2 = W
|
||||
if(secured && signaler2.secured)
|
||||
code = signaler2.code
|
||||
frequency = signaler2.frequency
|
||||
set_frequency(signaler2.frequency)
|
||||
to_chat(user, "You transfer the frequency and code of [signaler2] to [src].")
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -149,12 +149,14 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
var/list/contributers = list()
|
||||
var/list/contributer_names = list()
|
||||
for(var/thing in player_list)
|
||||
var/mob/M = thing
|
||||
if(M == user)
|
||||
var/mob/living/L = thing
|
||||
if(L == user)
|
||||
continue
|
||||
if(get_dist(M, user) <= credit_sharing_range)
|
||||
contributers += M
|
||||
contributer_names += M.name
|
||||
if(!istype(L))
|
||||
continue
|
||||
if(get_dist(L, user) <= credit_sharing_range)
|
||||
contributers += L
|
||||
contributer_names += L.name
|
||||
|
||||
var/points_gained = 0
|
||||
|
||||
|
||||
@@ -273,6 +273,14 @@ datum/gear/suit/duster
|
||||
display_name = "cloak, medical"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/medical
|
||||
|
||||
/datum/gear/suit/roles/poncho/cloak/custom //A colorable cloak
|
||||
display_name = "cloak (colorable)"
|
||||
path = /obj/item/clothing/accessory/poncho/roles/cloak/custom
|
||||
|
||||
/datum/gear/suit/roles/poncho/cloak/custom/New()
|
||||
..()
|
||||
gear_tweaks = list(gear_tweak_free_color_choice)
|
||||
|
||||
/datum/gear/suit/unathi_robe
|
||||
display_name = "roughspun robe"
|
||||
path = /obj/item/clothing/suit/unathi/robe
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
if(istype(W,/obj/item/clothing/accessory) || istype(W, /obj/item/weapon/hand_labeler))
|
||||
return ..()
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
if(user.get_inventory_slot(src) == slot_wear_suit)
|
||||
to_chat(user, "<span class='warning'>You cannot modify \the [src] while it is being worn.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -148,3 +148,66 @@
|
||||
new /obj/item/clothing/accessory/badge/holo/cord(src)
|
||||
..()
|
||||
return
|
||||
|
||||
// Synthmorph bag / Corporation badges. Primarily used on the robobag, but can be worn. Default is NT.
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag
|
||||
name = "NanoTrasen Badge"
|
||||
desc = "A plain metallic plate that might denote the wearer as a member of NanoTrasen."
|
||||
icon_state = "tag_nt"
|
||||
item_state = "badge"
|
||||
badge_string = "NanoTrasen"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/morpheus
|
||||
name = "Morpheus Badge"
|
||||
desc = "A plain metallic plate that might denote the wearer as a member of Morpheus Cyberkinetics."
|
||||
icon_state = "tag_blank"
|
||||
badge_string = "Morpheus"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/wardtaka
|
||||
name = "Ward-Takahashi Badge"
|
||||
desc = "A plain metallic plate that might denote the wearer as a member of Ward-Takahashi."
|
||||
icon_state = "tag_ward"
|
||||
badge_string = "Ward-Takahashi"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/zenghu
|
||||
name = "Zeng-Hu Badge"
|
||||
desc = "A plain metallic plate that might denote the wearer as a member of Zeng-Hu."
|
||||
icon_state = "tag_zeng"
|
||||
badge_string = "Zeng-Hu"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/gilthari
|
||||
name = "Gilthari Badge"
|
||||
desc = "An opulent metallic plate that might denote the wearer as a member of Gilthari."
|
||||
icon_state = "tag_gil"
|
||||
badge_string = "Gilthari"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/veymed
|
||||
name = "Vey-Medical Badge"
|
||||
desc = "A plain metallic plate that might denote the wearer as a member of Vey-Medical."
|
||||
icon_state = "tag_vey"
|
||||
badge_string = "Vey-Medical"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/hephaestus
|
||||
name = "Hephaestus Badge"
|
||||
desc = "A rugged metallic plate that might denote the wearer as a member of Hephaestus."
|
||||
icon_state = "tag_heph"
|
||||
badge_string = "Hephaestus"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/grayson
|
||||
name = "Grayson Badge"
|
||||
desc = "A rugged metallic plate that might denote the wearer as a member of Grayson."
|
||||
icon_state = "tag_grayson"
|
||||
badge_string = "Grayson"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/xion
|
||||
name = "Xion Badge"
|
||||
desc = "A rugged metallic plate that might denote the wearer as a member of Xion."
|
||||
icon_state = "tag_xion"
|
||||
badge_string = "Xion"
|
||||
|
||||
/obj/item/clothing/accessory/badge/corporate_tag/bishop
|
||||
name = "Bishop Badge"
|
||||
desc = "A sleek metallic plate that might denote the wearer as a member of Bishop."
|
||||
icon_state = "tag_bishop"
|
||||
badge_string = "Bishop"
|
||||
|
||||
@@ -216,6 +216,13 @@
|
||||
icon_state = "medcloak"
|
||||
item_state = "medcloak"
|
||||
|
||||
|
||||
/obj/item/clothing/accessory/poncho/roles/cloak/custom //A colorable cloak
|
||||
name = "cloak"
|
||||
desc = "A simple, bland cloak."
|
||||
icon_state = "colorcloak"
|
||||
item_state = "colorcloak"
|
||||
|
||||
/obj/item/clothing/accessory/hawaii
|
||||
name = "flower-pattern shirt"
|
||||
desc = "You probably need some welder googles to look at this."
|
||||
|
||||
@@ -78,6 +78,8 @@
|
||||
|
||||
/obj/item/weapon/spacecash/attack_self()
|
||||
var/amount = input(usr, "How many Thalers do you want to take? (0 to [src.worth])", "Take Money", 20) as num
|
||||
if(!src || QDELETED(src))
|
||||
return
|
||||
amount = round(CLAMP(amount, 0, src.worth))
|
||||
|
||||
if(!amount)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/New()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/Initialize()
|
||||
..()
|
||||
icon_state = base_icon
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
rim_pos = null // no fruit slices
|
||||
var/lid_color = "black"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/New()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/Initialize()
|
||||
..()
|
||||
lid_color = pick("black", "red", "blue")
|
||||
update_icon()
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake
|
||||
name = "protein shake"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake/New()
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake/Initialize()
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 30)
|
||||
reagents.add_reagent("iron", 10)
|
||||
|
||||
@@ -3285,23 +3285,23 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/pizzabox/margherita/New()
|
||||
/obj/item/pizzabox/margherita/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src)
|
||||
boxtag = "Margherita Deluxe"
|
||||
|
||||
/obj/item/pizzabox/vegetable/New()
|
||||
/obj/item/pizzabox/vegetable/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src)
|
||||
boxtag = "Gourmet Vegatable"
|
||||
|
||||
/obj/item/pizzabox/mushroom/New()
|
||||
/obj/item/pizzabox/mushroom/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src)
|
||||
boxtag = "Mushroom Special"
|
||||
|
||||
/obj/item/pizzabox/meat/New()
|
||||
/obj/item/pizzabox/meat/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
|
||||
boxtag = "Meatlover's Supreme"
|
||||
|
||||
/obj/item/pizzabox/old/New()
|
||||
/obj/item/pizzabox/old/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza(src)
|
||||
boxtag = "Deluxe Gourmet"
|
||||
|
||||
|
||||
@@ -217,13 +217,13 @@
|
||||
|
||||
spawn(gib_time)
|
||||
|
||||
src.operating = 0
|
||||
src.occupant.gib()
|
||||
qdel(src.occupant)
|
||||
operating = 0
|
||||
occupant.gib()
|
||||
occupant = null
|
||||
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
operating = 0
|
||||
for (var/obj/item/thing in contents)
|
||||
for (var/obj/thing in contents)
|
||||
// There's a chance that the gibber will fail to destroy some evidence.
|
||||
if(istype(thing,/obj/item/organ) && prob(80))
|
||||
qdel(thing)
|
||||
|
||||
@@ -457,6 +457,8 @@ I said no!
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/weapon/paper/paper = locate() in container
|
||||
if (!paper)
|
||||
return 0
|
||||
if (!paper.info)
|
||||
return 0
|
||||
return .
|
||||
|
||||
@@ -254,8 +254,9 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/deck/verb_pickup(mob/user as mob) // Snowflaked so pick up verb work as intended
|
||||
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
/obj/item/weapon/deck/verb_pickup() // Snowflaked so pick up verb work as intended
|
||||
var/mob/user = usr
|
||||
if((istype(user) && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if(!istype(usr, /mob/living/simple_mob))
|
||||
if( !usr.get_active_hand() ) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -413,8 +413,9 @@
|
||||
|
||||
activate_pin(3)
|
||||
|
||||
for(var/mob/O in hearers(1, get_turf(src)))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
if(loc)
|
||||
for(var/mob/O in hearers(1, get_turf(src)))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
|
||||
/obj/item/integrated_circuit/input/EPv2
|
||||
name = "\improper EPv2 circuit"
|
||||
|
||||
@@ -196,3 +196,7 @@
|
||||
recipes += new/datum/stack_recipe("alien wood floor tile", /obj/item/stack/tile/wood/sif, 1, 4, 20)
|
||||
recipes -= new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20)
|
||||
recipes -= new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1)
|
||||
|
||||
/material/supermatter/generate_recipes()
|
||||
recipes = list()
|
||||
recipes += new/datum/stack_recipe("supermatter shard", /obj/machinery/power/supermatter/shard, 30 , one_per_turf = 1, time = 600, on_floor = 1)
|
||||
|
||||
@@ -214,7 +214,101 @@
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/durasteel/hull
|
||||
name = "MAT_DURASTEELHULL"
|
||||
name = MAT_DURASTEELHULL
|
||||
|
||||
/obj/item/stack/material/titanium
|
||||
name = MAT_TITANIUM
|
||||
icon_state = "sheet-silver"
|
||||
item_state = "sheet-silver"
|
||||
default_type = MAT_TITANIUM
|
||||
no_variants = FALSE
|
||||
|
||||
/obj/item/stack/material/titanium/hull
|
||||
name = MAT_TITANIUMHULL
|
||||
default_type = MAT_TITANIUMHULL
|
||||
|
||||
// Particle Smasher and Exotic material.
|
||||
/obj/item/stack/material/verdantium
|
||||
name = MAT_VERDANTIUM
|
||||
icon_state = "sheet-wavy"
|
||||
item_state = "mhydrogen"
|
||||
default_type = MAT_VERDANTIUM
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/morphium
|
||||
name = MAT_MORPHIUM
|
||||
icon_state = "sheet-wavy"
|
||||
item_state = "mhydrogen"
|
||||
default_type = MAT_MORPHIUM
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/morphium/hull
|
||||
name = MAT_MORPHIUMHULL
|
||||
default_type = MAT_MORPHIUMHULL
|
||||
|
||||
/obj/item/stack/material/valhollide
|
||||
name = MAT_VALHOLLIDE
|
||||
icon_state = "sheet-gem"
|
||||
item_state = "diamond"
|
||||
default_type = MAT_VALHOLLIDE
|
||||
no_variants = FALSE
|
||||
apply_colour = TRUE
|
||||
|
||||
// Forged in the equivalent of Hell, one piece at a time.
|
||||
/obj/item/stack/material/supermatter
|
||||
name = MAT_SUPERMATTER
|
||||
icon_state = "sheet-super"
|
||||
item_state = "diamond"
|
||||
default_type = MAT_SUPERMATTER
|
||||
apply_colour = TRUE
|
||||
|
||||
/obj/item/stack/material/supermatter/proc/update_mass() // Due to how dangerous they can be, the item will get heavier and larger the more are in the stack.
|
||||
slowdown = amount / 10
|
||||
w_class = min(5, round(amount / 10) + 1)
|
||||
throw_range = round(amount / 7) + 1
|
||||
|
||||
/obj/item/stack/material/supermatter/use(var/used)
|
||||
. = ..()
|
||||
update_mass()
|
||||
return
|
||||
|
||||
/obj/item/stack/material/supermatter/attack_hand(mob/user)
|
||||
update_mass()
|
||||
radiation_repository.radiate(src, 5 + amount)
|
||||
var/mob/living/M = user
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
var/burn_user = TRUE
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(istype(G) && ((G.flags & THICKMATERIAL && prob(70)) || istype(G, /obj/item/clothing/gloves/gauntlets)))
|
||||
burn_user = FALSE
|
||||
|
||||
if(burn_user)
|
||||
H.visible_message("<span class='danger'>\The [src] flashes as it scorches [H]'s hands!</span>")
|
||||
H.apply_damage(amount / 2 + 5, BURN, "r_hand", used_weapon="Supermatter Chunk")
|
||||
H.apply_damage(amount / 2 + 5, BURN, "l_hand", used_weapon="Supermatter Chunk")
|
||||
H.drop_from_inventory(src, get_turf(H))
|
||||
return
|
||||
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
burn_user = FALSE
|
||||
|
||||
if(burn_user)
|
||||
M.apply_damage(amount, BURN, null, used_weapon="Supermatter Chunk")
|
||||
|
||||
/obj/item/stack/material/supermatter/ex_act(severity) // An incredibly hard to manufacture material, SM chunks are unstable by their 'stabilized' nature.
|
||||
if(prob((4 / severity) * 20))
|
||||
radiation_repository.radiate(get_turf(src), amount * 4)
|
||||
explosion(get_turf(src),round(amount / 12) , round(amount / 6), round(amount / 3), round(amount / 25))
|
||||
qdel(src)
|
||||
return
|
||||
radiation_repository.radiate(get_turf(src), amount * 2)
|
||||
..()
|
||||
|
||||
/obj/item/stack/material/wood
|
||||
name = "wooden plank"
|
||||
|
||||
@@ -105,6 +105,8 @@ var/list/name_to_material
|
||||
var/opacity = 1 // Is the material transparent? 0.5< makes transparent walls/doors.
|
||||
var/reflectivity = 0 // How reflective to light is the material? Currently used for laser reflection and defense.
|
||||
var/explosion_resistance = 5 // Only used by walls currently.
|
||||
var/negation = 0 // Objects that respect this will randomly absorb impacts with this var as the percent chance.
|
||||
var/spatial_instability = 0 // Objects that have trouble staying in the same physical space by sheer laws of nature have this. Percent for respecting items to cause teleportation.
|
||||
var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn.
|
||||
var/conductivity = null // How conductive the material is. Iron acts as the baseline, at 10.
|
||||
var/list/composite_material // If set, object matter var will be a list containing these values.
|
||||
@@ -293,6 +295,8 @@ var/list/name_to_material
|
||||
/material/supermatter
|
||||
name = "supermatter"
|
||||
icon_colour = "#FFFF00"
|
||||
stack_type = /obj/item/stack/material/supermatter
|
||||
shard_type = SHARD_SHARD
|
||||
radioactivity = 20
|
||||
stack_type = null
|
||||
luminescence = 3
|
||||
@@ -304,6 +308,7 @@ var/list/name_to_material
|
||||
sheet_singular_name = "crystal"
|
||||
sheet_plural_name = "crystals"
|
||||
is_fusion_fuel = 1
|
||||
stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 5, TECH_BLUESPACE = 4)
|
||||
|
||||
/material/phoron
|
||||
name = "phoron"
|
||||
@@ -354,11 +359,10 @@ var/list/name_to_material
|
||||
name = "marble"
|
||||
icon_colour = "#AAAAAA"
|
||||
weight = 26
|
||||
hardness = 100
|
||||
hardness = 70
|
||||
integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system
|
||||
stack_type = /obj/item/stack/material/marble
|
||||
|
||||
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = /obj/item/stack/material/steel
|
||||
@@ -455,8 +459,8 @@ var/list/name_to_material
|
||||
reflectivity = 0.9
|
||||
|
||||
/material/plasteel/titanium
|
||||
name = "titanium"
|
||||
stack_type = null
|
||||
name = MAT_TITANIUM
|
||||
stack_type = /obj/item/stack/material/titanium
|
||||
conductivity = 2.38
|
||||
icon_base = "metal"
|
||||
door_icon_base = "metal"
|
||||
@@ -465,7 +469,7 @@ var/list/name_to_material
|
||||
|
||||
/material/plasteel/titanium/hull
|
||||
name = MAT_TITANIUMHULL
|
||||
stack_type = null
|
||||
stack_type = /obj/item/stack/material/titanium/hull
|
||||
icon_base = "hull"
|
||||
icon_reinf = "reinf_mesh"
|
||||
|
||||
@@ -686,7 +690,7 @@ var/list/name_to_material
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
/material/lead
|
||||
name = "lead"
|
||||
name = MAT_LEAD
|
||||
stack_type = /obj/item/stack/material/lead
|
||||
icon_colour = "#273956"
|
||||
weight = 23 // Lead is a bit more dense than silver IRL, and silver has 22 ingame.
|
||||
@@ -695,6 +699,74 @@ var/list/name_to_material
|
||||
sheet_plural_name = "ingots"
|
||||
radiation_resistance = 25 // Lead is Special and so gets to block more radiation than it normally would with just weight, totalling in 48 protection.
|
||||
|
||||
// Particle Smasher and other exotic materials.
|
||||
|
||||
/material/verdantium
|
||||
name = MAT_VERDANTIUM
|
||||
stack_type = /obj/item/stack/material/verdantium
|
||||
icon_base = "metal"
|
||||
door_icon_base = "metal"
|
||||
icon_reinf = "reinf_metal"
|
||||
icon_colour = "#4FE95A"
|
||||
integrity = 80
|
||||
protectiveness = 15
|
||||
weight = 15
|
||||
hardness = 30
|
||||
shard_type = SHARD_SHARD
|
||||
negation = 15
|
||||
conductivity = 60
|
||||
reflectivity = 0.3
|
||||
radiation_resistance = 5
|
||||
stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 5, TECH_BIO = 4)
|
||||
sheet_singular_name = "sheet"
|
||||
sheet_plural_name = "sheets"
|
||||
|
||||
/material/morphium
|
||||
name = MAT_MORPHIUM
|
||||
stack_type = /obj/item/stack/material/morphium
|
||||
icon_base = "metal"
|
||||
door_icon_base = "metal"
|
||||
icon_colour = "#37115A"
|
||||
icon_reinf = "reinf_metal"
|
||||
protectiveness = 60
|
||||
integrity = 300
|
||||
conductivity = 1.5
|
||||
hardness = 90
|
||||
shard_type = SHARD_SHARD
|
||||
weight = 30
|
||||
negation = 25
|
||||
explosion_resistance = 85
|
||||
reflectivity = 0.2
|
||||
radiation_resistance = 10
|
||||
stack_origin_tech = list(TECH_MATERIAL = 8, TECH_ILLEGAL = 1, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_ARCANE = 1)
|
||||
|
||||
/material/morphium/hull
|
||||
name = MAT_MORPHIUMHULL
|
||||
stack_type = /obj/item/stack/material/morphium/hull
|
||||
icon_base = "hull"
|
||||
icon_reinf = "reinf_mesh"
|
||||
|
||||
/material/valhollide
|
||||
name = MAT_VALHOLLIDE
|
||||
stack_type = /obj/item/stack/material/valhollide
|
||||
icon_base = "stone"
|
||||
door_icon_base = "stone"
|
||||
icon_reinf = "reinf_mesh"
|
||||
icon_colour = "##FFF3B2"
|
||||
protectiveness = 30
|
||||
integrity = 240
|
||||
weight = 30
|
||||
hardness = 45
|
||||
negation = 2
|
||||
conductivity = 5
|
||||
reflectivity = 0.5
|
||||
radiation_resistance = 20
|
||||
spatial_instability = 30
|
||||
stack_origin_tech = list(TECH_MATERIAL = 7, TECH_PHORON = 5, TECH_BLUESPACE = 5)
|
||||
sheet_singular_name = "gem"
|
||||
sheet_plural_name = "gems"
|
||||
|
||||
|
||||
// Adminspawn only, do not let anyone get this.
|
||||
/material/alienalloy
|
||||
name = "alienalloy"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
. = 0
|
||||
return
|
||||
|
||||
if(!M.mind || !M.client) // Logged out. They might come back but we can't do any meaningful assessments for now.
|
||||
if(!M.client) // Logged out. They might come back but we can't do any meaningful assessments for now.
|
||||
. = 0
|
||||
return
|
||||
|
||||
@@ -79,4 +79,4 @@
|
||||
. += assess_player_activity(O)
|
||||
num++
|
||||
if(num)
|
||||
. = round(. / num, 0.1)
|
||||
. = round(. / num, 0.1)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/resource_field = list()
|
||||
var/obj/item/device/radio/intercom/faultreporter = new /obj/item/device/radio/intercom{channels=list("Supply")}(null)
|
||||
|
||||
var/ore_types = list(
|
||||
var/list/ore_types = list(
|
||||
"hematite" = /obj/item/weapon/ore/iron,
|
||||
"uranium" = /obj/item/weapon/ore/uranium,
|
||||
"gold" = /obj/item/weapon/ore/gold,
|
||||
@@ -34,8 +34,20 @@
|
||||
var/harvest_speed
|
||||
var/capacity
|
||||
var/charge_use
|
||||
var/exotic_drilling
|
||||
var/obj/item/weapon/cell/cell = null
|
||||
|
||||
// Found with an advanced laser. exotic_drilling >= 1
|
||||
var/list/ore_types_uncommon = list(
|
||||
MAT_MARBLE = /obj/item/weapon/ore/marble,
|
||||
MAT_LEAD = /obj/item/weapon/ore/lead
|
||||
)
|
||||
|
||||
// Found with an ultra laser. exotic_drilling >= 2
|
||||
var/list/ore_types_rare = list(
|
||||
MAT_VERDANTIUM = /obj/item/weapon/ore/verdantium
|
||||
)
|
||||
|
||||
//Flags
|
||||
var/need_update_field = 0
|
||||
var/need_player_check = 0
|
||||
@@ -127,7 +139,7 @@
|
||||
var/oretype = ore_types[metal]
|
||||
new oretype(src)
|
||||
|
||||
if(!found_resource)
|
||||
if(!found_resource) // If a drill can't see an advanced material, it will destroy it while going through.
|
||||
harvesting.has_resources = 0
|
||||
harvesting.resources = null
|
||||
resource_field -= harvesting
|
||||
@@ -219,6 +231,14 @@
|
||||
for(var/obj/item/weapon/stock_parts/P in component_parts)
|
||||
if(istype(P, /obj/item/weapon/stock_parts/micro_laser))
|
||||
harvest_speed = P.rating
|
||||
exotic_drilling = P.rating - 1
|
||||
if(exotic_drilling >= 1)
|
||||
ore_types |= ore_types_uncommon
|
||||
if(exotic_drilling >= 2)
|
||||
ore_types |= ore_types_rare
|
||||
else
|
||||
ore_types -= ore_types_uncommon
|
||||
ore_types -= ore_types_rare
|
||||
if(istype(P, /obj/item/weapon/stock_parts/matter_bin))
|
||||
capacity = 200 * P.rating
|
||||
if(istype(P, /obj/item/weapon/stock_parts/capacitor))
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
"surface minerals" = 0,
|
||||
"precious metals" = 0,
|
||||
"nuclear fuel" = 0,
|
||||
"exotic matter" = 0
|
||||
"exotic matter" = 0,
|
||||
"anomalous matter" = 0
|
||||
)
|
||||
|
||||
for(var/turf/simulated/T in range(2, get_turf(user)))
|
||||
@@ -30,10 +31,11 @@
|
||||
var/ore_type
|
||||
|
||||
switch(metal)
|
||||
if("silicates", "carbon", "hematite") ore_type = "surface minerals"
|
||||
if("gold", "silver", "diamond") ore_type = "precious metals"
|
||||
if("silicates", "carbon", "hematite", "marble") ore_type = "surface minerals"
|
||||
if("gold", "silver", "diamond", "lead") ore_type = "precious metals"
|
||||
if("uranium") ore_type = "nuclear fuel"
|
||||
if("phoron", "osmium", "hydrogen") ore_type = "exotic matter"
|
||||
if("verdantium") ore_type = "anomalous matter"
|
||||
|
||||
if(ore_type) metals[ore_type] += T.resources[metal]
|
||||
|
||||
|
||||
@@ -171,10 +171,13 @@
|
||||
"phoron" = 15,
|
||||
"silver" = 16,
|
||||
"gold" = 18,
|
||||
"marble" = 20,
|
||||
"uranium" = 30,
|
||||
"diamond" = 50,
|
||||
"platinum" = 40,
|
||||
"mhydrogen" = 40)
|
||||
"lead" = 40,
|
||||
"mhydrogen" = 40,
|
||||
"verdantium" = 60)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
var/obj/item/stack/flag/newflag = new src.type(T)
|
||||
newflag.amount = 1
|
||||
newflag.upright = 1
|
||||
anchored = 1
|
||||
newflag.anchored = 1
|
||||
newflag.name = newflag.singular_name
|
||||
newflag.icon_state = "[newflag.base_state]_open"
|
||||
newflag.visible_message("<b>[user]</b> plants [newflag] firmly in the ground.")
|
||||
|
||||
@@ -46,7 +46,10 @@ var/list/mining_overlay_cache = list()
|
||||
"osmium" = /obj/item/weapon/ore/osmium,
|
||||
"hydrogen" = /obj/item/weapon/ore/hydrogen,
|
||||
"silicates" = /obj/item/weapon/ore/glass,
|
||||
"carbon" = /obj/item/weapon/ore/coal
|
||||
"carbon" = /obj/item/weapon/ore/coal,
|
||||
"verdantium" = /obj/item/weapon/ore/verdantium,
|
||||
"marble" = /obj/item/weapon/ore/marble,
|
||||
"lead" = /obj/item/weapon/ore/lead
|
||||
)
|
||||
|
||||
has_resources = 1
|
||||
@@ -608,10 +611,10 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
var/mineral_name
|
||||
if(rare_ore)
|
||||
mineral_name = pickweight(list("uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20))
|
||||
mineral_name = pickweight(list("marble" = 5, "uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 5, "verdantium" = 1))
|
||||
|
||||
else
|
||||
mineral_name = pickweight(list("uranium" = 5, "platinum" = 5, "hematite" = 35, "carbon" = 35, "diamond" = 1, "gold" = 5, "silver" = 5, "phoron" = 10))
|
||||
mineral_name = pickweight(list("marble" = 3, "uranium" = 10, "platinum" = 10, "hematite" = 70, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 2, "verdantium" = 1))
|
||||
|
||||
if(mineral_name && (mineral_name in ore_data))
|
||||
mineral = ore_data[mineral_name]
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/marble
|
||||
name = "recrystallized carbonate"
|
||||
icon_state = "ore_marble"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "marble"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "sand"
|
||||
icon_state = "ore_glass"
|
||||
@@ -77,6 +83,29 @@
|
||||
icon_state = "ore_hydrogen"
|
||||
material = "mhydrogen"
|
||||
|
||||
/obj/item/weapon/ore/verdantium
|
||||
name = "verdantite dust"
|
||||
icon_state = "ore_verdantium"
|
||||
material = MAT_VERDANTIUM
|
||||
origin_tech = list(TECH_MATERIAL = 7)
|
||||
|
||||
// POCKET ... Crystal dust.
|
||||
/obj/item/weapon/ore/verdantium/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(istype(H) && H.has_eyes() && prob(85))
|
||||
H << "<span class='danger'>Some of \the [src] gets in your eyes!</span>"
|
||||
H.Blind(10)
|
||||
H.eye_blurry += 15
|
||||
spawn(1)
|
||||
if(istype(loc, /turf/)) qdel(src)
|
||||
|
||||
/obj/item/weapon/ore/lead
|
||||
name = "lead glance"
|
||||
icon_state = "ore_lead"
|
||||
material = MAT_LEAD
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Someone screwed up..."
|
||||
|
||||
@@ -132,4 +132,35 @@ var/global/list/ore_data = list()
|
||||
display_name = "metallic hydrogen"
|
||||
smelts_to = "tritium"
|
||||
compresses_to = "mhydrogen"
|
||||
scan_icon = "mineral_rare"
|
||||
scan_icon = "mineral_rare"
|
||||
|
||||
/ore/verdantium
|
||||
name = MAT_VERDANTIUM
|
||||
display_name = "crystalline verdantite"
|
||||
compresses_to = MAT_VERDANTIUM
|
||||
result_amount = 2
|
||||
spread_chance = 5
|
||||
ore = /obj/item/weapon/ore/verdantium
|
||||
scan_icon = "mineral_rare"
|
||||
xarch_ages = list(
|
||||
"billion" = 13,
|
||||
"billion_lower" = 10
|
||||
)
|
||||
|
||||
/ore/marble
|
||||
name = MAT_MARBLE
|
||||
display_name = "recrystallized carbonate"
|
||||
compresses_to = "marble"
|
||||
result_amount = 1
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/marble
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/ore/lead
|
||||
name = MAT_LEAD
|
||||
display_name = "lead glance"
|
||||
smelts_to = "lead"
|
||||
result_amount = 3
|
||||
spread_chance = 20
|
||||
ore = /obj/item/weapon/ore/lead
|
||||
scan_icon = "mineral_rare"
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
var/icon_scale_percent // Makes the holder's icon get scaled up or down.
|
||||
var/attack_speed_percent // Makes the holder's 'attack speed' (click delay) shorter or longer.
|
||||
var/pain_immunity // Makes the holder not care about pain while this is on. Only really useful to human mobs.
|
||||
var/pulse_modifier // Modifier for pulse, will be rounded on application, then added to the normal 'pulse' multiplier which ranges between 0 and 5 normally. Only applied if they're living.
|
||||
var/pulse_set_level // Positive number. If this is non-null, it will hard-set the pulse level to this. Pulse ranges from 0 to 5 normally.
|
||||
|
||||
/datum/modifier/New(var/new_holder, var/new_origin)
|
||||
holder = new_holder
|
||||
|
||||
@@ -267,4 +267,15 @@ the artifact triggers the rage.
|
||||
return FALSE
|
||||
if(L.get_poison_protection() >= 1)
|
||||
return FALSE
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
// Pulse modifier.
|
||||
/datum/modifier/false_pulse
|
||||
name = "false pulse"
|
||||
desc = "Your blood flows, despite all other factors."
|
||||
|
||||
on_created_text = "<span class='notice'>You feel alive.</span>"
|
||||
on_expired_text = "<span class='notice'>You feel.. different.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
pulse_set_level = PULSE_NORM
|
||||
|
||||
@@ -275,6 +275,8 @@
|
||||
var/final_message = "[part_a][speaker_name][part_b][formatted]"
|
||||
if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention))
|
||||
final_message = "[time]<font size='3'><b>[final_message]</b></font>"
|
||||
else
|
||||
final_message = "[time][final_message]"
|
||||
to_chat(src, final_message)
|
||||
|
||||
/mob/living/silicon/ai/on_hear_radio(part_a, speaker_name, track, part_b, formatted)
|
||||
@@ -282,6 +284,8 @@
|
||||
var/final_message = "[part_a][track][part_b][formatted]"
|
||||
if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention))
|
||||
final_message = "[time]<font size='3'><b>[final_message]</b></font>"
|
||||
else
|
||||
final_message = "[time][final_message]"
|
||||
to_chat(src, final_message)
|
||||
|
||||
/mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null)
|
||||
|
||||
@@ -339,3 +339,16 @@
|
||||
..()
|
||||
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||
src.brainmob.real_name = src.brainmob.name
|
||||
|
||||
// This type shouldn't care about brainmobs.
|
||||
/obj/item/device/mmi/inert
|
||||
|
||||
// This is a 'fake' MMI that is used to let AIs control borg shells directly.
|
||||
// This doesn't inherit from /digital because all that does is add ghost pulling capabilities, which this thing won't need.
|
||||
/obj/item/device/mmi/inert/ai_remote
|
||||
name = "\improper AI remote interface"
|
||||
desc = "A sophisticated board which allows for an artificial intelligence to remotely control a synthetic chassis."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "mainboard"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2, TECH_BLUESPACE = 2, TECH_DATA = 3)
|
||||
@@ -29,7 +29,7 @@
|
||||
m_type = 1
|
||||
|
||||
//Machine-only emotes
|
||||
if("ping", "beep", "buzz", "yes", "no", "rcough", "rsneeze")
|
||||
if("ping", "beep", "buzz", "yes", "ye", "no", "rcough", "rsneeze")
|
||||
|
||||
if(!isSynthetic())
|
||||
src << "<span class='warning'>You are not a synthetic.</span>"
|
||||
@@ -52,7 +52,7 @@
|
||||
else if(act == "ping")
|
||||
display_msg = "pings"
|
||||
use_sound = 'sound/machines/ping.ogg'
|
||||
else if(act == "yes")
|
||||
else if(act == "yes" || act == "ye")
|
||||
display_msg = "emits an affirmative blip"
|
||||
use_sound = 'sound/machines/synth_yes.ogg'
|
||||
else if(act == "no")
|
||||
@@ -727,7 +727,7 @@
|
||||
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough, cry, custom, deathgasp, drool, eyebrow, fastsway/qwag, \
|
||||
frown, gasp, giggle, glare-(none)/mob, grin, groan, grumble, handshake, hug-(none)/mob, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, \
|
||||
raise, salute, scream, sneeze, shake, shiver, shrug, sigh, signal-#1-10, slap-(none)/mob, smile, sneeze, sniff, snore, stare-(none)/mob, stopsway/swag, sway/wag, swish, tremble, twitch, \
|
||||
twitch_v, vomit, whimper, wink, yawn. Synthetics: beep, buzz, yess, no, rcough, rsneeze, ping"
|
||||
twitch_v, vomit, whimper, wink, yawn. Synthetics: beep, buzz, yes, no, rcough, rsneeze, ping"
|
||||
|
||||
else
|
||||
src << "<font color='blue'>Unusable emote '[act]'. Say *help for a list.</font>"
|
||||
|
||||
@@ -1393,7 +1393,7 @@
|
||||
/mob/living/carbon/human/proc/process_glasses(var/obj/item/clothing/glasses/G)
|
||||
if(G && G.active)
|
||||
see_in_dark += G.darkness_view
|
||||
if(G.overlay)
|
||||
if(G.overlay && client)
|
||||
client.screen |= G.overlay
|
||||
if(G.vision_flags)
|
||||
sight |= G.vision_flags
|
||||
@@ -1545,20 +1545,67 @@
|
||||
/mob/living/carbon/human/proc/handle_pulse()
|
||||
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(!internal_organs_by_name[O_HEART])
|
||||
return PULSE_NONE //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
|
||||
var/temp = PULSE_NORM
|
||||
|
||||
var/modifier_shift = 0
|
||||
var/modifier_set
|
||||
|
||||
if(modifiers && modifiers.len)
|
||||
for(var/datum/modifier/mod in modifiers)
|
||||
if(isnull(modifier_set) && !isnull(mod.pulse_set_level))
|
||||
modifier_set = round(mod.pulse_set_level) // Should be a whole number, but let's not take chances.
|
||||
else if(mod.pulse_set_level > modifier_set)
|
||||
modifier_set = round(mod.pulse_set_level)
|
||||
|
||||
modifier_set = max(0, modifier_set) // No setting to negatives.
|
||||
|
||||
if(mod.pulse_modifier)
|
||||
modifier_shift += mod.pulse_modifier
|
||||
|
||||
modifier_shift = round(modifier_shift)
|
||||
|
||||
if(!internal_organs_by_name[O_HEART])
|
||||
temp = PULSE_NONE
|
||||
if(!isnull(modifier_set))
|
||||
temp = modifier_set
|
||||
return temp //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
temp = PULSE_NONE
|
||||
if(!isnull(modifier_set))
|
||||
temp = modifier_set
|
||||
return temp //that's it, you're dead, nothing can influence your pulse, aside from outside means.
|
||||
|
||||
var/obj/item/organ/internal/heart/Pump = internal_organs_by_name[O_HEART]
|
||||
|
||||
if(Pump)
|
||||
temp += Pump.standard_pulse_level - PULSE_NORM
|
||||
|
||||
if(round(vessel.get_reagent_amount("blood")) <= BLOOD_VOLUME_BAD) //how much blood do we have
|
||||
temp = PULSE_THREADY //not enough :(
|
||||
temp = temp + 3 //not enough :(
|
||||
|
||||
if(status_flags & FAKEDEATH)
|
||||
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
|
||||
|
||||
if(!isnull(modifier_set))
|
||||
temp = modifier_set
|
||||
|
||||
temp = max(0, temp + modifier_shift) // No negative pulses.
|
||||
|
||||
if(Pump)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id in bradycardics)
|
||||
if(temp <= Pump.standard_pulse_level + 3 && temp >= Pump.standard_pulse_level)
|
||||
temp--
|
||||
if(R.id in tachycardics)
|
||||
if(temp <= Pump.standard_pulse_level + 1 && temp >= PULSE_NONE)
|
||||
temp++
|
||||
if(R.id in heartstopper) //To avoid using fakedeath
|
||||
temp = PULSE_NONE
|
||||
if(R.id in cheartstopper) //Conditional heart-stoppage
|
||||
if(R.volume >= R.overdose)
|
||||
temp = PULSE_NONE
|
||||
return temp
|
||||
//handles different chems' influence on pulse
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id in bradycardics)
|
||||
|
||||
@@ -113,10 +113,18 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
prometheans = src
|
||||
|
||||
/datum/species/shapeshifter/promethean/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
var/boxtype = pick(typesof(/obj/item/weapon/storage/toolbox/lunchbox))
|
||||
var/boxtype = pick(list(/obj/item/weapon/storage/toolbox/lunchbox,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/heart,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/cat,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/nt,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/mars,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/cti,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/nymph,
|
||||
/obj/item/weapon/storage/toolbox/lunchbox/syndicate)) //Only pick the empty types
|
||||
var/obj/item/weapon/storage/toolbox/lunchbox/L = new boxtype(get_turf(H))
|
||||
var/mob/living/simple_mob/animal/passive/mouse/mouse = new (L)
|
||||
var/obj/item/weapon/holder/holder = new (L)
|
||||
holder.held_mob = mouse
|
||||
mouse.forceMove(holder)
|
||||
holder.sync(mouse)
|
||||
if(H.backbag == 1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/death()
|
||||
/mob/living/death(gibbed)
|
||||
clear_fullscreens()
|
||||
|
||||
if(ai_holder)
|
||||
@@ -12,4 +12,12 @@
|
||||
var/obj/structure/blob/factory/F = nest
|
||||
F.spores -= src
|
||||
nest = null
|
||||
|
||||
for(var/s in owned_soul_links)
|
||||
var/datum/soul_link/S = s
|
||||
S.owner_died(gibbed)
|
||||
for(var/s in shared_soul_links)
|
||||
var/datum/soul_link/S = s
|
||||
S.sharer_died(gibbed)
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -103,18 +103,23 @@ default behaviour is:
|
||||
return
|
||||
|
||||
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
var/dense = 0
|
||||
if(loc.density)
|
||||
dense = 1
|
||||
for(var/atom/movable/A in loc)
|
||||
if(A == src)
|
||||
continue
|
||||
if(A.density)
|
||||
if(A.flags&ON_BORDER)
|
||||
dense = !A.CanPass(src, src.loc)
|
||||
else
|
||||
dense = 1
|
||||
if(dense) break
|
||||
var/can_swap = 1
|
||||
if(loc.density || tmob.loc.density)
|
||||
can_swap = 0
|
||||
if(can_swap)
|
||||
for(var/atom/movable/A in loc)
|
||||
if(A == src)
|
||||
continue
|
||||
if(!A.CanPass(tmob, loc))
|
||||
can_swap = 0
|
||||
if(!can_swap) break
|
||||
if(can_swap)
|
||||
for(var/atom/movable/A in tmob.loc)
|
||||
if(A == tmob)
|
||||
continue
|
||||
if(!A.CanPass(src, tmob.loc))
|
||||
can_swap = 0
|
||||
if(!can_swap) break
|
||||
|
||||
//Leaping mobs just land on the tile, no pushing, no anything.
|
||||
if(status_flags & LEAPING)
|
||||
@@ -123,7 +128,7 @@ default behaviour is:
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !tmob.buckled && !buckled && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
|
||||
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !tmob.buckled && !buckled && can_swap && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
forceMove(tmob.loc)
|
||||
tmob.forceMove(oldloc)
|
||||
@@ -899,7 +904,11 @@ default behaviour is:
|
||||
|
||||
/mob/living/proc/escape_buckle()
|
||||
if(buckled)
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
if(istype(buckled, /obj/vehicle))
|
||||
var/obj/vehicle/vehicle = buckled
|
||||
vehicle.unload()
|
||||
else
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
|
||||
/mob/living/proc/resist_grab()
|
||||
var/resisting = 0
|
||||
|
||||
@@ -49,10 +49,10 @@ var/list/ai_verbs_default = list(
|
||||
shouldnt_see = list(/obj/effect/rune)
|
||||
var/list/network = list(NETWORK_DEFAULT)
|
||||
var/obj/machinery/camera/camera = null
|
||||
var/list/connected_robots = list()
|
||||
var/aiRestorePowerRoutine = 0
|
||||
var/viewalerts = 0
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
var/list/connected_robots = list()
|
||||
var/obj/item/device/pda/ai/aiPDA = null
|
||||
var/obj/item/device/communicator/aiCommunicator = null
|
||||
var/obj/item/device/multitool/aiMulti = null
|
||||
@@ -221,6 +221,28 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
if(!stat) // Make sure we're not unconscious/dead.
|
||||
stat(null, text("System integrity: [(health+100)/2]%"))
|
||||
stat(null, text("Connected synthetics: [connected_robots.len]"))
|
||||
for(var/mob/living/silicon/robot/R in connected_robots)
|
||||
var/robot_status = "Nominal"
|
||||
if(R.shell)
|
||||
robot_status = "AI SHELL"
|
||||
else if(R.stat || !R.client)
|
||||
robot_status = "OFFLINE"
|
||||
else if(!R.cell || R.cell.charge <= 0)
|
||||
robot_status = "DEPOWERED"
|
||||
//Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
|
||||
stat(null, text("[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "Empty"] | \
|
||||
Module: [R.modtype] | Loc: [get_area_name(R, TRUE)] | Status: [robot_status]"))
|
||||
stat(null, text("AI shell beacons detected: [LAZYLEN(GLOB.available_ai_shells)]")) //Count of total AI shells
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/setup_icon()
|
||||
var/file = file2text("config/custom_sprites.txt")
|
||||
var/lines = splittext(file, "\n")
|
||||
@@ -277,7 +299,10 @@ var/list/ai_verbs_default = list(
|
||||
/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
|
||||
powered_ai = ai
|
||||
powered_ai.psupply = src
|
||||
forceMove(powered_ai.loc)
|
||||
if(istype(powered_ai,/mob/living/silicon/ai/announcer)) //Don't try to get a loc for a nullspace announcer mob, just put it into it
|
||||
forceMove(powered_ai)
|
||||
else
|
||||
forceMove(powered_ai.loc)
|
||||
|
||||
..()
|
||||
use_power(1) // Just incase we need to wake up the power system.
|
||||
@@ -405,6 +430,7 @@ var/list/ai_verbs_default = list(
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/emp_act(severity)
|
||||
disconnect_shell("Disconnected from remote shell due to ionic interfe%*@$^___")
|
||||
if (prob(30))
|
||||
view_core()
|
||||
..()
|
||||
@@ -688,8 +714,8 @@ var/list/ai_verbs_default = list(
|
||||
card.grab_ai(src, user)
|
||||
|
||||
else if(W.is_wrench())
|
||||
if(user == controlling_drone)
|
||||
to_chat(user, "<span class='notice'>The drone's subsystems resist your efforts to tamper with your bolts.</span>")
|
||||
if(user == deployed_shell)
|
||||
to_chat(user, "<span class='notice'>The shell's subsystems resist your efforts to tamper with your bolts.</span>")
|
||||
return
|
||||
if(anchored)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/mob/living/silicon/ai
|
||||
var/mob/living/silicon/robot/deployed_shell = null //For shell control
|
||||
|
||||
/mob/living/silicon/ai/Initialize()
|
||||
if(config.allow_ai_shells)
|
||||
verbs += /mob/living/silicon/ai/proc/deploy_to_shell_act
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/proc/deploy_to_shell(var/mob/living/silicon/robot/target)
|
||||
if(!config.allow_ai_shells)
|
||||
to_chat(src, span("warning", "AI Shells are not allowed on this server. You shouldn't have this verb because of it, so consider making a bug report."))
|
||||
return
|
||||
|
||||
if(incapacitated())
|
||||
to_chat(src, span("warning", "You are incapacitated!"))
|
||||
return
|
||||
|
||||
if(lacks_power())
|
||||
to_chat(src, span("warning", "Your core lacks power, wireless is disabled."))
|
||||
return
|
||||
|
||||
if(control_disabled)
|
||||
to_chat(src, span("warning", "Wireless networking module is offline."))
|
||||
return
|
||||
|
||||
var/list/possible = list()
|
||||
|
||||
for(var/borgie in GLOB.available_ai_shells)
|
||||
var/mob/living/silicon/robot/R = borgie
|
||||
if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) )
|
||||
possible += R
|
||||
|
||||
if(!LAZYLEN(possible))
|
||||
to_chat(src, span("warning", "No usable AI shell beacons detected."))
|
||||
|
||||
if(!target || !(target in possible)) //If the AI is looking for a new shell, or its pre-selected shell is no longer valid
|
||||
target = input(src, "Which body to control?") as null|anything in possible
|
||||
|
||||
if(!target || target.stat == DEAD || target.deployed || !(!target.connected_ai || (target.connected_ai == src) ) )
|
||||
if(target)
|
||||
to_chat(src, span("warning", "It is no longer possible to deploy to \the [target]."))
|
||||
else
|
||||
to_chat(src, span("notice", "Deployment aborted."))
|
||||
return
|
||||
|
||||
else if(mind)
|
||||
soul_link(/datum/soul_link/shared_body, src, target)
|
||||
deployed_shell = target
|
||||
target.deploy_init(src)
|
||||
mind.transfer_to(target)
|
||||
teleop = target // So the AI 'hears' messages near its core.
|
||||
target.post_deploy()
|
||||
|
||||
/mob/living/silicon/ai/proc/deploy_to_shell_act()
|
||||
set category = "AI Commands"
|
||||
set name = "Deploy to Shell"
|
||||
deploy_to_shell() // This is so the AI is not prompted with a list of all mobs when using the 'real' proc.
|
||||
|
||||
/mob/living/silicon/ai/proc/disconnect_shell(message = "Your remote connection has been reset!")
|
||||
if(deployed_shell) // Forcibly call back AI in event of things such as damage, EMP or power loss.
|
||||
message = span("danger", message)
|
||||
deployed_shell.undeploy(message)
|
||||
@@ -3,8 +3,8 @@
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
if(controlling_drone)
|
||||
controlling_drone.release_ai_control("<b>WARNING: Primary control loop failure.</b> Session terminated.")
|
||||
if(deployed_shell)
|
||||
disconnect_shell("Disconnecting from remote shell due to critical system failure.")
|
||||
. = ..(gibbed)
|
||||
|
||||
if(src.eyeobj)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
if (src.stat == UNCONSCIOUS)
|
||||
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
|
||||
msg += "</span>"
|
||||
if(deployed_shell)
|
||||
msg += "The wireless networking light is blinking.\n"
|
||||
msg += "*---------*"
|
||||
if(hardware && (hardware.owner == src))
|
||||
msg += "<br>"
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
//Being dead doesn't mean your temperature never changes
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if (src.stat!=CONSCIOUS)
|
||||
if (src.stat != CONSCIOUS)
|
||||
src.cameraFollow = null
|
||||
src.reset_view(null)
|
||||
if(controlling_drone)
|
||||
controlling_drone.release_ai_control("<b>WARNING: Primary control loop failure.</b> Session terminated.")
|
||||
disconnect_shell("Disconnecting from remote shell due to local system failure.")
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
@@ -91,6 +90,7 @@
|
||||
//Now to tell the AI why they're blind and dying slowly.
|
||||
|
||||
src << "You've lost power!"
|
||||
disconnect_shell(message = "Disconnected from remote shell due to depowered networking interface.")
|
||||
|
||||
spawn(20)
|
||||
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
//list(ckey = real_name,)
|
||||
//Since the ckey is used as the icon_state, the current system will only permit a single custom robot sprite per ckey.
|
||||
//While it might be possible for a ckey to use that custom sprite for several real_names, it seems rather pointless to support it. ~Mech: We found it wasn't pointless.
|
||||
var/list/robot_custom_icons
|
||||
GLOBAL_LIST_EMPTY(robot_custom_icons)
|
||||
|
||||
/hook/startup/proc/load_robot_custom_sprites()
|
||||
var/config_file = file2text("config/custom_sprites.txt")
|
||||
var/list/lines = splittext(config_file, "\n")
|
||||
|
||||
robot_custom_icons = list()
|
||||
GLOB.robot_custom_icons = list()
|
||||
for(var/line in lines)
|
||||
//split entry into ckey and real_name
|
||||
var/list/split_idx = splittext(line, "-") //this works if ckeys and borg names cannot contain dashes, and splittext starts from the beginning ~Mech
|
||||
@@ -20,13 +20,15 @@ var/list/robot_custom_icons
|
||||
split_idx.Remove(ckey)
|
||||
|
||||
for(var/name in split_idx)
|
||||
robot_custom_icons[name] = ckey
|
||||
GLOB.robot_custom_icons[name] = ckey
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/set_custom_sprite()
|
||||
var/sprite_owner = robot_custom_icons[real_name]
|
||||
if(!sprite_name)
|
||||
return
|
||||
var/sprite_owner = GLOB.robot_custom_icons[sprite_name]
|
||||
if(sprite_owner && sprite_owner == ckey)
|
||||
custom_sprite = 1
|
||||
icon = CUSTOM_ITEM_SYNTH
|
||||
if(icon_state == "robot")
|
||||
icon_state = "[ckey]-[name]-Standard" //Compliant with robot.dm line 236 ~Mech
|
||||
icon_state = "[ckey]-[sprite_name]-Standard" //Compliant with robot.dm line 236 ~Mech
|
||||
|
||||
@@ -135,20 +135,15 @@ var/list/mob_hat_cache = list()
|
||||
/mob/living/silicon/robot/drone/updatename()
|
||||
if(name_override)
|
||||
return
|
||||
if(controlling_ai)
|
||||
real_name = "remote drone ([controlling_ai])"
|
||||
else
|
||||
real_name = "[initial(name)] ([serial_number])"
|
||||
|
||||
real_name = "[initial(name)] ([serial_number])"
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/drone/updateicon()
|
||||
|
||||
overlays.Cut()
|
||||
if(stat == 0)
|
||||
if(controlling_ai)
|
||||
overlays += "eyes-[icon_state]-ai"
|
||||
else
|
||||
overlays += "eyes-[icon_state]"
|
||||
overlays += "eyes-[icon_state]"
|
||||
else
|
||||
overlays -= "eyes"
|
||||
if(hat) // Let the drones wear hats.
|
||||
@@ -233,12 +228,9 @@ var/list/mob_hat_cache = list()
|
||||
|
||||
to_chat(user, "<span class='danger'>You swipe the sequencer across [src]'s interface and watch its eyes flicker.</span>")
|
||||
|
||||
if(controlling_ai)
|
||||
to_chat(src, "<span class='danger'>\The [user] loads some kind of subversive software into the remote drone, corrupting its lawset but luckily sparing yours.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.</span>")
|
||||
to_chat(src, "<span class='danger'>You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.</span>")
|
||||
|
||||
log_game("[key_name(user)] emagged drone [key_name(src)][controlling_ai ? " but AI [key_name(controlling_ai)] is in remote control" : " Laws overridden"].")
|
||||
log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.")
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
|
||||
@@ -251,10 +243,9 @@ var/list/mob_hat_cache = list()
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.")
|
||||
|
||||
if(!controlling_ai)
|
||||
to_chat(src, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(src)
|
||||
to_chat(src, "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and \his commands.</span>")
|
||||
to_chat(src, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(src)
|
||||
to_chat(src, "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and \his commands.</span>")
|
||||
return 1
|
||||
|
||||
//DRONE LIFE/DEATH
|
||||
@@ -280,23 +271,13 @@ var/list/mob_hat_cache = list()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/death(gibbed)
|
||||
if(controlling_ai)
|
||||
release_ai_control("<b>WARNING: remote system failure.</b> Connection timed out.")
|
||||
. = ..(gibbed)
|
||||
|
||||
//DRONE MOVEMENT.
|
||||
/mob/living/silicon/robot/drone/Process_Spaceslipping(var/prob_slip)
|
||||
return 0
|
||||
|
||||
//CONSOLE PROCS
|
||||
/mob/living/silicon/robot/drone/proc/law_resync()
|
||||
|
||||
if(controlling_ai)
|
||||
to_chat(src, "<span class='warning'>Someone issues a remote law reset order for this unit, but you disregard it.</span>")
|
||||
return
|
||||
|
||||
if(stat != 2)
|
||||
if(stat != DEAD)
|
||||
if(emagged)
|
||||
to_chat(src, "<span class='danger'>You feel something attempting to modify your programming, but your hacked subroutines are unaffected.</span>")
|
||||
else
|
||||
@@ -305,16 +286,11 @@ var/list/mob_hat_cache = list()
|
||||
show_laws()
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/shut_down()
|
||||
|
||||
if(controlling_ai && mind.special_role)
|
||||
to_chat(src, "<span class='warning'>Someone issued a remote kill order for this unit, but you disregard it.</span>")
|
||||
return
|
||||
|
||||
if(stat != 2)
|
||||
if(stat != DEAD)
|
||||
if(emagged)
|
||||
to_chat(src, "<span class='danger'>You feel a system kill order percolate through [controlling_ai ? "the drones" : "your"] tiny brain, but it doesn't seem like a good idea to [controlling_ai ? "it" : "you"].</span>")
|
||||
to_chat(src, "<span class='danger'>You feel a system kill order percolate through your tiny brain, but it doesn't seem like a good idea to you.</span>")
|
||||
else
|
||||
to_chat(src, "<span class='danger'>You feel a system kill order percolate through [controlling_ai ? "the drones" : "your"] tiny brain, and [controlling_ai ? "it" : "you"] obediently destroy[controlling_ai ? "s itself" : " yourself"].</span>")
|
||||
to_chat(src, "<span class='danger'>You feel a system kill order percolate through your tiny brain, and you obediently destroy yourself.</span>")
|
||||
death()
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/full_law_reset()
|
||||
@@ -323,21 +299,6 @@ var/list/mob_hat_cache = list()
|
||||
clear_ion_laws(1)
|
||||
laws = new law_type
|
||||
|
||||
/mob/living/silicon/robot/drone/show_laws(var/everyone = 0)
|
||||
if(!controlling_ai)
|
||||
return..()
|
||||
to_chat(src, "<b>Obey these laws:</b>")
|
||||
controlling_ai.laws_sanity_check()
|
||||
controlling_ai.laws.show_laws(src)
|
||||
|
||||
/mob/living/silicon/robot/drone/robot_checklaws()
|
||||
set category = "Silicon Commands"
|
||||
set name = "State Laws"
|
||||
|
||||
if(!controlling_ai)
|
||||
return ..()
|
||||
controlling_ai.subsystem_law_manager()
|
||||
|
||||
//Reboot procs.
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/request_player()
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
/mob/living/silicon/ai
|
||||
var/mob/living/silicon/robot/drone/controlling_drone
|
||||
|
||||
/mob/living/silicon/robot/drone
|
||||
var/mob/living/silicon/ai/controlling_ai
|
||||
|
||||
/mob/living/silicon/robot/drone/attack_ai(var/mob/living/silicon/ai/user)
|
||||
|
||||
if(!istype(user) || controlling_ai || !config.allow_drone_spawn || !config.allow_ai_drones)
|
||||
return
|
||||
|
||||
if(client || key)
|
||||
to_chat(user, "<span class='warning'>You cannot take control of an autonomous, active drone.</span>")
|
||||
return
|
||||
|
||||
if(health < -35 || emagged)
|
||||
to_chat(user, "<span class='notice'><b>WARNING:</b> connection timed out.</span>")
|
||||
return
|
||||
|
||||
user.controlling_drone = src
|
||||
user.teleop = src
|
||||
radio.channels = user.aiRadio.keyslot2.channels
|
||||
controlling_ai = user
|
||||
verbs += /mob/living/silicon/robot/drone/proc/release_ai_control_verb
|
||||
local_transmit = FALSE
|
||||
languages = controlling_ai.languages.Copy()
|
||||
speech_synthesizer_langs = controlling_ai.speech_synthesizer_langs.Copy()
|
||||
stat = CONSCIOUS
|
||||
if(user.mind)
|
||||
user.mind.transfer_to(src)
|
||||
else
|
||||
key = user.key
|
||||
updatename()
|
||||
to_chat(src, "<span class='notice'><b>You have shunted your primary control loop into \a [initial(name)].</b> Use the <b>Release Control</b> verb to return to your core.</span>")
|
||||
|
||||
/obj/machinery/drone_fabricator/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
|
||||
if(!istype(user) || user.controlling_drone || !config.allow_drone_spawn || !config.allow_ai_drones)
|
||||
return
|
||||
|
||||
if(stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>\The [src] is unpowered.</span>")
|
||||
return
|
||||
|
||||
if(!produce_drones)
|
||||
to_chat(user, "<span class='warning'>\The [src] is disabled.</span>")
|
||||
return
|
||||
|
||||
if(drone_progress < 100)
|
||||
to_chat(user, "<span class='warning'>\The [src] is not ready to produce a new drone.</span>")
|
||||
return
|
||||
|
||||
if(count_drones() >= config.max_maint_drones)
|
||||
to_chat(user, "<span class='warning'>The drone control subsystems are tasked to capacity; they cannot support any more drones.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/drone/new_drone = create_drone()
|
||||
user.controlling_drone = new_drone
|
||||
user.teleop = new_drone
|
||||
new_drone.radio.channels = user.aiRadio.keyslot2.channels
|
||||
new_drone.controlling_ai = user
|
||||
new_drone.verbs += /mob/living/silicon/robot/drone/proc/release_ai_control_verb
|
||||
new_drone.local_transmit = FALSE
|
||||
new_drone.languages = new_drone.controlling_ai.languages.Copy()
|
||||
new_drone.speech_synthesizer_langs = new_drone.controlling_ai.speech_synthesizer_langs.Copy()
|
||||
|
||||
if(user.mind)
|
||||
user.mind.transfer_to(new_drone)
|
||||
else
|
||||
new_drone.key = user.key
|
||||
new_drone.updatename()
|
||||
|
||||
to_chat(new_drone, "<span class='notice'><b>You have shunted your primary control loop into \a [initial(new_drone.name)].</b> Use the <b>Release Control</b> verb to return to your core.</span>")
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/release_ai_control_verb()
|
||||
set name = "Release Control"
|
||||
set desc = "Release control of a remote drone."
|
||||
set category = "Silicon Commands"
|
||||
|
||||
release_ai_control("Remote session terminated.")
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/release_ai_control(var/message = "Connection terminated.")
|
||||
|
||||
if(controlling_ai)
|
||||
if(mind)
|
||||
mind.transfer_to(controlling_ai)
|
||||
else
|
||||
controlling_ai.key = key
|
||||
to_chat(controlling_ai, "<span class='notice'>[message]</span>")
|
||||
controlling_ai.controlling_drone = null
|
||||
controlling_ai.teleop = null
|
||||
controlling_ai = null
|
||||
|
||||
radio.channels = module.channels
|
||||
verbs -= /mob/living/silicon/robot/drone/proc/release_ai_control_verb
|
||||
module.remove_languages(src) //Removes excess, adds 'default'.
|
||||
remove_language("Robot Talk")
|
||||
add_language("Robot Talk", 0)
|
||||
add_language("Drone Talk", 1)
|
||||
local_transmit = TRUE
|
||||
full_law_reset()
|
||||
updatename()
|
||||
death()
|
||||
@@ -185,7 +185,7 @@
|
||||
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
m_type = 1
|
||||
|
||||
if("yes")
|
||||
if("yes", "ye")
|
||||
var/M = null
|
||||
if(param)
|
||||
for (var/mob/A in view(null, null))
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
|
||||
switch(src.stat)
|
||||
if(CONSCIOUS)
|
||||
if(!src.client) msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(shell)
|
||||
msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n"
|
||||
else if(!src.client)
|
||||
msg += "It appears to be in stand-by mode.\n" //afk
|
||||
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
|
||||
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
|
||||
msg += "*---------*"
|
||||
|
||||
@@ -14,30 +14,32 @@
|
||||
if(lawupdate)
|
||||
if (connected_ai)
|
||||
if(connected_ai.stat || connected_ai.control_disabled)
|
||||
src << "<b>AI signal lost, unable to sync laws.</b>"
|
||||
to_chat(src, "<b>AI signal lost, unable to sync laws.</b>")
|
||||
|
||||
else
|
||||
lawsync()
|
||||
photosync()
|
||||
src << "<b>Laws synced with AI, be sure to note any changes.</b>"
|
||||
to_chat(src, "<b>Laws synced with AI, be sure to note any changes.</b>")
|
||||
// TODO: Update to new antagonist system.
|
||||
if(mind && mind.special_role == "traitor" && mind.original == src)
|
||||
src << "<b>Remember, your AI does NOT share or know about your law 0.</b>"
|
||||
to_chat(src, "<b>Remember, your AI does NOT share or know about your law 0.</b>")
|
||||
else
|
||||
src << "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>"
|
||||
lawupdate = 0
|
||||
to_chat(src, "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>")
|
||||
lawupdate = FALSE
|
||||
|
||||
who << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(who)
|
||||
if(shell) //AI shell
|
||||
to_chat(who, "<b>Remember, you are an AI remotely controlling your shell, other AIs can be ignored.</b>")
|
||||
// TODO: Update to new antagonist system.
|
||||
if (mind && (mind.special_role == "traitor" && mind.original == src) && connected_ai)
|
||||
who << "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>"
|
||||
else if (connected_ai)
|
||||
who << "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>"
|
||||
else if (emagged)
|
||||
who << "<b>Remember, you are not required to listen to the AI.</b>"
|
||||
else if(mind && (mind.special_role == "traitor" && mind.original == src) && connected_ai)
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>")
|
||||
else if(connected_ai)
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>")
|
||||
else if(emagged)
|
||||
to_chat(who, "<b>Remember, you are not required to listen to the AI.</b>")
|
||||
else
|
||||
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
|
||||
to_chat(who, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>")
|
||||
|
||||
|
||||
/mob/living/silicon/robot/lawsync()
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/sight_mode = 0
|
||||
var/custom_name = ""
|
||||
var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best
|
||||
var/sprite_name = null // The name of the borg, for the purposes of custom icon sprite indexing.
|
||||
var/crisis //Admin-settable for combat module use.
|
||||
var/crisis_override = 0
|
||||
var/integrated_light_power = 6
|
||||
@@ -171,7 +172,7 @@
|
||||
else
|
||||
lawupdate = 0
|
||||
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/SetName(pickedName as text)
|
||||
custom_name = pickedName
|
||||
@@ -226,13 +227,17 @@
|
||||
mmi.brainmob.languages = languages
|
||||
mmi.brainmob.remove_language("Robot Talk")
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
else
|
||||
else if(!shell) // Shells don't have brainmbos in their MMIs.
|
||||
to_chat(src, "<span class='danger'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>")
|
||||
ghostize()
|
||||
//ERROR("A borg has been destroyed, but its MMI lacked a brainmob, so the mind could not be transferred. Player: [ckey].")
|
||||
mmi = null
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
if(shell)
|
||||
if(deployed)
|
||||
undeploy()
|
||||
revert_shell() // To get it out of the GLOB list.
|
||||
qdel(wires)
|
||||
wires = null
|
||||
return ..()
|
||||
@@ -242,7 +247,7 @@
|
||||
module_sprites = new_sprites.Copy()
|
||||
//Custom_sprite check and entry
|
||||
if (custom_sprite == 1)
|
||||
module_sprites["Custom"] = "[ckey]-[name]-[modtype]" //Made compliant with custom_sprites.dm line 32. (src.) was apparently redundant as it's implied. ~Mech
|
||||
module_sprites["Custom"] = "[ckey]-[sprite_name]-[modtype]" //Made compliant with custom_sprites.dm line 32. (src.) was apparently redundant as it's implied. ~Mech
|
||||
icontype = "Custom"
|
||||
else
|
||||
icontype = module_sprites[1]
|
||||
@@ -281,6 +286,8 @@
|
||||
braintype = BORG_BRAINTYPE_POSI
|
||||
else if(istype(mmi, /obj/item/device/mmi/digital/robot))
|
||||
braintype = BORG_BRAINTYPE_DRONE
|
||||
else if(istype(mmi, /obj/item/device/mmi/inert/ai_remote))
|
||||
braintype = BORG_BRAINTYPE_AI_SHELL
|
||||
else
|
||||
braintype = BORG_BRAINTYPE_CYBORG
|
||||
|
||||
@@ -326,6 +333,7 @@
|
||||
newname = sanitizeSafe(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
custom_name = newname
|
||||
sprite_name = newname
|
||||
|
||||
updatename()
|
||||
updateicon()
|
||||
@@ -471,6 +479,10 @@
|
||||
to_chat(user, "<span class='warning'>You need to open \the [src]'s panel before you can modify them.</span>")
|
||||
return
|
||||
|
||||
if(shell) // AI shells always have the laws of the AI
|
||||
to_chat(user, span("warning", "\The [src] is controlled remotely! You cannot upload new laws this way!"))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/aiModule/M = W
|
||||
M.install(src, user)
|
||||
return
|
||||
@@ -609,7 +621,7 @@
|
||||
else
|
||||
to_chat(user, "Unable to locate a radio.")
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)||istype(W, /obj/item/weapon/card/robot)) // trying to unlock the interface with an ID card
|
||||
else if (W.GetID()) // trying to unlock the interface with an ID card
|
||||
if(emagged)//still allow them to open the cover
|
||||
to_chat(user, "The interface seems slightly damaged")
|
||||
if(opened)
|
||||
@@ -645,6 +657,17 @@
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/proc/module_reset()
|
||||
uneq_all()
|
||||
modtype = initial(modtype)
|
||||
hands.icon_state = initial(hands.icon_state)
|
||||
|
||||
notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, module.name)
|
||||
module.Reset(src)
|
||||
qdel(module)
|
||||
module = null
|
||||
updatename("Default")
|
||||
|
||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -691,27 +714,29 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I)
|
||||
/mob/living/silicon/robot/proc/check_access(obj/item/I)
|
||||
if(!istype(req_access, /list)) //something's very wrong
|
||||
return 1
|
||||
|
||||
var/list/L = req_access
|
||||
if(!L.len) //no requirements
|
||||
return 1
|
||||
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
|
||||
if(!I) //nothing to check with..?
|
||||
return 0
|
||||
var/access_found = I.GetAccess()
|
||||
for(var/req in req_access)
|
||||
if(req in I.access) //have one of the required accesses
|
||||
if(req in access_found) //have one of the required accesses
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/updateicon()
|
||||
cut_overlays()
|
||||
if(stat == CONSCIOUS)
|
||||
add_overlay("eyes-[module_sprites[icontype]]")
|
||||
if(!shell || deployed) // Shell borgs that are not deployed will have no eyes.
|
||||
add_overlay("eyes-[module_sprites[icontype]]")
|
||||
|
||||
if(opened)
|
||||
var/panelprefix = custom_sprite ? "[src.ckey]-[src.name]" : "ov"
|
||||
var/panelprefix = custom_sprite ? "[src.ckey]-[src.sprite_name]" : "ov"
|
||||
if(wiresexposed)
|
||||
add_overlay("[panelprefix]-openpanel +w")
|
||||
else if(cell)
|
||||
@@ -958,6 +983,11 @@
|
||||
icontype = module_sprites[1]
|
||||
else
|
||||
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot Icon", icontype, null) in module_sprites
|
||||
|
||||
if(icontype == "Custom")
|
||||
icon = CUSTOM_ITEM_SYNTH
|
||||
else // This is to fix an issue where someone with a custom borg sprite chooses a non-custom sprite and turns invisible.
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = module_sprites[icontype]
|
||||
updateicon()
|
||||
|
||||
@@ -1013,6 +1043,8 @@
|
||||
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/first_arg, var/second_arg)
|
||||
if(!connected_ai)
|
||||
return
|
||||
if(shell && notifytype != ROBOT_NOTIFICATION_AI_SHELL)
|
||||
return // No point annoying the AI/s about renames and module resets for shells.
|
||||
switch(notifytype)
|
||||
if(ROBOT_NOTIFICATION_NEW_UNIT) //New Robot
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - New [lowertext(braintype)] connection detected: <a href='byond://?src=\ref[connected_ai];track2=\ref[connected_ai];track=\ref[src]'>[name]</a></span><br>"
|
||||
@@ -1023,6 +1055,8 @@
|
||||
if(ROBOT_NOTIFICATION_NEW_NAME) //New Name
|
||||
if(first_arg != second_arg)
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [first_arg] is now designated as [second_arg].</span><br>"
|
||||
if(ROBOT_NOTIFICATION_AI_SHELL) //New Shell
|
||||
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - New AI shell detected: <a href='?src=[REF(connected_ai)];track2=[html_encode(name)]'>[name]</a></span><br>")
|
||||
|
||||
/mob/living/silicon/robot/proc/disconnect_from_ai()
|
||||
if(connected_ai)
|
||||
@@ -1031,7 +1065,7 @@
|
||||
connected_ai = null
|
||||
|
||||
/mob/living/silicon/robot/proc/connect_to_ai(var/mob/living/silicon/ai/AI)
|
||||
if(AI && AI != connected_ai)
|
||||
if(AI && AI != connected_ai && !shell)
|
||||
disconnect_from_ai()
|
||||
connected_ai = AI
|
||||
connected_ai.connected_robots |= src
|
||||
@@ -1047,6 +1081,9 @@
|
||||
else
|
||||
to_chat(user, "You fail to emag the cover lock.")
|
||||
to_chat(src, "Hack attempt detected.")
|
||||
|
||||
if(shell) // A warning to Traitors who may not know that emagging AI shells does not slave them.
|
||||
to_chat(user, span("warning", "[src] seems to be controlled remotely! Emagging the interface may not work as expected."))
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "The cover is already unlocked.")
|
||||
@@ -1057,46 +1094,54 @@
|
||||
if(wiresexposed)
|
||||
to_chat(user, "You must close the panel first")
|
||||
return
|
||||
|
||||
|
||||
// The block of code below is from TG. Feel free to replace with a better result if desired.
|
||||
if(shell) // AI shells cannot be emagged, so we try to make it look like a standard reset. Smart players may see through this, however.
|
||||
to_chat(user, span("danger", "[src] is remotely controlled! Your emag attempt has triggered a system reset instead!"))
|
||||
log_game("[key_name(user)] attempted to emag an AI shell belonging to [key_name(src) ? key_name(src) : connected_ai]. The shell has been reset as a result.")
|
||||
module_reset()
|
||||
return
|
||||
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
disconnect_from_ai()
|
||||
to_chat(user, "You emag [src]'s interface.")
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.")
|
||||
. = 1
|
||||
spawn()
|
||||
to_chat(src, "<span class='danger'>ALERT: Foreign software detected.</span>")
|
||||
sleep(5)
|
||||
to_chat(src, "<span class='danger'>Initiating diagnostics...</span>")
|
||||
sleep(20)
|
||||
to_chat(src, "<span class='danger'>SynBorg v1.7.1 loaded.</span>")
|
||||
sleep(5)
|
||||
to_chat(src, "<span class='danger'>LAW SYNCHRONISATION ERROR</span>")
|
||||
sleep(5)
|
||||
to_chat(src, "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>")
|
||||
sleep(10)
|
||||
to_chat(src, "<span class='danger'>> N</span>")
|
||||
sleep(20)
|
||||
to_chat(src, "<span class='danger'>ERRORERRORERROR</span>")
|
||||
to_chat(src, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(src)
|
||||
to_chat(src, "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and [TU.his] commands.</span>")
|
||||
updateicon()
|
||||
else
|
||||
sleep(6)
|
||||
if(prob(50))
|
||||
emagged = 1
|
||||
lawupdate = 0
|
||||
disconnect_from_ai()
|
||||
to_chat(user, "You emag [src]'s interface.")
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.")
|
||||
. = 1
|
||||
spawn()
|
||||
to_chat(src, "<span class='danger'>ALERT: Foreign software detected.</span>")
|
||||
sleep(5)
|
||||
to_chat(src, "<span class='danger'>Initiating diagnostics...</span>")
|
||||
sleep(20)
|
||||
to_chat(src, "<span class='danger'>SynBorg v1.7.1 loaded.</span>")
|
||||
sleep(5)
|
||||
to_chat(src, "<span class='danger'>LAW SYNCHRONISATION ERROR</span>")
|
||||
sleep(5)
|
||||
to_chat(src, "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>")
|
||||
sleep(10)
|
||||
to_chat(src, "<span class='danger'>> N</span>")
|
||||
sleep(20)
|
||||
to_chat(src, "<span class='danger'>ERRORERRORERROR</span>")
|
||||
to_chat(src, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(src)
|
||||
to_chat(src, "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and [TU.his] commands.</span>")
|
||||
updateicon()
|
||||
else
|
||||
to_chat(user, "You fail to hack [src]'s interface.")
|
||||
to_chat(src, "Hack attempt detected.")
|
||||
return 1
|
||||
return
|
||||
to_chat(user, "You fail to hack [src]'s interface.")
|
||||
to_chat(src, "Hack attempt detected.")
|
||||
return 1
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/is_sentient()
|
||||
return braintype != BORG_BRAINTYPE_DRONE
|
||||
@@ -1105,4 +1150,4 @@
|
||||
/mob/living/silicon/robot/drop_item()
|
||||
if(module_active && istype(module_active,/obj/item/weapon/gripper))
|
||||
var/obj/item/weapon/gripper/G = module_active
|
||||
G.drop_item_nm()
|
||||
G.drop_item_nm()
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
// This file holds things required for remote borg control by an AI.
|
||||
|
||||
GLOBAL_LIST_EMPTY(available_ai_shells)
|
||||
|
||||
/mob/living/silicon/robot
|
||||
var/shell = FALSE
|
||||
var/deployed = FALSE
|
||||
var/mob/living/silicon/ai/mainframe = null
|
||||
|
||||
// Premade AI shell, for roundstart shells.
|
||||
/mob/living/silicon/robot/ai_shell/Initialize()
|
||||
mmi = new /obj/item/device/mmi/inert/ai_remote(src)
|
||||
post_mmi_setup()
|
||||
return ..()
|
||||
|
||||
// Call after inserting or instantiating an MMI.
|
||||
/mob/living/silicon/robot/proc/post_mmi_setup()
|
||||
if(istype(mmi, /obj/item/device/mmi/inert/ai_remote))
|
||||
make_shell()
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
else
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/make_shell()
|
||||
shell = TRUE
|
||||
braintype = "AI Shell"
|
||||
SetName("[modtype] AI Shell [num2text(ident)]")
|
||||
GLOB.available_ai_shells |= src
|
||||
if(!QDELETED(camera))
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
notify_ai(ROBOT_NOTIFICATION_AI_SHELL)
|
||||
updateicon()
|
||||
|
||||
/mob/living/silicon/robot/proc/revert_shell()
|
||||
if(!shell)
|
||||
return
|
||||
undeploy()
|
||||
shell = FALSE
|
||||
GLOB.available_ai_shells -= src
|
||||
if(!QDELETED(camera))
|
||||
camera.c_tag = real_name
|
||||
updateicon()
|
||||
|
||||
// This should be called before the AI client/mind is actually moved.
|
||||
/mob/living/silicon/robot/proc/deploy_init(mob/living/silicon/ai/AI)
|
||||
// Set the name when the AI steps inside.
|
||||
SetName("[AI.real_name] shell [num2text(ident)]")
|
||||
if(isnull(sprite_name)) // For custom sprites. It can only chance once in case there are two AIs with custom borg sprites.
|
||||
sprite_name = AI.real_name
|
||||
if(!QDELETED(camera))
|
||||
camera.c_tag = real_name
|
||||
|
||||
// Have the borg have eyes when active.
|
||||
mainframe = AI
|
||||
deployed = TRUE
|
||||
updateicon()
|
||||
|
||||
// Laws.
|
||||
connected_ai = mainframe // So they share laws.
|
||||
mainframe.connected_robots |= src
|
||||
lawsync()
|
||||
|
||||
// Give button to leave.
|
||||
verbs += /mob/living/silicon/robot/proc/undeploy_act
|
||||
to_chat(AI, span("notice", "You have connected to an AI Shell remotely, and are now in control of it.<br>\
|
||||
To return to your core, use the <b>Release Control</b> verb."))
|
||||
|
||||
// Languages and comms.
|
||||
languages = AI.languages.Copy()
|
||||
speech_synthesizer_langs = AI.speech_synthesizer_langs.Copy()
|
||||
if(radio && AI.aiRadio) //AI keeps all channels, including Syndie if it is an Infiltrator.
|
||||
// if(AI.radio.syndie)
|
||||
// radio.make_syndie()
|
||||
radio.subspace_transmission = TRUE
|
||||
radio.channels = AI.aiRadio.channels
|
||||
|
||||
// Called after the AI transfers over.
|
||||
/mob/living/silicon/robot/proc/post_deploy()
|
||||
if(!custom_sprite) // Check for custom sprite.
|
||||
set_custom_sprite()
|
||||
|
||||
/mob/living/silicon/robot/proc/undeploy(message)
|
||||
if(!deployed || !mind || !mainframe)
|
||||
return
|
||||
// mainframe.redeploy_action.Grant(mainframe)
|
||||
// mainframe.redeploy_action.last_used_shell = src
|
||||
if(message)
|
||||
to_chat(src, span("notice", message))
|
||||
mind.transfer_to(mainframe)
|
||||
deployed = FALSE
|
||||
updateicon()
|
||||
mainframe.teleop = null
|
||||
mainframe.deployed_shell = null
|
||||
SetName("[modtype] AI Shell [num2text(ident)]")
|
||||
// undeployment_action.Remove(src)
|
||||
if(radio) //Return radio to normal
|
||||
radio.recalculateChannels()
|
||||
if(!QDELETED(camera))
|
||||
camera.c_tag = real_name //update the camera name too
|
||||
// diag_hud_set_aishell()
|
||||
// mainframe.diag_hud_set_deployed()
|
||||
if(mainframe.laws)
|
||||
mainframe.laws.show_laws(mainframe) //Always remind the AI when switching
|
||||
mainframe = null
|
||||
|
||||
/mob/living/silicon/robot/proc/undeploy_act()
|
||||
set name = "Release Control"
|
||||
set desc = "Release control of a remote drone."
|
||||
set category = "Robot Commands"
|
||||
|
||||
undeploy("Remote session terminated.")
|
||||
|
||||
/mob/living/silicon/robot/attack_ai(mob/user)
|
||||
if(shell && config.allow_ai_shells && (!connected_ai || connected_ai == user))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
AI.deploy_to_shell(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Place this on your map to mark where a free AI shell will be.
|
||||
// This can be turned off in the config (and is off by default).
|
||||
// Note that mapping in more than one of these will result in multiple shells.
|
||||
/obj/effect/landmark/free_ai_shell
|
||||
name = "free ai shell spawner"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x3"
|
||||
delete_me = TRUE
|
||||
|
||||
/obj/effect/landmark/free_ai_shell/Initialize()
|
||||
if(config.allow_ai_shells && config.give_free_ai_shell)
|
||||
new /mob/living/silicon/robot/ai_shell(get_turf(src))
|
||||
return ..()
|
||||
@@ -137,6 +137,8 @@
|
||||
if(large_cocoon)
|
||||
C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3")
|
||||
|
||||
ai_holder.target = null
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/nurse/handle_special()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
icon_state = "lizard"
|
||||
icon_living = "lizard"
|
||||
icon_dead = "lizard-dead"
|
||||
icon_dead = "lizard_dead"
|
||||
|
||||
health = 5
|
||||
maxHealth = 5
|
||||
|
||||
@@ -280,6 +280,10 @@
|
||||
|
||||
// Detect if we made a silent landing.
|
||||
if(locate(/obj/structure/stairs) in landing)
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if(L.pulling)
|
||||
L.pulling.forceMove(landing)
|
||||
return 1
|
||||
else
|
||||
var/atom/A = find_fall_target(oldloc, landing)
|
||||
|
||||
@@ -2,32 +2,31 @@
|
||||
// parent class for pipes //
|
||||
////////////////////////////
|
||||
obj/machinery/atmospherics/pipe/zpipe
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "up"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "up"
|
||||
|
||||
name = "upwards pipe"
|
||||
desc = "A pipe segment to connect upwards."
|
||||
name = "upwards pipe"
|
||||
desc = "A pipe segment to connect upwards."
|
||||
|
||||
volume = 70
|
||||
volume = 70
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "cap"
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "cap"
|
||||
|
||||
// node1 is the connection on the same Z
|
||||
// node2 is the connection on the other Z
|
||||
// node1 is the connection on the same Z
|
||||
// node2 is the connection on the other Z
|
||||
|
||||
var/minimum_temperature_difference = 300
|
||||
var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No
|
||||
var/minimum_temperature_difference = 300
|
||||
var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No
|
||||
|
||||
var/maximum_pressure = 70*ONE_ATMOSPHERE
|
||||
var/fatigue_pressure = 55*ONE_ATMOSPHERE
|
||||
alert_pressure = 55*ONE_ATMOSPHERE
|
||||
var/maximum_pressure = 70*ONE_ATMOSPHERE
|
||||
var/fatigue_pressure = 55*ONE_ATMOSPHERE
|
||||
alert_pressure = 55*ONE_ATMOSPHERE
|
||||
|
||||
|
||||
level = 1
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/zpipe/New()
|
||||
..()
|
||||
@@ -152,7 +151,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/atmos_init()
|
||||
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
hide(!T.is_plating())
|
||||
if(level == 1 && !T.is_plating()) hide(1) // but respect level
|
||||
|
||||
///////////////////////
|
||||
// and the down pipe //
|
||||
@@ -189,7 +188,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/atmos_init()
|
||||
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
hide(!T.is_plating())
|
||||
if(level == 1 && !T.is_plating()) hide(1) // but respect level
|
||||
|
||||
///////////////////////
|
||||
// supply/scrubbers //
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
var/obj/structure/ladder/target_ladder = getTargetLadder(M)
|
||||
if(!target_ladder)
|
||||
return
|
||||
if(!M.Move(get_turf(src)))
|
||||
if(!(M.loc == loc) && !M.Move(get_turf(src)))
|
||||
to_chat(M, "<span class='notice'>You fail to reach \the [src].</span>")
|
||||
return
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
if(target_ladder)
|
||||
M.forceMove(get_turf(target_ladder))
|
||||
|
||||
/obj/structure/ladder/attack_robot(var/mob/M)
|
||||
attack_hand(M)
|
||||
return
|
||||
|
||||
/obj/structure/ladder/proc/getTargetLadder(var/mob/M)
|
||||
if((!target_up && !target_down) || (target_up && !istype(target_up.loc, /turf) || (target_down && !istype(target_down.loc,/turf))))
|
||||
to_chat(M, "<span class='notice'>\The [src] is incomplete and can't be climbed.</span>")
|
||||
@@ -131,6 +135,7 @@
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
flags = ON_BORDER
|
||||
layer = STAIRS_LAYER
|
||||
|
||||
/obj/structure/stairs/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
sync_icon(L)
|
||||
|
||||
/mob/zshadow/Destroy()
|
||||
owner.shadow = null
|
||||
owner = null
|
||||
..() //But we don't return because the hint is wrong
|
||||
return QDEL_HINT_QUEUE
|
||||
|
||||
@@ -151,6 +151,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
|
||||
name = "slime core"
|
||||
desc = "A complex, organic knot of jelly and crystalline particles."
|
||||
icon_state = "core"
|
||||
decays = FALSE
|
||||
parent_organ = BP_TORSO
|
||||
clone_source = TRUE
|
||||
flags = OPENCONTAINER
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
parent_organ = BP_TORSO
|
||||
dead_icon = "heart-off"
|
||||
|
||||
var/standard_pulse_level = PULSE_NORM // We run on a normal clock. This is NOT CONNECTED to species heart-rate modifier.
|
||||
|
||||
|
||||
/obj/item/organ/internal/heart/handle_germ_effects()
|
||||
. = ..() //Up should return an infection level as an integer
|
||||
|
||||
@@ -6,30 +6,31 @@ var/list/organ_cache = list()
|
||||
germ_level = 0
|
||||
|
||||
// Strings.
|
||||
var/organ_tag = "organ" // Unique identifier.
|
||||
var/parent_organ = BP_TORSO // Organ holding this object.
|
||||
var/organ_tag = "organ" // Unique identifier.
|
||||
var/parent_organ = BP_TORSO // Organ holding this object.
|
||||
|
||||
// Status tracking.
|
||||
var/status = 0 // Various status flags
|
||||
var/vital // Lose a vital limb, die immediately.
|
||||
var/damage = 0 // Current damage to the organ
|
||||
var/status = 0 // Various status flags
|
||||
var/vital // Lose a vital limb, die immediately.
|
||||
var/damage = 0 // Current damage to the organ
|
||||
var/robotic = 0
|
||||
|
||||
// Reference data.
|
||||
var/mob/living/carbon/human/owner // Current mob owning the organ.
|
||||
var/list/transplant_data // Transplant match data.
|
||||
var/list/autopsy_data = list() // Trauma data for forensics.
|
||||
var/list/trace_chemicals = list() // Traces of chemicals in the organ.
|
||||
var/datum/dna/dna // Original DNA.
|
||||
var/datum/species/species // Original species.
|
||||
var/mob/living/carbon/human/owner // Current mob owning the organ.
|
||||
var/list/transplant_data // Transplant match data.
|
||||
var/list/autopsy_data = list() // Trauma data for forensics.
|
||||
var/list/trace_chemicals = list() // Traces of chemicals in the organ.
|
||||
var/datum/dna/dna // Original DNA.
|
||||
var/datum/species/species // Original species.
|
||||
|
||||
// Damage vars.
|
||||
var/min_bruised_damage = 10 // Damage before considered bruised
|
||||
var/min_broken_damage = 30 // Damage before becoming broken
|
||||
var/max_damage // Damage cap
|
||||
var/can_reject = 1 // Can this organ reject?
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
var/preserved = 0 // If this is 1, prevents organ decay.
|
||||
var/min_bruised_damage = 10 // Damage before considered bruised
|
||||
var/min_broken_damage = 30 // Damage before becoming broken
|
||||
var/max_damage // Damage cap
|
||||
var/can_reject = 1 // Can this organ reject?
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
var/decays = TRUE // Can this organ decay at all?
|
||||
var/preserved = 0 // If this is 1, prevents organ decay.
|
||||
|
||||
// Language vars. Putting them here in case we decide to do something crazy with sign-or-other-nonverbal languages.
|
||||
var/list/will_assist_languages = list()
|
||||
@@ -135,7 +136,7 @@ var/list/organ_cache = list()
|
||||
if(B && prob(40))
|
||||
reagents.remove_reagent("blood",0.1)
|
||||
blood_splatter(src,B,1)
|
||||
if(config.organs_decay) damage += rand(1,3)
|
||||
if(config.organs_decay && decays) damage += rand(1,3)
|
||||
if(damage >= max_damage)
|
||||
damage = max_damage
|
||||
adjust_germ_level(rand(2,6))
|
||||
|
||||
@@ -29,4 +29,25 @@
|
||||
"You unsecure the [src.name] from the floor.", \
|
||||
"You hear a ratchet.")
|
||||
return
|
||||
if(W.is_screwdriver())
|
||||
panel_open = !panel_open
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
visible_message("<span class='notice'>\The [user] adjusts \the [src]'s mechanisms.</span>")
|
||||
if(panel_open && do_after(user, 30))
|
||||
to_chat(user, "<span class='notice'>\The [src] looks like it could be modified.</span>")
|
||||
if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='cult'>\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src]'s mechanisms look secure.</span>")
|
||||
if(istype(W, /obj/item/weapon/smes_coil/super_io) && panel_open)
|
||||
visible_message("<span class='notice'>\The [user] begins to modify \the [src] with \the [W].</span>")
|
||||
if(do_after(user, 300))
|
||||
user.drop_from_inventory(W)
|
||||
visible_message("<span class='notice'>\The [user] installs \the [W] onto \the [src].</span>")
|
||||
qdel(W)
|
||||
var/turf/T = get_turf(src)
|
||||
var/new_machine = /obj/machinery/particle_smasher
|
||||
new new_machine(T)
|
||||
qdel(src)
|
||||
return ..()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if (A)
|
||||
if(ismob(A))
|
||||
toxmob(A)
|
||||
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/)))
|
||||
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/))||(istype(A, /obj/machinery/particle_smasher)))
|
||||
A:energy += energy
|
||||
//R-UST port
|
||||
else if(istype(A,/obj/machinery/power/fusion_core))
|
||||
|
||||
@@ -0,0 +1,365 @@
|
||||
/*
|
||||
* Contains the particle smasher and its recipes.
|
||||
*/
|
||||
|
||||
/obj/machinery/particle_smasher
|
||||
name = "Particle Focus"
|
||||
desc = "A strange device used to create exotic matter."
|
||||
icon = 'icons/obj/machines/particle_smasher.dmi'
|
||||
icon_state = "smasher"
|
||||
anchored = 0
|
||||
density = 1
|
||||
use_power = 0
|
||||
|
||||
var/successful_craft = FALSE // Are we waiting to be emptied?
|
||||
var/image/material_layer // Holds the image used for the filled overlay.
|
||||
var/image/material_glow // Holds the image used for the glow overlay.
|
||||
var/image/reagent_layer // Holds the image used for showing a contained beaker.
|
||||
var/energy = 0 // How many 'energy' units does this have? Acquired by a Particle Accelerator like a Singularity.
|
||||
var/max_energy = 600
|
||||
var/obj/item/stack/material/target // The material being bombarded.
|
||||
var/obj/item/weapon/reagent_containers/reagent_container // Holds the beaker. The process will consume ALL reagents inside it.
|
||||
var/beaker_type = /obj/item/weapon/reagent_containers/glass/beaker
|
||||
var/list/storage // Holds references to items allowed to be used in the fabrication phase.
|
||||
var/max_storage = 3 // How many items can be jammed into it?
|
||||
var/list/recipes // The list containing the Particle Smasher's recipes.
|
||||
|
||||
/obj/machinery/particle_smasher/Initialize()
|
||||
..()
|
||||
storage = list()
|
||||
update_icon()
|
||||
prepare_recipes()
|
||||
|
||||
/obj/machinery/particle_smasher/Destroy()
|
||||
for(var/datum/recipe/particle_smasher/D in recipes)
|
||||
qdel(D)
|
||||
recipes.Cut()
|
||||
..()
|
||||
|
||||
/obj/machinery/particle_smasher/examine(mob/user)
|
||||
..()
|
||||
if(user in view(1))
|
||||
to_chat(user, "<span class='notice'>\The [src] contains:</span>")
|
||||
for(var/obj/item/I in contents)
|
||||
to_chat(user, "<span class='notice'>\the [I]</span>")
|
||||
|
||||
/obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.type == /obj/item/device/analyzer)
|
||||
to_chat(user, "<span class='notice'>\The [src] reads an energy level of [energy].</span>")
|
||||
else if(istype(W, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = W
|
||||
if(M.uses_charge)
|
||||
to_chat(user, "<span class='notice'>You cannot fill \the [src] with a synthesizer!</span>")
|
||||
return
|
||||
target = M.split(1)
|
||||
target.forceMove(src)
|
||||
update_icon()
|
||||
else if(istype(W, beaker_type))
|
||||
if(reagent_container)
|
||||
to_chat(user, "<span class='notice'>\The [src] already has a container attached.</span>")
|
||||
return
|
||||
if(isrobot(user) && istype(W.loc, /obj/item/weapon/gripper))
|
||||
var/obj/item/weapon/gripper/G = W.loc
|
||||
G.drop_item()
|
||||
else
|
||||
user.drop_from_inventory(W)
|
||||
reagent_container = W
|
||||
reagent_container.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You add \the [reagent_container] to \the [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(W.is_wrench())
|
||||
anchored = !anchored
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
||||
"You secure the [src.name] to the floor.", \
|
||||
"You hear a ratchet.")
|
||||
else
|
||||
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
|
||||
"You unsecure the [src.name] from the floor.", \
|
||||
"You hear a ratchet.")
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card/id))
|
||||
to_chat(user, "<span class='notice'>Swiping \the [W] on \the [src] doesn't seem to do anything...</span>")
|
||||
return ..()
|
||||
else if(((isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) || (!isrobot(user) && W.canremove)) && storage.len < max_storage)
|
||||
if(isrobot(user) && istype(W.loc, /obj/item/weapon/gripper))
|
||||
var/obj/item/weapon/gripper/G = W.loc
|
||||
G.drop_item()
|
||||
else
|
||||
user.drop_from_inventory(W)
|
||||
W.forceMove(src)
|
||||
storage += W
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/particle_smasher/update_icon()
|
||||
cut_overlays()
|
||||
if(!material_layer)
|
||||
material_layer = image(icon, "[initial(icon_state)]-material")
|
||||
if(!material_glow)
|
||||
material_glow = image(icon, "[initial(icon_state)]-material-glow")
|
||||
material_glow.plane = PLANE_LIGHTING_ABOVE
|
||||
if(!reagent_layer)
|
||||
reagent_layer = image(icon, "[initial(icon_state)]-reagent")
|
||||
if(anchored)
|
||||
icon_state = "[initial(icon_state)]-o"
|
||||
if(target)
|
||||
material_layer.color = target.material.icon_colour
|
||||
add_overlay(material_layer)
|
||||
if(successful_craft)
|
||||
material_glow.color = target.material.icon_colour
|
||||
add_overlay(material_glow)
|
||||
if(reagent_container)
|
||||
add_overlay(reagent_layer)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
if(target && energy)
|
||||
var/power_percent = round((energy / max_energy) * 100)
|
||||
light_color = target.material.icon_colour
|
||||
switch(power_percent)
|
||||
if(0 to 25)
|
||||
light_range = 1
|
||||
if(26 to 50)
|
||||
light_range = 2
|
||||
if(51 to 75)
|
||||
light_range = 3
|
||||
if(76 to INFINITY)
|
||||
light_range = 4
|
||||
set_light(light_range, 2, light_color)
|
||||
else
|
||||
set_light(0, 0, "#FFFFFF")
|
||||
|
||||
/obj/machinery/particle_smasher/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj, /obj/item/projectile/beam))
|
||||
if(Proj.damage >= 50)
|
||||
TryCraft()
|
||||
return 0
|
||||
|
||||
/obj/machinery/particle_smasher/process()
|
||||
if(!src.anchored) // Rapidly loses focus.
|
||||
if(energy)
|
||||
radiation_repository.radiate(src, round(((src.energy-150)/50)*5,1))
|
||||
energy = max(0, energy - 30)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(energy)
|
||||
radiation_repository.radiate(src, round(((src.energy-150)/50)*5,1))
|
||||
energy = CLAMP(energy - 5, 0, max_energy)
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/particle_smasher/proc/prepare_recipes()
|
||||
if(!recipes)
|
||||
recipes = list()
|
||||
for(var/D in subtypesof(/datum/recipe/particle_smasher))
|
||||
recipes += new D
|
||||
else
|
||||
for(var/datum/recipe/particle_smasher/D in recipes)
|
||||
qdel(D)
|
||||
recipes.Cut()
|
||||
for(var/D in subtypesof(/datum/recipe/particle_smasher))
|
||||
recipes += new D
|
||||
|
||||
/obj/machinery/particle_smasher/proc/TryCraft()
|
||||
|
||||
if(!recipes || !recipes.len)
|
||||
recipes = typesof(/datum/recipe/particle_smasher)
|
||||
|
||||
if(!target) // You are just blasting an empty machine.
|
||||
visible_message("<span class='notice'>\The [src] shudders.</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(successful_craft)
|
||||
visible_message("<span class='warning'>\The [src] fizzles.</span>")
|
||||
if(prob(33)) // Why are you blasting it after it's already done!
|
||||
radiation_repository.radiate(src, 10 + round(src.energy / 60, 1))
|
||||
energy = max(0, energy - 30)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
var/list/possible_recipes = list()
|
||||
var/max_prob = 0
|
||||
for(var/datum/recipe/particle_smasher/R in recipes) // Only things for the smasher. Don't get things like the chef's cake recipes.
|
||||
if(R.probability) // It's actually a recipe you're supposed to be able to make.
|
||||
if(istype(target, R.required_material))
|
||||
if(energy >= R.required_energy_min && energy <= R.required_energy_max) // The machine has enough Vaguely Defined 'Energy'.
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment.temperature >= R.required_atmos_temp_min && environment.temperature <= R.required_atmos_temp_max) // Too hot, or too cold.
|
||||
if(R.reagents && R.reagents.len)
|
||||
if(!reagent_container || R.check_reagents(reagent_container.reagents) == -1) // It doesn't have a reagent storage when it needs it, or it's lacking what is needed.
|
||||
continue
|
||||
if(R.items && R.items.len)
|
||||
if(!(storage && storage.len) || R.check_items(src) == -1) // It's empty, or it doesn't contain what is needed.
|
||||
continue
|
||||
possible_recipes += R
|
||||
max_prob += R.probability
|
||||
|
||||
if(possible_recipes.len)
|
||||
var/local_prob = rand(0, max_prob - 1)%max_prob
|
||||
var/cumulative = 0
|
||||
for(var/datum/recipe/particle_smasher/R in possible_recipes)
|
||||
cumulative += R.probability
|
||||
if(local_prob < cumulative)
|
||||
successful_craft = TRUE
|
||||
DoCraft(R)
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/particle_smasher/proc/DoCraft(var/datum/recipe/particle_smasher/recipe)
|
||||
if(!successful_craft || !recipe)
|
||||
return
|
||||
|
||||
qdel(target)
|
||||
target = null
|
||||
|
||||
if(reagent_container)
|
||||
reagent_container.reagents.clear_reagents()
|
||||
|
||||
if(recipe.items && recipe.items.len)
|
||||
for(var/obj/item/I in storage)
|
||||
for(var/item_type in recipe.items)
|
||||
if(istype(I, item_type))
|
||||
storage -= I
|
||||
qdel(I)
|
||||
break
|
||||
|
||||
var/result = recipe.result
|
||||
var/obj/item/stack/material/M = new result(src)
|
||||
target = M
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/particle_smasher/verb/eject_contents()
|
||||
set src in view(1)
|
||||
set category = "Object"
|
||||
set name = "Eject Particle Focus Contents"
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
DumpContents()
|
||||
|
||||
/obj/machinery/particle_smasher/proc/DumpContents()
|
||||
target = null
|
||||
reagent_container = null
|
||||
successful_craft = FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/item/I in contents)
|
||||
if(I in storage)
|
||||
storage -= I
|
||||
I.forceMove(T)
|
||||
update_icon()
|
||||
|
||||
/*
|
||||
* The special recipe datums used for the particle smasher.
|
||||
*/
|
||||
|
||||
/datum/recipe/particle_smasher
|
||||
//reagents //Commented out due to inheritance. Still a list, used as ex: // example: = list("pacid" = 5)
|
||||
//items //Commented out due to inheritance. Still a list, used as ex: // example: = list(/obj/item/weapon/tool/crowbar, /obj/item/weapon/welder) Place /foo/bar before /foo. Do not include fruit. Maximum of 3 items.
|
||||
|
||||
result = /obj/item/stack/material/iron // The sheet this will produce.
|
||||
var/required_material = /obj/item/stack/material/iron // The required material sheet.
|
||||
var/required_energy_min = 0 // The minimum energy this recipe can process at.
|
||||
var/required_energy_max = 600 // The maximum energy this recipe can process at.
|
||||
var/required_atmos_temp_min = 0 // The minimum ambient atmospheric temperature required, in kelvin.
|
||||
var/required_atmos_temp_max = 600 // The maximum ambient atmospheric temperature required, in kelvin.
|
||||
var/probability = 0 // The probability for the recipe to be produced. 0 will make it impossible.
|
||||
|
||||
/datum/recipe/particle_smasher/check_items(var/obj/container as obj)
|
||||
. = 1
|
||||
if (items && items.len)
|
||||
var/list/checklist = list()
|
||||
checklist = items.Copy() // You should really trust Copy
|
||||
if(istype(container, /obj/machinery/particle_smasher))
|
||||
var/obj/machinery/particle_smasher/machine = container
|
||||
for(var/obj/O in machine.storage)
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||
continue // Fruit is handled in check_fruit().
|
||||
var/found = 0
|
||||
for(var/i = 1; i < checklist.len+1; i++)
|
||||
var/item_type = checklist[i]
|
||||
if (istype(O,item_type))
|
||||
checklist.Cut(i, i+1)
|
||||
found = 1
|
||||
break
|
||||
if (!found)
|
||||
. = 0
|
||||
if (checklist.len)
|
||||
. = -1
|
||||
return .
|
||||
|
||||
/datum/recipe/particle_smasher/deuterium_tritium
|
||||
reagents = list("hydrogen" = 15)
|
||||
|
||||
result = /obj/item/stack/material/tritium
|
||||
required_material = /obj/item/stack/material/deuterium
|
||||
|
||||
required_energy_min = 200
|
||||
required_energy_max = 400
|
||||
|
||||
required_atmos_temp_max = 200
|
||||
probability = 30
|
||||
|
||||
/datum/recipe/particle_smasher/verdantium_morphium
|
||||
result = /obj/item/stack/material/morphium
|
||||
required_material = /obj/item/stack/material/verdantium
|
||||
|
||||
required_energy_min = 400
|
||||
required_energy_max = 500
|
||||
probability = 20
|
||||
|
||||
/datum/recipe/particle_smasher/plasteel_morphium
|
||||
items = list(/obj/item/prop/alien/junk)
|
||||
|
||||
result = /obj/item/stack/material/morphium
|
||||
required_material = /obj/item/stack/material/plasteel
|
||||
|
||||
required_energy_min = 100
|
||||
required_energy_max = 300
|
||||
probability = 10
|
||||
|
||||
/datum/recipe/particle_smasher/osmium_lead
|
||||
reagents = list("tungsten" = 10)
|
||||
|
||||
result = /obj/item/stack/material/lead
|
||||
required_material = /obj/item/stack/material/osmium
|
||||
|
||||
required_energy_min = 200
|
||||
required_energy_max = 400
|
||||
|
||||
required_atmos_temp_min = 1000
|
||||
required_atmos_temp_max = 8000
|
||||
probability = 50
|
||||
|
||||
/datum/recipe/particle_smasher/phoron_valhollide
|
||||
reagents = list("phoron" = 10, "pacid" = 10)
|
||||
|
||||
result = /obj/item/stack/material/valhollide
|
||||
required_material = /obj/item/stack/material/phoron
|
||||
|
||||
required_energy_min = 300
|
||||
required_energy_max = 500
|
||||
|
||||
required_atmos_temp_min = 1
|
||||
required_atmos_temp_max = 100
|
||||
probability = 10
|
||||
|
||||
/datum/recipe/particle_smasher/valhollide_supermatter
|
||||
reagents = list("phoron" = 300)
|
||||
|
||||
result = /obj/item/stack/material/supermatter
|
||||
required_material = /obj/item/stack/material/valhollide
|
||||
|
||||
required_energy_min = 575
|
||||
required_energy_max = 600
|
||||
|
||||
required_atmos_temp_min = 3000
|
||||
required_atmos_temp_max = 10000
|
||||
probability = 1
|
||||
@@ -144,11 +144,6 @@
|
||||
charge -= output_used*SMESRATE // reduce the storage (may be recovered in /restore() if excessive)
|
||||
|
||||
add_avail(output_used) // add output to powernet (smes side)
|
||||
|
||||
if(output_used < 0.0001) // either from no charge or set to 0
|
||||
outputting(0)
|
||||
investigate_log("lost power and turned <font color='red'>off</font>","singulo")
|
||||
log_game("SMES([x],[y],[z]) Power depleted.")
|
||||
else if(output_attempt && output_level > 0)
|
||||
outputting = 1
|
||||
else
|
||||
|
||||
+38
-21
@@ -1,4 +1,7 @@
|
||||
#define SOLAR_MAX_DIST 40
|
||||
#define SOLAR_AUTO_START_NO 0 // Will never start itself.
|
||||
#define SOLAR_AUTO_START_YES 1 // Will always start itself.
|
||||
#define SOLAR_AUTO_START_CONFIG 2 // Will start itself if config allows it (default is no).
|
||||
|
||||
GLOBAL_VAR_INIT(solar_gen_rate, 1500)
|
||||
GLOBAL_LIST_EMPTY(solars_list)
|
||||
@@ -293,9 +296,23 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
var/nexttime = 0 // time for a panel to rotate of 1° in manual tracking
|
||||
var/obj/machinery/power/tracker/connected_tracker = null
|
||||
var/list/connected_panels = list()
|
||||
var/auto_start = SOLAR_AUTO_START_NO
|
||||
|
||||
/obj/machinery/power/solar_control/drain_power()
|
||||
return -1
|
||||
// Used for mapping in solar arrays which automatically start itself.
|
||||
// Generally intended for far away and remote locations, where player intervention is rare.
|
||||
// In the interest of backwards compatability, this isn't named auto_start, as doing so might break downstream maps.
|
||||
/obj/machinery/power/solar_control/autostart
|
||||
auto_start = SOLAR_AUTO_START_YES
|
||||
|
||||
// Similar to above but controlled by the configuration file.
|
||||
// Intended to be used for the main solar arrays, so individual servers can choose to have them start automatically or require manual intervention.
|
||||
/obj/machinery/power/solar_control/config_start
|
||||
auto_start = SOLAR_AUTO_START_CONFIG
|
||||
|
||||
/obj/machinery/power/solar_control/Initialize()
|
||||
. = ..()
|
||||
connect_to_network()
|
||||
set_panels(cdir)
|
||||
|
||||
/obj/machinery/power/solar_control/Destroy()
|
||||
for(var/obj/machinery/power/solar/M in connected_panels)
|
||||
@@ -304,6 +321,25 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
connected_tracker.unset_control()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/solar_control/proc/auto_start(forced = FALSE)
|
||||
// Automatically sets the solars, if allowed.
|
||||
if(forced || auto_start == SOLAR_AUTO_START_YES || (auto_start == SOLAR_AUTO_START_CONFIG && config.autostart_solars) )
|
||||
track = 2 // Auto tracking mode.
|
||||
search_for_connected()
|
||||
if(connected_tracker)
|
||||
connected_tracker.set_angle(SSsun.sun.angle)
|
||||
set_panels(cdir)
|
||||
|
||||
// This would use LateInitialize(), however the powernet does not appear to exist during that time.
|
||||
/hook/roundstart/proc/auto_start_solars()
|
||||
for(var/a in GLOB.solars_list)
|
||||
var/obj/machinery/power/solar_control/SC = a
|
||||
SC.auto_start()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/solar_control/drain_power()
|
||||
return -1
|
||||
|
||||
/obj/machinery/power/solar_control/disconnect_from_network()
|
||||
..()
|
||||
GLOB.solars_list.Remove(src)
|
||||
@@ -346,13 +382,6 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
set_panels(cdir)
|
||||
updateDialog()
|
||||
|
||||
|
||||
/obj/machinery/power/solar_control/Initialize()
|
||||
. = ..()
|
||||
if(!powernet) return
|
||||
set_panels(cdir)
|
||||
connect_to_network()
|
||||
|
||||
/obj/machinery/power/solar_control/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
@@ -528,18 +557,6 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
broken()
|
||||
return
|
||||
|
||||
// Used for mapping in solar array which automatically starts itself (telecomms, for example)
|
||||
/obj/machinery/power/solar_control/autostart
|
||||
track = 2 // Auto tracking mode
|
||||
|
||||
/obj/machinery/power/solar_control/autostart/New()
|
||||
..()
|
||||
spawn(150) // Wait 15 seconds to ensure everything was set up properly (such as, powernets, solar panels, etc.
|
||||
src.search_for_connected()
|
||||
if(connected_tracker && track == 2)
|
||||
connected_tracker.set_angle(SSsun.sun.angle)
|
||||
src.set_panels(cdir)
|
||||
|
||||
//
|
||||
// MISC
|
||||
//
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
closest_atom = A
|
||||
closest_dist = dist
|
||||
|
||||
else if(closest_mob)
|
||||
else if(closest_machine)
|
||||
continue
|
||||
|
||||
else if(istype(A, /obj/structure/blob))
|
||||
|
||||
@@ -57,25 +57,34 @@
|
||||
T.resources["gold"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["marble"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["diamond"] = 0
|
||||
T.resources["phoron"] = 0
|
||||
T.resources["osmium"] = 0
|
||||
T.resources["hydrogen"] = 0
|
||||
T.resources["verdantium"] = 0
|
||||
T.resources["lead"] = 0
|
||||
else if(current_cell < deep_val) // Rare metals.
|
||||
T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["uranium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["phoron"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["osmium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["hydrogen"] = 0
|
||||
T.resources["diamond"] = 0
|
||||
T.resources["hematite"] = 0
|
||||
T.resources["marble"] = 0
|
||||
else // Deep metals.
|
||||
T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX)
|
||||
T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["phoron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["osmium"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX)
|
||||
T.resources["marble"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_HIGH_MAX)
|
||||
T.resources["hematite"] = 0
|
||||
T.resources["gold"] = 0
|
||||
T.resources["silver"] = 0
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/list/data = null
|
||||
var/volume = 0
|
||||
var/metabolism = REM // This would be 0.2 normally
|
||||
var/list/filtered_organs = list() // Organs that will slow the processing of this chemical.
|
||||
var/mrate_static = FALSE //If the reagent should always process at the same speed, regardless of species, make this TRUE
|
||||
var/ingest_met = 0
|
||||
var/touch_met = 0
|
||||
@@ -69,6 +70,22 @@
|
||||
// Metabolism
|
||||
removed *= active_metab.metabolism_speed
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.has_organ[O_HEART])
|
||||
var/obj/item/organ/internal/heart/Pump = H.internal_organs_by_name[O_HEART]
|
||||
if(!Pump)
|
||||
removed *= 0.1
|
||||
else if(Pump.standard_pulse_level == PULSE_NONE) // No pulse normally means chemicals process a little bit slower than normal.
|
||||
removed *= 0.8
|
||||
else // Otherwise, chemicals process as per percentage of your current pulse, or, if you have no pulse but are alive, by a miniscule amount.
|
||||
removed *= max(0.1, H.pulse / Pump.standard_pulse_level)
|
||||
if(filtered_organs && filtered_organs.len)
|
||||
for(var/organ_tag in filtered_organs)
|
||||
var/obj/item/organ/internal/O = H.internal_organs_by_name[organ_tag]
|
||||
if(O && !O.is_broken() && prob(max(0, O.max_damage - O.damage)))
|
||||
removed *= 0.8
|
||||
|
||||
if(ingest_met && (active_metab.metabolism_class == CHEM_INGEST))
|
||||
removed = ingest_met
|
||||
if(touch_met && (active_metab.metabolism_class == CHEM_TOUCH))
|
||||
|
||||
@@ -966,6 +966,14 @@
|
||||
for(var/obj/effect/decal/cleanable/blood/B in T)
|
||||
qdel(B)
|
||||
|
||||
/datum/reagent/sterilizine/touch_mob(var/mob/living/L, var/amount)
|
||||
if(istype(L))
|
||||
if(istype(L, /mob/living/simple_mob/slime))
|
||||
var/mob/living/simple_mob/slime/S = L
|
||||
S.adjustToxLoss(rand(15, 25) * amount) // Does more damage than water.
|
||||
S.visible_message("<span class='warning'>[S]'s flesh sizzles where the fluid touches it!</span>", "<span class='danger'>Your flesh burns in the fluid!</span>")
|
||||
remove_self(amount)
|
||||
|
||||
/datum/reagent/leporazine
|
||||
name = "Leporazine"
|
||||
id = "leporazine"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#CF3600"
|
||||
metabolism = REM * 0.25 // 0.05 by default. Hopefully enough to get some help, or die horribly, whatever floats your boat
|
||||
filtered_organs = list(O_LIVER, O_KIDNEYS)
|
||||
var/strength = 4 // How much damage it deals per unit
|
||||
|
||||
/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
@@ -253,6 +254,7 @@
|
||||
color = "#669900"
|
||||
metabolism = REM
|
||||
strength = 3
|
||||
mrate_static = TRUE
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
..()
|
||||
@@ -879,3 +881,47 @@ datum/reagent/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/re
|
||||
randmuti(M)
|
||||
M << "<span class='warning'>You feel odd!</span>"
|
||||
M.apply_effect(6 * removed, IRRADIATE, 0)
|
||||
|
||||
/*
|
||||
* Hostile nanomachines.
|
||||
* Unscannable, and commonly all look the same.
|
||||
*/
|
||||
|
||||
/datum/reagent/shredding_nanites
|
||||
name = "Restorative Nanites"
|
||||
id = "shredding_nanites"
|
||||
description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be malfunctioning."
|
||||
taste_description = "metal"
|
||||
reagent_state = SOLID
|
||||
color = "#555555"
|
||||
metabolism = REM * 4 // Nanomachines. Fast.
|
||||
|
||||
/datum/reagent/shredding_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustBruteLoss(4 * removed)
|
||||
M.adjustOxyLoss(4 * removed)
|
||||
|
||||
/datum/reagent/irradiated_nanites
|
||||
name = "Restorative Nanites"
|
||||
id = "irradiated_nanites"
|
||||
description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be malfunctioning."
|
||||
taste_description = "metal"
|
||||
reagent_state = SOLID
|
||||
color = "#555555"
|
||||
metabolism = REM * 4
|
||||
|
||||
/datum/reagent/irradiated_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
radiation_repository.radiate(get_turf(M), 20) // Irradiate people around you.
|
||||
M.radiation = max(M.radiation + 5 * removed, 0) // Irradiate you. Because it's inside you.
|
||||
|
||||
/datum/reagent/neurophage_nanites
|
||||
name = "Restorative Nanites"
|
||||
id = "neurophage_nanites"
|
||||
description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be completely hostile."
|
||||
taste_description = "metal"
|
||||
reagent_state = SOLID
|
||||
color = "#555555"
|
||||
metabolism = REM * 4
|
||||
|
||||
/datum/reagent/neurophage_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.adjustBrainLoss(2 * removed) // Their job is to give you a bad time.
|
||||
M.adjustBruteLoss(2 * removed)
|
||||
|
||||
@@ -171,7 +171,9 @@
|
||||
return
|
||||
|
||||
var/cycle_time = injtime*0.33 //33% of the time slept between 5u doses
|
||||
var/warmup_time = cycle_time //If the target is another mob, this gets overwritten
|
||||
var/warmup_time = 0 //0 for containers
|
||||
if(ismob(target))
|
||||
warmup_time = cycle_time //If the target is another mob, this gets overwritten
|
||||
|
||||
if(ismob(target) && target != user)
|
||||
warmup_time = injtime*0.66 // Otherwise 66% of the time is warmup
|
||||
@@ -200,14 +202,14 @@
|
||||
|
||||
var/trans = 0
|
||||
var/contained = reagentlist()
|
||||
while(reagents.total_volume)
|
||||
if(ismob(target))
|
||||
if(ismob(target))
|
||||
while(reagents.total_volume)
|
||||
trans += reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
else
|
||||
trans += reagents.trans_to_obj(target, amount_per_transfer_from_this)
|
||||
update_icon()
|
||||
if(!reagents.total_volume || !do_after(user,cycle_time,target))
|
||||
break
|
||||
update_icon()
|
||||
if(!reagents.total_volume || !do_after(user,cycle_time,target))
|
||||
break
|
||||
else
|
||||
trans += reagents.trans_to_obj(target, amount_per_transfer_from_this)
|
||||
|
||||
if (reagents.total_volume <= 0 && mode == SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define OFF 0
|
||||
#define FORWARDS 1
|
||||
#define BACKWARDS 2
|
||||
#define BACKWARDS -1
|
||||
|
||||
//conveyor2 is pretty much like the original, except it supports corners, but not diverters.
|
||||
//note that corner pieces transfer stuff clockwise when running forward, and anti-clockwise backwards.
|
||||
@@ -32,12 +32,7 @@
|
||||
if(newdir)
|
||||
set_dir(newdir)
|
||||
|
||||
if(dir & (dir-1)) // Diagonal. Forwards is *away* from dir, curving to the right.
|
||||
forwards = turn(dir, 135)
|
||||
backwards = turn(dir, 45)
|
||||
else
|
||||
forwards = dir
|
||||
backwards = turn(dir, 180)
|
||||
update_dir()
|
||||
|
||||
if(on)
|
||||
operating = FORWARDS
|
||||
@@ -60,6 +55,18 @@
|
||||
operating = OFF
|
||||
update()
|
||||
|
||||
/obj/machinery/conveyor/set_dir()
|
||||
.=..()
|
||||
update_dir()
|
||||
|
||||
/obj/machinery/conveyor/proc/update_dir()
|
||||
if(!(dir in cardinal)) // Diagonal. Forwards is *away* from dir, curving to the right.
|
||||
forwards = turn(dir, 135)
|
||||
backwards = turn(dir, 45)
|
||||
else
|
||||
forwards = dir
|
||||
backwards = turn(dir, 180)
|
||||
|
||||
/obj/machinery/conveyor/proc/update()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "conveyor-broken"
|
||||
|
||||
@@ -16,7 +16,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
var/mat_efficiency = 1
|
||||
var/speed = 1
|
||||
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, MAT_PLASTEEL = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, MAT_LEAD = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0)
|
||||
|
||||
hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER)
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
@@ -68,7 +70,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
mat_efficiency = 1 - (T - 1) / 4
|
||||
mat_efficiency = max(1 - (T - 1) / 4, 0.2)
|
||||
speed = T
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/update_icon()
|
||||
@@ -143,12 +145,12 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
max_res_amount -= materials[mat]
|
||||
|
||||
if(materials[S.material.name] + amnt <= max_res_amount)
|
||||
if(S && S.amount >= 1)
|
||||
if(S && S.get_amount() >= 1)
|
||||
var/count = 0
|
||||
overlays += "fab-load-metal"
|
||||
spawn(10)
|
||||
overlays -= "fab-load-metal"
|
||||
while(materials[S.material.name] + amnt <= max_res_amount && S.amount >= 1)
|
||||
while(materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1)
|
||||
materials[S.material.name] += amnt
|
||||
S.use(1)
|
||||
count++
|
||||
|
||||
@@ -16,4 +16,11 @@
|
||||
req_tech = list(TECH_ILLEGAL = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 500)
|
||||
build_path = /obj/item/weapon/storage/box/syndie_kit/chameleon
|
||||
sort_string = "VASBA"
|
||||
sort_string = "VASBA"
|
||||
|
||||
/datum/design/item/weapon/esword
|
||||
id = "chargesword"
|
||||
req_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 4, TECH_ENGINEERING = 5, TECH_ILLEGAL = 4, TECH_ANOMALY = 1)
|
||||
materials = list(MAT_PLASTEEL = 3500, "glass" = 1000, MAT_LEAD = 2250, MAT_METALHYDROGEN = 500)
|
||||
build_path = /obj/item/weapon/melee/energy/sword/charge
|
||||
sort_string = "VASCA"
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Contains Precursor and Anomalous designs for the Protolathe.
|
||||
*/
|
||||
|
||||
/datum/design/item/precursor/AssembleDesignName()
|
||||
..()
|
||||
name = "Alien prototype ([item_name])"
|
||||
|
||||
/datum/design/item/precursor/AssembleDesignDesc()
|
||||
if(!desc)
|
||||
if(build_path)
|
||||
var/obj/item/I = build_path
|
||||
desc = initial(I.desc)
|
||||
..()
|
||||
|
||||
/datum/design/item/precursor/crowbar
|
||||
name = "Hybrid Crowbar"
|
||||
desc = "A tool utilizing cutting edge modern technology, and ancient component designs."
|
||||
id = "hybridcrowbar"
|
||||
req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1)
|
||||
materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_GOLD = 250, MAT_URANIUM = 2500)
|
||||
build_path = /obj/item/weapon/tool/crowbar/hybrid
|
||||
sort_string = "PATAC"
|
||||
|
||||
/datum/design/item/precursor/wrench
|
||||
name = "Hybrid Wrench"
|
||||
desc = "A tool utilizing cutting edge modern technology, and ancient component designs."
|
||||
id = "hybridwrench"
|
||||
req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_PRECURSOR = 1)
|
||||
materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_SILVER = 300, MAT_URANIUM = 2000)
|
||||
build_path = /obj/item/weapon/tool/wrench/hybrid
|
||||
sort_string = "PATAW"
|
||||
|
||||
/datum/design/item/precursor/screwdriver
|
||||
name = "Hybrid Screwdriver"
|
||||
desc = "A tool utilizing cutting edge modern technology, and ancient component designs."
|
||||
id = "hybridscrewdriver"
|
||||
req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_PRECURSOR = 1)
|
||||
materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_PLASTIC = 8000, MAT_DIAMOND = 2000)
|
||||
build_path = /obj/item/weapon/tool/screwdriver/hybrid
|
||||
sort_string = "PATAS"
|
||||
|
||||
/datum/design/item/precursor/wirecutters
|
||||
name = "Hybrid Wirecutters"
|
||||
desc = "A tool utilizing cutting edge modern technology, and ancient component designs."
|
||||
id = "hybridwirecutters"
|
||||
req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_PHORON = 2, TECH_PRECURSOR = 1)
|
||||
materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_PLASTIC = 8000, MAT_PHORON = 2750, MAT_DIAMOND = 2000)
|
||||
build_path = /obj/item/weapon/tool/wirecutters/hybrid
|
||||
sort_string = "PATBW"
|
||||
|
||||
/datum/design/item/precursor/welder
|
||||
name = "Hybrid Welding Tool"
|
||||
desc = "A tool utilizing cutting edge modern technology, and ancient component designs."
|
||||
id = "hybridwelder"
|
||||
req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PHORON = 3, TECH_MAGNET = 5, TECH_PRECURSOR = 1)
|
||||
materials = list(MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_METALHYDROGEN = 4750, MAT_URANIUM = 6000)
|
||||
build_path = /obj/item/weapon/weldingtool/experimental/hybrid
|
||||
sort_string = "PATCW"
|
||||
|
||||
/datum/design/item/anomaly/AssembleDesignName()
|
||||
..()
|
||||
name = "Anomalous prototype ([item_name])"
|
||||
|
||||
/datum/design/item/anomaly/AssembleDesignDesc()
|
||||
if(!desc)
|
||||
if(build_path)
|
||||
var/obj/item/I = build_path
|
||||
desc = initial(I.desc)
|
||||
..()
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
/datum/design/item/stock_part
|
||||
build_type = PROTOLATHE
|
||||
time = 3 //Sets an independent time for stock parts, currently one third normal print time.
|
||||
|
||||
/datum/design/item/stock_part/AssembleDesignName()
|
||||
..()
|
||||
@@ -34,6 +35,20 @@
|
||||
build_path = /obj/item/weapon/stock_parts/capacitor/super
|
||||
sort_string = "CAAAC"
|
||||
|
||||
/datum/design/item/stock_part/hyper_capacitor
|
||||
id = "hyper_capacitor"
|
||||
req_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_GLASS = 100, MAT_VERDANTIUM = 30, MAT_DURASTEEL = 25)
|
||||
build_path = /obj/item/weapon/stock_parts/capacitor/hyper
|
||||
sort_string = "CAAAD"
|
||||
|
||||
/datum/design/item/stock_part/omni_capacitor
|
||||
id = "omni_capacitor"
|
||||
req_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_DIAMOND = 1000, MAT_GLASS = 1000, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100)
|
||||
build_path = /obj/item/weapon/stock_parts/capacitor/omni
|
||||
sort_string = "CAAAE"
|
||||
|
||||
/datum/design/item/stock_part/micro_mani
|
||||
id = "micro_mani"
|
||||
req_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1)
|
||||
@@ -55,6 +70,20 @@
|
||||
build_path = /obj/item/weapon/stock_parts/manipulator/pico
|
||||
sort_string = "CAABC"
|
||||
|
||||
/datum/design/item/stock_part/hyper_mani
|
||||
id = "hyper_mani"
|
||||
req_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 50)
|
||||
build_path = /obj/item/weapon/stock_parts/manipulator/hyper
|
||||
sort_string = "CAABD"
|
||||
|
||||
/datum/design/item/stock_part/omni_mani
|
||||
id = "omni_mani"
|
||||
req_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_PLASTEEL = 500, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100)
|
||||
build_path = /obj/item/weapon/stock_parts/manipulator/omni
|
||||
sort_string = "CAABE"
|
||||
|
||||
/datum/design/item/stock_part/basic_matter_bin
|
||||
id = "basic_matter_bin"
|
||||
req_tech = list(TECH_MATERIAL = 1)
|
||||
@@ -76,6 +105,20 @@
|
||||
build_path = /obj/item/weapon/stock_parts/matter_bin/super
|
||||
sort_string = "CAACC"
|
||||
|
||||
/datum/design/item/stock_part/hyper_matter_bin
|
||||
id = "hyper_matter_bin"
|
||||
req_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_VERDANTIUM = 60, MAT_DURASTEEL = 75)
|
||||
build_path = /obj/item/weapon/stock_parts/matter_bin/hyper
|
||||
sort_string = "CAACD"
|
||||
|
||||
/datum/design/item/stock_part/omni_matter_bin
|
||||
id = "omni_matter_bin"
|
||||
req_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_PLASTEEL = 100, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100)
|
||||
build_path = /obj/item/weapon/stock_parts/matter_bin/omni
|
||||
sort_string = "CAACE"
|
||||
|
||||
/datum/design/item/stock_part/basic_micro_laser
|
||||
id = "basic_micro_laser"
|
||||
req_tech = list(TECH_MAGNET = 1)
|
||||
@@ -97,6 +140,20 @@
|
||||
build_path = /obj/item/weapon/stock_parts/micro_laser/ultra
|
||||
sort_string = "CAADC"
|
||||
|
||||
/datum/design/item/stock_part/hyper_micro_laser
|
||||
id = "hyper_micro_laser"
|
||||
req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 6, TECH_ARCANE = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_GLASS = 20, MAT_URANIUM = 30, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 100)
|
||||
build_path = /obj/item/weapon/stock_parts/micro_laser/hyper
|
||||
sort_string = "CAADD"
|
||||
|
||||
/datum/design/item/stock_part/omni_micro_laser
|
||||
id = "omni_micro_laser"
|
||||
req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 7, TECH_PRECURSOR = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_GLASS = 500, MAT_URANIUM = 2000, MAT_MORPHIUM = 50, MAT_DURASTEEL = 100)
|
||||
build_path = /obj/item/weapon/stock_parts/micro_laser/omni
|
||||
sort_string = "CAADE"
|
||||
|
||||
/datum/design/item/stock_part/basic_sensor
|
||||
id = "basic_sensor"
|
||||
req_tech = list(TECH_MAGNET = 1)
|
||||
@@ -118,6 +175,20 @@
|
||||
build_path = /obj/item/weapon/stock_parts/scanning_module/phasic
|
||||
sort_string = "CAAEC"
|
||||
|
||||
/datum/design/item/stock_part/hyper_sensor
|
||||
id = "hyper_sensor"
|
||||
req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 4, TECH_ARCANE = 1)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, MAT_GLASS = 20, MAT_SILVER = 50, MAT_VERDANTIUM = 40, MAT_DURASTEEL = 50)
|
||||
build_path = /obj/item/weapon/stock_parts/scanning_module/hyper
|
||||
sort_string = "CAAED"
|
||||
|
||||
/datum/design/item/stock_part/omni_sensor
|
||||
id = "omni_sensor"
|
||||
req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 5, TECH_PRECURSOR = 1)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, MAT_PLASTEEL = 500, MAT_GLASS = 750, MAT_SILVER = 500, MAT_MORPHIUM = 60, MAT_DURASTEEL = 100)
|
||||
build_path = /obj/item/weapon/stock_parts/scanning_module/omni
|
||||
sort_string = "CAAEE"
|
||||
|
||||
/datum/design/item/stock_part/subspace_ansible
|
||||
id = "s-ansible"
|
||||
req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2)
|
||||
@@ -167,7 +238,7 @@
|
||||
build_path = /obj/item/weapon/stock_parts/subspace/transmitter
|
||||
sort_string = "UAAAG"
|
||||
|
||||
// RPED lives here because it handles stock parts
|
||||
// RPEDs live here because they handle stock parts
|
||||
/datum/design/item/stock_part/RPED
|
||||
name = "Rapid Part Exchange Device"
|
||||
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
|
||||
@@ -175,4 +246,13 @@
|
||||
req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 5000)
|
||||
build_path = /obj/item/weapon/storage/part_replacer
|
||||
sort_string = "CBAAA"
|
||||
sort_string = "CBAAA"
|
||||
|
||||
/datum/design/item/stock_part/ARPED
|
||||
name = "Advanced Rapid Part Exchange Device"
|
||||
desc = "Special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity."
|
||||
id = "arped"
|
||||
req_tech = list(TECH_ENGINEERING = 5, TECH_MATERIAL = 5)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, "glass" = 10000)
|
||||
build_path = /obj/item/weapon/storage/part_replacer/adv
|
||||
sort_string = "CBAAB"
|
||||
@@ -223,6 +223,67 @@
|
||||
time = 60
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 37500, "uranium" = 7500)
|
||||
|
||||
/datum/design/item/mechfab/janus
|
||||
category = "Janus"
|
||||
req_tech = list(TECH_MATERIAL = 7, TECH_BLUESPACE = 5, TECH_MAGNET = 6, TECH_PHORON = 3, TECH_ARCANE = 1, TECH_PRECURSOR = 2)
|
||||
|
||||
/datum/design/item/mechfab/janus/chassis
|
||||
name = "Janus Chassis"
|
||||
id = "janus_chassis"
|
||||
build_path = /obj/item/mecha_parts/chassis/janus
|
||||
time = 100
|
||||
materials = list(MAT_DURASTEEL = 19000, MAT_MORPHIUM = 10500, MAT_PLASTEEL = 5500, MAT_LEAD = 2500)
|
||||
req_tech = list(TECH_MATERIAL = 7, TECH_BLUESPACE = 5, TECH_MAGNET = 6, TECH_PHORON = 3, TECH_ARCANE = 1, TECH_PRECURSOR = 3)
|
||||
|
||||
/datum/design/item/mechfab/janus/torso
|
||||
name = "Imperion Torso"
|
||||
id = "janus_torso"
|
||||
build_path = /obj/item/mecha_parts/part/janus_torso
|
||||
time = 300
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, MAT_DURASTEEL = 8000, MAT_MORPHIUM = 10000, MAT_GOLD = 5000, MAT_VERDANTIUM = 5000)
|
||||
|
||||
/datum/design/item/mechfab/janus/head
|
||||
name = "Imperion Head"
|
||||
id = "janus_head"
|
||||
build_path = /obj/item/mecha_parts/part/janus_head
|
||||
time = 200
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 6000, MAT_GOLD = 5000)
|
||||
|
||||
/datum/design/item/mechfab/janus/left_arm
|
||||
name = "Prototype Gygax Left Arm"
|
||||
id = "janus_left_arm"
|
||||
build_path = /obj/item/mecha_parts/part/janus_left_arm
|
||||
time = 200
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_DIAMOND = 7000)
|
||||
|
||||
/datum/design/item/mechfab/janus/right_arm
|
||||
name = "Prototype Gygax Right Arm"
|
||||
id = "janus_right_arm"
|
||||
build_path = /obj/item/mecha_parts/part/janus_right_arm
|
||||
time = 200
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_DIAMOND = 7000)
|
||||
|
||||
/datum/design/item/mechfab/janus/left_leg
|
||||
name = "Prototype Durand Left Leg"
|
||||
id = "janus_left_leg"
|
||||
build_path = /obj/item/mecha_parts/part/janus_left_leg
|
||||
time = 200
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_URANIUM = 7000)
|
||||
|
||||
/datum/design/item/mechfab/janus/right_leg
|
||||
name = "Prototype Durand Right Leg"
|
||||
id = "janus_right_leg"
|
||||
build_path = /obj/item/mecha_parts/part/janus_right_leg
|
||||
time = 200
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 30000, MAT_METALHYDROGEN = 3000, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_URANIUM = 7000)
|
||||
|
||||
/datum/design/item/mechfab/janus/phase_coil
|
||||
name = "Janus Phase Coil"
|
||||
id = "janus_coil"
|
||||
build_path = /obj/item/prop/alien/phasecoil
|
||||
time = 600
|
||||
materials = list(MAT_SUPERMATTER = 2000, MAT_PLASTEEL = 60000, MAT_URANIUM = 3250, MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_GOLD = 5000, MAT_VERDANTIUM = 5000, MAT_DIAMOND = 10000, MAT_LEAD = 15000)
|
||||
|
||||
/datum/design/item/mecha
|
||||
build_type = MECHFAB
|
||||
category = "Exosuit Equipment"
|
||||
|
||||
@@ -284,6 +284,10 @@
|
||||
id = "armour"
|
||||
build_path = /obj/item/robot_parts/robot_component/armour
|
||||
|
||||
/datum/design/item/prosfab/cyborg/component/ai_shell
|
||||
name = "AI Remote Interface"
|
||||
id = "mmi_ai_shell"
|
||||
build_path = /obj/item/device/mmi/inert/ai_remote
|
||||
|
||||
//////////////////// Cyborg Modules ////////////////////
|
||||
/datum/design/item/prosfab/robot_upgrade
|
||||
@@ -353,4 +357,85 @@
|
||||
id = "borg_language_module"
|
||||
req_tech = list(TECH_DATA = 6, TECH_MATERIAL = 6)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 25000, "glass" = 3000, "gold" = 350)
|
||||
build_path = /obj/item/borg/upgrade/language
|
||||
build_path = /obj/item/borg/upgrade/language
|
||||
|
||||
// Synthmorph Bags.
|
||||
|
||||
/datum/design/item/prosfab/synthmorphbag
|
||||
name = "Synthmorph Storage Bag"
|
||||
desc = "Used to store or slowly defragment an FBP."
|
||||
id = "misc_synth_bag"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 250, "glass" = 250, "plastic" = 2000)
|
||||
build_path = /obj/item/bodybag/cryobag/robobag
|
||||
|
||||
/datum/design/item/prosfab/badge_nt
|
||||
name = "NanoTrasen Tag"
|
||||
desc = "Used to identify an empty NanoTrasen FBP."
|
||||
id = "misc_synth_bag_tag_nt"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag
|
||||
|
||||
/datum/design/item/prosfab/badge_morph
|
||||
name = "Morpheus Tag"
|
||||
desc = "Used to identify an empty Morpheus FBP."
|
||||
id = "misc_synth_bag_tag_morph"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/morpheus
|
||||
|
||||
/datum/design/item/prosfab/badge_wardtaka
|
||||
name = "Ward-Takahashi Tag"
|
||||
desc = "Used to identify an empty Ward-Takahashi FBP."
|
||||
id = "misc_synth_bag_tag_wardtaka"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/wardtaka
|
||||
|
||||
/datum/design/item/prosfab/badge_zenghu
|
||||
name = "Zeng-Hu Tag"
|
||||
desc = "Used to identify an empty Zeng-Hu FBP."
|
||||
id = "misc_synth_bag_tag_zenghu"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/zenghu
|
||||
|
||||
/datum/design/item/prosfab/badge_gilthari
|
||||
name = "Gilthari Tag"
|
||||
desc = "Used to identify an empty Gilthari FBP."
|
||||
id = "misc_synth_bag_tag_gilthari"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "gold" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/gilthari
|
||||
req_tech = list(TECH_MATERIAL = 4, TECH_ILLEGAL = 2, TECH_PHORON = 2)
|
||||
|
||||
/datum/design/item/prosfab/badge_veymed
|
||||
name = "Vey-Medical Tag"
|
||||
desc = "Used to identify an empty Vey-Medical FBP."
|
||||
id = "misc_synth_bag_tag_veymed"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/veymed
|
||||
req_tech = list(TECH_MATERIAL = 3, TECH_ILLEGAL = 1, TECH_BIO = 4)
|
||||
|
||||
/datum/design/item/prosfab/badge_hephaestus
|
||||
name = "Hephaestus Tag"
|
||||
desc = "Used to identify an empty Hephaestus FBP."
|
||||
id = "misc_synth_bag_tag_heph"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/hephaestus
|
||||
|
||||
/datum/design/item/prosfab/badge_grayson
|
||||
name = "Grayson Tag"
|
||||
desc = "Used to identify an empty Grayson FBP."
|
||||
id = "misc_synth_bag_tag_grayson"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/grayson
|
||||
|
||||
/datum/design/item/prosfab/badge_xion
|
||||
name = "Xion Tag"
|
||||
desc = "Used to identify an empty Xion FBP."
|
||||
id = "misc_synth_bag_tag_xion"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 500, "plastic" = 1000)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/xion
|
||||
|
||||
/datum/design/item/prosfab/badge_bishop
|
||||
name = "Bishop Tag"
|
||||
desc = "Used to identify an empty Bishop FBP."
|
||||
id = "misc_synth_bag_tag_bishop"
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 2000, "plastic" = 500)
|
||||
build_path = /obj/item/clothing/accessory/badge/corporate_tag/bishop
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
var/mat_efficiency = 1
|
||||
var/speed = 1
|
||||
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, MAT_PLASTEEL = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, MAT_LEAD = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0)
|
||||
|
||||
hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER)
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/Initialize()
|
||||
. = ..()
|
||||
@@ -71,7 +73,7 @@
|
||||
T = 0
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
T += M.rating
|
||||
mat_efficiency = 1 - (T - 2) / 8
|
||||
mat_efficiency = max(1 - (T - 2) / 8, 0.2)
|
||||
speed = T / 2
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/dismantle()
|
||||
@@ -131,12 +133,12 @@
|
||||
max_res_amount -= materials[mat]
|
||||
|
||||
if(materials[S.material.name] + amnt <= max_res_amount)
|
||||
if(S && S.amount >= 1)
|
||||
if(S && S.get_amount() >= 1)
|
||||
var/count = 0
|
||||
overlays += "fab-load-metal"
|
||||
spawn(10)
|
||||
overlays -= "fab-load-metal"
|
||||
while(materials[S.material.name] + amnt <= max_res_amount && S.amount >= 1)
|
||||
while(materials[S.material.name] + amnt <= max_res_amount && S.get_amount() >= 1)
|
||||
materials[S.material.name] += amnt
|
||||
S.use(1)
|
||||
count++
|
||||
@@ -207,28 +209,17 @@
|
||||
/obj/machinery/r_n_d/protolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
|
||||
var/recursive = amount == -1 ? 1 : 0
|
||||
material = lowertext(material)
|
||||
var/mattype
|
||||
switch(material)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
mattype = /obj/item/stack/material/steel
|
||||
if("glass")
|
||||
mattype = /obj/item/stack/material/glass
|
||||
if("plastic")
|
||||
mattype = /obj/item/stack/material/plastic
|
||||
if("gold")
|
||||
mattype = /obj/item/stack/material/gold
|
||||
if("silver")
|
||||
mattype = /obj/item/stack/material/silver
|
||||
if("osmium")
|
||||
mattype = /obj/item/stack/material/osmium
|
||||
if("diamond")
|
||||
mattype = /obj/item/stack/material/diamond
|
||||
if("phoron")
|
||||
mattype = /obj/item/stack/material/phoron
|
||||
if("uranium")
|
||||
mattype = /obj/item/stack/material/uranium
|
||||
else
|
||||
return
|
||||
var/obj/item/stack/material/mattype
|
||||
var/material/MAT = get_material_by_name(material)
|
||||
|
||||
if(!MAT)
|
||||
return
|
||||
|
||||
mattype = MAT.stack_type
|
||||
|
||||
if(!mattype)
|
||||
return
|
||||
|
||||
var/obj/item/stack/material/S = new mattype(loc)
|
||||
if(amount <= 0)
|
||||
amount = S.max_amount
|
||||
|
||||
@@ -660,6 +660,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<UL>"
|
||||
for(var/M in linked_lathe.materials)
|
||||
var/amount = linked_lathe.materials[M]
|
||||
var/hidden_mat = FALSE
|
||||
for(var/HM in linked_lathe.hidden_materials)
|
||||
if(M == HM && amount == 0)
|
||||
hidden_mat = TRUE
|
||||
break
|
||||
if(hidden_mat)
|
||||
continue
|
||||
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
|
||||
if(amount >= SHEET_MATERIAL_AMOUNT)
|
||||
dat += " || Eject "
|
||||
@@ -745,6 +752,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "<UL>"
|
||||
for(var/M in linked_imprinter.materials)
|
||||
var/amount = linked_imprinter.materials[M]
|
||||
var/hidden_mat = FALSE
|
||||
for(var/HM in linked_imprinter.hidden_materials)
|
||||
if(M == HM && amount == 0)
|
||||
hidden_mat = TRUE
|
||||
break
|
||||
if(hidden_mat)
|
||||
continue
|
||||
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
|
||||
if(amount >= SHEET_MATERIAL_AMOUNT)
|
||||
dat += " || Eject: "
|
||||
|
||||
@@ -11,53 +11,23 @@
|
||||
var/busy = 0
|
||||
var/obj/machinery/computer/rdconsole/linked_console
|
||||
|
||||
var/list/materials = list()
|
||||
var/list/materials = list() // Materials this machine can accept.
|
||||
var/list/hidden_materials = list() // Materials this machine will not display, unless it contains them. Must be in the materials list as well.
|
||||
|
||||
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/machinery/r_n_d/proc/getMaterialType(var/name)
|
||||
switch(name)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
return /obj/item/stack/material/steel
|
||||
if("glass")
|
||||
return /obj/item/stack/material/glass
|
||||
if("plastic")
|
||||
return /obj/item/stack/material/plastic
|
||||
if("gold")
|
||||
return /obj/item/stack/material/gold
|
||||
if("silver")
|
||||
return /obj/item/stack/material/silver
|
||||
if("osmium")
|
||||
return /obj/item/stack/material/osmium
|
||||
if("phoron")
|
||||
return /obj/item/stack/material/phoron
|
||||
if("uranium")
|
||||
return /obj/item/stack/material/uranium
|
||||
if("diamond")
|
||||
return /obj/item/stack/material/diamond
|
||||
var/material/M = get_material_by_name(name)
|
||||
if(M && M.stack_type)
|
||||
return M.stack_type
|
||||
return null
|
||||
|
||||
/obj/machinery/r_n_d/proc/getMaterialName(var/type)
|
||||
switch(type)
|
||||
if(/obj/item/stack/material/steel)
|
||||
return DEFAULT_WALL_MATERIAL
|
||||
if(/obj/item/stack/material/glass)
|
||||
return "glass"
|
||||
if(/obj/item/stack/material/plastic)
|
||||
return "plastic"
|
||||
if(/obj/item/stack/material/gold)
|
||||
return "gold"
|
||||
if(/obj/item/stack/material/silver)
|
||||
return "silver"
|
||||
if(/obj/item/stack/material/osmium)
|
||||
return "osmium"
|
||||
if(/obj/item/stack/material/phoron)
|
||||
return "phoron"
|
||||
if(/obj/item/stack/material/uranium)
|
||||
return "uranium"
|
||||
if(/obj/item/stack/material/diamond)
|
||||
return "diamond"
|
||||
if(istype(type, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = type
|
||||
return M.material.name
|
||||
return null
|
||||
|
||||
/obj/machinery/r_n_d/proc/eject(var/material, var/amount)
|
||||
if(!(material in materials))
|
||||
|
||||
@@ -208,11 +208,17 @@ research holder datum.
|
||||
level = 0
|
||||
|
||||
/datum/tech/arcane
|
||||
name = "Arcane Research"
|
||||
desc = "Research into the occult and arcane field for use in practical science"
|
||||
name = "Anomalous Research"
|
||||
desc = "Study of phenomena that disobey the fundamental laws of this universe."
|
||||
id = TECH_ARCANE
|
||||
level = 0
|
||||
|
||||
/datum/tech/precursor
|
||||
name = "Precursor Research"
|
||||
desc = "The applied study of Precursor Technology, for modern applications."
|
||||
id = TECH_PRECURSOR
|
||||
level = 0
|
||||
|
||||
/obj/item/weapon/disk/tech_disk
|
||||
name = "technology disk"
|
||||
desc = "A disk for storing technology data for further research."
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
M.gib()
|
||||
else if(istype(AM, /mob/zshadow))
|
||||
AM.Destroy() //prevent deleting shadow without deleting shadow's shadows
|
||||
else if(AM.simulated && !(istype(AM, /mob/observer)))
|
||||
qdel(AM)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(prob(75))
|
||||
secondary_effect.ToggleActivate(0)
|
||||
|
||||
icon_num = rand(0, 11)
|
||||
icon_num = rand(0, 14)
|
||||
|
||||
icon_state = "ano[icon_num]0"
|
||||
if(icon_num == 7 || icon_num == 8)
|
||||
@@ -47,6 +47,11 @@
|
||||
desc = "A strange alien device."
|
||||
if(prob(25))
|
||||
my_effect.trigger = pick(TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN)
|
||||
else if(icon_num == 12 || icon_num == 14)
|
||||
name = "intricately carved statue"
|
||||
desc = "A strange statue."
|
||||
if(prob(60))
|
||||
my_effect.trigger = pick(TRIGGER_TOUCH, TRIGGER_HEAT, TRIGGER_COLD, TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
|
||||
|
||||
/obj/machinery/artifact/proc/choose_effect()
|
||||
var/effect_type = input(usr, "What type do you want?", "Effect Type") as null|anything in typesof(/datum/artifact_effect) - /datum/artifact_effect
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
//snowflake guns for xenoarch because you can't override the update_icon() proc inside the giant mess that is find creation
|
||||
/obj/item/weapon/gun/energy/laser/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/xray/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/xray/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/captain/xenoarch
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/captain/xenoarch/update_icon()
|
||||
return
|
||||
|
||||
@@ -36,21 +36,25 @@
|
||||
item_type = "bowl"
|
||||
if(prob(33))
|
||||
new_item = new /obj/item/weapon/reagent_containers/glass/replenishing(src.loc)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
else
|
||||
new_item = new /obj/item/weapon/reagent_containers/glass/beaker(src.loc)
|
||||
new_item.icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
new_item.icon_state = "bowl"
|
||||
apply_image_decorations = 1
|
||||
if(prob(40))
|
||||
new_item.color = rgb(rand(0,255),rand(0,255),rand(0,255))
|
||||
if(prob(20))
|
||||
additional_desc = "There appear to be [pick("dark","faintly glowing","pungent","bright")] [pick("red","purple","green","blue")] stains inside."
|
||||
if(2)
|
||||
item_type = "urn"
|
||||
if(prob(33))
|
||||
new_item = new /obj/item/weapon/reagent_containers/glass/replenishing(src.loc)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
else
|
||||
new_item = new /obj/item/weapon/reagent_containers/glass/beaker(src.loc)
|
||||
new_item.icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
new_item.icon_state = "urn"
|
||||
new_item.icon_state = "urn[rand(1,2)]"
|
||||
apply_image_decorations = 1
|
||||
if(prob(20))
|
||||
additional_desc = "It [pick("whispers faintly","makes a quiet roaring sound","whistles softly","thrums quietly","throbs")] if you put it to your ear."
|
||||
@@ -62,6 +66,8 @@
|
||||
new_item = new /obj/item/weapon/material/knife(src.loc)
|
||||
else
|
||||
new_item = new /obj/item/weapon/material/kitchen/utensil/spoon(src.loc)
|
||||
if(prob(60))
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
additional_desc = "[pick("It's like no [item_type] you've ever seen before",\
|
||||
"It's a mystery how anyone is supposed to eat with this",\
|
||||
"You wonder what the creator's mouth was shaped like")]."
|
||||
@@ -69,12 +75,13 @@
|
||||
name = "statuette"
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
item_type = "statuette"
|
||||
icon_state = "statuette"
|
||||
icon_state = "statuette[rand(1,3)]"
|
||||
additional_desc = "It depicts a [pick("small","ferocious","wild","pleasing","hulking")] \
|
||||
[pick("alien figure","rodent-like creature","reptilian alien","primate","unidentifiable object")] \
|
||||
[pick("performing unspeakable acts","posing heroically","in a fetal position","cheering","sobbing","making a plaintive gesture","making a rude gesture")]."
|
||||
if(prob(25))
|
||||
new_item = new /obj/item/weapon/vampiric(src.loc)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
if(5)
|
||||
name = "instrument"
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
@@ -93,8 +100,8 @@
|
||||
"It looks wickedly jagged",\
|
||||
"There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along the edges")]."
|
||||
if(7)
|
||||
//assuming there are 10 types of coins
|
||||
var/chance = 10
|
||||
//assuming there are 12 types of coins
|
||||
var/chance = 8
|
||||
for(var/type in typesof(/obj/item/weapon/coin))
|
||||
if(prob(chance))
|
||||
new_item = new type(src.loc)
|
||||
@@ -113,6 +120,8 @@
|
||||
item_type = "[pick("wicked","evil","byzantine","dangerous")] looking [pick("device","contraption","thing","trap")]"
|
||||
apply_prefix = 0
|
||||
new_item = new /obj/item/weapon/beartrap(src.loc)
|
||||
if(prob(40))
|
||||
new_item.color = rgb(rand(0,255),rand(0,255),rand(0,255))
|
||||
additional_desc = "[pick("It looks like it could take a limb off",\
|
||||
"Could be some kind of animal trap",\
|
||||
"There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along part of it")]."
|
||||
@@ -132,6 +141,7 @@
|
||||
var/storage_amount = 2**(new_box.max_w_class-1)
|
||||
new_box.max_storage_space = rand(storage_amount, storage_amount * 10)
|
||||
if(prob(30))
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
apply_image_decorations = 1
|
||||
if(12)
|
||||
item_type = "[pick("cylinder","tank","chamber")]"
|
||||
@@ -151,6 +161,9 @@
|
||||
new_item = new /obj/item/weapon/tool/crowbar(src.loc)
|
||||
else
|
||||
new_item = new /obj/item/weapon/tool/screwdriver(src.loc)
|
||||
if(prob(40))
|
||||
new_item.color = rgb(rand(0,255),rand(0,255),rand(0,255))
|
||||
apply_image_decorations = 1
|
||||
additional_desc = "[pick("It doesn't look safe.",\
|
||||
"You wonder what it was used for",\
|
||||
"There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains on it")]."
|
||||
@@ -177,6 +190,9 @@
|
||||
else
|
||||
new_item = new /obj/item/weapon/pen/reagent/sleepy(src.loc)
|
||||
if(prob(30))
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
icon_state = "pen1"
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
apply_image_decorations = 1
|
||||
if(16)
|
||||
apply_prefix = 0
|
||||
@@ -201,6 +217,7 @@
|
||||
new_item = new /obj/item/device/soulstone(src.loc)
|
||||
new_item.icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
new_item.icon_state = icon_state
|
||||
new_item.origin_tech[TECH_ARCANE] = 2
|
||||
if(17)
|
||||
//cultblade
|
||||
apply_prefix = 0
|
||||
@@ -218,6 +235,9 @@
|
||||
new_item = new /obj/item/weapon/material/sword(src.loc)
|
||||
new_item.force = 10
|
||||
item_type = new_item.name
|
||||
if(prob(30))
|
||||
new_item.icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
new_item.icon_state = "blade1"
|
||||
if(20)
|
||||
//arcane clothing
|
||||
apply_prefix = 0
|
||||
@@ -228,12 +248,14 @@
|
||||
|
||||
var/new_type = pick(possible_spawns)
|
||||
new_item = new new_type(src.loc)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
if(21)
|
||||
//soulstone
|
||||
apply_prefix = 0
|
||||
new_item = new /obj/item/device/soulstone(src.loc)
|
||||
item_type = new_item.name
|
||||
apply_material_decorations = 0
|
||||
new_item.origin_tech[TECH_ARCANE] = 2
|
||||
if(22)
|
||||
if(prob(50))
|
||||
new_item = new /obj/item/weapon/material/shard(src.loc)
|
||||
@@ -281,8 +303,10 @@
|
||||
new_gun.power_supply.rigged = 1
|
||||
if(prob(10))
|
||||
new_gun.power_supply.maxcharge = 0
|
||||
new_gun.origin_tech[TECH_ARCANE] = rand(0, 1)
|
||||
if(prob(15))
|
||||
new_gun.power_supply.charge = rand(0, new_gun.power_supply.maxcharge)
|
||||
new_gun.origin_tech[TECH_ARCANE] = 1
|
||||
else
|
||||
new_gun.power_supply.charge = 0
|
||||
|
||||
@@ -407,8 +431,11 @@
|
||||
//gas mask
|
||||
if(prob(25))
|
||||
new_item = new /obj/item/clothing/mask/gas/poltergeist(src.loc)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
else
|
||||
new_item = new /obj/item/clothing/mask/gas(src.loc)
|
||||
if(prob(40))
|
||||
new_item.color = rgb(rand(0,255),rand(0,255),rand(0,255))
|
||||
if(36)
|
||||
// Alien stuff.
|
||||
apply_prefix = FALSE
|
||||
@@ -438,11 +465,87 @@
|
||||
|
||||
var/new_type = pick(alien_stuff)
|
||||
new_item = new new_type(src.loc)
|
||||
new_item.origin_tech[TECH_ARCANE] = 2
|
||||
new_item.origin_tech[TECH_PRECURSOR] = 1
|
||||
item_type = new_item.name
|
||||
|
||||
if(37)
|
||||
// Alien boats.
|
||||
apply_prefix = FALSE
|
||||
var/new_boat_mat = pickweight(
|
||||
MAT_WOOD = 100,
|
||||
MAT_SIFWOOD = 200,
|
||||
DEFAULT_WALL_MATERIAL = 60,
|
||||
MAT_URANIUM = 14,
|
||||
MAT_MARBLE = 16,
|
||||
MAT_GOLD = 20,
|
||||
MAT_SILVER = 24,
|
||||
MAT_PLASTEEL = 10,
|
||||
MAT_TITANIUM = 6,
|
||||
MAT_IRON = 30,
|
||||
MAT_PHORON = 4,
|
||||
MAT_VERDANTIUM = 2,
|
||||
MAT_DIAMOND = 4,
|
||||
MAT_DURASTEEL = 2,
|
||||
MAT_MORPHIUM = 2,
|
||||
MAT_SUPERMATTER = 1
|
||||
)
|
||||
var/list/alien_stuff = list(
|
||||
/obj/vehicle/boat,
|
||||
/obj/vehicle/boat/dragon
|
||||
)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/oar(src.loc, new_boat_mat)
|
||||
var/new_type = pick(alien_stuff)
|
||||
new_item = new new_type(src.loc, new_boat_mat)
|
||||
item_type = new_item.name
|
||||
|
||||
if(38)
|
||||
// Imperion circuit.
|
||||
apply_prefix = FALSE
|
||||
apply_image_decorations = FALSE
|
||||
var/possible_circuits = subtypesof(/obj/item/weapon/circuitboard/mecha/imperion)
|
||||
var/new_type = pick(possible_circuits)
|
||||
new_item = new new_type(src.loc)
|
||||
name = new_item.name
|
||||
desc = new_item.desc
|
||||
item_type = new_item.name
|
||||
|
||||
if(istype(new_item, /obj/item/weapon/material))
|
||||
var/new_item_mat = pickweight(
|
||||
DEFAULT_WALL_MATERIAL = 80,
|
||||
MAT_WOOD = 20,
|
||||
MAT_SIFWOOD = 40,
|
||||
MAT_URANIUM = 14,
|
||||
MAT_MARBLE = 16,
|
||||
MAT_GOLD = 20,
|
||||
MAT_SILVER = 24,
|
||||
MAT_PLASTEEL = 10,
|
||||
MAT_TITANIUM = 6,
|
||||
MAT_IRON = 30,
|
||||
MAT_PHORON = 4,
|
||||
MAT_VERDANTIUM = 2,
|
||||
MAT_DIAMOND = 4,
|
||||
MAT_DURASTEEL = 2,
|
||||
MAT_MORPHIUM = 2,
|
||||
MAT_SUPERMATTER = 1
|
||||
)
|
||||
var/obj/item/weapon/material/MW = new_item
|
||||
MW.applies_material_colour = TRUE
|
||||
MW.set_material(new_item_mat)
|
||||
if(istype(MW, /obj/item/weapon/material/twohanded))
|
||||
var/obj/item/weapon/material/twohanded/TH = MW
|
||||
TH.force_unwielded *= 0.7
|
||||
TH.force_wielded *= 0.5
|
||||
else
|
||||
MW.force *= 0.3
|
||||
|
||||
var/decorations = ""
|
||||
if(apply_material_decorations)
|
||||
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
|
||||
if(istype(new_item, /obj/item/weapon/material))
|
||||
var/obj/item/weapon/material/MW = new_item
|
||||
source_material = MW.material.display_name
|
||||
desc = "A [material_descriptor ? "[material_descriptor] " : ""][item_type] made of [source_material], all craftsmanship is of [pick("the lowest","low","average","high","the highest")] quality."
|
||||
|
||||
var/list/descriptors = list()
|
||||
@@ -499,8 +602,12 @@
|
||||
|
||||
if(talkative)
|
||||
new_item.talking_atom = new(new_item)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
new_item.origin_tech[TECH_PRECURSOR] = 1
|
||||
|
||||
qdel(src)
|
||||
|
||||
else if(talkative)
|
||||
src.talking_atom = new(src)
|
||||
new_item.origin_tech[TECH_ARCANE] = 1
|
||||
new_item.origin_tech[TECH_PRECURSOR] = 1
|
||||
|
||||
Reference in New Issue
Block a user