code folder. 221 files changed wew

This commit is contained in:
deathride58
2018-02-12 21:03:40 -05:00
parent e3ad2643b2
commit 72ff7be9bd
221 changed files with 2797 additions and 2172 deletions
+4 -6
View File
@@ -40,17 +40,15 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(istype(W, /obj/item/weldingtool))
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
return
if(WT.remove_fuel(0,user))
if(W.use_tool(src, user, 0, volume=40))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
user.visible_message("[user.name] shaped [src] into metal with [W].", \
"<span class='notice'>You shape [src] into metal with [W].</span>", \
"<span class='italics'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
+13 -12
View File
@@ -279,21 +279,22 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
/obj/item/shard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/lightreplacer))
I.attackby(src, user)
else if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for(var/obj/item/stack/sheet/glass/G in user.loc)
if(G == NG)
continue
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
qdel(src)
else
return ..()
/obj/item/shard/welder_act(mob/living/user, obj/item/I)
if(I.use_tool(src, user, 0, volume=50))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for(var/obj/item/stack/sheet/glass/G in user.loc)
if(G == NG)
continue
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
qdel(src)
return TRUE
/obj/item/shard/Crossed(mob/living/L)
if(istype(L) && has_gravity(loc))
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
+16 -2
View File
@@ -25,7 +25,7 @@
/obj/item/stack/on_grind()
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
grind_results[grind_results[i]] *= amount //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
/obj/item/stack/grind_requirements()
if(is_cyborg)
@@ -247,7 +247,7 @@
return 0
return 1
/obj/item/stack/proc/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
/obj/item/stack/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
if(zero_amount())
return 0
if (is_cyborg)
@@ -260,6 +260,20 @@
update_weight()
return 1
/obj/item/stack/tool_use_check(mob/living/user, amount)
if(get_amount() < amount)
if(singular_name)
if(amount > 1)
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name]\s to do this!</span>")
else
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name] to do this!</span>")
else
to_chat(user, "<span class='warning'>You need at least [amount] to do this!</span>")
return FALSE
return TRUE
/obj/item/stack/proc/zero_amount()
if(is_cyborg)
return source.energy < cost
@@ -21,18 +21,15 @@
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(get_amount() < 4)
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
return
if(WT.is_hot() && !mineralType)
if(!mineralType)
to_chat(user, "<span class='warning'>You can not reform this!</span>")
return
if(WT.remove_fuel(0,user))
if(W.use_tool(src, user, 0, volume=40))
if(mineralType == "plasma")
atmos_spawn_air("plasma=5;TEMP=1000")
user.visible_message("<span class='warning'>[user.name] sets the plasma tiles on fire!</span>", \