Merge pull request #743 from Zuhayr/showfix

Several fix ports, minor show_messages inclusion.
This commit is contained in:
EmperorJon
2016-01-09 02:05:58 +00:00
30 changed files with 102 additions and 109 deletions
+19
View File
@@ -6,6 +6,7 @@ var/list/holder_mob_icon_cache = list()
desc = "You shouldn't ever see this."
icon = 'icons/obj/objects.dmi'
slot_flags = SLOT_HEAD | SLOT_HOLSTER
show_messages = 1
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/head.dmi'
@@ -43,6 +44,17 @@ var/list/holder_mob_icon_cache = list()
M.reset_view()
qdel(src)
/obj/item/weapon/holder/GetID()
for(var/mob/M in contents)
var/obj/item/I = M.GetIdCard()
if(I)
return I
return null
/obj/item/weapon/holder/GetAccess()
var/obj/item/I = GetID()
return I ? I.GetAccess() : ..()
/obj/item/weapon/holder/proc/sync(var/mob/living/M)
dir = 2
overlays.Cut()
@@ -83,6 +95,13 @@ var/list/holder_mob_icon_cache = list()
//Mob procs and vars for scooping up
/mob/living/var/holder_type
/mob/living/MouseDrop(var/atom/over_object)
var/mob/living/carbon/human/H = over_object
if(holder_type && istype(H) && !H.lying && !issmall(H) && Adjacent(H))
get_scooped(H, (usr == src))
return
return ..()
/mob/living/proc/get_scooped(var/mob/living/carbon/grabber, var/self_grab)
if(!holder_type || buckled || pinned.len)
@@ -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
@@ -1,17 +1,13 @@
/mob/living/carbon/alien/diona/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
if(H.species && H.species.name == "Diona" && do_merge(H))
return
get_scooped(H)
return
else if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
/mob/living/carbon/alien/diona/MouseDrop(var/atom/over_object)
var/mob/living/carbon/human/H = over_object
if(!istype(H) || !Adjacent(H))
return ..()
if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
hat.loc = get_turf(src)
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
hat = null
update_icons()
updateicon()
else
return ..()
@@ -1370,13 +1370,6 @@
return 1
return 0
/mob/living/carbon/human/MouseDrop(var/atom/over_object)
var/mob/living/carbon/human/H = over_object
if(holder_type && istype(H) && !H.lying && !issmall(H) && Adjacent(H))
get_scooped(H, (usr == src))
return
return ..()
/mob/living/carbon/human/verb/pull_punches()
set name = "Pull Punches"
set desc = "Try not to hurt them."
@@ -127,9 +127,6 @@
return 0
..()
/mob/living/silicon/pai/MouseDrop(atom/over_object)
return
/mob/living/silicon/pai/emp_act(severity)
// Silence for 2 minutes
// 20% chance to kill
@@ -396,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
@@ -421,12 +406,3 @@
grabber.update_inv_l_hand()
grabber.update_inv_r_hand()
return H
/mob/living/silicon/pai/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)
return
else
return ..()
@@ -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
@@ -21,13 +21,11 @@
return
/mob/living/silicon/robot/drone/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)
return
else if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
/mob/living/silicon/robot/drone/MouseDrop(var/atom/over_object)
var/mob/living/carbon/human/H = over_object
if(!istype(H) || !Adjacent(H))
return ..()
if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
hat.loc = get_turf(src)
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
@@ -124,17 +124,6 @@
. = ..()
set_flee_target(AM.thrower? AM.thrower : src.loc)
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)
return
else
return ..()
//Basic friend AI
/mob/living/simple_animal/cat/fluff
var/mob/living/carbon/human/friend
@@ -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,20 +81,6 @@
if(client)
client.time_died_as_mouse = world.time
/mob/living/simple_animal/mouse/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)
return
else
return ..()
/mob/living/simple_animal/mouse/start_pulling(var/atom/movable/AM)//Prevents mouse from pulling things
src << "<span class='warning'>You are too small to pull anything.</span>"
return
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
if( ishuman(AM) )
+25 -1
View File
@@ -603,20 +603,44 @@
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_size)
src << "<span class='warning'>It won't budge!</span>"
return
if((mob_size < M.mob_size) && (can_pull_mobs != MOB_PULL_LARGER))
src << "<span class='warning'>It won't budge!</span>"
return
if((mob_size == M.mob_size) && (can_pull_mobs == MOB_PULL_SMALLER))
src << "<span class='warning'>It won't budge!</span>"
return
// If your size is larger than theirs and you have some
// kind of mob pull value AT ALL, you will be able to pull
// them, so don't bother checking that explicitly.
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
stop_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