Merge pull request #9039 from Fox-McCloud/attack-hulk

Makes Hulk Attacking Less Snowflakey
This commit is contained in:
tigercat2000
2018-06-03 16:38:52 -07:00
committed by GitHub
27 changed files with 418 additions and 547 deletions
@@ -2,13 +2,13 @@
"ab" = (/turf/simulated/mineral/random/labormineral,/area/awaycontent/a3{always_unpowered = 1; ambientsounds = list('sound/ambience/ambimine.ogg'); has_gravity = 1; name = "Khonsu 19"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ac" = (/obj/structure/alien/weeds,/obj/structure/alien/resin/wall,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ad" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/resin/wall,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ae" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ae" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"af" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/resin/wall,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ag" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ag" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ah" = (/obj/structure/alien/weeds,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ai" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/mob/living/simple_animal/hostile/alien,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aj" = (/obj/structure/alien/weeds,/obj/structure/stool/bed/nest,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ak" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"ak" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"al" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/stool/bed/nest,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"am" = (/obj/structure/alien/weeds/node,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"an" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/stool/bed/nest,/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
@@ -32,9 +32,9 @@
"aF" = (/obj/machinery/gateway{dir = 1},/turf/simulated/floor/plasteel{dir = 8; icon_state = "vault"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"})
"aG" = (/obj/machinery/gateway{dir = 9},/turf/simulated/floor/plasteel{dir = 1; icon_state = "vault"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"})
"aH" = (/obj/machinery/gateway{dir = 5},/turf/simulated/floor/plasteel{dir = 4; icon_state = "vault"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"})
"aI" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/obj/effect/decal/cleanable/blood/gibs{color = "red"; icon_state = "gib1_flesh"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aI" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/obj/effect/decal/cleanable/blood/gibs{color = "red"; icon_state = "gib1_flesh"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aJ" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/effect/decal/cleanable/blood/gibs{color = "red"; icon_state = "gib2_flesh"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aK" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/obj/effect/decal/cleanable/blood{color = "red"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aK" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/obj/effect/decal/cleanable/blood{color = "red"},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aL" = (/obj/structure/alien/weeds,/mob/living/simple_animal/hostile/alien/drone{plants_off = 1},/turf/simulated/floor/plating/airless/asteroid,/area/awaycontent/a5{always_unpowered = 1; has_gravity = 1; name = "The Hive"; power_environ = 0; power_equip = 0; power_light = 0; poweralm = 0})
"aM" = (/obj/machinery/light{dir = 8},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"})
"aN" = (/obj/machinery/gateway/centeraway{calibrated = 0},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/awaycontent/a4{has_gravity = 1; name = "Syndicate Outpost"})
@@ -220,7 +220,7 @@
"el" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/stool/bed/nest,/obj/effect/decal/cleanable/blood/tracks{color = "red"; desc = "Your instincts say you shouldn't be following these."; dir = 9; icon = 'icons/effects/blood.dmi'; icon_state = "tracks"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"em" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/effect/decal/cleanable/blood/tracks{color = "red"; desc = "Your instincts say you shouldn't be following these."; dir = 4; icon = 'icons/effects/blood.dmi'; icon_state = "tracks"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"en" = (/obj/structure/alien/weeds,/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eo" = (/obj/machinery/light{active_power_usage = 0; dir = 1; icon_state = "tube-broken"; status = 2},/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/obj/machinery/camera{c_tag = "Xenobiology Containment North"; network = list("MO19X")},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eo" = (/obj/machinery/light{active_power_usage = 0; dir = 1; icon_state = "tube-broken"; status = 2},/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/obj/machinery/camera{c_tag = "Xenobiology Containment North"; network = list("MO19X")},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"ep" = (/obj/machinery/sparker{desc = "A wall-mounted ignition device. This one has been applied with an acid-proof coating."; id = "awayxenobio"; name = "Acid-Proof mounted igniter"; pixel_x = 0; pixel_y = 25; unacidable = 1},/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/resin/wall,/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eq" = (/obj/structure/alien/weeds,/obj/structure/alien/resin/wall,/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"er" = (/obj/structure/alien/weeds,/obj/structure/stool/bed/nest,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
@@ -240,7 +240,7 @@
"eF" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/resin/wall,/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eG" = (/obj/structure/alien/weeds,/obj/structure/stool/bed/nest,/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eH" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/effect/decal/cleanable/blood/tracks{color = "red"; desc = "Your instincts say you shouldn't be following these."; icon = 'icons/effects/blood.dmi'; icon_state = "tracks"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eI" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eI" = (/obj/structure/alien/weeds,/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eJ" = (/turf/simulated/wall,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eK" = (/turf/simulated/wall/rust,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eL" = (/turf/simulated/floor/plasteel{dir = 2; icon_state = "whitehall"},/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
@@ -248,7 +248,7 @@
"eN" = (/obj/machinery/light/small{active_power_usage = 0; dir = 8; icon_state = "bulb-broken"; status = 2},/obj/machinery/camera{c_tag = "Xenobiology"; dir = 4; network = list("MO19","MO19R")},/turf/simulated/floor/plasteel{dir = 6; icon_state = "whitehall"},/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eO" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/visible,/obj/structure/stool/bed/chair/office/light{dir = 4},/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eP" = (/obj/structure/table/reinforced,/obj/machinery/door_control{id = "Awaylab"; name = "Containment Chamber Blast Doors"; pixel_x = 4; pixel_y = -2; req_access_txt = "201"},/obj/machinery/ignition_switch{id = "awayxenobio"; pixel_x = 4; pixel_y = 8},/obj/structure/alien/weeds{icon_state = "weeds2"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "warning"},/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eQ" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eQ" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eR" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/effect/decal/cleanable/blood{color = "red"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eS" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"eT" = (/turf/simulated/wall,/area/awaycontent/a7)
@@ -273,7 +273,7 @@
"fm" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/machinery/atmospherics/pipe/simple/visible,/turf/simulated/floor/plasteel{icon_state = "white"},/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"fn" = (/obj/structure/closet/l3closet/scientist,/obj/structure/window/reinforced,/obj/structure/alien/weeds{icon_state = "weeds1"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "warning"},/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"fo" = (/obj/structure/cable,/obj/structure/cable{icon_state = "0-2"; d2 = 2},/obj/machinery/door/poddoor/preopen{desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; name = "Acid-Proof containment chamber blast door"; unacidable = 1},/obj/structure/grille,/obj/structure/window/full/reinforced,/turf/simulated/floor/plating,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"fp" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/weeds{desc = "A large mottled egg."; health = 100; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"fp" = (/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/structure/alien/weeds{desc = "A large mottled egg."; icon_state = "egg_hatched"; name = "egg"},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"fq" = (/obj/structure/alien/weeds{icon_state = "weeds1"},/obj/structure/stool/bed/nest,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_impregnated"; item_state = "facehugger_impregnated"; stat = 2},/turf/simulated/floor/engine,/area/awaycontent/a2{has_gravity = 1; name = "MO19 Research"})
"fr" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/floor/plating,/area/awaycontent/a7)
"fs" = (/obj/effect/decal/cleanable/blood/tracks{desc = "Your instincts say you shouldn't be following these."; dir = 8; icon_state = "ltrails_1"},/turf/simulated/floor/plating,/area/awaycontent/a7)
+5
View File
@@ -12,6 +12,11 @@
if(proximity && istype(G) && G.Touch(A, 1))
return
if(HULK in mutations)
if(proximity) //no telekinetic hulk attack
if(A.attack_hulk(src))
return
A.attack_hand(src)
/atom/proc/attack_hand(mob/user as mob)
+6
View File
@@ -143,6 +143,12 @@
/atom/proc/setDir(newdir)
dir = newdir
/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(does_attack_animation)
user.changeNext_move(CLICK_CD_MELEE)
add_attack_logs(user, src, "Punched with hulk powers")
user.do_attack_animation(src, ATTACK_EFFECT_SMASH)
/atom/proc/CheckParts(list/parts_list)
for(var/A in parts_list)
if(istype(A, /datum/reagent))
+3
View File
@@ -147,6 +147,9 @@
..()
take_damage(power/400, BURN)
/obj/structure/blob/hulk_damage()
return 15
/obj/structure/blob/attackby(var/obj/item/W, var/mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
+5 -6
View File
@@ -54,13 +54,12 @@
if(prob(75))
qdel(src)
/obj/machinery/optable/attack_hand(mob/user as mob)
if(HULK in usr.mutations)
to_chat(usr, text("<span class='notice'>You destroy the table.</span>"))
visible_message("<span class='warning'>[usr] destroys the operating table!</span>")
src.density = 0
/obj/machinery/optable/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
..(user, TRUE)
visible_message("<span class='warning'>[user] destroys the operating table!</span>")
qdel(src)
return
return TRUE
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
+14 -13
View File
@@ -470,19 +470,10 @@
/obj/mecha/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
log_message("Attack by hand/paw. Attacker - [user].",1)
if((HULK in user.mutations) && !prob(deflect_chance))
do_attack_animation(src, ATTACK_EFFECT_SMASH)
take_damage(15)
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
user.visible_message("<span class='danger'>[user] hits [name], doing some damage.</span>",
"<span class='danger'>You hit [name] with all your might. The metal creaks and bends.</span>")
else
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>","<span class='danger'>You hit [name] with no visible effect.</span>")
log_append_to_last("Armor saved.")
return
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>", "<span class='danger'>You hit [name] with no visible effect.</span>")
log_append_to_last("Armor saved.")
/obj/mecha/attack_alien(mob/living/user)
@@ -526,6 +517,16 @@
user.create_attack_log("<font color='red'>attacked [name]</font>")
return
/obj/mecha/hulk_damage()
return 15
/obj/mecha/attack_hulk(mob/living/carbon/human/user)
. = ..()
if(.)
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST))
log_message("Attack by hulk. Attacker - [user].", 1)
add_attack_logs(user, src, "Punched with hulk powers")
/obj/mecha/hitby(atom/movable/A) //wrapper
..()
log_message("Hit by [A].",1)
@@ -163,13 +163,14 @@
// dense and opaque, but easy to break
/obj/structure/foamedmetal
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 1 // changed in New()
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = TRUE
opacity = TRUE // changed in New()
anchored = TRUE
max_integrity = 20
var/metal = MFOAM_ALUMINUM
/obj/structure/foamedmetal/Initialize()
@@ -177,7 +178,6 @@
air_update_turf(1)
/obj/structure/foamedmetal/Destroy()
density = 0
air_update_turf(1)
return ..()
@@ -186,64 +186,31 @@
..()
move_update_air(T)
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
playsound(loc, 'sound/weapons/tap.ogg', 100, 1)
/obj/structure/foamedmetal/proc/updateicon()
if(metal == MFOAM_ALUMINUM)
icon_state = "metalfoam"
max_integrity = 20
obj_integrity = max_integrity
else
icon_state = "ironfoam"
/obj/structure/foamedmetal/ex_act(severity)
qdel(src)
/obj/structure/foamedmetal/blob_act()
qdel(src)
/obj/structure/foamedmetal/bullet_act()
if(metal==MFOAM_ALUMINUM || prob(50))
qdel(src)
max_integrity = 50
obj_integrity = max_integrity
/obj/structure/foamedmetal/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
if((HULK in user.mutations) || (prob(75 - metal*25)))
user.visible_message("<span class='warning'>[user] smashes through \the [src].</span>", "<span class='notice'>You smash through \the [src].</span>")
if(prob(75 - metal * 25))
user.visible_message("<span class='warning'>[user] smashes through [src].</span>", "<span class='notice'>You smash through [src].</span>")
qdel(src)
else
to_chat(user, "<span class='notice'>You hit the metal foam but bounce off it.</span>")
playsound(loc, 'sound/weapons/tap.ogg', 100, 1)
/obj/structure/foamedmetal/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(istype(I, /obj/item/grab))
var/obj/item/grab/G = I
G.affecting.loc = src.loc
user.visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>")
qdel(I)
qdel(src)
return
if(prob(I.force*20 - metal*25))
user.visible_message("<span class='warning'>[user] smashes through the foamed metal with \the [I].</span>", "<span class='notice'>You smash through the foamed metal with \the [I].</span>")
qdel(src)
else
to_chat(user, "<span class='warning'>You hit the metal foam to no effect.</span>")
/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/M)
M.do_attack_animation(src)
if(M.melee_damage_upper == 0)
M.visible_message("<span class='notice'>[M] nudges \the [src].</span>")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
M.visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>")
qdel(src)
/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M)
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>");
qdel(src)
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target)
return !density
/obj/structure/foamedmetal/CanAtmosPass()
return !density
return !density
+4 -1
View File
@@ -11,4 +11,7 @@
return
/obj/effect/fire_act()
return
return
/obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
return FALSE
+3
View File
@@ -550,3 +550,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
/obj/item/proc/on_trip(mob/living/carbon/human/H)
if(H.slip(src, trip_stun, trip_weaken, trip_tiles, trip_walksafe, trip_any, trip_verb))
return TRUE
/obj/item/attack_hulk(mob/living/carbon/human/user)
return FALSE
@@ -247,6 +247,11 @@
return ..()
return 0
/obj/item/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
to_chat(user, "<span class='warning'>You can't pick up such a dangerous item with your meaty hands without losing fingers, better not to!</span>")
return TRUE
/obj/item/twohanded/dualsaber/green
blade_color = "green"
+16
View File
@@ -71,6 +71,22 @@
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>")
take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration)
/obj/proc/hulk_damage()
return 150 //the damage hulks do on punches to this object, is affected by melee armor
/obj/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
..(user, TRUE)
visible_message("<span class='danger'>[user] smashes [src]!</span>")
if(density)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
else
playsound(src, 'sound/effects/bang.ogg', 50, 1)
take_damage(hulk_damage(), BRUTE, "melee", 0, get_dir(src, user))
return TRUE
return FALSE
/obj/blob_act(obj/structure/blob/B)
if(isturf(loc))
var/turf/T = loc
+45 -152
View File
@@ -13,6 +13,27 @@
/obj/structure/alien
icon = 'icons/mob/alien.dmi'
max_integrity = 100
/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
switch(damage_type)
if(BRUTE)
damage_amount *= 0.25
if(BURN)
damage_amount *= 2
. = ..()
/obj/structure/alien/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
if(damage_amount)
playsound(loc, 'sound/items/welder.ogg', 100, 1)
/*
* Resin
@@ -22,13 +43,13 @@
desc = "Looks like some kind of thick resin."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
icon_state = "resin"
density = 1
opacity = 1
anchored = 1
density = TRUE
opacity = TRUE
anchored = TRUE
canSmoothWith = list(/obj/structure/alien/resin)
var/health = 200
var/resintype = null
max_integrity = 200
smooth = SMOOTH_TRUE
var/resintype = null
/obj/structure/alien/resin/Initialize()
air_update_turf(1)
@@ -60,7 +81,7 @@
/obj/structure/alien/resin/wall/shadowling //For chrysalis
name = "chrysalis wall"
desc = "Some sort of purple substance in an egglike shape. It pulses and throbs from within and seems impenetrable."
health = INFINITY
max_integrity = INFINITY
/obj/structure/alien/resin/membrane
name = "resin membrane"
@@ -68,80 +89,11 @@
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
icon_state = "membrane0"
opacity = 0
health = 120
max_integrity = 160
resintype = "membrane"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
/obj/structure/alien/resin/proc/healthcheck()
if(health <=0)
qdel(src)
/obj/structure/alien/resin/bullet_act(obj/item/projectile/Proj)
if(Proj.damage_type == BRUTE || Proj.damage_type == BURN)
health -= Proj.damage
..()
healthcheck()
/obj/structure/alien/resin/ex_act(severity)
switch(severity)
if(1)
health -= 150
if(2)
health -= 100
if(3)
health -= 50
healthcheck()
/obj/structure/alien/resin/blob_act()
health -= 50
healthcheck()
/obj/structure/alien/resin/hitby(atom/movable/AM)
..()
var/tforce = 0
if(ismob(AM))
tforce = 10
else if(isobj(AM))
var/obj/O = AM
tforce = O.throwforce
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health -= tforce
healthcheck()
/obj/structure/alien/resin/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
health = 0
healthcheck()
/obj/structure/alien/resin/attack_alien(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(islarva(user))
return
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health -= 50
if(health <= 0)
user.visible_message("<span class='danger'>[user] slices the [name] apart!</span>")
healthcheck()
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
health -= I.force
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
healthcheck()
..()
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0)
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
@@ -157,11 +109,11 @@
gender = PLURAL
name = "resin floor"
desc = "A thick resin surface covers the floor."
anchored = TRUE
density = FALSE
layer = TURF_LAYER
icon_state = "weeds"
anchored = 1
density = 0
layer = 2
var/health = 15
max_integrity = 15
var/obj/structure/alien/weeds/node/linked_node = null
var/static/list/weedImageCache
@@ -204,39 +156,9 @@
new /obj/structure/alien/weeds(T, linked_node)
/obj/structure/alien/weeds/ex_act(severity)
qdel(src)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
var/damage = I.force / 4
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, WT.usesound, 100, 1)
health -= damage
healthcheck()
/obj/structure/alien/weeds/proc/healthcheck()
if(health <= 0)
qdel(src)
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
take_damage(5, BURN, 0, 0)
/obj/structure/alien/weeds/proc/updateWeedOverlays()
@@ -303,9 +225,10 @@
name = "egg"
desc = "A large mottled egg."
icon_state = "egg_growing"
density = 0
anchored = 1
var/health = 100
density = FALSE
anchored = TRUE
max_integrity = 100
integrity_failure = 5
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
layer = MOB_LAYER
@@ -315,6 +238,8 @@
..()
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
Grow()
if(status == BURST)
obj_integrity = integrity_failure
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
return attack_hand(user)
@@ -346,7 +271,7 @@
icon_state = "egg"
status = GROWN
/obj/structure/alien/egg/proc/Burst(kill = 1) //drops and kills the hugger if any is remaining
/obj/structure/alien/egg/proc/Burst(kill = TRUE) //drops and kills the hugger if any is remaining
if(status == GROWN || status == GROWING)
icon_state = "egg_hatched"
flick("egg_opening", src)
@@ -364,45 +289,13 @@
child.Attach(M)
break
/obj/structure/alien/egg/bullet_act(obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
..()
healthcheck()
/obj/structure/alien/egg/attackby(obj/item/I, mob/user, params)
if(I.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(I.attack_verb)] [src] with [I]!</span>")
else
visible_message("<span class='danger'>[user] has attacked [src] with [I]!</span>")
var/damage = I.force / 4
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, WT.usesound, 100, 1)
health -= damage
user.changeNext_move(CLICK_CD_MELEE)
healthcheck()
/obj/structure/alien/egg/proc/healthcheck()
if(health <= 0)
if(status != BURST && status != BURSTING)
Burst()
else if(status == BURST && prob(50))
qdel(src) //Remove the egg after it has been hit after bursting.
/obj/structure/alien/egg/obj_break(damage_flag)
if(status != BURST)
Burst(kill = TRUE)
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
health -= 5
healthcheck()
take_damage(5, BURN, 0, 0)
/obj/structure/alien/egg/HasProximity(atom/movable/AM)
if(status == GROWN)
+14 -9
View File
@@ -69,18 +69,23 @@
if(ismob(user))
shock(user, 70)
/obj/structure/grille/hulk_damage()
return 60
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
if(!shock(user, 70))
..(user, TRUE)
return TRUE
/obj/structure/grille/attack_hand(mob/living/user)
. = ..()
if(.)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='warning'>You kick [src].</span>", \
"You hear twisting metal.")
if(shock(user, 70))
return
if(HULK in user.mutations)
take_damage(60, BRUTE, "melee", 1)
else
user.visible_message("<span class='warning'>[user] hits [src].</span>")
if(!shock(user, 70))
take_damage(rand(5,10), BRUTE, "melee", 1)
/obj/structure/grille/attack_alien(mob/living/user)
+1 -8
View File
@@ -83,14 +83,7 @@
qdel(src)
/obj/structure/table/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
playsound(loc, 'sound/effects/bang.ogg', 50, 1)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
deconstruct(FALSE)
else
..()
..()
if(climber)
climber.Weaken(2)
climber.visible_message("<span class='warning'>[climber.name] has been knocked off the table", "You've been knocked off the table", "You see [climber.name] get knocked off the table</span>")
+6 -5
View File
@@ -173,14 +173,15 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
add_fingerprint(user)
playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(!can_be_reached(user))
return 1
. = ..()
/obj/structure/window/attack_hand(mob/user)
if(!can_be_reached(user))
return
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
deconstruct(FALSE)
else if(user.a_intent == INTENT_HARM)
if(user.a_intent == INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] bangs against [src]!</span>", \
+13 -15
View File
@@ -229,20 +229,19 @@
to_chat(M, "<span class='notice'>You push the wall but nothing happens!</span>")
return
/turf/simulated/wall/attack_hand(mob/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
if(HULK in user.mutations)
if(prob(hardness) || rotting)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
to_chat(user, text("<span class='notice'>You smash through the wall.</span>"))
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(1)
return
else
playsound(src, 'sound/effects/bang.ogg', 50, 1)
to_chat(user, text("<span class='notice'>You punch the wall.</span>"))
return
/turf/simulated/wall/attack_hulk(mob/user, does_attack_animation = FALSE)
..(user, TRUE)
if(prob(hardness) || rotting)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
dismantle_wall(TRUE)
else
playsound(src, 'sound/effects/bang.ogg', 50, 1)
to_chat(user, text("<span class='notice'>You punch the wall.</span>"))
return TRUE
/turf/simulated/wall/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if(rotting)
if(hardness <= 10)
to_chat(user, "<span class='notice'>This wall feels rather unstable.</span>")
@@ -254,9 +253,8 @@
to_chat(user, "<span class='notice'>You push the wall but nothing happens!</span>")
playsound(src, 'sound/weapons/Genhit.ogg', 25, 1)
src.add_fingerprint(user)
add_fingerprint(user)
..()
return
/turf/simulated/wall/attackby(obj/item/W as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
+170 -227
View File
@@ -1,6 +1,6 @@
//////////////////////////////
// Fish Tanks! //
// Fish Tanks //
//////////////////////////////
@@ -9,44 +9,41 @@
desc = "So generic, it might as well have no description at all."
icon = 'icons/obj/fish_items.dmi'
icon_state = "tank1"
density = 0
anchored = 0
density = FALSE
anchored = FALSE
pass_flags = 0
var/tank_type = "" // Type of aquarium, used for icon updating
var/water_capacity = 0 // Number of units the tank holds (varies with tank type)
var/water_level = 0 // Number of units currently in the tank (new tanks start empty)
var/light_switch = 0 // 0 = off, 1 = on (off by default)
var/filth_level = 0.0 // How dirty the tank is (max 10)
var/filth_level = 0 // How dirty the tank is (max 10)
var/lid_switch = 0 // 0 = open, 1 = closed (open by default)
var/max_fish = 0 // How many fish the tank can support (varies with tank type, 1 fish per 50 units sounds reasonable)
var/food_level = 0 // Amount of fishfood floating in the tank (max 10)
var/fish_count = 0 // Number of fish in the tank
var/list/fish_list = null // Tracks the current types of fish in the tank
var/list/fish_list = list() // Tracks the current types of fish in the tank
var/egg_count = 0 // How many fish eggs can be harvested from the tank (capped at the max_fish value)
var/list/egg_list = null // Tracks the current types of harvestable eggs in the tank
var/list/egg_list = list() // Tracks the current types of harvestable eggs in the tank
var/has_lid = 0 // 0 if the tank doesn't have a lid/light, 1 if it does
var/max_health = 0 // Can handle a couple hits
var/cur_health = 0 // Current health, starts at max_health
var/leaking = 0 // 0 if not leaking, 1 if minor leak, 2 if major leak (not leaking by default)
var/has_lid = FALSE // 0 if the tank doesn't have a lid/light, 1 if it does
var/leaking = FALSE // 0 if not leaking, 1 if minor leak, 2 if major leak (not leaking by default)
var/shard_count = 0 // Number of glass shards to salvage when broken (1 less than the number of sheets to build the tank)
/obj/machinery/fishtank/bowl
name = "fish bowl"
desc = "A small bowl capable of housing a single fish, commonly found on desks. This one has a tiny treasure chest in it!"
icon_state = "bowl1"
density = 0 // Small enough to not block stuff
anchored = 0 // Small enough to move even when filled
density = FALSE // Small enough to not block stuff
anchored = FALSE // Small enough to move even when filled
pass_flags = PASSTABLE | LETPASSTHROW // Just like at the county fair, you can't seem to throw the ball in to win the goldfish, and it's small enough to pull onto a table
tank_type = "bowl"
water_capacity = 50 // Not very big, therefore it can't hold much
max_fish = 1 // What a lonely fish
has_lid = 0
max_health = 15 // Not very sturdy
cur_health = 15
has_lid = FALSE
max_integrity = 15 // Not very sturdy
shard_count = 0 // No salvageable shards
/obj/machinery/fishtank/tank
@@ -54,17 +51,16 @@
desc = "A large glass tank designed to house aquatic creatures. Contains an integrated water circulation system."
icon = 'icons/obj/fish_items.dmi'
icon_state = "tank1"
density = 1
anchored = 1
density = TRUE
anchored = TRUE
pass_flags = LETPASSTHROW
tank_type = "tank"
water_capacity = 200 // Decent sized, holds almost 2 full buckets
max_fish = 4 // Room for a few fish
has_lid = 1
max_health = 50 // Average strength, will take a couple hits from a toolbox.
cur_health = 50
has_lid = TRUE
max_integrity = 50 // Average strength, will take a couple hits from a toolbox.
shard_count = 2
@@ -72,17 +68,16 @@
name = "wall aquarium"
desc = "This aquarium is massive! It completely occupies the same space as a wall, and looks very sturdy too!"
icon_state = "wall1"
density = 1
anchored = 1
density = TRUE
anchored = TRUE
pass_flags = 0 // This thing is the size of a wall, you can't throw past it.
tank_type = "wall"
water_capacity = 500 // This thing fills an entire tile, it holds a lot.
max_fish = 10 // Plenty of room for a lot of fish
has_lid = 1
max_health = 100 // This thing is a freaking wall, it can handle abuse.
cur_health = 100
has_lid = TRUE
max_integrity = 100 // This thing is a freaking wall, it can handle abuse.
shard_count = 3
@@ -94,9 +89,10 @@
set name = "Toggle Tank Lid"
set category = "Object"
set src in view(1)
toggle_lid(usr)
/obj/machinery/fishtank/proc/toggle_lid(var/mob/living/user)
toggle_lid()
/obj/machinery/fishtank/proc/toggle_lid()
lid_switch = !lid_switch
update_icon()
@@ -104,12 +100,13 @@
set name = "Toggle Tank Light"
set category = "Object"
set src in view(1)
toggle_light(usr)
/obj/machinery/fishtank/proc/toggle_light(var/mob/living/user)
toggle_light()
/obj/machinery/fishtank/proc/toggle_light()
light_switch = !light_switch
if(light_switch)
set_light(2,2,"#a0a080")
set_light(2, 2, "#a0a080")
else
adjust_tank_light()
@@ -119,8 +116,6 @@
/obj/machinery/fishtank/New()
..()
fish_list = new/list()
egg_list = new/list()
if(!has_lid) //Tank doesn't have a lid/light, remove the verbs for then
verbs -= /obj/machinery/fishtank/verb/toggle_lid_verb
verbs -= /obj/machinery/fishtank/verb/toggle_light_verb
@@ -154,7 +149,8 @@
overlays += "over_leak_[leaking]" //Green if we aren't leaking, light blue and slow blink if minor link, dark blue and rapid flashing for major leak
//Update water overlay
if(water_level == 0) return //Skip the rest of this if there is no water in the aquarium
if(!water_level)
return //Skip the rest of this if there is no water in the aquarium
var/water_type = "_clean" //Default to clean water
if(filth_level > 5) water_type = "_dirty" //Show dirty water above filth_level 5 (breeding threshold)
if(water_level > (water_capacity * 0.85)) //Show full if the water_level is over 85% of water_capacity
@@ -162,15 +158,13 @@
else if(water_level > (water_capacity * 0.35)) //Show half-full if the water_level is over 35% of water_capacity
overlays += "over_[tank_type]_half[water_type]"
return
//////////////////////////////
// PROCESS PROC //
//////////////////////////////
//Stops atmos from passing wall tanks, since they are effectively full-windows.
/obj/machinery/fishtank/wall/CanAtmosPass(var/turf/T)
return 0
/obj/machinery/fishtank/wall/CanAtmosPass(turf/T)
return FALSE
/obj/machinery/fishtank/process()
//Start by counting fish in the tank
@@ -238,9 +232,7 @@
adjust_tank_light()
/obj/machinery/fishtank/proc/adjust_tank_light()
if(light_switch) //tank light overrides fish lights
return
else
if(!light_switch) //tank light overrides fish lights
var/glo_light = 0
for(var/datum/fish/fish in fish_list)
if(istype(fish, /datum/fish/glofish))
@@ -261,19 +253,13 @@
food_level = min(10, max(0, food_level + amount))
/obj/machinery/fishtank/proc/check_health()
//Max value check
if(cur_health > max_health) //Cur_health cannot exceed max_health, set it to max_health if it does
cur_health = max_health
//Leaking status check
if(cur_health <= (max_health * 0.25)) //Major leak at or below 25% health (-10 water/cycle)
if(obj_integrity <= (max_integrity * 0.25)) //Major leak at or below 25% health (-10 water/cycle)
leaking = 2
else if(cur_health <= (max_health * 0.5)) //Minor leak at or below 50% health (-1 water/cycle)
else if(obj_integrity <= (max_integrity * 0.5)) //Minor leak at or below 50% health (-1 water/cycle)
leaking = 1
else //Not leaking above 50% health
leaking = 0
//Destruction check
if(cur_health <= 0) //The tank is broken, destroy it
destroy()
/obj/machinery/fishtank/proc/kill_fish(datum/fish/fish_type = null)
//Check if we were passed a fish to kill, otherwise kill a random one
@@ -292,12 +278,12 @@
fish_list.Add(fish_type) //Add a fish of the specified type
fish_count++ //Increase fish_count to reflect the introduction of a fish, so the everything else works fine
//Announce the new fish
visible_message("A new [fish_type.fish_name] has hatched in \the [src]!")
visible_message("A new [fish_type.fish_name] has hatched in [src]!")
//Null type fish are dud eggs, give a message to inform the player
else
to_chat(usr, "The eggs disolve in the water. They were duds!")
/obj/machinery/fishtank/proc/harvest_eggs(var/mob/user)
/obj/machinery/fishtank/proc/harvest_eggs(mob/user)
if(!egg_count) //Can't harvest non-existant eggs
return
@@ -312,62 +298,39 @@
egg_list.Cut() //Destroy any excess eggs, clearing the egg_list
/obj/machinery/fishtank/proc/harvest_fish(var/mob/user)
if(fish_count <= 0) //Can't catch non-existant fish!
to_chat(usr, "There are no fish in \the [src] to catch!")
/obj/machinery/fishtank/proc/harvest_fish(mob/user)
if(fish_count <= 0) //Can't catch non-existant fish!
to_chat(user, "There are no fish in [src] to catch!")
return
var/list/fish_names_list = list()
for(var/datum/fish/fish_type in fish_list)
fish_names_list += list("[fish_type.fish_name]" = fish_type)
var/caught_fish = input("Select a fish to catch.", "Fishing") as null|anything in fish_names_list //Select a fish from the tank
if(fish_count <= 0)
to_chat(usr, "There are no fish in \the [src] to catch!")
to_chat(user, "There are no fish in [src] to catch!")
return
else if(caught_fish)
user.visible_message("[user.name] harvests \a [caught_fish] from \the [src].", "You scoop \a [caught_fish] out of \the [src].")
user.visible_message("[user.name] harvests \a [caught_fish] from [src].", "You scoop \a [caught_fish] out of [src].")
var/datum/fish/fish_type = fish_names_list[caught_fish]
var/fish_item = fish_type.fish_item
if(fish_item)
new fish_item(get_turf(user)) //Spawn the appropriate fish_item at the user's feet.
kill_fish(fish_type) //Kill the caught fish from the tank
/obj/machinery/fishtank/proc/destroy(var/deconstruct = 0)
var/turf/T = get_turf(src) //Store the tank's turf for atmos updating after deletion of tank
if(!deconstruct) //Check if we are deconstructing or breaking the tank
var/shards_left = shard_count
while(shards_left > 0) //Produce the appropriate number of glass shards
new /obj/item/shard(get_turf(src))
shards_left --
if(water_level) //Spill any water that was left in the tank when it broke
spill_water()
else //We are deconstructing, make glass sheets instead of shards
var/sheets = shard_count + 1 //Deconstructing it salvages all the glass used to build the tank
new /obj/item/stack/sheet/glass(get_turf(src), sheets) //Produce the appropriate number of glass sheets, in a single stack
qdel(src) //qdel the tank and it's contents
T.air_update_turf(1) //Update the air for the turf, to avoid permanent atmos sealing with wall tanks
//Update the air for the turf, to avoid permanent atmos sealing with wall tanks
/obj/machinery/fishtank/proc/spill_water()
var/turf/simulated/T = get_turf(src)
switch(tank_type)
if("bowl") //Fishbowl: Wets it's own tile
var/turf/T = get_turf(src)
if(!istype(T, /turf/simulated)) return
var/turf/simulated/S = T
S.MakeSlippery()
if(istype(T))
T.MakeSlippery()
if("tank") //Fishtank: Wets it's own tile and the 4 adjacent tiles (cardinal directions)
var/turf/ST = get_turf(src)
if(istype(ST, /turf/simulated))
var/turf/simulated/ST2 = ST
ST2.MakeSlippery()
var/list/L = ST.CardinalTurfs()
for(var/turf/T in L)
if(!istype(T, /turf/simulated)) continue
var/turf/simulated/S = T
S.MakeSlippery()
if(istype(T))
T.MakeSlippery()
for(var/turf/simulated/ST in T.CardinalTurfs())
ST.MakeSlippery()
if("wall") //Wall-tank: Wets it's own tile and the surrounding 8 tiles (3x3 square)
for(var/turf/T in spiral_range_turfs(1, src.loc))
if(!istype(T, /turf/simulated)) continue
var/turf/simulated/S = T
S.MakeSlippery()
for(var/turf/simulated/ST in spiral_range_turfs(1, loc))
ST.MakeSlippery()
/obj/machinery/fishtank/proc/breed_fish()
var/list/breed_candidates = fish_list.Copy()
@@ -412,20 +375,20 @@
examine_message += "Water level: "
if(water_level == 0)
examine_message += "\The [src] is empty! "
if(!water_level)
examine_message += "[src] is empty! "
else if(water_level < water_capacity * 0.1)
examine_message += "\The [src] is nearly empty! "
examine_message += "[src] is nearly empty! "
else if(water_level <= water_capacity * 0.25)
examine_message += "\The [src] is about one-quarter filled. "
examine_message += "[src] is about one-quarter filled. "
else if(water_level <= water_capacity * 0.5)
examine_message += "\The [src] is about half filled. "
examine_message += "[src] is about half filled. "
else if(water_level <= water_capacity * 0.75)
examine_message += "\The [src] is about three-quarters filled. "
examine_message += "[src] is about three-quarters filled. "
else if(water_level < water_capacity)
examine_message += "\The [src] is nearly full! "
examine_message += "[src] is nearly full! "
else if(water_level == water_capacity)
examine_message += "\The [src] is full! "
examine_message += "[src] is full! "
examine_message += "<br>Cleanliness level: "
@@ -467,7 +430,7 @@
//Report the number and types of live fish if there is water in the tank
if(fish_count == 0)
examine_message += "\The [src] doesn't contain any live fish. "
examine_message += "[src] doesn't contain any live fish. "
else
//Build a message reporting the types of fish
var/fish_num = fish_count
@@ -483,7 +446,7 @@
message +=", "
message +="." //No more fish, end the message with a period
//Display the number of fish and previously constructed message
examine_message += "\The [src] contains [fish_count] live fish. [message] "
examine_message += "[src] contains [fish_count] live fish. [message] "
examine_message += "<br>"
@@ -498,12 +461,16 @@
examine_message += "<br>"
//Report if the tank is leaking/cracked
if(water_level > 0) //Tank has water, so it's actually leaking
if(leaking == 1) examine_message += "\The [src] is leaking."
if(leaking == 2) examine_message += "\The [src] is leaking profusely!"
if(water_level) //Tank has water, so it's actually leaking
if(leaking == 1)
examine_message += "[src] is leaking."
if(leaking == 2)
examine_message += "[src] is leaking profusely!"
else //No water, report the cracks instead
if(leaking == 1) examine_message += "\The [src] is cracked."
if(leaking == 2) examine_message += "\The [src] is nearly shattered!"
if(leaking == 1)
examine_message += "[src] is cracked."
if(leaking == 2)
examine_message += "[src] is nearly shattered!"
//Finally, report the full examine_message constructed from the above reports
@@ -514,127 +481,113 @@
// ATACK PROCS //
//////////////////////////////
/obj/machinery/fishtank/attack_animal(mob/living/simple_animal/M as mob)
/obj/machinery/fishtank/attack_animal(mob/living/simple_animal/M)
if(istype(M, /mob/living/simple_animal/pet/cat))
if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
M.visible_message("[M.name] stares at into \the [src] while sitting perfectly still.", "The lid is closed, so you stare into \the [src] intently.")
M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.")
else
if(fish_count) //Tank must actually have fish to try catching one
M.visible_message("[M.name] leaps up onto \the[src] and attempts to fish through the opening!", "You jump up onto \the [src] and begin fishing through the opening!")
spawn(10)
if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens
M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!")
if(istype(M, /mob/living/simple_animal/pet/cat/Syndi))
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
else //No water or didn't slip, get that fish!
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!")
if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens
M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!")
if(istype(M, /mob/living/simple_animal/pet/cat/Syndi))
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
else //No water or didn't slip, get that fish!
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
else
to_chat(usr, "There are no fish in [src]!")
to_chat(M, "There are no fish in [src]!")
else
attack_generic(M, M.harm_intent_damage)
return ..()
else if(istype(M, /mob/living/simple_animal/hostile/bear))
if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
M.visible_message("[M.name] scrapes it's claws along \the [src]'s lid.", "The lid is closed, so you scrape your claws against \the [src]'s lid.")
M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.")
else
if(fish_count) //Tank must actually have fish to try catching one
M.visible_message("[M.name] reaches into \the[src] and attempts to fish through the opening!", "You reach into \the [src] and begin fishing through the opening!")
spawn(5)
if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail
M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!")
else //No water or didn't slip, get that fish!
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!")
if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail
M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!")
else //No water or didn't slip, get that fish!
M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
else
to_chat(usr, "There are no fish in [src]!")
to_chat(M, "There are no fish in [src]!")
else
attack_generic(M, M.harm_intent_damage)
return ..()
else
if(M.melee_damage_upper > 0) //If the simple_animal has a melee_damage_upper defined, use that for the damage
attack_generic(M, M.melee_damage_upper)
else if(M.a_intent == INTENT_HARM) //Let any simple_animal try to break tanks when on harm intent
if(M.harm_intent_damage <= 0) return //If it doesn't do damage, don't bother with the attack
attack_generic(M, M.harm_intent_damage)
check_health()
return ..()
/obj/machinery/fishtank/attack_alien(mob/living/user as mob)
if(islarva(user)) return
attack_generic(user, 15)
/obj/machinery/fishtank/attack_slime(mob/living/user as mob)
var/mob/living/carbon/slime/S = user
if(!S.is_adult)
return
attack_generic(user, rand(10, 15))
/obj/machinery/fishtank/attack_hand(mob/user as mob)
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
destroy()
else if(usr.a_intent == INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
/obj/machinery/fishtank/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if(user.a_intent == INTENT_HARM)
playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("<span class='danger'>[usr.name] bangs against the [src.name]!</span>", \
"<span class='danger'>You bang against the [src.name]!</span>", \
user.visible_message("<span class='danger'>[user.name] bangs against the [name]!</span>", \
"<span class='danger'>You bang against the [name]!</span>", \
"You hear a banging sound.")
else
user.changeNext_move(CLICK_CD_MELEE)
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("[usr.name] taps on the [src.name].", \
"You tap on the [src.name].", \
playsound(loc, 'sound/effects/glassknock.ogg', 80, 1)
user.visible_message("[user.name] taps on the [name].", \
"You tap on the [name].", \
"You hear a knocking sound.")
return
/obj/machinery/fishtank/proc/hit(var/damage, var/sound_effect = 1)
cur_health = max(0, cur_health - damage)
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
check_health()
/obj/machinery/fishtank/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)
cur_health -= damage
if(cur_health <= 0)
user.visible_message("<span class='danger'>[user] smashes through \the [src]!</span>")
destroy()
else //for nicer text~
user.visible_message("<span class='danger'>[user] smashes into \the [src]!</span>")
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
if(.) //received damage
check_health()
/obj/machinery/fishtank/attackby(var/obj/item/O, var/mob/user as mob)
/obj/machinery/fishtank/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(damage_amount)
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
/obj/machinery/fishtank/deconstruct(disassembled = TRUE)
if(QDELETED(src))
return
if(!disassembled)
playsound(src, "shatter", 70, 1)
for(var/i in 1 to shard_count) //Produce the appropriate number of glass shards
var/obj/item/shard/S = new /obj/item/shard(get_turf(src))
transfer_fingerprints_to(S)
if(water_level) //Spill any water that was left in the tank when it broke
spill_water()
else //We are deconstructing, make glass sheets instead of shards
new /obj/item/stack/sheet/glass(get_turf(src), shard_count + 1) //Produce the appropriate number of glass sheets, in a single stack
qdel(src)
/obj/machinery/fishtank/attackby(obj/item/O, mob/user)
//Welders repair damaged tanks on help intent, damage on all others
if(istype(O, /obj/item/weldingtool))
if(iswelder(O))
var/obj/item/weldingtool/W = O
if(user.a_intent == INTENT_HELP)
if(W.isOn())
if(cur_health < max_health)
if(obj_integrity < max_integrity)
playsound(loc, W.usesound, 50, 1)
to_chat(usr, "You repair some of the cracks on \the [src].")
cur_health += 20
to_chat(user, "You repair some of the cracks on [src].")
obj_integrity = min(obj_integrity + 20, max_integrity)
check_health()
else
to_chat(usr, "There is no damage to fix!")
to_chat(user, "There is no damage to fix!")
else
if(cur_health < max_health)
to_chat(usr, "[W.name] must be on to repair this damage.")
if(obj_integrity < max_integrity)
to_chat(user, "[W] must be on to repair this damage.")
else
user.changeNext_move(CLICK_CD_MELEE)
hit(W.force)
return
return ..()
//Open reagent containers add and remove water
if(O.is_open_container())
else if(O.is_open_container())
if(istype(O, /obj/item/reagent_containers/glass))
if(lid_switch)
to_chat(usr, "Open the lid on \the [src] first!")
to_chat(user, "Open the lid on [src] first!")
return
var/obj/item/reagent_containers/glass/C = O
//Containers with any reagents will get dumped in
@@ -652,57 +605,52 @@
C.reagents.clear_reagents()
else
if(water_level == water_capacity)
to_chat(usr, "[src] is already full!")
return
to_chat(user, "[src] is already full!")
else
message = "The filtration process purifies the water, raising the water level."
if((water_level + water_value) == water_capacity)
message += " You filled \the [src] to the brim!"
message += " You filled [src] to the brim!"
if((water_level + water_value) > water_capacity)
message += " You overfilled \the [src] and some water runs down the side, wasted."
message += " You overfilled [src] and some water runs down the side, wasted."
C.reagents.clear_reagents()
adjust_water_level(water_value)
user.visible_message("[user.name] pours the contents of [C.name] into \the [src].", "[message]")
return
user.visible_message("[user.name] pours the contents of [C.name] into [src].", "[message]")
//Empty containers will scoop out water, filling the container as much as possible from the water_level
else
if(water_level == 0)
to_chat(usr, "[src] is empty!")
if(!water_level)
to_chat(user, "[src] is empty!")
else
if(water_level >= C.volume) //Enough to fill the container completely
C.reagents.add_reagent("fishwater", C.volume)
adjust_water_level(-C.volume)
user.visible_message("[user.name] scoops out some water from \the [src].", "You completely fill [C.name] from \the [src].")
user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [C.name] from [src].")
else //Fill the container as much as possible with the water_level
C.reagents.add_reagent("fishwater", water_level)
adjust_water_level(-water_level)
user.visible_message("[user.name] scoops out some water from \the [src].", "You fill [C.name] with the last of the water in \the [src].")
return
user.visible_message("[user.name] scoops out some water from [src].", "You fill [C.name] with the last of the water in [src].")
//Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process
if(istype(O, /obj/item/wrench))
if(water_level == 0)
to_chat(usr, "<span class='notice'>Now disassembling [src].</span>")
playsound(src.loc, O.usesound, 50, 1)
else if(iswrench(O))
if(!water_level)
to_chat(user, "<span class='notice'>Now disassembling [src].</span>")
playsound(loc, O.usesound, 50, 1)
if(do_after(user, 50 * O.toolspeed, target = src))
destroy(1)
deconstruct(TRUE)
else
to_chat(usr, "[src] must be empty before you disassemble it!")
return
to_chat(user, "[src] must be empty before you disassemble it!")
//Fish eggs
else if(istype(O, /obj/item/fish_eggs))
var/obj/item/fish_eggs/egg = O
//Don't add eggs if there is no water (they kinda need that to live)
if(water_level == 0)
to_chat(usr, "[src] has no water; [egg.name] won't hatch without water!")
if(!water_level)
to_chat(user, "[src] has no water; [egg.name] won't hatch without water!")
else
//Don't add eggs if the tank already has the max number of fish
if(fish_count >= max_fish)
to_chat(usr, "[src] can't hold any more fish.")
to_chat(user, "[src] can't hold any more fish.")
else
add_fish(egg.fish_type)
qdel(egg)
return
//Fish food
else if(istype(O, /obj/item/fishfood))
//Only add food if there is water and it isn't already full of food
@@ -711,33 +659,28 @@
if(fish_count == 0)
user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.")
else
user.visible_message("[user.name] feeds the fish in \the [src]. The fish look excited!", "You feed the fish in \the [src]. They look excited!")
user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!")
adjust_food_level(10)
else
to_chat(usr, "[src] already has plenty of food in it. You decide to not add more.")
to_chat(user, "[src] already has plenty of food in it. You decide to not add more.")
else
to_chat(usr, "[src] doesn't have any water in it. You should fill it with water first.")
return
to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.")
//Fish egg scoop
else if(istype(O, /obj/item/egg_scoop))
if(egg_count)
user.visible_message("[user.name] harvests some fish eggs from \the [src].", "You scoop the fish eggs out of \the [src].")
user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].")
harvest_eggs(user)
else
user.visible_message("[user.name] fails to harvest any fish eggs from \the [src].", "There are no fish eggs in \the [src] to scoop out.")
return
user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.")
//Fish net
if(istype(O, /obj/item/fish_net))
else if(istype(O, /obj/item/fish_net))
harvest_fish(user)
return
//Tank brush
if(istype(O, /obj/item/tank_brush))
else if(istype(O, /obj/item/tank_brush))
if(filth_level == 0)
to_chat(usr, "[src] is already spotless!")
to_chat(user, "[src] is already spotless!")
else
adjust_filth_level(-filth_level)
user.visible_message("[user.name] scrubs the inside of \the [src], cleaning the filth.", "You scrub the inside of \the [src], cleaning the filth.")
else if(O && O.force)
user.visible_message("<span class='danger'>\The [src] has been attacked by [user.name] with \the [O]!</span>")
hit(O.force)
return
user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.")
else
return ..()
@@ -1,16 +1,25 @@
/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
..(user, TRUE)
adjustBruteLoss(15)
var/hitverb = "punched"
if(mob_size < MOB_SIZE_LARGE)
Paralyse(1)
spawn(0)
step_away(src, user, 15)
sleep(1)
step_away(src, user, 15)
hitverb = "slammed"
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[user] has [hitverb] [src]!</span>", "<span class='userdanger'>[user] has [hitverb] [src]!</span>")
return TRUE
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
if(..())
switch(M.a_intent)
if(INTENT_HARM)
var/damage = rand(1, 9)
if(prob(90))
if(HULK in M.mutations)//HULK SMASH
damage = 15
spawn(0)
Paralyse(1)
step_away(src, M, 15)
sleep(3)
step_away(src, M, 15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
@@ -2,13 +2,6 @@
if(..())
var/damage = rand(1, 9)
if(prob(90))
if(HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src, M, 15)
sleep(3)
step_away(src, M, 15)
playsound(loc, "punch", 25, 1, -1)
add_attack_logs(M, src, "Melee attacked with fists")
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
@@ -23,6 +16,18 @@
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
..(user, TRUE)
adjustBruteLoss(5 + rand(1, 9))
spawn(0)
Paralyse(1)
step_away(src, user, 15)
sleep(3)
step_away(src, user, 15)
return TRUE
/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
if(!no_effect && !visual_effect_icon)
visual_effect_icon = ATTACK_EFFECT_BITE
@@ -348,6 +348,18 @@ emp_act
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
var/hulk_verb = pick("smash", "pummel")
if(check_shields(user, 15, "the [hulk_verb]ing"))
return
..(user, TRUE)
playsound(loc, user.species.unarmed.attack_sound, 25, 1, -1)
var/message = "[user] has [hulk_verb]ed [src]!"
visible_message("<span class='danger'>[message]</span>", "<span class='userdanger'>[message]</span>")
adjustBruteLoss(15)
return TRUE
/mob/living/carbon/human/attack_hand(mob/user)
if(..()) //to allow surgery to return properly.
return
@@ -21,7 +21,7 @@
var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys.
var/tail // Name of tail image in species effects icon file.
var/unarmed //For empty hand harm-intent attack
var/datum/unarmed_attack/unarmed //For empty hand harm-intent attack
var/unarmed_type = /datum/unarmed_attack
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/silent_steps = 0 // Stops step noises
@@ -375,9 +375,6 @@
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
var/armor_block = target.run_armor_check(affecting, "melee")
if(HULK in user.mutations)
target.adjustBruteLoss(15)
playsound(target.loc, attack.attack_sound, 25, 1, -1)
target.visible_message("<span class='danger'>[user] [pick(attack.attack_verb)]ed [target]!</span>")
+18 -14
View File
@@ -234,6 +234,24 @@
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/slime/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
if(Victim || Target)
Victim = null
Target = null
anchored = 0
if(prob(80) && !client)
Discipline++
spawn(0)
step_away(src, user, 15)
sleep(3)
step_away(src, user, 15)
..(user, TRUE)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[user] has punched [src]!</span>", "<span class='userdanger'>[user] has punched [src]!</span>")
adjustBruteLoss(15)
return TRUE
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M)
if(Victim)
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
@@ -301,20 +319,6 @@
var/damage = rand(1, 9)
attacked += 10
if(prob(90))
if(HULK in M.mutations)
damage += 15
if(Victim || Target)
Victim = null
Target = null
anchored = 0
if(prob(80) && !client)
Discipline++
spawn(0)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
add_attack_logs(M, src, "Melee attacked with fists")
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
@@ -41,6 +41,15 @@
if(L.a_intent == INTENT_HELP)
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
/mob/living/silicon/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
..(user, TRUE)
adjustBruteLoss(rand(10, 15))
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[user] has punched [src]!</span>", "<span class='userdanger'>[user] has punched [src]!</span>")
return TRUE
return FALSE
/mob/living/silicon/attack_hand(mob/living/carbon/human/M)
switch(M.a_intent)
if(INTENT_HELP)
@@ -51,15 +60,6 @@
else
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
playsound(loc, 'sound/effects/bang.ogg', 10, 1)
if(HULK in M.mutations)
var/damage = rand(10,15)
adjustBruteLoss(damage)
add_attack_logs(M, src, "Melee attacked with fists")
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
return 1
else
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent.</span>", \
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent.</span>", \
"<span class='userdanger'>[M] punches [src], but doesn't leave a dent.!</span>")
return 0
return FALSE
@@ -19,6 +19,14 @@
updatehealth()
return 1
/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
if(user.a_intent == INTENT_HARM)
..(user, TRUE)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[user] has punched [src]!</span>", "<span class='userdanger'>[user] has punched [src]!</span>")
adjustBruteLoss(15)
return TRUE
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
var/damage = rand(15, 30)
@@ -201,11 +201,6 @@ var/global/list/ts_spiderling_list = list()
spider_specialattack(G,can_poison)
else
G.attack_animal(src)
else if(istype(target, /obj/structure/alien/resin))
var/obj/structure/alien/resin/E = target
do_attack_animation(E)
E.health -= rand(melee_damage_lower, melee_damage_upper)
E.healthcheck()
else
target.attack_animal(src)
@@ -947,8 +947,7 @@
/datum/reagent/glyphosate/reaction_obj(obj/O, volume)
if(istype(O,/obj/structure/alien/weeds))
var/obj/structure/alien/weeds/alien_weeds = O
alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast
alien_weeds.healthcheck()
alien_weeds.take_damage(rand(15, 35), BRUTE, 0) // Kills alien weeds pretty fast
else if(istype(O, /obj/structure/glowshroom)) //even a small amount is enough to kill it
qdel(O)
else if(istype(O, /obj/structure/spacevine))
@@ -42,7 +42,8 @@
/obj/machinery/constructable_frame,
/obj/machinery/icemachine,
/obj/item/bombcore/chemical,
/obj/machinery/vending)
/obj/machinery/vending,
/obj/machinery/fishtank)
/obj/item/reagent_containers/glass/New()
..()