Rename Bumped to CollidedWith

In light of the change of Bump to Collide, this should also be done
as it will make it less confusing for devs in the future

I also ended up changing a bunch of the code in the CollidedWith procs,
things that were assuming types, doing bad loc changes and so forth
This commit is contained in:
oranges
2017-07-15 00:25:22 +00:00
parent 2d805255ae
commit e04fd83b9d
36 changed files with 102 additions and 104 deletions
+5 -11
View File
@@ -49,17 +49,11 @@
new /obj/structure/grille/ratvar(src.loc)
qdel(src)
/obj/structure/grille/Bumped(atom/user)
if(ismob(user))
var/tile_density = FALSE
for(var/atom/movable/AM in get_turf(src))
if(AM == src)
continue
if(AM.density && AM.layer >= layer)
tile_density = TRUE
break
if(!tile_density)
shock(user, 70)
/obj/structure/grille/CollidedWith(atom/movable/AM)
if(!ismob(AM))
return
var/mob/M = AM
shock(M, 70)
/obj/structure/grille/attack_paw(mob/user)
+11 -7
View File
@@ -115,10 +115,14 @@
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/user)
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier", safety=1)
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
/obj/structure/holosign/barrier/cyborg/hacked/CollidedWith(atom/movable/AM)
if(shockcd)
return
if(!ismob(AM))
return
var/mob/living/M = AM
M.electrocute_act(15,"Energy Barrier", safety=1)
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
@@ -37,10 +37,10 @@
..()
move_update_air(T)
/obj/structure/mineral_door/Bumped(atom/user)
/obj/structure/mineral_door/CollidedWith(atom/movable/AM)
..()
if(!state)
return TryToSwitchState(user)
return TryToSwitchState(AM)
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
+2 -2
View File
@@ -115,7 +115,7 @@
radiate()
return ..()
/obj/structure/statue/uranium/Bumped(atom/user)
/obj/structure/statue/uranium/CollidedWith(atom/movable/AM)
radiate()
..()
@@ -273,7 +273,7 @@
name = "statue of a clown"
icon_state = "clown"
/obj/structure/statue/bananium/Bumped(atom/user)
/obj/structure/statue/bananium/CollidedWith(atom/movable/AM)
honk()
..()
@@ -32,7 +32,7 @@
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
return 1
/obj/structure/transit_tube/station/Bumped(atom/movable/AM)
/obj/structure/transit_tube/station/CollidedWith(atom/movable/AM)
if(!pod_moving && open_status == STATION_TUBE_OPEN && ismob(AM) && AM.dir == boarding_dir)
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving)
@@ -71,7 +71,7 @@
if(do_after(user, 15, target = src))
if(open_status == STATION_TUBE_OPEN && GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
GM.Knockdown(100)
src.Bumped(GM)
src.CollidedWith(GM)
break
else
for(var/obj/structure/transit_tube_pod/pod in loc)