Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+23 -42
View File
@@ -1,27 +1,9 @@
/datum/personal_crafting
var/busy
var/viewing_category = 1 //typical powergamer starting on the Weapons tab
var/list/categories = list(CAT_WEAPON,
CAT_AMMO,
CAT_ROBOT,
CAT_MISC,
CAT_PRIMAL,
CAT_BREAD,
CAT_BURGER,
CAT_CAKE,
CAT_EGG,
CAT_MEAT,
CAT_MISCFOOD,
CAT_PASTRY,
CAT_PIE,
CAT_PIZZA,
CAT_SALAD,
CAT_SANDWICH,
CAT_SOUP,
CAT_SPAGHETTI)
var/list/categories = list(CAT_WEAPON,CAT_AMMO,CAT_ROBOT,CAT_FOOD,CAT_MISC,CAT_PRIMAL)
var/datum/action/innate/crafting/button
var/display_craftable_only = FALSE
var/display_compact = TRUE
@@ -60,9 +42,9 @@
/datum/personal_crafting/proc/get_environment(mob/user)
. = list()
for(var/obj/item/I in user.held_items)
. += I
if(!isturf(user.loc))
. += user.r_hand
. += user.l_hand
if(!istype(user.loc, /turf))
return
var/list/L = block(get_step(user, SOUTHWEST), get_step(user, NORTHEAST))
for(var/A in L)
@@ -110,6 +92,7 @@
return 1
/datum/personal_crafting/proc/construct_item(mob/user, datum/crafting_recipe/R)
for(var/A in R.parts)
var/list/contents = get_surroundings(user)
var/send_feedback = 1
if(check_contents(R, contents))
@@ -256,26 +239,24 @@
/datum/personal_crafting/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = not_incapacitated_turf_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "personal_crafting", "Crafting Menu", 700, 800, master_ui, state)
ui = new(user, src, ui_key, "personal_crafting", "Crafting Menu", 600, 800, master_ui, state)
ui.open()
/datum/personal_crafting/ui_data(mob/user)
var/list/data = list()
var/cur_category = categories[viewing_category]
data["busy"] = busy
data["prev_cat"] = categories[prev_cat()]
data["category"] = cur_category
data["category"] = categories[viewing_category]
data["next_cat"] = categories[next_cat()]
data["display_craftable_only"] = display_craftable_only
data["display_compact"] = display_compact
var/list/surroundings = get_surroundings(user)
var/list/can_craft = list()
var/list/cant_craft = list()
for(var/rec in crafting_recipes)
var/datum/crafting_recipe/R = rec
if(R.category != cur_category)
if(R.category != categories[viewing_category])
continue
if(check_contents(R, surroundings))
can_craft += list(build_recipe_data(R))
@@ -313,10 +294,6 @@
display_craftable_only = !display_craftable_only
usr << "<span class='notice'>You will now [display_craftable_only ? "only see recipes you can craft":"see all recipes"].</span>"
. = TRUE
if("toggle_compact")
display_compact = !display_compact
usr << "<span class='notice'>Crafting menu is now [display_compact? "compact" : "full size"].</span>"
. = TRUE
//Next works nicely with modular arithmetic
@@ -341,23 +318,27 @@
var/tool_text = ""
var/catalyst_text = ""
for(var/a in R.reqs)
//We just need the name, so cheat-typecast to /atom for speed (even tho Reagents are /datum they DO have a "name" var)
//Also these are typepaths so sadly we can't just do "[a]"
var/atom/A = a
req_text += " [R.reqs[A]] [initial(A.name)],"
for(var/A in R.reqs)
if(ispath(A, /obj))
var/obj/O = A
req_text += " [R.reqs[A]] [initial(O.name)],"
else if(ispath(A, /datum/reagent))
var/datum/reagent/RE = A
req_text += " [R.reqs[A]] [initial(RE.name)],"
req_text = replacetext(req_text,",","",-1)
data["req_text"] = req_text
for(var/a in R.chem_catalysts)
var/atom/A = a //cheat-typecast
catalyst_text += " [R.chem_catalysts[A]] [initial(A.name)],"
for(var/C in R.chem_catalysts)
if(ispath(C, /datum/reagent))
var/datum/reagent/RE = C
catalyst_text += " [R.chem_catalysts[C]] [initial(RE.name)],"
catalyst_text = replacetext(catalyst_text,",","",-1)
data["catalyst_text"] = catalyst_text
for(var/a in R.tools)
var/atom/A = a //cheat-typecast
tool_text += " [R.tools[A]] [initial(A.name)],"
for(var/O in R.tools)
if(ispath(O, /obj))
var/obj/T = O
tool_text += " [R.tools[O]] [initial(T.name)],"
tool_text = replacetext(tool_text,",","",-1)
data["tool_text"] = tool_text
+27 -40
View File
@@ -39,15 +39,6 @@
time = 15
category = CAT_WEAPON
/datum/crafting_recipe/strobeshield
name = "strobe shield"
result = /obj/item/device/assembly/flash/shield
reqs = list(/obj/item/wallframe/flasher = 1,
/obj/item/device/assembly/flash/handheld = 1,
/obj/item/weapon/shield/riot = 1)
time = 40
category = CAT_WEAPON
/datum/crafting_recipe/molotov
name = "Molotov"
result = /obj/item/weapon/reagent_containers/food/drinks/bottle/molotov
@@ -103,16 +94,17 @@
/datum/crafting_recipe/ed209
name = "ED209"
result = /mob/living/simple_animal/bot/ed209
reqs = list(/obj/item/robot_suit = 1,
reqs = list(/obj/item/robot_parts/robot_suit = 1,
/obj/item/clothing/head/helmet = 1,
/obj/item/clothing/suit/armor/vest = 1,
/obj/item/bodypart/l_leg/robot = 1,
/obj/item/bodypart/r_leg/robot = 1,
/obj/item/stack/sheet/metal = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/weapon/gun/energy/e_gun/advtaser = 1,
/obj/item/robot_parts/l_leg = 1,
/obj/item/robot_parts/r_leg = 1,
/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/gun/energy/gun/advtaser = 1,
/obj/item/weapon/stock_parts/cell = 1,
/obj/item/device/assembly/prox_sensor = 1)
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/robot_parts/r_arm = 1)
tools = list(/obj/item/weapon/weldingtool, /obj/item/weapon/screwdriver)
time = 60
category = CAT_ROBOT
@@ -124,7 +116,7 @@
/obj/item/clothing/head/helmet/sec = 1,
/obj/item/weapon/melee/baton = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/bodypart/r_arm/robot = 1)
/obj/item/robot_parts/r_arm = 1)
tools = list(/obj/item/weapon/weldingtool)
time = 60
category = CAT_ROBOT
@@ -134,7 +126,7 @@
result = /mob/living/simple_animal/bot/cleanbot
reqs = list(/obj/item/weapon/reagent_containers/glass/bucket = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/bodypart/r_arm/robot = 1)
/obj/item/robot_parts/r_arm = 1)
time = 40
category = CAT_ROBOT
@@ -144,7 +136,7 @@
reqs = list(/obj/item/weapon/storage/toolbox/mechanical = 1,
/obj/item/stack/tile/plasteel = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/bodypart/r_arm/robot = 1)
/obj/item/robot_parts/r_arm = 1)
time = 40
category = CAT_ROBOT
@@ -154,7 +146,7 @@
reqs = list(/obj/item/device/healthanalyzer = 1,
/obj/item/weapon/storage/firstaid = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/bodypart/r_arm/robot = 1)
/obj/item/robot_parts/r_arm = 1)
time = 40
category = CAT_ROBOT
@@ -193,7 +185,8 @@
/datum/crafting_recipe/dragonsbreath
name = "Dragonsbreath Shell"
result = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,/datum/reagent/phosphorus = 5)
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
/datum/reagent/phosphorus = 5,)
tools = list(/obj/item/weapon/screwdriver)
time = 5
category = CAT_AMMO
@@ -204,7 +197,7 @@
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
/datum/reagent/glycerol = 5,
/datum/reagent/toxin/acid = 5,
/datum/reagent/toxin/acid/fluacid = 5)
/datum/reagent/toxin/acid/fluacid = 5,)
tools = list(/obj/item/weapon/screwdriver)
time = 5
category = CAT_AMMO
@@ -252,11 +245,11 @@
/datum/crafting_recipe/ishotgun
name = "Improvised Shotgun"
result = /obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised
result = /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
reqs = list(/obj/item/weaponcrafting/reciever = 1,
/obj/item/pipe = 1,
/obj/item/weaponcrafting/stock = 1,
/obj/item/stack/packageWrap = 5)
/obj/item/stack/packageWrap = 5,)
tools = list(/obj/item/weapon/screwdriver)
time = 100
category = CAT_WEAPON
@@ -326,6 +319,14 @@
reqs = list(/obj/item/weapon/paper = 5)
category = CAT_MISC
/datum/crafting_recipe/headlamp
name = "Headlamp"
result = /obj/item/clothing/head/hardhat/headlamp
time = 30
reqs = list(/obj/item/stack/cable_coil = 15,
/obj/item/device/flashlight = 1)
category = CAT_MISC
/datum/crafting_recipe/chemical_payload
name = "Chemical Payload (C4)"
@@ -360,7 +361,7 @@
/datum/crafting_recipe/bonetalisman
name = "Bone Talisman"
result = /obj/item/clothing/neck/talisman
result = /obj/item/clothing/tie/talisman
time = 20
reqs = list(/obj/item/stack/sheet/bone = 2,
/obj/item/stack/sheet/sinew = 1)
@@ -382,7 +383,7 @@
category = CAT_PRIMAL
/datum/crafting_recipe/drakecloak
name = "Ash Drake Armour"
name = "Ash Drake Cloak"
result = /obj/item/clothing/suit/hooded/cloak/drake
time = 60
reqs = list(/obj/item/stack/sheet/bone = 10,
@@ -420,17 +421,3 @@
reqs = list(/obj/item/stack/sheet/bone = 6,
/obj/item/stack/sheet/sinew = 3)
category = CAT_PRIMAL
/datum/crafting_recipe/bonfire
name = "Bonfire"
time = 60
reqs = list(/obj/item/weapon/grown/log = 5)
result = /obj/structure/bonfire
category = CAT_PRIMAL
/datum/crafting_recipe/smallcarton
name = "Small Carton"
result = /obj/item/weapon/reagent_containers/food/drinks/sillycup/smallcarton
time = 10
reqs = list(/obj/item/stack/sheet/cardboard = 1)
category = CAT_MISC