Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+10 -10
View File
@@ -23,11 +23,11 @@
t_him = "him"
else if(M.gender == FEMALE)
t_him = "her"
user << "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>"
to_chat(user, "<span class='danger'>\The [M] is dead, you cannot help [t_him]!</span>")
return
if(!istype(M, /mob/living/carbon) && !istype(M, /mob/living/simple_animal))
user << "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>"
to_chat(user, "<span class='danger'>You don't know how to apply \the [src] to [M]!</span>")
return 1
var/obj/item/bodypart/affecting
@@ -35,16 +35,16 @@
var/mob/living/carbon/C = M
affecting = C.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
user << "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
return
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(stop_bleeding)
if(H.bleedsuppress)
user << "<span class='warning'>[H]'s bleeding is already bandaged!</span>"
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
return
else if(!H.bleed_rate)
user << "<span class='warning'>[H] isn't bleeding!</span>"
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
return
@@ -57,13 +57,13 @@
if (istype(M, /mob/living/simple_animal))
var/mob/living/simple_animal/critter = M
if (!(critter.healable))
user << "<span class='notice'> You cannot use [src] on [M]!</span>"
to_chat(user, "<span class='notice'> You cannot use [src] on [M]!</span>")
return
else if (critter.health == critter.maxHealth)
user << "<span class='notice'> [M] is at full health.</span>"
to_chat(user, "<span class='notice'> [M] is at full health.</span>")
return
else if(src.heal_brute < 1)
user << "<span class='notice'> [src] won't help [M] at all.</span>"
to_chat(user, "<span class='notice'> [src] won't help [M] at all.</span>")
return
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", "<span class='green'>You apply [src] on [M].</span>")
else
@@ -82,7 +82,7 @@
var/mob/living/carbon/C = M
affecting = C.get_bodypart(check_zone(user.zone_selected))
if(!affecting) //Missing limb?
user << "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>"
to_chat(user, "<span class='warning'>[C] doesn't have \a [parse_zone(user.zone_selected)]!</span>")
return
if(ishuman(C))
var/mob/living/carbon/human/H = C
@@ -93,7 +93,7 @@
if(affecting.heal_damage(heal_brute, heal_burn))
C.update_damage_overlays()
else
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
else
M.heal_bodypart_damage((src.heal_brute/2), (src.heal_burn/2))
+4 -4
View File
@@ -21,7 +21,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
/obj/item/stack/rods/New(var/loc, var/amount=null)
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE)
..()
recipes = rod_recipes
@@ -39,7 +39,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 2)
user << "<span class='warning'>You need at least two rods to do this!</span>"
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
return
if(WT.remove_fuel(0,user))
@@ -57,9 +57,9 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/S = W
if(amount != 1)
user << "<span class='warning'>You must use a single rod!</span>"
to_chat(user, "<span class='warning'>You must use a single rod!</span>")
else if(S.w_class > WEIGHT_CLASS_SMALL)
user << "<span class='warning'>The ingredient is too big for [src]!</span>"
to_chat(user, "<span class='warning'>The ingredient is too big for [src]!</span>")
else
var/obj/item/weapon/reagent_containers/food/snacks/customizable/A = new/obj/item/weapon/reagent_containers/food/snacks/customizable/kebab(get_turf(src))
A.initialize_custom_food(src, S, user)
@@ -32,7 +32,7 @@ var/global/list/datum/stack_recipe/glass_recipes = list ( \
/obj/item/stack/sheet/glass/fifty
amount = 50
/obj/item/stack/sheet/glass/New(loc, amount)
/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge = TRUE)
recipes = glass_recipes
..()
@@ -41,11 +41,11 @@ var/global/list/datum/stack_recipe/glass_recipes = list ( \
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if (get_amount() < 1 || CC.get_amount() < 5)
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>"
to_chat(user, "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>")
return
CC.use(5)
use(1)
user << "<span class='notice'>You attach wire to the [name].</span>"
to_chat(user, "<span class='notice'>You attach wire to the [name].</span>")
var/obj/item/stack/light_w/new_tile = new(user.loc)
new_tile.add_fingerprint(user)
else if(istype(W, /obj/item/stack/rods))
@@ -61,7 +61,7 @@ var/global/list/datum/stack_recipe/glass_recipes = list ( \
if (!G && replace)
user.put_in_hands(RG)
else
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>"
to_chat(user, "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>")
return
else
return ..()
@@ -106,7 +106,7 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
source.add_charge(amount * metcost)
glasource.add_charge(amount * glacost)
/obj/item/stack/sheet/rglass/New(loc, amount)
/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = reinforced_glass_recipes
..()
@@ -159,11 +159,11 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.species_traits)) // golems, etc
H << "<span class='warning'>[src] cuts into your hand!</span>"
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
H.apply_damage(force*0.5, BRUTE, hit_hand)
else if(ismonkey(user))
var/mob/living/carbon/monkey/M = user
M << "<span class='warning'>[src] cuts into your hand!</span>"
to_chat(M, "<span class='warning'>[src] cuts into your hand!</span>")
M.apply_damage(force*0.5, BRUTE, hit_hand)
@@ -180,7 +180,7 @@ var/global/list/datum/stack_recipe/reinforced_glass_recipes = list ( \
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user)
user << "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>"
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 ..()
@@ -13,7 +13,7 @@ var/global/list/datum/stack_recipe/human_recipes = list( \
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/hooded/bloated_human, 5, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/human/New(var/loc, var/amount=null)
/obj/item/stack/sheet/animalhide/human/Initialize(mapload, new_amount, merge = TRUE)
recipes = human_recipes
return ..()
@@ -33,7 +33,7 @@ var/global/list/datum/stack_recipe/corgi_recipes = list ( \
new/datum/stack_recipe("corgi costume", /obj/item/clothing/suit/hooded/ian_costume, 3, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/corgi/New(var/loc, var/amount=null)
/obj/item/stack/sheet/animalhide/corgi/Initialize(mapload, new_amount, merge = TRUE)
recipes = corgi_recipes
return ..()
@@ -54,7 +54,7 @@ var/global/list/datum/stack_recipe/monkey_recipes = list ( \
new/datum/stack_recipe("monkey suit", /obj/item/clothing/suit/monkeysuit, 2, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/monkey/New(var/loc, var/amount=null)
/obj/item/stack/sheet/animalhide/monkey/Initialize(mapload, new_amount, merge = TRUE)
recipes = monkey_recipes
return ..()
@@ -75,7 +75,7 @@ var/global/list/datum/stack_recipe/xeno_recipes = list ( \
new/datum/stack_recipe("alien suit", /obj/item/clothing/suit/xenos, 2, on_floor = 1), \
)
/obj/item/stack/sheet/animalhide/xeno/New(var/loc, var/amount=null)
/obj/item/stack/sheet/animalhide/xeno/Initialize(mapload, new_amount, merge = TRUE)
recipes = xeno_recipes
return ..()
@@ -138,7 +138,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \
)
/obj/item/stack/sheet/sinew/New(var/loc, var/amount=null)
/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge = TRUE)
recipes = sinew_recipes
return ..()
/*
@@ -173,7 +173,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \
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>")
if(do_after(user,50, target = src))
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>")
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/hairlesshide/HS in user.loc)
if(HS.amount < 50)
@@ -29,9 +29,9 @@
if (M.use(1))
use(1)
var/obj/item/L = new /obj/item/stack/tile/light(user.loc)
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)
else
user << "<span class='warning'>You need one metal sheet to finish the light tile!</span>"
to_chat(user, "<span class='warning'>You need one metal sheet to finish the light tile!</span>")
else
return ..()
@@ -71,7 +71,7 @@ var/global/list/datum/stack_recipe/sandbag_recipes = list ( \
new/datum/stack_recipe("sandbags", /obj/structure/barricade/sandbags, 1, time = 25, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/sandbags/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/sandbags/Initialize(mapload, new_amount, merge = TRUE)
recipes = sandbag_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -96,7 +96,7 @@ var/global/list/datum/stack_recipe/diamond_recipes = list ( \
new/datum/stack_recipe("AI Core Statue", /obj/structure/statue/diamond/ai2, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/diamond/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/diamond/Initialize(mapload, new_amount, merge = TRUE)
recipes = diamond_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -120,7 +120,7 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \
new/datum/stack_recipe("Engineer Statue", /obj/structure/statue/uranium/eng, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/uranium/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/uranium/Initialize(mapload, new_amount, merge = TRUE)
recipes = uranium_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -146,7 +146,7 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
new/datum/stack_recipe("Scientist Statue", /obj/structure/statue/plasma/scientist, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/plasma/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/plasma/Initialize(mapload, new_amount, merge = TRUE)
recipes = plasma_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -186,7 +186,7 @@ var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("CMO Statue", /obj/structure/statue/gold/cmo, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/gold/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/gold/Initialize(mapload, new_amount, merge = TRUE)
recipes = gold_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -213,7 +213,7 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \
new/datum/stack_recipe("Med Borg Statue", /obj/structure/statue/silver/medborg, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/silver/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/silver/Initialize(mapload, new_amount, merge = TRUE)
recipes = silver_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -235,7 +235,7 @@ var/global/list/datum/stack_recipe/clown_recipes = list ( \
new/datum/stack_recipe("Clown Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/mineral/bananium/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/bananium/Initialize(mapload, new_amount, merge = TRUE)
recipes = clown_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -261,7 +261,7 @@ var/global/list/datum/stack_recipe/titanium_recipes = list ( \
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20), \
)
/obj/item/stack/sheet/mineral/titanium/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/titanium/Initialize(mapload, new_amount, merge = TRUE)
recipes = titanium_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -288,7 +288,7 @@ var/global/list/datum/stack_recipe/plastitanium_recipes = list ( \
new/datum/stack_recipe("plas-titanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \
)
/obj/item/stack/sheet/mineral/plastitanium/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge = TRUE)
recipes = plastitanium_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -313,7 +313,7 @@ var/global/list/datum/stack_recipe/snow_recipes = list ( \
new/datum/stack_recipe("Snowball", /obj/item/toy/snowball, 1), \
)
/obj/item/stack/sheet/mineral/snow/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/snow/Initialize(mapload, new_amount, merge = TRUE)
recipes = snow_recipes
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -373,6 +373,6 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
new/datum/stack_recipe("Abductor Sciencist Statue", /obj/structure/statue/bananium/clown, 5, one_per_turf = 1, on_floor = 1)*/
)
/obj/item/stack/sheet/mineral/abductor/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
recipes = abductor_recipes
..()
@@ -38,7 +38,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("firelock frame", /obj/structure/firelock_frame, 3, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \*/
new/datum/stack_recipe("reflector frame", /obj/structure/reflector, 5, time = 25, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
@@ -85,7 +85,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
is_cyborg = 1
cost = 500
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
/obj/item/stack/sheet/metal/Initialize(mapload, new_amount, merge = TRUE)
recipes = metal_recipes
return ..()
@@ -111,7 +111,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
resistance_flags = FIRE_PROOF
merge_type = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
/obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge = TRUE)
recipes = plasteel_recipes
return ..()
@@ -160,7 +160,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/wood
/obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null)
/obj/item/stack/sheet/mineral/wood/Initialize(mapload, new_amount, merge = TRUE)
recipes = wood_recipes
return ..()
@@ -205,7 +205,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
throwforce = 0
merge_type = /obj/item/stack/sheet/cloth
/obj/item/stack/sheet/cloth/New(var/loc, var/amount=null)
/obj/item/stack/sheet/cloth/Initialize(mapload, new_amount, merge = TRUE)
recipes = cloth_recipes
return ..()
@@ -237,7 +237,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/cardboard
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
/obj/item/stack/sheet/cardboard/Initialize(mapload, new_amount, merge = TRUE)
recipes = cardboard_recipes
return ..()
@@ -272,20 +272,20 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
if(!iscultist(user))
user << "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>"
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
return
return ..()
/obj/item/stack/sheet/runed_metal/attack(atom/target, mob/living/user)
if(!iscultist(user))
user << "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>"
to_chat(user, "<span class='warning'>Only one with forbidden knowledge could hope to work this metal...</span>")
return
..()
/obj/item/stack/sheet/runed_metal/fifty
amount = 50
/obj/item/stack/sheet/runed_metal/New(var/loc, var/amount=null)
/obj/item/stack/sheet/runed_metal/Initialize(mapload, new_amount, merge = TRUE)
recipes = runed_metal_recipes
return ..()
@@ -322,7 +322,7 @@ var/global/list/datum/stack_recipe/brass_recipes = list ( \
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
/obj/item/stack/tile/brass/New(var/loc, var/amount=null)
/obj/item/stack/tile/brass/Initialize(mapload, new_amount, merge = TRUE)
recipes = brass_recipes
..()
pixel_x = 0
@@ -368,7 +368,6 @@ var/global/list/datum/stack_recipe/plastic_recipes = list(
singular_name = "plastic sheet"
icon_state = "sheet-plastic"
throwforce = 7
flags = CONDUCT
origin_tech = "materials=1"
origin_tech = "materials=1;biotech=1"
merge_type = /obj/item/stack/sheet/plastic
@@ -379,6 +378,6 @@ var/global/list/datum/stack_recipe/plastic_recipes = list(
/obj/item/stack/sheet/plastic/five
amount = 5
/obj/item/stack/sheet/plastic/New()
/obj/item/stack/sheet/plastic/Initialize(mapload, new_amount, merge = TRUE)
recipes = plastic_recipes
. = ..()
+31 -30
View File
@@ -19,42 +19,45 @@
var/cost = 1 // How much energy from storage it costs
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
/obj/item/stack/New(var/loc, var/amount=null)
/obj/item/stack/Initialize(mapload, new_amount=null , merge = TRUE)
..()
if (amount)
src.amount = amount
if(new_amount)
amount = new_amount
if(!merge_type)
merge_type = src.type
return
merge_type = type
if(merge)
for(var/obj/item/stack/S in loc)
if(S.merge_type == merge_type)
merge(S)
/obj/item/stack/Destroy()
if (usr && usr.machine==src)
usr << browse(null, "window=stack")
return ..()
. = ..()
/obj/item/stack/examine(mob/user)
..()
if (is_cyborg)
if(src.singular_name)
user << "There is enough energy for [src.get_amount()] [src.singular_name]\s."
to_chat(user, "There is enough energy for [src.get_amount()] [src.singular_name]\s.")
else
user << "There is enough energy for [src.get_amount()]."
to_chat(user, "There is enough energy for [src.get_amount()].")
return
if(src.singular_name)
if(src.get_amount()>1)
user << "There are [src.get_amount()] [src.singular_name]\s in the stack."
to_chat(user, "There are [src.get_amount()] [src.singular_name]\s in the stack.")
else
user << "There is [src.get_amount()] [src.singular_name] in the stack."
to_chat(user, "There is [src.get_amount()] [src.singular_name] in the stack.")
else if(src.get_amount()>1)
user << "There are [src.get_amount()] in the stack."
to_chat(user, "There are [src.get_amount()] in the stack.")
else
user << "There is [src.get_amount()] in the stack."
to_chat(user, "There is [src.get_amount()] in the stack.")
/obj/item/stack/proc/get_amount()
if (is_cyborg)
return round(source.energy / cost)
if(is_cyborg)
. = round(source.energy / cost)
else
return (amount)
. = (amount)
/obj/item/stack/attack_self(mob/user)
interact(user)
@@ -101,7 +104,6 @@
t1 += "</TT></body></HTML>"
user << browse(t1, "window=stack")
onclose(user, "stack")
return
/obj/item/stack/Topic(href, href_list)
..()
@@ -161,18 +163,18 @@
/obj/item/stack/proc/building_checks(datum/stack_recipe/R, multiplier)
if (src.get_amount() < R.req_amount*multiplier)
if (R.req_amount*multiplier>1)
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>"
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>")
else
usr << "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>"
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
return 0
if(R.window_checks && !valid_window_location(usr.loc, usr.dir))
usr << "<span class='warning'>The [R.title] won't fit here!</span>"
to_chat(usr, "<span class='warning'>The [R.title] won't fit here!</span>")
return 0
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
usr << "<span class='warning'>There is another [R.title] here!</span>"
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
return 0
if(R.on_floor && !isfloorturf(usr.loc))
usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>"
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
return 0
return 1
@@ -204,7 +206,7 @@
update_icon()
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
if(QDELETED(S) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
return
var/transfer = get_amount()
if(S.is_cyborg)
@@ -220,12 +222,12 @@
/obj/item/stack/Crossed(obj/o)
if(istype(o, merge_type) && !o.throwing)
merge(o)
return ..()
. = ..()
/obj/item/stack/hitby(atom/movable/AM, skip, hitpush)
if(istype(AM, merge_type))
merge(AM)
return ..()
. = ..()
/obj/item/stack/attack_hand(mob/user)
if (user.get_inactive_held_item() == src)
@@ -234,11 +236,10 @@
change_stack(user,1)
else
..()
return
/obj/item/stack/AltClick(mob/living/user)
if(!istype(user) || !user.canUseTopic(src))
user << "<span class='warning'>You can't do that right now!</span>"
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
@@ -253,10 +254,10 @@
return
else
change_stack(user,stackmaterial)
user << "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>"
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
/obj/item/stack/proc/change_stack(mob/user,amount)
var/obj/item/stack/F = new src.type(user, amount)
var/obj/item/stack/F = new type(user, amount, FALSE)
. = F
F.copy_evidences(src)
user.put_in_hands(F)
@@ -270,9 +271,9 @@
if(istype(W, merge_type))
var/obj/item/stack/S = W
merge(S)
user << "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>"
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
else
return ..()
. = ..()
/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
src.blood_DNA = from.blood_DNA
@@ -15,7 +15,7 @@
if(I && I.imp_in)
I.hidden_uplink.telecrystals += amount
use(amount)
user << "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>"
to_chat(user, "<span class='notice'>You press [src] onto yourself and charge your hidden uplink.</span>")
/obj/item/stack/telecrystal/afterattack(obj/item/I, mob/user, proximity)
if(!proximity)
@@ -24,7 +24,7 @@
if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
I.hidden_uplink.telecrystals += amount
use(amount)
user << "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>"
to_chat(user, "<span class='notice'>You slot [src] into the [I] and charge its internal uplink.</span>")
/obj/item/stack/telecrystal/five
amount = 5
@@ -24,11 +24,11 @@
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 4)
user << "<span class='warning'>You need at least four tiles to do this!</span>"
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
return
if(WT.is_hot() && !mineralType)
user << "<span class='warning'>You can not reform this!</span>"
to_chat(user, "<span class='warning'>You can not reform this!</span>")
return
if(WT.remove_fuel(0,user))
@@ -111,6 +111,18 @@
/obj/item/stack/tile/fakespace/loaded
amount = 30
/obj/item/stack/tile/fakepit
name = "fake pits"
singular_name = "fake pit"
desc = "A piece of carpet with a forced perspective illusion of a pit. No way this could fool anyone!"
icon_state = "tile_pit"
turf_type = /turf/open/floor/fakepit
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/tile/fakepit
/obj/item/stack/tile/fakepit/loaded
amount = 30
//High-traction
/obj/item/stack/tile/noslip
name = "high-traction floor tile"
@@ -124,6 +136,34 @@
/obj/item/stack/tile/noslip/thirty
amount = 30
//Circuit
/obj/item/stack/tile/circuit
name = "blue circuit tile"
singular_name = "blue circuit tile"
desc = "A blue circuit tile."
icon_state = "tile_bcircuit"
turf_type = /turf/open/floor/circuit
/obj/item/stack/tile/circuit/green
name = "green circuit tile"
singular_name = "green circuit tile"
desc = "A green circuit tile."
icon_state = "tile_gcircuit"
turf_type = /turf/open/floor/circuit/green
/obj/item/stack/tile/circuit/green/anim
turf_type = /turf/open/floor/circuit/green/anim
/obj/item/stack/tile/circuit/red
name = "red circuit tile"
singular_name = "red circuit tile"
desc = "A red circuit tile."
icon_state = "tile_rcircuit"
turf_type = /turf/open/floor/circuit/red
/obj/item/stack/tile/circuit/red/anim
turf_type = /turf/open/floor/circuit/red/anim
//Pod floor
/obj/item/stack/tile/pod
name = "pod floor tile"
+4 -4
View File
@@ -81,7 +81,7 @@
if(O.opened)
return
if(!O.delivery_icon) //no delivery icon means unwrappable closet (e.g. body bags)
user << "<span class='warning'>You can't wrap this!</span>"
to_chat(user, "<span class='warning'>You can't wrap this!</span>")
return
if(use(3))
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
@@ -90,14 +90,14 @@
P.add_fingerprint(user)
O.add_fingerprint(user)
else
user << "<span class='warning'>You need more paper!</span>"
to_chat(user, "<span class='warning'>You need more paper!</span>")
return
else
user << "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>"
to_chat(user, "<span class='warning'>The object you are trying to wrap is unsuitable for the sorting machinery!</span>")
return
user.visible_message("<span class='notice'>[user] wraps [target].</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [name] on [target]</font>")
user.log_message("<font color='blue'>Has used [name] on [target]</font>", INDIVIDUAL_ATTACK_LOG)
/obj/item/stack/packageWrap/Destroy()
if(!amount)