Merge pull request #1069 from Erthilo/master

Cable restraints, lockdown fixes, resting fixes
This commit is contained in:
SkyMarshal
2012-05-15 14:53:49 -07:00
10 changed files with 71 additions and 37 deletions
+3
View File
@@ -862,6 +862,9 @@
/obj/item/weapon/handcuffs/cyborg
dispenser = 1
/obj/item/weapon/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
/obj/item/weapon/locator
name = "locator"
+10 -10
View File
@@ -362,12 +362,12 @@
add_blood(G.affecting)
H.halloss += rand(10, 15)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to engage \the [src]'s safeties!",\
"\red You smash \the [H]\s head on \the [src] with enough force to engage \the [src]'s safeties!",\
"\red You smash \the [H]'s head on \the [src] with enough force to engage \the [src]'s safeties!",\
"\red You hear a whine as \the [src]'s engage.")
else
H.halloss += rand(5, 10)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src]!",\
"\red You smash \the [H]\s head on \the [src]!",\
"\red You smash \the [H]'s head on \the [src]!",\
"\red You hear a whine as \the [src]'s is hit by something dense.")
H.UpdateDamageIcon()
H.updatehealth()
@@ -387,25 +387,25 @@
affecting.take_damage(rand(0,5), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)
G.assailant.visible_message("\red [G.assailant] smashes \the [H]\s head on \the [src]!",\
"\red You smash \the [H]\s head on \the [src]!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src]!",\
"\red You smash \the [H]'s head on \the [src]!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
@@ -59,7 +59,7 @@
if (I && istype(I))
if(src.check_access(I))
authenticated = 1
if(20 in I.access)
if((access_hop in I.access) || (access_captain in I.access))
authenticated = 2
if("logout")
authenticated = 0
@@ -71,7 +71,7 @@
var/obj/item/device/pda/pda = I
I = pda.id
if (I && istype(I))
if(access_captain in I.access)
if((access_hop in I.access) || (access_captain in I.access))
var/old_level = security_level
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
+3 -3
View File
@@ -16,7 +16,7 @@
//only load blast doors for map-defined departments for the moment
switch(department)
if("SinguloEngineering-Antiqua")
if("Engineering")
connectedDoorIds.Add("Engineering Primary Access")
connectedDoorIds.Add("Engineering Secondary Access")
connectedDoorIds.Add("Fore Maintenance Access")
@@ -34,7 +34,7 @@
connectedDoorIds.Add("Central aft shell access")
connectedDoorIds.Add("Port aft shell access")
connectedDoorIds.Add("Starboard aft shell access")
if("Medbay-Exodus")
if("Medbay")
connectedDoorIds.Add("Genetics Outer Shutters")
connectedDoorIds.Add("Genetics Inner Shutters")
connectedDoorIds.Add("Chemistry Outer Shutters")
@@ -143,4 +143,4 @@
t += "</table>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=lockdown;size=500x800")
onclose(user, "lockdown")
onclose(user, "lockdown")
+8 -8
View File
@@ -167,25 +167,25 @@ TABLE AND RACK OBJECT INTERATIONS
affecting.take_damage(rand(0,5), 0) //Extra damage
if(dented)
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] with enough force to further deform \the [src]!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave another dent!\n[prob(50)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else
dented = 1
G.assailant.visible_message("\red \The [G.assailant] smashes \the [H]'s head on \the [src] so hard it left a dent!\nYou wish you could unhear that sound.",\
"\red You smash \the [H]\s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You smash \the [H]'s head on \the [src] with enough force to leave a dent!\n[prob(5)?"That was a satisfying noise." : "That sound will haunt your nightmares"]",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
else if(prob(50))
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] bone and cartilage making a loud crunch!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
else
G.assailant.visible_message("\red [G.assailant] smashes \the [G.assailant]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]\s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You smash \the [H]'s head on \the [src], [H.gender == MALE? "his" : "her"] nose smashed and face bloodied!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
else
affecting.take_damage(rand(5,10), 0)
G.assailant.visible_message("\red [G.assailant] smashes \the [H]\s head on \the [src]!",\
"\red You smash \the [H]\s head on \the [src]!",\
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src]!",\
"\red You smash \the [H]'s head on \the [src]!",\
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
H.UpdateDamageIcon()
H.updatehealth()
@@ -116,7 +116,10 @@
//handcuffed?
if (src.handcuffed)
msg += "[t_He] [t_is] \icon[src.handcuffed] handcuffed!\n"
if(istype(src.handcuffed, /obj/item/weapon/handcuffs/cable))
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] restrained with cable!</span>\n"
else
msg += "<span class='warning'>[t_He] [t_is] \icon[src.handcuffed] handcuffed!</span>\n"
//belt
if (src.belt)
+6 -4
View File
@@ -975,10 +975,16 @@
if (stunned > 0)
AdjustStunned(-1)
stat = 0
if (weakened > 0)
AdjustWeakened(-1)
lying = 1
stat = 0
if(resting)
lying = 1
stat = 0
if (paralysis > 0)
handle_dreams()
AdjustParalysis(-1)
@@ -998,10 +1004,6 @@
if(!sleeping_willingly)
sleeping--
if(resting)
lying = 1
stat = 0
var/h = hand
hand = 0
drop_item()
+12 -9
View File
@@ -493,22 +493,25 @@
usr.next_move = world.time + 100
usr.last_special = world.time + 100
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
usr << "\green You attempt to break \the [usr:handcuffed]. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
O.show_message(text("\red <B>[] is trying to break \the [usr:handcuffed]!</B>", usr), 1)
spawn(0)
if(do_after(usr, 50))
if(!usr:handcuffed || usr:buckled)
return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", usr), 1)
usr << "\green You successfully break your handcuffs."
O.show_message(text("\red <B>[] manages to break \the [usr:handcuffed]!</B>", usr), 1)
usr << "\green You successfully break \the [usr:handcuffed]."
del(usr:handcuffed)
usr:handcuffed = null
else
usr << "\red You attempt to remove your handcuffs. (This will take around [displaytime] minutes and you need to stand still)"
if(istype(usr:handcuffed, /obj/item/weapon/handcuffs/cable))
breakouttime = 300
displaytime = 0.5
usr << "\red You attempt to remove \the [usr:handcuffed]. (This will take around [displaytime] minutes and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] attempts to remove the handcuffs!</B>", usr), 1)
O.show_message(text("\red <B>[] attempts to remove \the [usr:handcuffed]!</B>", usr), 1)
spawn(0)
var/increment = 150
for(var/i = 0, i < breakouttime, i += increment)
@@ -527,11 +530,11 @@
"This is exhausting!") // - SkyMarshal
for(var/mob/O in viewers(usr))
if(prob(50)) //Reduces spam slightly
O.show_message(text("\red [] continues to struggle in their cuffs!", usr), 1)
O.show_message(text("\red [] continues to struggle in \the [usr:handcuffed]!", usr), 1)
if(!usr:handcuffed) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to remove the handcuffs!</B>", usr), 1)
usr << "\blue You successfully remove your handcuffs."
O.show_message(text("\red <B>[] manages to remove \the [usr:handcuffed]!</B>", usr), 1)
usr << "\blue You successfully remove \the [usr:handcuffed]."
usr:handcuffed:loc = usr:loc
usr:handcuffed = null
usr.update_clothing()
+19
View File
@@ -242,6 +242,25 @@
else
usr << "A coil of power cable. There are [amount] lengths of cable in the coil."
/obj/item/weapon/cable_coil/verb/make_restraint()
set name = "Make Cable Restraints"
set category = "Object"
var/mob/M = usr
if (istype(M, /mob/dead/)) return
if (usr.stat) return
if(!istype(usr.loc,/turf)) return
if(src.amount <= 14)
usr << "\red You need at least 15 lengths to make restraints!"
return
if(src.amount == 15)
del(src)
else
src.amount -= 15
var/obj/item/weapon/handcuffs/cable/B = new /obj/item/weapon/handcuffs/cable(usr.loc)
B.layer = 20
usr << "\blue You wind some cable together to make some restraints."
..()
/obj/item/weapon/cable_coil/attackby(obj/item/weapon/W, mob/user)
..()
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
+4
View File
@@ -66,6 +66,10 @@ should be listed in the changelog upon commit though. Thanks. -->
<li class="rscadd">Add ADVANCED INTERROGATION TECHNIQUES (smashing peoples faces with tables). Grab someone once and then click on a table. Don't abuse this!</li>
<li class="bugfix">Fixes sleep button not waking you up.</li>
<li class="bugfix">Fixes mech weapons not firing.</li>
<li class="rscadd">Added cable restraints, made from 15 lengths of cable coil by right-click a cable coil in-hand and choosing 'Make Cable Restraints'. These works just like handcuffs, but only take 30 seconds to break!</li>
<li class="tweak">The Head of Personnel can now change alert levels.</li>
<li class="bugfix">Fixes lockdown computers being blank.</li>
</ul>
</ul>
</div>