mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-20 20:54:35 +01:00
Merge branch 'xenorewrite' of https://github.com/Zuhayr/Baystation12 into dev
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
|
||||
/obj/structure/closet/attack_animal(mob/living/user as mob)
|
||||
if(user.wall_smash)
|
||||
visible_message("\red [user] destroys the [src]. ")
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/extinguisher))
|
||||
if(!has_extinguisher && opened)
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
if(isrobot(user))
|
||||
return
|
||||
if (hasorgans(user))
|
||||
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
||||
|
||||
@@ -31,32 +31,34 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
|
||||
var/damage_dealt
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(H))
|
||||
damage_dealt = 5
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
if(!damage_dealt)
|
||||
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)
|
||||
health -= 5
|
||||
damage_dealt += 5
|
||||
else
|
||||
health -= 1
|
||||
damage_dealt += 1
|
||||
|
||||
health -= damage_dealt
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/user as mob)
|
||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
||||
|
||||
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
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/user as mob)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if (!S.is_adult)
|
||||
@@ -199,6 +201,7 @@
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user as mob, prb)
|
||||
|
||||
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
return
|
||||
|
||||
|
||||
proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
||||
@@ -91,10 +91,6 @@
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
|
||||
|
||||
attack_alien(mob/user as mob)
|
||||
if(islarva(user)) return
|
||||
attack_generic(user, 15)
|
||||
|
||||
attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
|
||||
@@ -256,7 +256,9 @@
|
||||
var/close_delay = 100
|
||||
|
||||
TryToSwitchState(atom/user)
|
||||
if(isalien(user))
|
||||
|
||||
var/mob/living/carbon/M = user
|
||||
if(istype(M) && locate(/datum/organ/internal/xenos/hivenode) in M.internal_organs)
|
||||
return ..()
|
||||
|
||||
Open()
|
||||
|
||||
@@ -10,11 +10,23 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||
|
||||
if(shattered) return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.a_intent == "hurt")
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
if(prob(30) || H.species.can_shred(H))
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
shatter()
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
||||
return
|
||||
|
||||
var/userloc = H.loc
|
||||
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
@@ -83,16 +95,6 @@
|
||||
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/user as mob)
|
||||
if(islarva(user)) return
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
|
||||
@@ -32,15 +32,20 @@
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/alien))
|
||||
return
|
||||
if(!istype(user,/mob/living/carbon/alien/humanoid))
|
||||
unbuckle()
|
||||
|
||||
var/mob/living/carbon/xenos = user
|
||||
var/mob/living/carbon/victim = M
|
||||
|
||||
if(istype(victim) && locate(/datum/organ/internal/xenos/hivenode) in victim.internal_organs)
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
if(istype(xenos) && !(locate(/datum/organ/internal/xenos/hivenode) in xenos.internal_organs))
|
||||
return
|
||||
|
||||
if(M == usr)
|
||||
return
|
||||
|
||||
@@ -20,8 +20,9 @@
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.")
|
||||
climbable = 1
|
||||
breakable = 1
|
||||
parts = /obj/item/weapon/table_parts
|
||||
|
||||
var/parts = /obj/item/weapon/table_parts
|
||||
var/flipped = 0
|
||||
var/health = 100
|
||||
|
||||
@@ -43,16 +44,6 @@
|
||||
update_adjacent()
|
||||
..()
|
||||
|
||||
/obj/structure/table/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
/obj/structure/rack/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
spawn(2) //So it properly updates when deleting
|
||||
|
||||
@@ -263,49 +254,6 @@
|
||||
else
|
||||
dir = 2
|
||||
|
||||
/obj/structure/table/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
destroy()
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
destroy()
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/table/attack_alien(mob/user)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.wall_smash)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
|
||||
/obj/structure/table/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!" ))
|
||||
destroy()
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
@@ -601,29 +549,9 @@
|
||||
flags = FPRINT
|
||||
anchored = 1.0
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
var/parts = /obj/item/weapon/rack_parts
|
||||
|
||||
/obj/structure/rack/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
del(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
del(src)
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
|
||||
/obj/structure/rack/blob_act()
|
||||
if(prob(75))
|
||||
del(src)
|
||||
return
|
||||
else if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
del(src)
|
||||
return
|
||||
breakable = 1
|
||||
climbable = 1
|
||||
parts = /obj/item/weapon/rack_parts
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
@@ -654,32 +582,4 @@
|
||||
return
|
||||
user.drop_item()
|
||||
if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
/obj/structure/rack/meteorhit(obj/O as obj)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/table/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!" ))
|
||||
destroy()
|
||||
|
||||
/obj/structure/rack/attack_paw(mob/user)
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/rack/attack_alien(mob/user)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.wall_smash)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
@@ -114,6 +114,14 @@
|
||||
new /obj/item/weapon/shard(loc)
|
||||
if(reinf) new /obj/item/stack/rods(loc)
|
||||
del(src)
|
||||
else if (istype(usr,/mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(H.species.can_shred(H))
|
||||
attack_generic(H,25)
|
||||
return
|
||||
|
||||
else if (usr.a_intent == "hurt")
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
@@ -131,7 +139,7 @@
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
@@ -142,11 +150,6 @@
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/window/attack_alien(mob/user as mob)
|
||||
if(islarva(user)) return
|
||||
attack_generic(user, 15)
|
||||
|
||||
/obj/structure/window/attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
|
||||
Reference in New Issue
Block a user