mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #37760 from YPOQ/stackfix
Fixed stacks sometimes having the wrong amount if created on another stack
This commit is contained in:
committed by
yogstation13-bot
parent
0e78c3bebf
commit
e61c1ba97d
@@ -355,8 +355,7 @@
|
|||||||
return
|
return
|
||||||
user.visible_message("<span class='notice'>[user] removes the wires from [src].</span>", \
|
user.visible_message("<span class='notice'>[user] removes the wires from [src].</span>", \
|
||||||
"<span class='notice'>You remove the wiring from [src], exposing the circuit board.</span>")
|
"<span class='notice'>You remove the wiring from [src], exposing the circuit board.</span>")
|
||||||
var/obj/item/stack/cable_coil/B = new(get_turf(src))
|
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||||
B.amount = 5
|
|
||||||
constructionStep = CONSTRUCTION_GUTTED
|
constructionStep = CONSTRUCTION_GUTTED
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -65,8 +65,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/stack/sheet/hairlesshide/machine_wash(obj/machinery/washing_machine/WM)
|
/obj/item/stack/sheet/hairlesshide/machine_wash(obj/machinery/washing_machine/WM)
|
||||||
var/obj/item/stack/sheet/wetleather/WL = new(loc)
|
new /obj/item/stack/sheet/wetleather(drop_location(), amount)
|
||||||
WL.amount = amount
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/item/clothing/suit/hooded/ian_costume/machine_wash(obj/machinery/washing_machine/WM)
|
/obj/item/clothing/suit/hooded/ian_costume/machine_wash(obj/machinery/washing_machine/WM)
|
||||||
|
|||||||
@@ -367,8 +367,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/generator_init()
|
/obj/item/mecha_parts/mecha_equipment/generator/proc/generator_init()
|
||||||
fuel = new /obj/item/stack/sheet/mineral/plasma(src)
|
fuel = new /obj/item/stack/sheet/mineral/plasma(src, 0)
|
||||||
fuel.amount = 0
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/generator/detach()
|
/obj/item/mecha_parts/mecha_equipment/generator/detach()
|
||||||
STOP_PROCESSING(SSobj, src)
|
STOP_PROCESSING(SSobj, src)
|
||||||
@@ -472,8 +471,7 @@
|
|||||||
var/rad_per_cycle = 3
|
var/rad_per_cycle = 3
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
|
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
|
||||||
fuel = new /obj/item/stack/sheet/mineral/uranium(src)
|
fuel = new /obj/item/stack/sheet/mineral/uranium(src, 0)
|
||||||
fuel.amount = 0
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/critfail()
|
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/critfail()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -301,8 +301,7 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/Initialize()
|
/obj/item/mecha_parts/mecha_equipment/cable_layer/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
cable = new(src)
|
cable = new(src, 0)
|
||||||
cable.amount = 0
|
|
||||||
|
|
||||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/can_attach(obj/mecha/working/M)
|
/obj/item/mecha_parts/mecha_equipment/cable_layer/can_attach(obj/mecha/working/M)
|
||||||
if(..())
|
if(..())
|
||||||
@@ -333,8 +332,7 @@
|
|||||||
if(to_load)
|
if(to_load)
|
||||||
to_load = min(target.amount, to_load)
|
to_load = min(target.amount, to_load)
|
||||||
if(!cable)
|
if(!cable)
|
||||||
cable = new(src)
|
cable = new(src, 0)
|
||||||
cable.amount = 0
|
|
||||||
cable.amount += to_load
|
cable.amount += to_load
|
||||||
target.use(to_load)
|
target.use(to_load)
|
||||||
occupant_message("<span class='notice'>[to_load] meters of cable successfully loaded.</span>")
|
occupant_message("<span class='notice'>[to_load] meters of cable successfully loaded.</span>")
|
||||||
@@ -358,8 +356,7 @@
|
|||||||
m = min(m, cable.amount)
|
m = min(m, cable.amount)
|
||||||
if(m)
|
if(m)
|
||||||
use_cable(m)
|
use_cable(m)
|
||||||
var/obj/item/stack/cable_coil/CC = new (get_turf(chassis))
|
new /obj/item/stack/cable_coil(get_turf(chassis), m)
|
||||||
CC.amount = m
|
|
||||||
else
|
else
|
||||||
occupant_message("There's no more cable on the reel.")
|
occupant_message("There's no more cable on the reel.")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -104,8 +104,7 @@
|
|||||||
to_chat(user, "<span class='warning'>There is another network terminal here!</span>")
|
to_chat(user, "<span class='warning'>There is another network terminal here!</span>")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(T)
|
new /obj/item/stack/cable_coil(T, 10)
|
||||||
C.amount = 10
|
|
||||||
to_chat(user, "<span class='notice'>You cut the cables and disassemble the unused power terminal.</span>")
|
to_chat(user, "<span class='notice'>You cut the cables and disassemble the unused power terminal.</span>")
|
||||||
qdel(E)
|
qdel(E)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -211,10 +211,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
|||||||
if(W.is_sharp())
|
if(W.is_sharp())
|
||||||
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||||
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
|
user.visible_message("[user] starts cutting hair off \the [src].", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='italics'>You hear the sound of a knife rubbing against flesh.</span>")
|
||||||
if(do_after(user,50, target = src))
|
if(do_after(user, 50, target = src))
|
||||||
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
|
to_chat(user, "<span class='notice'>You cut the hair from this [src.singular_name].</span>")
|
||||||
var/obj/item/stack/sheet/hairlesshide/HS = new(user.loc)
|
new /obj/item/stack/sheet/hairlesshide(user.drop_location(), 1)
|
||||||
HS.amount = 1
|
|
||||||
use(1)
|
use(1)
|
||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
@@ -228,21 +227,11 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
|||||||
if(exposed_temperature >= drying_threshold_temperature)
|
if(exposed_temperature >= drying_threshold_temperature)
|
||||||
wetness--
|
wetness--
|
||||||
if(wetness == 0)
|
if(wetness == 0)
|
||||||
//Try locating an exisitng stack on the tile and add to there if possible
|
new /obj/item/stack/sheet/leather(drop_location(), 1)
|
||||||
for(var/obj/item/stack/sheet/leather/HS in src.loc)
|
|
||||||
if(HS.amount < 50)
|
|
||||||
HS.amount++
|
|
||||||
src.use(1)
|
|
||||||
wetness = initial(wetness)
|
|
||||||
break
|
|
||||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
|
||||||
var/obj/item/stack/sheet/leather/HS = new(src.loc)
|
|
||||||
HS.amount = 1
|
|
||||||
wetness = initial(wetness)
|
wetness = initial(wetness)
|
||||||
src.use(1)
|
use(1)
|
||||||
|
|
||||||
/obj/item/stack/sheet/wetleather/microwave_act(obj/machinery/microwave/MW)
|
/obj/item/stack/sheet/wetleather/microwave_act(obj/machinery/microwave/MW)
|
||||||
..()
|
..()
|
||||||
var/obj/item/stack/sheet/leather/L = new(loc)
|
new /obj/item/stack/sheet/leather(drop_location(), amount)
|
||||||
L.amount = amount
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|||||||
@@ -14,13 +14,12 @@
|
|||||||
grind_results = list("silicon" = 20, "copper" = 5)
|
grind_results = list("silicon" = 20, "copper" = 5)
|
||||||
|
|
||||||
/obj/item/stack/light_w/attackby(obj/item/O, mob/user, params)
|
/obj/item/stack/light_w/attackby(obj/item/O, mob/user, params)
|
||||||
|
var/atom/Tsec = user.drop_location()
|
||||||
if(istype(O, /obj/item/wirecutters))
|
if(istype(O, /obj/item/wirecutters))
|
||||||
var/obj/item/stack/cable_coil/CC = new (user.loc)
|
var/obj/item/stack/cable_coil/CC = new (Tsec, 5)
|
||||||
CC.amount = 5
|
|
||||||
CC.add_fingerprint(user)
|
CC.add_fingerprint(user)
|
||||||
amount--
|
amount--
|
||||||
var/obj/item/stack/sheet/glass/G = new (user.loc)
|
var/obj/item/stack/sheet/glass/G = new (Tsec)
|
||||||
G.add_fingerprint(user)
|
G.add_fingerprint(user)
|
||||||
if(amount <= 0)
|
if(amount <= 0)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
@@ -28,7 +27,6 @@
|
|||||||
else if(istype(O, /obj/item/stack/sheet/metal))
|
else if(istype(O, /obj/item/stack/sheet/metal))
|
||||||
var/obj/item/stack/sheet/metal/M = O
|
var/obj/item/stack/sheet/metal/M = O
|
||||||
if (M.use(1))
|
if (M.use(1))
|
||||||
use(1)
|
|
||||||
var/obj/item/L = new /obj/item/stack/tile/light(user.loc)
|
var/obj/item/L = new /obj/item/stack/tile/light(user.loc)
|
||||||
to_chat(user, "<span class='notice'>You make a light tile.</span>")
|
to_chat(user, "<span class='notice'>You make a light tile.</span>")
|
||||||
L.add_fingerprint(user)
|
L.add_fingerprint(user)
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
|||||||
/obj/item/stack/sheet/metal/twenty
|
/obj/item/stack/sheet/metal/twenty
|
||||||
amount = 20
|
amount = 20
|
||||||
|
|
||||||
|
/obj/item/stack/sheet/metal/ten
|
||||||
|
amount = 10
|
||||||
|
|
||||||
/obj/item/stack/sheet/metal/five
|
/obj/item/stack/sheet/metal/five
|
||||||
amount = 5
|
amount = 5
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,13 @@
|
|||||||
return
|
return
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/item/stack/Initialize(mapload, new_amount=null , merge = TRUE)
|
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(new_amount)
|
if(new_amount != null)
|
||||||
amount = new_amount
|
amount = new_amount
|
||||||
|
while(amount > max_amount)
|
||||||
|
amount -= max_amount
|
||||||
|
new type(loc, max_amount, FALSE)
|
||||||
if(!merge_type)
|
if(!merge_type)
|
||||||
merge_type = type
|
merge_type = type
|
||||||
if(merge)
|
if(merge)
|
||||||
|
|||||||
@@ -147,8 +147,7 @@
|
|||||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||||
state = SCREWED_CORE
|
state = SCREWED_CORE
|
||||||
update_icon()
|
update_icon()
|
||||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
|
new /obj/item/stack/cable_coil(drop_location(), 5)
|
||||||
A.amount = 5
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||||
|
|||||||
@@ -111,5 +111,5 @@
|
|||||||
|
|
||||||
for(var/i = 0, i<2, i++)
|
for(var/i = 0, i<2, i++)
|
||||||
for(var/res in resources)
|
for(var/res in resources)
|
||||||
var/obj/item/stack/R = new res(src)
|
var/obj/item/stack/R = res
|
||||||
R.amount = R.max_amount
|
new res(src, initial(R.max_amount))
|
||||||
|
|||||||
@@ -493,10 +493,10 @@
|
|||||||
D.pixel_z = target.pixel_z
|
D.pixel_z = target.pixel_z
|
||||||
if(do_mob(src, target, 100))
|
if(do_mob(src, target, 100))
|
||||||
to_chat(src, "<span class='info'>Dismantling complete.</span>")
|
to_chat(src, "<span class='info'>Dismantling complete.</span>")
|
||||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(target.loc)
|
var/atom/Tsec = target.drop_location()
|
||||||
M.amount = 5
|
new /obj/item/stack/sheet/metal(Tsec, 5)
|
||||||
for(var/obj/item/I in target.component_parts)
|
for(var/obj/item/I in target.component_parts)
|
||||||
I.forceMove(M.drop_location())
|
I.forceMove(Tsec)
|
||||||
var/obj/effect/temp_visual/swarmer/disintegration/N = new /obj/effect/temp_visual/swarmer/disintegration(get_turf(target))
|
var/obj/effect/temp_visual/swarmer/disintegration/N = new /obj/effect/temp_visual/swarmer/disintegration(get_turf(target))
|
||||||
N.pixel_x = target.pixel_x
|
N.pixel_x = target.pixel_x
|
||||||
N.pixel_y = target.pixel_y
|
N.pixel_y = target.pixel_y
|
||||||
@@ -505,7 +505,7 @@
|
|||||||
if(istype(target, /obj/machinery/computer))
|
if(istype(target, /obj/machinery/computer))
|
||||||
var/obj/machinery/computer/C = target
|
var/obj/machinery/computer/C = target
|
||||||
if(C.circuit)
|
if(C.circuit)
|
||||||
C.circuit.forceMove(M.drop_location())
|
C.circuit.forceMove(Tsec)
|
||||||
qdel(target)
|
qdel(target)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -299,8 +299,7 @@
|
|||||||
qdel(S)
|
qdel(S)
|
||||||
return TRUE
|
return TRUE
|
||||||
for(var/obj/item/stack/sheet/wetleather/WL in src)
|
for(var/obj/item/stack/sheet/wetleather/WL in src)
|
||||||
var/obj/item/stack/sheet/leather/L = new(drop_location())
|
new /obj/item/stack/sheet/leather(drop_location(), WL.amount)
|
||||||
L.amount = WL.amount
|
|
||||||
qdel(WL)
|
qdel(WL)
|
||||||
return TRUE
|
return TRUE
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -262,8 +262,7 @@
|
|||||||
if(!check_cost(D.materials, amount))
|
if(!check_cost(D.materials, amount))
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
var/obj/item/stack/product = new D.build_path(loc)
|
new D.build_path(drop_location(), amount)
|
||||||
product.amount = amount
|
|
||||||
for(var/R in D.make_reagents)
|
for(var/R in D.make_reagents)
|
||||||
beaker.reagents.add_reagent(R, D.make_reagents[R]*amount)
|
beaker.reagents.add_reagent(R, D.make_reagents[R]*amount)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -36,19 +36,8 @@
|
|||||||
continue
|
continue
|
||||||
grassAmt += 1 + round(G.seed.potency * tile_coefficient)
|
grassAmt += 1 + round(G.seed.potency * tile_coefficient)
|
||||||
qdel(G)
|
qdel(G)
|
||||||
var/obj/item/stack/tile/GT = new stacktype(user.loc)
|
new stacktype(user.drop_location(), grassAmt)
|
||||||
while(grassAmt > GT.max_amount)
|
|
||||||
GT.amount = GT.max_amount
|
|
||||||
grassAmt -= GT.max_amount
|
|
||||||
GT = new stacktype(user.loc)
|
|
||||||
GT.amount = grassAmt
|
|
||||||
for(var/obj/item/stack/tile/T in user.loc)
|
|
||||||
if((T.type == stacktype) && (T.amount < T.max_amount))
|
|
||||||
GT.merge(T)
|
|
||||||
if(GT.amount <= 0)
|
|
||||||
break
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
|
||||||
|
|
||||||
// Carpet
|
// Carpet
|
||||||
/obj/item/seeds/grass/carpet
|
/obj/item/seeds/grass/carpet
|
||||||
|
|||||||
@@ -303,13 +303,12 @@
|
|||||||
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
|
desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num
|
||||||
var/amount = round(min(desired,50,smelt_amount))
|
var/amount = round(min(desired,50,smelt_amount))
|
||||||
materials.use_amount(alloy.materials, amount)
|
materials.use_amount(alloy.materials, amount)
|
||||||
var/output = new alloy.build_path(src)
|
var/output
|
||||||
if(istype(output, /obj/item/stack/sheet))
|
if(ispath(alloy.build_path, /obj/item/stack/sheet))
|
||||||
var/obj/item/stack/sheet/produced_alloy = output
|
output = new alloy.build_path(src, amount)
|
||||||
produced_alloy.amount = amount
|
|
||||||
unload_mineral(produced_alloy)
|
|
||||||
else
|
else
|
||||||
unload_mineral(output)
|
output = new alloy.build_path(src)
|
||||||
|
unload_mineral(output)
|
||||||
else
|
else
|
||||||
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
to_chat(usr, "<span class='warning'>Required access not found.</span>")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -44,8 +44,7 @@
|
|||||||
if(!(text2path(href_list["release"]) in machine.stack_list))
|
if(!(text2path(href_list["release"]) in machine.stack_list))
|
||||||
return //someone tried to spawn materials by spoofing hrefs
|
return //someone tried to spawn materials by spoofing hrefs
|
||||||
var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])]
|
var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])]
|
||||||
var/obj/item/stack/sheet/out = new inp.type()
|
var/obj/item/stack/sheet/out = new inp.type(null, inp.amount)
|
||||||
out.amount = inp.amount
|
|
||||||
inp.amount = 0
|
inp.amount = 0
|
||||||
machine.unload_mineral(out)
|
machine.unload_mineral(out)
|
||||||
|
|
||||||
@@ -81,14 +80,12 @@
|
|||||||
|
|
||||||
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
|
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
|
||||||
if(!(inp.type in stack_list)) //It's the first of this sheet added
|
if(!(inp.type in stack_list)) //It's the first of this sheet added
|
||||||
var/obj/item/stack/sheet/s = new inp.type(src,0)
|
var/obj/item/stack/sheet/s = new inp.type(src, 0)
|
||||||
s.amount = 0
|
|
||||||
stack_list[inp.type] = s
|
stack_list[inp.type] = s
|
||||||
var/obj/item/stack/sheet/storage = stack_list[inp.type]
|
var/obj/item/stack/sheet/storage = stack_list[inp.type]
|
||||||
storage.amount += inp.amount //Stack the sheets
|
storage.amount += inp.amount //Stack the sheets
|
||||||
qdel(inp) //Let the old sheet garbage collect
|
qdel(inp) //Let the old sheet garbage collect
|
||||||
while(storage.amount > stack_amt) //Get rid of excessive stackage
|
while(storage.amount > stack_amt) //Get rid of excessive stackage
|
||||||
var/obj/item/stack/sheet/out = new inp.type()
|
var/obj/item/stack/sheet/out = new inp.type(null, stack_amt)
|
||||||
out.amount = stack_amt
|
|
||||||
unload_mineral(out)
|
unload_mineral(out)
|
||||||
storage.amount -= stack_amt
|
storage.amount -= stack_amt
|
||||||
|
|||||||
@@ -164,12 +164,7 @@
|
|||||||
update_controls()
|
update_controls()
|
||||||
|
|
||||||
/mob/living/simple_animal/bot/floorbot/proc/empty_tiles()
|
/mob/living/simple_animal/bot/floorbot/proc/empty_tiles()
|
||||||
var/atom/Tsec = drop_location()
|
new tiletype(drop_location(), specialtiles)
|
||||||
|
|
||||||
while(specialtiles > initial(tiletype.max_amount))
|
|
||||||
new tiletype(Tsec,initial(tiletype.max_amount))
|
|
||||||
specialtiles -= initial(tiletype.max_amount)
|
|
||||||
new tiletype(Tsec,specialtiles)
|
|
||||||
specialtiles = 0
|
specialtiles = 0
|
||||||
tiletype = null
|
tiletype = null
|
||||||
|
|
||||||
@@ -378,8 +373,7 @@
|
|||||||
if(prob(50))
|
if(prob(50))
|
||||||
drop_part(robot_arm, Tsec)
|
drop_part(robot_arm, Tsec)
|
||||||
|
|
||||||
var/obj/item/stack/tile/plasteel/T = new (Tsec)
|
new /obj/item/stack/tile/plasteel(Tsec, 1)
|
||||||
T.amount = 1
|
|
||||||
|
|
||||||
do_sparks(3, TRUE, src)
|
do_sparks(3, TRUE, src)
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -111,13 +111,8 @@
|
|||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/DropFuel()
|
/obj/machinery/power/port_gen/pacman/DropFuel()
|
||||||
if(sheets)
|
if(sheets)
|
||||||
var/fail_safe = FALSE
|
new sheet_path(drop_location(), sheets)
|
||||||
while(sheets > 0 && fail_safe < 100)
|
sheets = 0
|
||||||
fail_safe += 1
|
|
||||||
var/obj/item/stack/sheet/S = new sheet_path(loc)
|
|
||||||
var/amount = min(sheets, S.max_amount)
|
|
||||||
S.amount = amount
|
|
||||||
sheets -= amount
|
|
||||||
|
|
||||||
/obj/machinery/power/port_gen/pacman/UseFuel()
|
/obj/machinery/power/port_gen/pacman/UseFuel()
|
||||||
var/needed_sheets = 1 / (time_per_sheet * consumption / power_output)
|
var/needed_sheets = 1 / (time_per_sheet * consumption / power_output)
|
||||||
|
|||||||
@@ -191,12 +191,12 @@
|
|||||||
|
|
||||||
// Give back the glass type we were supplied with
|
// Give back the glass type we were supplied with
|
||||||
/obj/item/solar_assembly/proc/give_glass(device_broken)
|
/obj/item/solar_assembly/proc/give_glass(device_broken)
|
||||||
|
var/atom/Tsec = drop_location()
|
||||||
if(device_broken)
|
if(device_broken)
|
||||||
new /obj/item/shard(loc)
|
new /obj/item/shard(Tsec)
|
||||||
new /obj/item/shard(loc)
|
new /obj/item/shard(Tsec)
|
||||||
else if(glass_type)
|
else if(glass_type)
|
||||||
var/obj/item/stack/sheet/S = new glass_type(loc)
|
new glass_type(Tsec, 2)
|
||||||
S.amount = 2
|
|
||||||
glass_type = null
|
glass_type = null
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -171,8 +171,7 @@
|
|||||||
|
|
||||||
else if(istype(O, /obj/item/stack/sheet/hairlesshide))
|
else if(istype(O, /obj/item/stack/sheet/hairlesshide))
|
||||||
var/obj/item/stack/sheet/hairlesshide/HH = O
|
var/obj/item/stack/sheet/hairlesshide/HH = O
|
||||||
var/obj/item/stack/sheet/wetleather/WL = new(get_turf(HH))
|
new /obj/item/stack/sheet/wetleather(get_turf(HH), HH.amount)
|
||||||
WL.amount = HH.amount
|
|
||||||
qdel(HH)
|
qdel(HH)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -448,8 +448,7 @@ datum/status_effect/stabilized/blue/on_remove()
|
|||||||
else if(istype(O, /obj/item/stack/sheet/hairlesshide))
|
else if(istype(O, /obj/item/stack/sheet/hairlesshide))
|
||||||
to_chat(owner, "<span class='warning'>[linked_extract] kept your hands wet! It wets [O]!</span>")
|
to_chat(owner, "<span class='warning'>[linked_extract] kept your hands wet! It wets [O]!</span>")
|
||||||
var/obj/item/stack/sheet/hairlesshide/HH = O
|
var/obj/item/stack/sheet/hairlesshide/HH = O
|
||||||
var/obj/item/stack/sheet/wetleather/WL = new(get_turf(HH))
|
new /obj/item/stack/sheet/wetleather(get_turf(HH), HH.amount)
|
||||||
WL.amount = HH.amount
|
|
||||||
qdel(HH)
|
qdel(HH)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -66,10 +66,8 @@ Charged extracts:
|
|||||||
colour = "metal"
|
colour = "metal"
|
||||||
|
|
||||||
/obj/item/slimecross/charged/metal/do_effect(mob/user)
|
/obj/item/slimecross/charged/metal/do_effect(mob/user)
|
||||||
var/obj/item/stack/sheet/metal/M = new(get_turf(user))
|
new /obj/item/stack/sheet/metal(get_turf(user), 25)
|
||||||
M.amount = 25
|
new /obj/item/stack/sheet/plasteel(get_turf(user), 10)
|
||||||
var/obj/item/stack/sheet/plasteel/P = new(get_turf(user))
|
|
||||||
P.amount = 10
|
|
||||||
user.visible_message("<span class='notice'>[src] grows into a plethora of metals!</span>")
|
user.visible_message("<span class='notice'>[src] grows into a plethora of metals!</span>")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -85,8 +83,7 @@ Charged extracts:
|
|||||||
colour = "dark purple"
|
colour = "dark purple"
|
||||||
|
|
||||||
/obj/item/slimecross/charged/darkpurple/do_effect(mob/user)
|
/obj/item/slimecross/charged/darkpurple/do_effect(mob/user)
|
||||||
var/obj/item/stack/sheet/mineral/plasma/M = new(get_turf(user))
|
new /obj/item/stack/sheet/mineral/plasma(get_turf(user), 10)
|
||||||
M.amount = 10
|
|
||||||
user.visible_message("<span class='notice'>[src] produces a large amount of plasma!</span>")
|
user.visible_message("<span class='notice'>[src] produces a large amount of plasma!</span>")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -113,8 +110,7 @@ Charged extracts:
|
|||||||
colour = "bluespace"
|
colour = "bluespace"
|
||||||
|
|
||||||
/obj/item/slimecross/charged/bluespace/do_effect(mob/user)
|
/obj/item/slimecross/charged/bluespace/do_effect(mob/user)
|
||||||
var/obj/item/stack/sheet/bluespace_crystal/M = new(get_turf(user))
|
new /obj/item/stack/sheet/bluespace_crystal(get_turf(user), 10)
|
||||||
M.amount = 10
|
|
||||||
user.visible_message("<span class='notice'>[src] produces several sheets of polycrystal!</span>")
|
user.visible_message("<span class='notice'>[src] produces several sheets of polycrystal!</span>")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -138,8 +134,7 @@ Charged extracts:
|
|||||||
colour = "pyrite"
|
colour = "pyrite"
|
||||||
|
|
||||||
/obj/item/slimecross/charged/pyrite/do_effect(mob/user)
|
/obj/item/slimecross/charged/pyrite/do_effect(mob/user)
|
||||||
var/obj/item/stack/sheet/mineral/bananium/M = new(get_turf(user))
|
new /obj/item/stack/sheet/mineral/bananium(get_turf(user), 10)
|
||||||
M.amount = 10
|
|
||||||
user.visible_message("<span class='warning'>[src] solidifies with a horrifying banana stench!</span>")
|
user.visible_message("<span class='warning'>[src] solidifies with a horrifying banana stench!</span>")
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -75,12 +75,7 @@ Industrial extracts:
|
|||||||
/obj/item/slimecross/industrial/metal
|
/obj/item/slimecross/industrial/metal
|
||||||
colour = "metal"
|
colour = "metal"
|
||||||
plasmarequired = 3
|
plasmarequired = 3
|
||||||
itempath = /obj/item/stack/sheet/metal
|
itempath = /obj/item/stack/sheet/metal/ten
|
||||||
|
|
||||||
/obj/item/slimecross/industrial/metal/do_after_spawn(obj/item/spawned)
|
|
||||||
var/obj/item/stack/sheet/metal/M = spawned
|
|
||||||
if(istype(M))
|
|
||||||
M.amount = 10
|
|
||||||
|
|
||||||
/obj/item/slimecross/industrial/yellow
|
/obj/item/slimecross/industrial/yellow
|
||||||
colour = "yellow"
|
colour = "yellow"
|
||||||
|
|||||||
Reference in New Issue
Block a user