Merge pull request #9601 from Ghommie/Ghommie-cit265

Ports move force and move resist, movement/pushing/pulling tweaks & co.
This commit is contained in:
kevinz000
2020-10-03 19:35:47 -03:00
committed by Dip
parent 76f9c30103
commit b8bc551d51
120 changed files with 563 additions and 447 deletions
+11 -3
View File
@@ -16,7 +16,7 @@
name = "AI"
icon = 'icons/mob/ai.dmi'
icon_state = "ai"
anchored = TRUE
move_resist = MOVE_FORCE_OVERPOWERING
density = TRUE
canmove = FALSE
status_flags = CANSTUN|CANPUSH
@@ -100,6 +100,7 @@
new/obj/structure/AIcore/deactivated(loc) //New empty terminal.
return INITIALIZE_HINT_QDEL //Delete AI.
ADD_TRAIT(src, TRAIT_NO_TELEPORT, src)
if(L && istype(L, /datum/ai_laws))
laws = L
laws.associate(src)
@@ -318,9 +319,16 @@
return // stop
if(incapacitated())
return
anchored = !anchored // Toggles the anchor
var/is_anchored = FALSE
if(move_resist == MOVE_FORCE_OVERPOWERING)
move_resist = MOVE_FORCE_NORMAL
else
is_anchored = TRUE
move_resist = MOVE_FORCE_OVERPOWERING
REMOVE_TRAIT(src, TRAIT_NO_TELEPORT, src)
ADD_TRAIT(src, TRAIT_NO_TELEPORT, src)
to_chat(src, "<b>You are now [anchored ? "" : "un"]anchored.</b>")
to_chat(src, "<b>You are now [is_anchored ? "" : "un"]anchored.</b>")
// the message in the [] will change depending whether or not the AI is anchored
/mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore
+1 -1
View File
@@ -14,7 +14,7 @@
cameraFollow = null
anchored = FALSE //unbolt floorbolts
move_resist = MOVE_FORCE_NORMAL
update_canmove()
if(eyeobj)
eyeobj.setLoc(get_turf(src))
@@ -105,7 +105,9 @@
if(loc != card)
visible_message("<span class='notice'>[src] [rest? "lays down for a moment..." : "perks up from the ground"]</span>")
/mob/living/silicon/pai/start_pulling(atom/movable/AM)
/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
if(ispAI(AM))
return ..()
return FALSE
/mob/living/silicon/pai/proc/toggle_integrated_light()