Generalized pulling restrictions to mob level.

This commit is contained in:
Zuhayr
2016-01-08 23:20:30 +10:30
parent 4ab3daf318
commit baf1e4315e
21 changed files with 52 additions and 45 deletions
+8 -1
View File
@@ -125,6 +125,8 @@
#define FLASH_PROTECTION_NONE 0
#define FLASH_PROTECTION_MODERATE 1
#define FLASH_PROTECTION_MAJOR 2
#define ANIMAL_SPAWN_DELAY round(config.respawn_delay / 6)
#define DRONE_SPAWN_DELAY round(config.respawn_delay / 3)
#define ANIMAL_SPAWN_DELAY round(config.respawn_delay / 6)
#define DRONE_SPAWN_DELAY round(config.respawn_delay / 3)
@@ -171,4 +173,9 @@
#define BP_ALL list(BP_GROIN, BP_TORSO, BP_HEAD, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG)
#define SYNTH_BLOOD_COLOUR "#030303"
#define SYNTH_FLESH_COLOUR "#575757"
#define SYNTH_FLESH_COLOUR "#575757"
#define MOB_PULL_NONE 0
#define MOB_PULL_SMALLER 1
#define MOB_PULL_SAME 2
#define MOB_PULL_LARGER 3
@@ -5,6 +5,7 @@
density = 1
var/health = 100.0
flags = CONDUCT
w_class = 5
var/valve_open = 0
var/release_pressure = ONE_ATMOSPHERE
+1
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/atmos.dmi'
icon_state = "psiphon:0"
density = 1
w_class = 3
var/on = 0
var/direction_out = 0 //0 = siphoning, 1 = releasing
@@ -4,6 +4,7 @@
icon = 'icons/obj/atmos.dmi'
icon_state = "pscrubber:0"
density = 1
w_class = 3
var/on = 0
var/volume_rate = 800
@@ -4,6 +4,7 @@
icon = 'icons/obj/closet.dmi'
icon_state = "closed"
density = 1
w_class = 5
var/icon_closed = "closed"
var/icon_opened = "open"
var/opened = 0
@@ -4,6 +4,7 @@
icon_state = "door_as_0"
anchored = 0
density = 1
w_class = 5
var/state = 0
var/base_icon_state = ""
var/base_name = "Airlock"
+1
View File
@@ -3,6 +3,7 @@
anchored = 1
density = 1
layer = 2
w_class = 5
var/state = 0
var/health = 200
var/cover = 50 //how much cover the girder provides against projectiles.
+1
View File
@@ -5,6 +5,7 @@
icon_state = "latticefull"
density = 0
anchored = 1.0
w_class = 3
layer = 2.3 //under pipes
// flags = CONDUCT
@@ -4,6 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
w_class = 3
pressure_resistance = 5
flags = OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
+1
View File
@@ -4,6 +4,7 @@
opacity = 0
density = 0
layer = 3.5
w_class = 3
/obj/structure/sign/ex_act(severity)
switch(severity)
@@ -5,6 +5,7 @@
icon_state = "dispenser"
density = 1
anchored = 1.0
w_class = 5
var/oxygentanks = 10
var/phorontanks = 10
var/list/oxytanks = list() //sorry for the similar var names
@@ -5,6 +5,7 @@
icon = 'icons/obj/objects.dmi'
icon_state = "target_stake"
density = 1
w_class = 5
flags = CONDUCT
var/obj/item/target/pinned_target // the current pinned target
@@ -16,6 +16,7 @@ obj/structure/windoor_assembly
anchored = 0
density = 0
dir = NORTH
w_class = 3
var/obj/item/weapon/airlock_electronics/electronics = null
+2
View File
@@ -3,6 +3,8 @@
desc = "A window."
icon = 'icons/obj/structures.dmi'
density = 1
w_class = 3
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
@@ -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)
+10 -1
View File
@@ -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
+2
View File
@@ -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
+5
View File
@@ -0,0 +1,5 @@
author: Zuhayr
delete-after: True
changes:
- rscadd: Drones can now pull a variety of things (such as scrubbers). This came with a pulling refactor so please report any strangeness with pulling in general.
- rscadd: Drones (and any mob that can be picked up) can be bashed against airlocks and such to use their internal access, so long as the person using them does not have an ID card equipped.