mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Resolves conflicts with baseball PR.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
desc = "Some rods. Can be used for building, or something."
|
||||
@@ -11,7 +15,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=1000)
|
||||
max_amount = 60
|
||||
max_amount = 50
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
toolspeed = 1
|
||||
@@ -20,9 +24,9 @@
|
||||
/obj/item/stack/rods/cyborg
|
||||
materials = list()
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/rods/New(loc, amount=null)
|
||||
..()
|
||||
|
||||
recipes = rod_recipes
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
@@ -32,12 +36,12 @@
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
to_chat(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))
|
||||
@@ -47,9 +51,9 @@
|
||||
// stack was moved into another one on the pile
|
||||
new_item = locate() in user.loc
|
||||
|
||||
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
user.visible_message("[user.name] shape [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
|
||||
var/replace = user.get_inactive_hand() == src
|
||||
use(2)
|
||||
@@ -59,34 +63,3 @@
|
||||
user.put_in_hands(new_item)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/stack/rods/attack_self(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
|
||||
if(locate(/obj/structure/grille, usr.loc))
|
||||
for(var/obj/structure/grille/G in usr.loc)
|
||||
if(G.destroyed)
|
||||
G.health = 10
|
||||
G.density = 1
|
||||
G.destroyed = 0
|
||||
G.icon_state = "grille"
|
||||
use(1)
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if(amount < 2)
|
||||
to_chat(user, "\blue You need at least two rods to do this.")
|
||||
return
|
||||
to_chat(usr, "\blue Assembling grille...")
|
||||
|
||||
if(!do_after(usr, 10, target = user))
|
||||
return
|
||||
|
||||
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
|
||||
to_chat(usr, "\blue You assemble a grille")
|
||||
F.add_fingerprint(usr)
|
||||
use(2)
|
||||
return
|
||||
|
||||
@@ -5,7 +5,6 @@ Mineral Sheets
|
||||
- Diamond
|
||||
- Uranium
|
||||
- Plasma
|
||||
- Plastic
|
||||
- Gold
|
||||
- Silver
|
||||
- Bananium
|
||||
@@ -77,23 +76,6 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
new/datum/stack_recipe("Xenomorph Statue", /obj/structure/statue/plasma/xeno, 5, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
var/global/list/datum/stack_recipe/bananium_recipes = list ( \
|
||||
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
|
||||
null, \
|
||||
@@ -196,19 +178,6 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic
|
||||
name = "Plastic"
|
||||
icon_state = "sheet-plastic"
|
||||
origin_tech = "materials=3"
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/New()
|
||||
..()
|
||||
recipes = plastic_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/cyborg
|
||||
name = "plastic sheets"
|
||||
icon_state = "sheet-plastic"
|
||||
|
||||
/obj/item/stack/sheet/mineral/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-gold"
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
* Plasteel
|
||||
* Wood
|
||||
* Cloth
|
||||
* Plastic
|
||||
* Cardboard
|
||||
* Runed Metal (cult)
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -150,13 +152,15 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
|
||||
new /datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("dog bed", /obj/structure/stool/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40),
|
||||
new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1),
|
||||
new /datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40),
|
||||
new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),
|
||||
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10)
|
||||
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),
|
||||
new /datum/stack_recipe("baseball bat", /obj/item/weapon/melee/baseball_bat, 5, time = 15)
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/wood
|
||||
@@ -290,3 +294,39 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
origin_tech = "materials=2;biotech=2"
|
||||
|
||||
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
|
||||
new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
|
||||
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
|
||||
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/plastic
|
||||
name = "plastic"
|
||||
desc = "Compress dinosaur over millions of years, then refine, split and mold, and voila! You have plastic."
|
||||
singular_name = "plastic sheet"
|
||||
icon_state = "sheet-plastic"
|
||||
throwforce = 7
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
|
||||
/obj/item/stack/sheet/plastic/New()
|
||||
recipes = plastic_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/sheet/plastic/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/sheet/plastic/five
|
||||
amount = 5
|
||||
|
||||
@@ -35,6 +35,24 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/shard/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
if(!proximity || !(src in user))
|
||||
return
|
||||
if(isturf(AM))
|
||||
return
|
||||
if(istype(AM, /obj/item/weapon/storage))
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.gloves)
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
if(affecting.take_damage(force*0.5))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/weapon/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating themself to death with [src]! It looks like they're trying to commit suicide!</span>")
|
||||
user.visible_message("<span class='suicide'>[user] is beating themselves to death with [src]! It looks like they're trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
origin_tech = "materials=5;engineering=5;abductor=3"
|
||||
|
||||
/obj/item/weapon/wrench/power
|
||||
name = "Hand Drill"
|
||||
name = "hand drill"
|
||||
desc = "A simple powered drill with a bolt bit."
|
||||
icon_state = "drill_bolt"
|
||||
item_state = "drill"
|
||||
@@ -178,7 +178,7 @@
|
||||
toolspeed = 0.1
|
||||
|
||||
/obj/item/weapon/screwdriver/power
|
||||
name = "Hand Drill"
|
||||
name = "hand drill"
|
||||
desc = "A simple hand drill with a screwdriver bit attached."
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
@@ -275,7 +275,7 @@
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weapon/wirecutters/power
|
||||
name = "Jaws of Life"
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
@@ -672,7 +672,7 @@ obj/item/weapon/weldingtool/experimental/process()
|
||||
|
||||
/obj/item/weapon/crowbar/large
|
||||
name = "crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big."
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
@@ -690,8 +690,8 @@ obj/item/weapon/weldingtool/experimental/process()
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weapon/crowbar/power
|
||||
name = "Jaws of Life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head"
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
@@ -716,7 +716,7 @@ obj/item/weapon/weldingtool/experimental/process()
|
||||
// Conversion kit
|
||||
/obj/item/weapon/conversion_kit
|
||||
name = "\improper Revolver Conversion Kit"
|
||||
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure"
|
||||
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "kit"
|
||||
flags = CONDUCT
|
||||
|
||||
@@ -138,4 +138,67 @@ obj/item/weapon/wirerod/attackby(obj/item/I, mob/user, params)
|
||||
icon_state = "kidanspear"
|
||||
item_state = "kidanspear"
|
||||
force = 10
|
||||
throwforce = 15
|
||||
throwforce = 15
|
||||
|
||||
/obj/item/weapon/melee/baseball_bat
|
||||
name = "baseball bat"
|
||||
desc = "There ain't a skull in the league that can withstand a swatter."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "baseball_bat"
|
||||
item_state = "baseball_bat"
|
||||
force = 10
|
||||
throwforce = 12
|
||||
attack_verb = list("beat", "smacked")
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/homerun_ready = 0
|
||||
var/homerun_able = 0
|
||||
|
||||
/obj/item/weapon/melee/baseball_bat/homerun
|
||||
name = "home run bat"
|
||||
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
|
||||
homerun_able = 1
|
||||
|
||||
/obj/item/weapon/melee/baseball_bat/attack_self(mob/user)
|
||||
if(!homerun_able)
|
||||
..()
|
||||
return
|
||||
if(homerun_ready)
|
||||
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
|
||||
..()
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
|
||||
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
|
||||
if(do_after(user, 90, target = src))
|
||||
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
|
||||
homerun_ready = 1
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/baseball_bat/attack(mob/living/target, mob/living/user)
|
||||
. = ..()
|
||||
var/atom/throw_target = get_edge_target_turf(target, user.dir)
|
||||
if(homerun_ready)
|
||||
user.visible_message("<span class='userdanger'>It's a home run!</span>")
|
||||
target.throw_at(throw_target, rand(8,10), 14, user)
|
||||
target.ex_act(2)
|
||||
playsound(get_turf(src), 'sound/weapons/HOMERUN.ogg', 100, 1)
|
||||
homerun_ready = 0
|
||||
return
|
||||
else
|
||||
target.throw_at(throw_target, rand(1,2), 7, user)
|
||||
|
||||
/obj/item/weapon/melee/baseball_bat/ablative
|
||||
name = "metal baseball bat"
|
||||
desc = "This bat is made of highly reflective, highly armored material."
|
||||
icon_state = "baseball_bat_metal"
|
||||
item_state = "baseball_bat_metal"
|
||||
force = 12
|
||||
throwforce = 15
|
||||
|
||||
/obj/item/weapon/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers
|
||||
var/picksound = rand(1,2)
|
||||
var/turf = get_turf(src)
|
||||
if(picksound == 1)
|
||||
playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1)
|
||||
if(picksound == 2)
|
||||
playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1)
|
||||
return 1
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/freezer
|
||||
desc = "It's an immobile card-locked refrigerative storage unit. This one is lead-lined."
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/update_icon()
|
||||
if(broken)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
base_name = "Maintenance Hatch"
|
||||
airlock_type = "/maintenance_hatch"
|
||||
glass = -1
|
||||
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
|
||||
base_icon_state = "highsec"
|
||||
base_name = "High Security Airlock"
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
base_icon_state = "shuttle"
|
||||
base_name = "shuttle airlock"
|
||||
base_name = "Shuttle Airlock"
|
||||
airlock_type = "/shuttle"
|
||||
glass = -1
|
||||
|
||||
@@ -175,10 +175,10 @@
|
||||
new /obj/item/stack/sheet/rglass(src.loc)
|
||||
glass = 0
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||
user.visible_message("[user] disassembles the airlock assembly.", "You start to disassemble the airlock assembly.")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "\blue You dissasembled the airlock assembly!")
|
||||
to_chat(user, "\blue You disassembled the airlock assembly!")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
qdel(src)
|
||||
else
|
||||
@@ -212,8 +212,9 @@
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "\blue You cut the airlock wires.!")
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
to_chat(user, "\blue You cut the airlock's wires!")
|
||||
if(state == 1)
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
|
||||
@@ -7,11 +7,16 @@
|
||||
anchored = 1
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = 2.9
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
layer = BELOW_OBJ_LAYER
|
||||
level = 3
|
||||
|
||||
var/health = 10
|
||||
var/broken = 0
|
||||
var/can_deconstruct = TRUE
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
var/grille_type = null
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
|
||||
/obj/structure/grille/fence/
|
||||
var/width = 3
|
||||
@@ -26,7 +31,6 @@
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
|
||||
/obj/structure/grille/fence/east_west
|
||||
//width=80
|
||||
//height=42
|
||||
@@ -38,19 +42,23 @@
|
||||
icon='icons/fence-ns.dmi'
|
||||
|
||||
/obj/structure/grille/ex_act(severity)
|
||||
qdel(src)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(rand(5,10), BRUTE, 0)
|
||||
|
||||
/obj/structure/grille/blob_act()
|
||||
qdel(src)
|
||||
if(!broken)
|
||||
obj_break()
|
||||
|
||||
/obj/structure/grille/Bumped(atom/user)
|
||||
if(ismob(user)) shock(user, 70)
|
||||
if(ismob(user))
|
||||
shock(user, 70)
|
||||
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user as mob)
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='warning'>You kick [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
@@ -58,26 +66,23 @@
|
||||
if(shock(user, 70))
|
||||
return
|
||||
if(HULK in user.mutations)
|
||||
health -= 5
|
||||
take_damage(5)
|
||||
else
|
||||
health -= 1
|
||||
healthcheck()
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
if(istype(user, /mob/living/carbon/alien/larva))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
if(!shock(user, 70))
|
||||
health -= 5
|
||||
healthcheck()
|
||||
return
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/living/user as mob)
|
||||
/obj/structure/grille/attack_slime(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
@@ -89,12 +94,11 @@
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
health -= rand(2,3)
|
||||
healthcheck()
|
||||
return
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
/obj/structure/grille/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
|
||||
return
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
@@ -102,18 +106,15 @@
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
health -= M.melee_damage_upper
|
||||
healthcheck()
|
||||
return
|
||||
take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type)
|
||||
|
||||
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
health -= M.force * 0.5
|
||||
healthcheck()
|
||||
take_damage(M.force * 0.5, M.damtype)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return 1
|
||||
else
|
||||
@@ -128,118 +129,144 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
..()
|
||||
if((Proj.damage_type != STAMINA)) //Grilles can't be exhausted to death
|
||||
src.health -= Proj.damage*0.3
|
||||
healthcheck()
|
||||
return
|
||||
/obj/structure/grille/bullet_act(obj/item/projectile/Proj)
|
||||
. = ..()
|
||||
take_damage(Proj.damage*0.3, Proj.damage_type)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
if(!destroyed)
|
||||
new /obj/item/stack/rods(loc, 2)
|
||||
else
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
deconstruct()
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
|
||||
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods) && broken)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(!shock(user, 90))
|
||||
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
|
||||
"<span class='notice'>You rebuild the broken grille.</span>")
|
||||
new grille_type(loc)
|
||||
R.use(1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass) )
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
|
||||
if( x == user.x )
|
||||
if( y > user.y )
|
||||
dir_to_set = 2
|
||||
else
|
||||
dir_to_set = 1
|
||||
else if( y == user.y )
|
||||
if( x > user.x )
|
||||
dir_to_set = 8
|
||||
else
|
||||
dir_to_set = 4
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't reach.</span>")
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass))
|
||||
if(!broken)
|
||||
var/obj/item/stack/ST = W
|
||||
if (ST.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start placing the window.</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
if(!src) return //Grille destroyed while waiting
|
||||
var/dir_to_set = NORTH
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
|
||||
return
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions.
|
||||
if(x == user.x)
|
||||
if(y > user.y)
|
||||
dir_to_set = SOUTH
|
||||
else
|
||||
dir_to_set = NORTH
|
||||
else if(y == user.y)
|
||||
if(x > user.x)
|
||||
dir_to_set = WEST
|
||||
else
|
||||
dir_to_set = EAST
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't reach.</span>")
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.dir = dir_to_set
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
var/obj/item/stack/ST = W
|
||||
ST.use(1)
|
||||
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
|
||||
WD.update_icon()
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start placing the window...</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored) //Grille destroyed or unanchored while waiting
|
||||
return
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.setDir(dir_to_set)
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
ST.use(1)
|
||||
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
|
||||
WD.update_icon()
|
||||
return
|
||||
//window placing end
|
||||
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
|
||||
return attacked_by(W, user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard))
|
||||
health -= W.force * 0.1
|
||||
else if(!shock(user, 70))
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
health -= W.force
|
||||
if("brute")
|
||||
health -= W.force * 0.1
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
/obj/structure/grille/proc/attacked_by(obj/item/I, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(!(I.flags&NOBLUDGEON))
|
||||
if(I.force)
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/proc/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(can_deconstruct)
|
||||
var/obj/R = new rods_type(loc, rods_amount)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/healthcheck()
|
||||
/obj/structure/grille/proc/obj_break()
|
||||
if(!broken && can_deconstruct)
|
||||
new broken_type(loc)
|
||||
var/obj/R = new rods_type(loc, rods_broken)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
if(!destroyed)
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
destroyed = 1
|
||||
new /obj/item/stack/rods(loc)
|
||||
|
||||
if(!broken)
|
||||
obj_break()
|
||||
else
|
||||
if(health <= -6)
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
deconstruct()
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user as mob, prb)
|
||||
if(!anchored || destroyed) // deanchored/destroyed grilles are never connected
|
||||
/obj/structure/grille/proc/shock(mob/user, prb)
|
||||
if(!anchored || broken) // unanchored/broken grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
@@ -258,8 +285,27 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!destroyed)
|
||||
if(!broken)
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
health -= 1
|
||||
healthcheck()
|
||||
take_damage(1)
|
||||
..()
|
||||
|
||||
/obj/structure/grille/hitby(atom/movable/AM)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 5
|
||||
else if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
tforce = max(0, I.throwforce * 0.5)
|
||||
take_damage(tforce)
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
health = 0
|
||||
broken = 1
|
||||
rods_amount = 1
|
||||
rods_broken = 0
|
||||
grille_type = /obj/structure/grille
|
||||
broken_type = null
|
||||
|
||||
@@ -27,6 +27,23 @@
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
|
||||
/obj/structure/stool/bed/dogbed
|
||||
name = "dog bed"
|
||||
icon_state = "dogbed"
|
||||
desc = "A comfy-looking dog bed. You can even strap your pet in, in case the gravity turns off."
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/stool/bed/dogbed/ian
|
||||
name = "Ian's bed"
|
||||
desc = "Ian's bed! Looks comfy."
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/stool/bed/dogbed/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswrench(W))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
new /obj/item/stack/sheet/wood(loc, 10)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/stool/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||
|
||||
Reference in New Issue
Block a user