mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 18:42:19 +00:00
Generalized pulling restrictions to mob level.
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
death_msg = "expires with a pitiful chirrup..."
|
||||
universal_understand = 1
|
||||
universal_speak = 0 // Dionaea do not need to speak to people other than other dionaea.
|
||||
|
||||
can_pull_size = 2
|
||||
can_pull_mobs = MOB_PULL_SMALLER
|
||||
|
||||
holder_type = /obj/item/weapon/holder/diona
|
||||
var/obj/item/hat
|
||||
|
||||
@@ -18,19 +22,6 @@
|
||||
species = all_species["Diona"]
|
||||
verbs += /mob/living/carbon/alien/diona/proc/merge
|
||||
|
||||
/mob/living/carbon/alien/diona/start_pulling(var/atom/movable/AM)
|
||||
//TODO: Collapse these checks into one proc (see pai and drone)
|
||||
if(istype(AM,/obj/item))
|
||||
var/obj/item/O = AM
|
||||
if(O.w_class > 2)
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
else
|
||||
..()
|
||||
else
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
|
||||
W.loc = get_turf(src)
|
||||
return 1
|
||||
|
||||
@@ -393,18 +393,6 @@
|
||||
resting = 0
|
||||
icon_state = "[chassis]"
|
||||
|
||||
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)
|
||||
|
||||
if(istype(AM,/obj/item))
|
||||
var/obj/item/O = AM
|
||||
if(O.w_class == 1)
|
||||
..()
|
||||
else
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
else
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
|
||||
// No binary for pAIs.
|
||||
/mob/living/silicon/pai/binarycheck()
|
||||
return 0
|
||||
|
||||
@@ -37,6 +37,9 @@ var/list/mob_hat_cache = list()
|
||||
integrated_light_power = 3
|
||||
local_transmit = 1
|
||||
|
||||
can_pull_size = 3
|
||||
can_pull_mobs = MOB_PULL_SMALLER
|
||||
|
||||
mob_bump_flag = SIMPLE_ANIMAL
|
||||
mob_swap_flags = SIMPLE_ANIMAL
|
||||
mob_push_flags = SIMPLE_ANIMAL
|
||||
@@ -49,8 +52,6 @@ var/list/mob_hat_cache = list()
|
||||
var/obj/machinery/drone_fabricator/master_fabricator
|
||||
var/law_type = /datum/ai_laws/drone
|
||||
var/module_type = /obj/item/weapon/robot_module/drone
|
||||
var/can_pull_size = 2
|
||||
var/can_pull_mobs
|
||||
var/obj/item/hat
|
||||
var/hat_x_offset = 0
|
||||
var/hat_y_offset = -13
|
||||
@@ -66,10 +67,10 @@ var/list/mob_hat_cache = list()
|
||||
icon_state = "constructiondrone"
|
||||
law_type = /datum/ai_laws/construction_drone
|
||||
module_type = /obj/item/weapon/robot_module/drone/construction
|
||||
can_pull_size = 5
|
||||
can_pull_mobs = 1
|
||||
hat_x_offset = 1
|
||||
hat_y_offset = -12
|
||||
can_pull_size = 5
|
||||
can_pull_mobs = MOB_PULL_SAME
|
||||
|
||||
/mob/living/silicon/robot/drone/New()
|
||||
|
||||
@@ -315,20 +316,6 @@ var/list/mob_hat_cache = list()
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
|
||||
src << "Use <b>say ;Hello</b> to talk to other drones and <b>say Hello</b> to speak silently to your nearby fellows."
|
||||
|
||||
/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
|
||||
|
||||
if(!(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)))
|
||||
if(istype(AM,/obj/item))
|
||||
var/obj/item/O = AM
|
||||
if(O.w_class > can_pull_size)
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
else
|
||||
if(!can_pull_mobs)
|
||||
src << "<span class='warning'>You are too small to pull that.</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/add_robot_verbs()
|
||||
src.verbs |= silicon_subsystems
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
holder_type = /obj/item/weapon/holder/mouse
|
||||
mob_size = MOB_MINISCULE
|
||||
|
||||
can_pull_size = 1
|
||||
can_pull_mobs = MOB_PULL_NONE
|
||||
|
||||
/mob/living/simple_animal/mouse/Life()
|
||||
..()
|
||||
if(!stat && prob(speak_chance))
|
||||
@@ -78,6 +81,7 @@
|
||||
if(client)
|
||||
client.time_died_as_mouse = world.time
|
||||
|
||||
|
||||
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
|
||||
if( ishuman(AM) )
|
||||
if(!stat)
|
||||
|
||||
@@ -603,19 +603,28 @@
|
||||
pullin.icon_state = "pull0"
|
||||
|
||||
/mob/proc/start_pulling(var/atom/movable/AM)
|
||||
|
||||
if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort!
|
||||
return
|
||||
|
||||
if (AM.anchored)
|
||||
usr << "<span class='notice'>It won't budge!</span>"
|
||||
src << "<span class='warning'>It won't budge!</span>"
|
||||
return
|
||||
|
||||
var/mob/M = AM
|
||||
if(ismob(AM))
|
||||
if(!can_pull_mobs || can_pull_mobs == MOB_PULL_NONE || (mob_size >= M.mob_size && can_pull_mobs == MOB_PULL_SMALLER) || (mob_size < M.mob_size && can_pull_mobs != MOB_PULL_LARGER))
|
||||
src << "<span class='warning'>It won't budge!</span>"
|
||||
return
|
||||
if(!iscarbon(src))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = usr
|
||||
else if(isobj(AM))
|
||||
var/obj/I = AM
|
||||
if(!can_pull_size || can_pull_size < I.w_class)
|
||||
src << "<span class='warning'>It won't budge!</span>"
|
||||
return
|
||||
|
||||
if(pulling)
|
||||
var/pulling_old = pulling
|
||||
|
||||
@@ -149,6 +149,8 @@
|
||||
var/const/deafness = 2//Carbon
|
||||
var/const/muteness = 4//Carbon
|
||||
|
||||
var/can_pull_size = 10 // Maximum w_class the mob can pull.
|
||||
var/can_pull_mobs = MOB_PULL_LARGER // Whether or not the mob can pull other mobs.
|
||||
|
||||
var/datum/dna/dna = null//Carbon
|
||||
var/radiation = 0.0//Carbon
|
||||
|
||||
Reference in New Issue
Block a user