mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
rename __DEFINES/mob.dm to __DEFINES/mobs.dm
make environment_smash into bitflags add obj_damage for simple animals make default max_integrity and obj_integrity INFINITY for non-defined objects, until we can move more objects to obj_integrity/take_damage() system adds examining objects to roughly check damage more obj_defense.dm procs tables can be attacked with items, glass tables have a narsie_act() fixes, changes to make it compile
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
/obj/structure/girder/attack_animal(mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(M.environment_smash >= 1)
|
||||
if(M.environment_smash == 3)
|
||||
if((M.environment_smash & ENVIRONMENT_SMASH_STRUCTURES) || (M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS))
|
||||
if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS)
|
||||
ex_act(2)
|
||||
M.visible_message("<span class='warning'>[M] smashes through \the [src].</span>", "<span class='warning'>You smash through \the [src].</span>")
|
||||
else
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
var/grille_type = null
|
||||
var/grille_type
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
|
||||
/obj/structure/grille/fence/
|
||||
@@ -95,36 +95,6 @@
|
||||
if(!shock(user, 70))
|
||||
take_damage(20, BRUTE, "melee", 1)
|
||||
|
||||
/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
|
||||
if(!S.is_adult)
|
||||
return
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/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)
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", 1)
|
||||
|
||||
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
take_damage(M.force * 0.5, M.damtype)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
@@ -142,10 +112,6 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/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, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
@@ -155,7 +121,7 @@
|
||||
deconstruct()
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
anchored = !anchored
|
||||
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>")
|
||||
@@ -177,7 +143,7 @@
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
|
||||
return attacked_by(W, user)
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
|
||||
if(!istype(S) || !user)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
/obj/structure/inflatable/attack_generic(mob/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
|
||||
icon_state = "brass_frame"
|
||||
burn_state = FIRE_PROOF
|
||||
unacidable = 1
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
framestackamount = 1
|
||||
|
||||
|
||||
@@ -82,42 +82,6 @@
|
||||
new /obj/structure/table/reinforced/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
if(3)
|
||||
if(prob(25))
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
@@ -254,18 +218,7 @@
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, loc)
|
||||
spark_system.start()
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("<span class='notice'>The [src] was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear [src] coming apart.</span>", 2)
|
||||
deconstruct(FALSE)
|
||||
return
|
||||
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(user.a_intent != INTENT_HARM && !(I.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
@@ -275,8 +228,8 @@
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
@@ -401,6 +354,7 @@
|
||||
icon_state = "glass_table"
|
||||
buildstack = /obj/item/stack/sheet/glass
|
||||
max_integrity = 70
|
||||
unacidable = 1
|
||||
canSmoothWith = null
|
||||
var/list/debris = list()
|
||||
|
||||
@@ -465,6 +419,11 @@
|
||||
debris -= AM
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/narsie_act()
|
||||
color = NARSIE_WINDOW_COLOUR
|
||||
for(var/obj/item/weapon/shard/S in debris)
|
||||
S.color = NARSIE_WINDOW_COLOUR
|
||||
|
||||
/*
|
||||
* Wooden tables
|
||||
*/
|
||||
@@ -602,8 +561,8 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
layer = TABLE_LAYER
|
||||
density = 1
|
||||
anchored = 1
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
pass_flags = LETPASSTHROW
|
||||
max_integrity = 20
|
||||
|
||||
@@ -611,28 +570,6 @@
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
|
||||
|
||||
/obj/structure/rack/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
qdel(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
if(3)
|
||||
if(prob(25))
|
||||
qdel(src)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
|
||||
/obj/structure/rack/blob_act()
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
return
|
||||
else if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
@@ -668,46 +605,21 @@
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
if(!(W.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
W.Move(loc)
|
||||
return
|
||||
|
||||
/obj/structure/rack/attack_hand(mob/user)
|
||||
if(HULK in user.mutations)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
deconstruct()
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='danger'>You kick [src].</span>")
|
||||
obj_integrity -= rand(1,2)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_alien(mob/living/user)
|
||||
/obj/structure/rack/attack_hand(mob/living/user)
|
||||
if(user.weakened || user.resting || user.lying)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/rack/proc/healthcheck()
|
||||
if(obj_integrity <= 0)
|
||||
deconstruct()
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='danger'>You kick [src].</span>")
|
||||
take_damage(rand(4,8), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
|
||||
@@ -148,7 +148,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/proc/attack_generic(mob/living/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
/obj/structure/window/attack_generic(mob/living/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
health -= damage
|
||||
|
||||
Reference in New Issue
Block a user