Fixes for:

Air tank dialog not updating to show 'restore gas flow' when clicking 'stop gas flow'
Being able to knock out, stun, paralyze, etc, the AI
Timers/igniters not igniting when the timer completed: screwdrivering the timer/igniter assembly was not setting status on the igniter. (prox/igniters and remote/igniters did set it)
This commit is contained in:
shadowlord13
2008-05-31 18:25:59 +00:00
parent 32f1af1fc7
commit bbe4fcca82
7 changed files with 1233 additions and 1197 deletions
+2 -4
View File
@@ -69,6 +69,7 @@
if ((href_list["stat"] && src.loc == usr))
if (usr.internal == src)
usr.internal = null
src.updateEquippedDialog()
return
if (usr.internal)
usr.internal = null
@@ -77,10 +78,7 @@
usr.internal = src
usr << "\blue Now running on internals!"
src.add_fingerprint(usr)
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
//Foreach goto(206)
src.updateEquippedDialog()
else
usr << browse(null, "window=tank")
return
+3
View File
@@ -151,6 +151,9 @@ var
</li><li>There are now 24 solar panels at north solar, which is the same number that main solar (southwest) has (there were 12 at north solar before).
</li><li>Fixed several places (everywhere I did it) where I typo'd in an infinite loop in attack_ai calling itself when it should have been calling attack_hand instead.
</li><li>Fixed some more errors in the computers that crept in while I was merging them through the reorganizations.
</li><li>Fixed a bug which was causing the air tank dialog to not update when you switched gas flow off (so it still said 'stop gas flow' instead of 'restore gas flow').
</li><li>You shouldn't be able to knock out, stun, paralyze, etc, the AI anymore.
</li><li>Timer/igniters now actually ignite when the timer finishes.
</ul>
<p><B>Version 40.93.2H9.6</B>
+114 -77
View File
@@ -1246,44 +1246,59 @@
/obj/item/weapon/gun/revolver/attack(mob/M, mob/user)
src.add_fingerprint(user)
var/mob/human/H = M
if (istype(M, /mob/ai))
if ((user.a_intent == "hurt" && src.bullets > 0))
src.bullets--
src.force = 75
..()
src.force = 60
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You have been shot point-blank by []!", 2)
else
src.force = 30
..()
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been pistol whipped by []!</B>", M, user), 1, "\red You have been pistol whipped by []!", 2)
else
var/mob/human/H = M
// ******* Check
// ******* Check
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
M << "\red The helmet protects you from being hit hard in the head!"
return
if ((user.a_intent == "hurt" && src.bullets > 0))
if (prob(20))
if (M.paralysis < 10)
M.paralysis = 10
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
M << "\red The helmet protects you from being hit hard in the head!"
return
if ((user.a_intent == "hurt" && src.bullets > 0))
if (prob(20))
if (M.paralysis < 10)
M.paralysis = 10
else
if (M.weakened < 10)
M.weakened = 10
src.bullets--
src.force = 75
..()
src.force = 60
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear someone fall", 2)
else
if (M.weakened < 10)
M.weakened = 10
src.bullets--
src.force = 75
..()
src.force = 60
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been shot point-blank by []!</B>", M, user), 1, "\red You hear someone fall", 2)
//Foreach goto(192)
else
if (prob(50))
if (M.paralysis < 60)
M.paralysis = 60
else
if (M.weakened < 60)
M.weakened = 60
src.force = 30
..()
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has been pistol whipped []!</B>", M, user), 1, "\red You hear someone fall", 2)
//Foreach goto(315)
if (prob(50))
if (M.paralysis < 60)
M.paralysis = 60
else
if (M.weakened < 60)
M.weakened = 60
src.force = 30
..()
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has been pistol whipped by []!</B>", M, user), 1, "\red You hear someone fall", 2)
return
/obj/item/weapon/gun/energy/proc/update_icon()
@@ -1335,7 +1350,7 @@
..()
src.add_fingerprint(user)
if ((prob(30) && M.stat < 2))
if ((prob(30) && M.stat < 2) && (!istype(M, /mob/ai)))
var/mob/human/H = M
// ******* Check
@@ -1403,46 +1418,59 @@
/obj/item/weapon/gun/energy/taser_gun/attack(mob/M, mob/user)
src.add_fingerprint(user)
var/mob/human/H = M
if (istype(M, /mob/ai) && M.stat<2)
if ((user.a_intent == "hurt" && src.charges > 0))
src.charges--
src.force = 25
..()
src.force = 10
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been zapped with the taser gun by []!</B>", M, user), 1, "\red You have been zapped with the taser gun by []!", 2)
else
..()
else
var/mob/human/H = M
// ******* Check
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
M << "\red The helmet protects you from being hit hard in the head!"
return
if (src.charges >= 1)
if (user.a_intent == "hurt")
if (prob(20))
if (M.paralysis < 10)
M.paralysis = 10
else if (M.weakened < 10)
M.weakened = 10
if (M.stuttering < 10)
M.stuttering = 10
..()
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall", 2)
//Foreach goto(182)
else
if (prob(50))
if (M.paralysis < 60)
M.paralysis = 60
// ******* Check
if ((istype(H, /mob/human) && istype(H, /obj/item/weapon/clothing/head) && H.flags & 8 && prob(80)))
M << "\red The helmet protects you from being hit hard in the head!"
return
if (src.charges >= 1)
if (user.a_intent == "hurt")
if (prob(20))
if (M.paralysis < 10)
M.paralysis = 10
else if (M.weakened < 10)
M.weakened = 10
if (M.stuttering < 10)
M.stuttering = 10
..()
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] has been knocked unconscious!</B>", M), 1, "\red You hear someone fall", 2)
//Foreach goto(182)
else
if (M.weakened < 60)
M.weakened = 60
if (M.stuttering < 60)
M.stuttering = 60
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has been stunned with the taser gun by []!</B>", M, user), 1, "\red You hear someone fall", 2)
//Foreach goto(309)
src.charges--
update_icon()
else // no charges in the gun, so they just wallop the target with it
..()
if (prob(50))
if (M.paralysis < 60)
M.paralysis = 60
else
if (M.weakened < 60)
M.weakened = 60
if (M.stuttering < 60)
M.stuttering = 60
if (M.stat<2)
M.stat = 1
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has been stunned with the taser gun by []!</B>", M, user), 1, "\red You hear someone fall", 2)
//Foreach goto(309)
src.charges--
update_icon()
else // no charges in the gun, so they just wallop the target with it
..()
/obj/item/weapon/pill_canister/New()
@@ -3452,7 +3480,7 @@
/obj/item/weapon/storage/toolbox/attack(mob/M, mob/user)
..()
if ((prob(30) && M.stat < 2))
if ((prob(30) && M.stat < 2) && (!istype(M, /mob/ai)))
var/mob/H = M
// ******* Check
@@ -5796,4 +5824,13 @@
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src.attack_hand(M)
AutoUpdateAI(src)
AutoUpdateAI(src, 0)
//Used for air tanks only at the moment, maybe other things later
/obj/proc/updateEquippedDialog()
var/list/nearby = viewers(1, src.loc)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src:attack_self(M)
AutoUpdateAI(src, 1)
+5 -2
View File
@@ -613,9 +613,12 @@
src.loc = S.loc
return
/proc/AutoUpdateAI(obj/subject)
/proc/AutoUpdateAI(obj/subject, isSelf)
if (subject!=null)
for(var/mob/ai/M in world)
if ((M.client && M.machine == subject))
subject.attack_ai(M)
if (isSelf==0)
subject.attack_ai(M)
else
subject:attack_self(M)
+7 -6
View File
@@ -621,12 +621,13 @@
return
if (!( istype(W, /obj/item/weapon/screwdriver) ))
return
src.status = !( src.status )
if (src.status)
user.show_message("\blue The timer is now secured!", 1)
else
user.show_message("\blue The timer is now unsecured!", 1)
src.status = !( src.status )
if (src.status)
user.show_message("\blue The timer is now secured! The igniter now works!", 1)
else
user.show_message("\blue The timer is now unsecured! The igniter will not work.", 1)
src.part2.status = src.status
src.add_fingerprint(user)
return
-7
View File
@@ -3,16 +3,9 @@
// New source code should be placed in .dm files: choose File/New --> Code File.
// BEGIN_INTERNALS
/*
FILE: ss13h_new.dmp
DIR: Code Code\Machinery Code\mob Icons
MAP_ICON_TYPE: 0
AUTO_FILE_DIR: ON
*/
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR "backup"
#define FILE_DIR "Code"
#define FILE_DIR "Code/Item"
#define FILE_DIR "Code/Item/Weapon"
+1102 -1101
View File
File diff suppressed because it is too large Load Diff