mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] some istype to macros (#9802)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73486c399b
commit
ed79946ade
@@ -180,7 +180,7 @@
|
||||
/obj/vehicle/train/security/engine/RunOver(var/mob/living/M)
|
||||
..()
|
||||
|
||||
if(is_train_head() && istype(load, /mob/living/carbon/human))
|
||||
if(is_train_head() && ishuman(load))
|
||||
var/mob/living/carbon/human/D = load
|
||||
to_chat(D, span_danger("You ran over \the [M]!"))
|
||||
visible_message(span_danger("\The [src] ran over \the [M]!"))
|
||||
@@ -218,7 +218,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(on)
|
||||
@@ -239,7 +239,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!on)
|
||||
@@ -255,7 +255,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!key || (load && load != usr))
|
||||
@@ -277,7 +277,7 @@
|
||||
/obj/vehicle/train/security/trolley/load(var/atom/movable/C)
|
||||
if(ismob(C) && !passenger_allowed)
|
||||
return 0
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human))
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ishuman(C))
|
||||
return 0
|
||||
|
||||
//if there are any items you don't want to be able to interact with, add them to this check
|
||||
@@ -291,7 +291,7 @@
|
||||
return 1
|
||||
|
||||
/obj/vehicle/train/security/engine/load(var/atom/movable/C)
|
||||
if(!istype(C, /mob/living/carbon/human))
|
||||
if(!ishuman(C))
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
/obj/vehicle/train/engine/RunOver(var/mob/living/M)
|
||||
..()
|
||||
|
||||
if(is_train_head() && istype(load, /mob/living/carbon/human))
|
||||
if(is_train_head() && ishuman(load))
|
||||
var/mob/living/carbon/human/D = load
|
||||
to_chat(D, span_bolddanger("You ran over [M]!"))
|
||||
visible_message(span_bolddanger("\The [src] ran over [M]!"))
|
||||
@@ -228,7 +228,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(on)
|
||||
@@ -251,7 +251,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!on)
|
||||
@@ -267,7 +267,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!key || (load && load != usr))
|
||||
@@ -289,7 +289,7 @@
|
||||
/obj/vehicle/train/trolley/load(var/atom/movable/C, var/mob/user)
|
||||
if(ismob(C) && !passenger_allowed)
|
||||
return 0
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human))
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ishuman(C))
|
||||
return 0
|
||||
|
||||
//if there are any items you don't want to be able to interact with, add them to this check
|
||||
@@ -303,7 +303,7 @@
|
||||
return 1
|
||||
|
||||
/obj/vehicle/train/engine/load(var/atom/movable/C, var/mob/user)
|
||||
if(!istype(C, /mob/living/carbon/human))
|
||||
if(!ishuman(C))
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if(isturf(T))
|
||||
A.Move(T) //bump things away when hit
|
||||
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
visible_message(span_danger("[src] knocks over [M]!"))
|
||||
M.apply_effects(2, 2) // Knock people down for a short moment
|
||||
@@ -152,7 +152,7 @@
|
||||
health -= round(M.mob_size / 4) // Less damage if they actually put the point in to emag it.
|
||||
var/turf/T2 = get_step(A, pick(throw_dirs))
|
||||
M.throw_at(T2, 1, 1, src)
|
||||
if(istype(load, /mob/living/carbon/human))
|
||||
if(ishuman(load))
|
||||
var/mob/living/D = load
|
||||
to_chat(D, span_danger("You hit [M]!"))
|
||||
add_attack_logs(D,M,"Ran over with [src.name]")
|
||||
@@ -209,7 +209,7 @@
|
||||
/obj/vehicle/train/trolley/trailer/proc/update_load()
|
||||
if(load)
|
||||
var/y_offset = load_offset_y
|
||||
if(istype(load, /mob/living))
|
||||
if(isliving(load))
|
||||
y_offset = mob_offset_y
|
||||
load.pixel_x = (initial(load.pixel_x) + 16 + load_offset_x + pixel_x) //Base location for the sprite, plus 16 to center it on the 'base' sprite of the trailer, plus the x shift of the trailer, then shift it by the same pixel_x as the trailer to track it.
|
||||
load.pixel_y = (initial(load.pixel_y) + y_offset + pixel_y) //Same as the above.
|
||||
@@ -251,7 +251,7 @@
|
||||
if(isturf(T))
|
||||
A.Move(T) //bump things away when hit
|
||||
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
visible_message(span_danger("[src] knocks over [M]!"))
|
||||
M.apply_effects(1, 1)
|
||||
@@ -263,7 +263,7 @@
|
||||
throw_dirs -= dir
|
||||
var/turf/T2 = get_step(A, pick(throw_dirs))
|
||||
M.throw_at(T2, 1, 1, src)
|
||||
if(istype(load, /mob/living/carbon/human))
|
||||
if(ishuman(load))
|
||||
var/mob/living/D = load
|
||||
to_chat(D, span_danger("You hit [M]!"))
|
||||
add_attack_logs(D,M,"Ran over with [src.name]")
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
/obj/vehicle/train/rover/engine/RunOver(var/mob/living/M)
|
||||
..()
|
||||
|
||||
if(is_train_head() && istype(load, /mob/living/carbon/human))
|
||||
if(is_train_head() && ishuman(load))
|
||||
var/mob/living/carbon/human/D = load
|
||||
to_chat(D, span_danger("You ran over \the [M]!"))
|
||||
visible_message(span_danger("\The [src] ran over \the [M]!"))
|
||||
@@ -219,7 +219,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(on)
|
||||
@@ -240,7 +240,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!on)
|
||||
@@ -256,7 +256,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!key || (load && load != usr))
|
||||
@@ -278,7 +278,7 @@
|
||||
/obj/vehicle/train/rover/trolley/load(var/atom/movable/C)
|
||||
if(ismob(C) && !passenger_allowed)
|
||||
return 0
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human))
|
||||
if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ishuman(C))
|
||||
return 0
|
||||
|
||||
//if there are any items you don't want to be able to interact with, add them to this check
|
||||
@@ -292,7 +292,7 @@
|
||||
return 1
|
||||
|
||||
/obj/vehicle/train/rover/engine/load(var/atom/movable/C)
|
||||
if(!istype(C, /mob/living/carbon/human))
|
||||
if(!ishuman(C))
|
||||
return 0
|
||||
|
||||
. = ..(C)
|
||||
|
||||
@@ -50,12 +50,12 @@
|
||||
A.Move(T) //bump things away when hit
|
||||
|
||||
if(emagged)
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
visible_message(span_red("[src] knocks over [M]!"))
|
||||
M.apply_effects(5, 5) //knock people down if you hit them
|
||||
M.apply_damages(22 / move_delay) // and do damage according to how fast the train is going
|
||||
if(istype(load, /mob/living/carbon/human))
|
||||
if(ishuman(load))
|
||||
var/mob/living/D = load
|
||||
to_chat(D, span_red("You hit [M]!"))
|
||||
add_attack_logs(D,M,"Ran over with [src.name]")
|
||||
@@ -133,7 +133,7 @@
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(1)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr))
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
var/turf/Tsec = get_turf(src)
|
||||
|
||||
//stuns people who are thrown off a train that has been blown up
|
||||
if(istype(load, /mob/living))
|
||||
if(isliving(load))
|
||||
var/mob/living/M = load
|
||||
M.apply_effects(5, 5)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user