mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Manual merge of head.dmi.
This commit is contained in:
@@ -323,6 +323,7 @@
|
||||
#include "code\game\machinery\newscaster.dm"
|
||||
#include "code\game\machinery\OpTable.dm"
|
||||
#include "code\game\machinery\overview.dm"
|
||||
#include "code\game\machinery\portable_tag_turret.dm"
|
||||
#include "code\game\machinery\portable_turret.dm"
|
||||
#include "code\game\machinery\recharger.dm"
|
||||
#include "code\game\machinery\rechargestation.dm"
|
||||
@@ -994,7 +995,6 @@
|
||||
#include "code\modules\mob\living\carbon\human\examine.dm"
|
||||
#include "code\modules\mob\living\carbon\human\human.dm"
|
||||
#include "code\modules\mob\living\carbon\human\human_attackhand.dm"
|
||||
#include "code\modules\mob\living\carbon\human\human_attackpaw.dm"
|
||||
#include "code\modules\mob\living\carbon\human\human_damage.dm"
|
||||
#include "code\modules\mob\living\carbon\human\human_defense.dm"
|
||||
#include "code\modules\mob\living\carbon\human\human_defines.dm"
|
||||
|
||||
@@ -172,9 +172,6 @@
|
||||
/obj/machinery/atmospherics/tvalve/attack_ai(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
|
||||
@@ -65,9 +65,6 @@
|
||||
/obj/machinery/atmospherics/unary/freezer/attack_ai(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/attack_paw(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/freezer/attack_hand(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
|
||||
@@ -86,9 +86,6 @@
|
||||
/obj/machinery/atmospherics/unary/heater/attack_ai(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/attack_paw(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
|
||||
@@ -130,9 +130,6 @@
|
||||
/obj/machinery/atmospherics/valve/attack_ai(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/valve/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/valve/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
|
||||
@@ -55,9 +55,6 @@
|
||||
del target
|
||||
return ..()
|
||||
|
||||
attack_paw(var/mob/M)
|
||||
return attack_hand(M)
|
||||
|
||||
attackby(obj/item/C as obj, mob/user as mob)
|
||||
(..)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
harm_intent_damage = 8
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 15
|
||||
attacktext = "slashes"
|
||||
attacktext = "slashed"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
|
||||
@@ -126,7 +126,7 @@
|
||||
harm_intent_damage = 2
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 10
|
||||
attacktext = "bites"
|
||||
attacktext = "bitten"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
layer = 3.1 //so they can stay hidde under the /obj/structure/bush
|
||||
|
||||
@@ -71,9 +71,6 @@
|
||||
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/guestpass/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_paw(var/mob/user as mob)
|
||||
return interact(user)
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -135,8 +135,7 @@
|
||||
else
|
||||
breaktape(null, user)
|
||||
|
||||
/obj/item/tape/attack_paw(mob/user as mob)
|
||||
breaktape(/obj/item/weapon/wirecutters,user)
|
||||
|
||||
|
||||
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
|
||||
|
||||
@@ -38,9 +38,6 @@ var/list/alldepartments = list("Central Command")
|
||||
/obj/machinery/faxmachine/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/faxmachine/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/faxmachine/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
/mob/proc/DblClickOn(var/atom/A, var/params)
|
||||
ClickOn(A,params)
|
||||
|
||||
|
||||
/*
|
||||
Translates into attack_hand, etc.
|
||||
|
||||
@@ -168,6 +167,21 @@
|
||||
/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag)
|
||||
return
|
||||
|
||||
/mob/living/UnarmedAttack(var/atom/A, var/proximity_flag)
|
||||
|
||||
if(!ticker)
|
||||
src << "You cannot attack people before the game has started."
|
||||
return 0
|
||||
|
||||
if (istype(get_area(src), /area/start))
|
||||
src << "No attacking people at spawn, you jackass."
|
||||
return 0
|
||||
|
||||
if(stat)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/*
|
||||
Ranged unarmed attack:
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Generic damage proc (slimes and monkeys).
|
||||
/atom/proc/attack_generic(mob/user as mob)
|
||||
return 0
|
||||
|
||||
/*
|
||||
Humans:
|
||||
Adds an exception for gloves, to allow special glove types like the ninja ones.
|
||||
@@ -5,15 +9,19 @@
|
||||
Otherwise pretty standard.
|
||||
*/
|
||||
/mob/living/carbon/human/UnarmedAttack(var/atom/A, var/proximity)
|
||||
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
// Special glove functions:
|
||||
// If the gloves do anything, have them return 1 to stop
|
||||
// normal attack_hand() here.
|
||||
if(proximity && istype(G) && G.Touch(A,1))
|
||||
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
||||
if(istype(G) && G.Touch(A,1))
|
||||
return
|
||||
|
||||
A.attack_hand(src)
|
||||
|
||||
/atom/proc/attack_hand(mob/user as mob)
|
||||
return
|
||||
|
||||
@@ -41,24 +49,21 @@
|
||||
return
|
||||
A.attack_tk(src)
|
||||
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
*/
|
||||
/mob/living/UnarmedAttack(var/atom/A)
|
||||
A.attack_animal(src)
|
||||
/atom/proc/attack_animal(mob/user as mob)
|
||||
return
|
||||
/mob/living/RestrainedClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
Monkeys
|
||||
*/
|
||||
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A)
|
||||
A.attack_paw(src)
|
||||
/atom/proc/attack_paw(mob/user as mob)
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A, var/proximity)
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
A.attack_hand(src)
|
||||
|
||||
/*
|
||||
Monkey RestrainedClickOn() was apparently the
|
||||
one and only use of all of the restrained click code
|
||||
@@ -88,26 +93,91 @@
|
||||
|
||||
/*
|
||||
Aliens
|
||||
Defaults to same as monkey in most places
|
||||
*/
|
||||
|
||||
/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/UnarmedAttack(var/atom/A, var/proximity)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
A.attack_generic(src,rand(5,6),"bitten")
|
||||
|
||||
/*
|
||||
Slimes
|
||||
Nothing happening here
|
||||
*/
|
||||
/mob/living/carbon/slime/UnarmedAttack(var/atom/A)
|
||||
A.attack_slime(src)
|
||||
/atom/proc/attack_slime(mob/user as mob)
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/RestrainedClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/UnarmedAttack(var/atom/A, var/proximity)
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
// Eating
|
||||
if(Victim)
|
||||
return
|
||||
|
||||
// Basic attack.
|
||||
A.attack_generic(src, (is_adult ? rand(20,40) : rand(5,25)), "glomped")
|
||||
|
||||
// Handle mob shocks.
|
||||
var/mob/living/M = A
|
||||
if(istype(M) && powerlevel > 0 && !istype(A,/mob/living/carbon/slime))
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC || H.species.insulated)
|
||||
return
|
||||
|
||||
var/power = max(0,min(10,(powerlevel+rand(0,3))))
|
||||
|
||||
var/stunprob = 10
|
||||
switch(power*10)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
powerlevel = max(0,powerlevel-3)
|
||||
src.visible_message("\red <B>The [name] has shocked [M]!</B>")
|
||||
M.Weaken(power)
|
||||
M.Stun(power)
|
||||
if (M.stuttering < power) M.stuttering = power
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, M)
|
||||
s.start()
|
||||
|
||||
if(prob(stunprob) && powerlevel >= 8)
|
||||
M.adjustFireLoss(powerlevel * rand(6,10))
|
||||
M.updatehealth()
|
||||
/*
|
||||
New Players:
|
||||
Have no reason to click on anything at all.
|
||||
*/
|
||||
/mob/new_player/ClickOn()
|
||||
return
|
||||
|
||||
/*
|
||||
Animals
|
||||
*/
|
||||
/mob/living/simple_animal/UnarmedAttack(var/atom/A, var/proximity)
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
if(melee_damage_upper == 0 && istype(A,/mob/living))
|
||||
custom_emote(1,"[friendly] [src]!")
|
||||
return
|
||||
|
||||
var/damage = rand(melee_damage_lower, melee_damage_upper)
|
||||
if(A.attack_generic(src,damage,attacktext,wall_smash) && loc && attack_sound)
|
||||
playsound(loc, attack_sound, 50, 1, 1)
|
||||
@@ -193,11 +193,6 @@
|
||||
return src.master.attackby(a, b)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_paw(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_paw(a, b, c)
|
||||
return
|
||||
|
||||
/atom/movable/overlay/attack_hand(a, b, c)
|
||||
if (src.master)
|
||||
return src.master.attack_hand(a, b, c)
|
||||
|
||||
@@ -324,8 +324,6 @@
|
||||
return
|
||||
return
|
||||
*/
|
||||
/obj/machinery/computer/scan_consolenew/attack_paw(user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
maxHealth = 20
|
||||
melee_damage_lower = 4
|
||||
melee_damage_upper = 8
|
||||
attacktext = "hits"
|
||||
attacktext = "hit"
|
||||
attack_sound = 'sound/weapons/genhit1.ogg'
|
||||
var/obj/effect/blob/factory/factory = null
|
||||
faction = "blob"
|
||||
|
||||
@@ -165,9 +165,6 @@ var/bomb_set
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
|
||||
if (src.extended)
|
||||
if (!ishuman(user))
|
||||
|
||||
@@ -417,76 +417,20 @@
|
||||
/proc/get_all_centcom_jobs()
|
||||
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
|
||||
|
||||
//gets the actual job rank (ignoring alt titles)
|
||||
//this is used solely for sechuds
|
||||
/obj/proc/GetJobRealName()
|
||||
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
|
||||
return
|
||||
|
||||
var/rank
|
||||
var/assignment
|
||||
if(istype(src, /obj/item/device/pda))
|
||||
if(src:id)
|
||||
rank = src:id:rank
|
||||
assignment = src:id:assignment
|
||||
else if(istype(src, /obj/item/weapon/card/id))
|
||||
rank = src:rank
|
||||
assignment = src:assignment
|
||||
|
||||
if( rank in joblist )
|
||||
return rank
|
||||
|
||||
if( assignment in joblist )
|
||||
return assignment
|
||||
|
||||
return "Unknown"
|
||||
|
||||
//gets the alt title, failing that the actual job rank
|
||||
//this is unused
|
||||
/obj/proc/sdsdsd() //GetJobDisplayName
|
||||
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
|
||||
return
|
||||
|
||||
var/assignment
|
||||
if(istype(src, /obj/item/device/pda))
|
||||
if(src:id)
|
||||
assignment = src:id:assignment
|
||||
else if(istype(src, /obj/item/weapon/card/id))
|
||||
assignment = src:assignment
|
||||
|
||||
if(assignment)
|
||||
return assignment
|
||||
|
||||
return "Unknown"
|
||||
proc/GetIdCard(var/mob/living/carbon/human/H)
|
||||
if(H.wear_id)
|
||||
var/id = H.wear_id.GetID()
|
||||
if(id)
|
||||
return id
|
||||
if(H.get_active_hand())
|
||||
var/obj/item/I = H.get_active_hand()
|
||||
return I.GetID()
|
||||
|
||||
proc/FindNameFromID(var/mob/living/carbon/human/H)
|
||||
ASSERT(istype(H))
|
||||
var/obj/item/weapon/card/id/C = H.get_active_hand()
|
||||
if( istype(C) || istype(C, /obj/item/device/pda) )
|
||||
var/obj/item/weapon/card/id/ID = C
|
||||
|
||||
if( istype(C, /obj/item/device/pda) )
|
||||
var/obj/item/device/pda/pda = C
|
||||
ID = pda.id
|
||||
if(!istype(ID))
|
||||
ID = null
|
||||
|
||||
if(ID)
|
||||
return ID.registered_name
|
||||
|
||||
C = H.wear_id
|
||||
|
||||
if( istype(C) || istype(C, /obj/item/device/pda) )
|
||||
var/obj/item/weapon/card/id/ID = C
|
||||
|
||||
if( istype(C, /obj/item/device/pda) )
|
||||
var/obj/item/device/pda/pda = C
|
||||
ID = pda.id
|
||||
if(!istype(ID))
|
||||
ID = null
|
||||
|
||||
if(ID)
|
||||
return ID.registered_name
|
||||
var/obj/item/weapon/card/id/C = GetIdCard(H)
|
||||
if(C)
|
||||
return C.registered_name
|
||||
|
||||
proc/get_all_job_icons() //For all existing HUD icons
|
||||
return joblist + list("Prisoner")
|
||||
|
||||
@@ -45,19 +45,6 @@
|
||||
if(prob(75))
|
||||
del(src)
|
||||
|
||||
/obj/machinery/optable/attack_paw(mob/user as mob)
|
||||
if ((HULK in usr.mutations))
|
||||
usr << text("\blue You destroy the operating table.")
|
||||
visible_message("\red [usr] destroys the operating table!")
|
||||
src.density = 0
|
||||
del(src)
|
||||
if (!( locate(/obj/machinery/optable, user.loc) ))
|
||||
step(user, get_dir(user, src))
|
||||
if (user.loc == src.loc)
|
||||
user.layer = TURF_LAYER
|
||||
visible_message("The monkey hides under the table!")
|
||||
return
|
||||
|
||||
/obj/machinery/optable/attack_hand(mob/user as mob)
|
||||
if (HULK in usr.mutations)
|
||||
usr << text("\blue You destroy the table.")
|
||||
|
||||
@@ -50,9 +50,6 @@
|
||||
/obj/machinery/sleep_console/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/sleep_console/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/sleep_console/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -211,10 +211,6 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -1094,9 +1094,6 @@ FIRE ALARM
|
||||
/obj/machinery/firealarm/bullet_act(BLAH)
|
||||
return src.alarm()
|
||||
|
||||
/obj/machinery/firealarm/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/firealarm/emp_act(severity)
|
||||
if(prob(50/severity)) alarm()
|
||||
..()
|
||||
@@ -1379,9 +1376,6 @@ Code shamelessly copied from apc_frame
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 6
|
||||
|
||||
/obj/machinery/partyalarm/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/partyalarm/attack_hand(mob/user as mob)
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
|
||||
@@ -243,9 +243,6 @@ update_flag
|
||||
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
|
||||
return src.ui_interact(user)
|
||||
|
||||
|
||||
@@ -103,9 +103,6 @@
|
||||
/obj/machinery/portable_atmospherics/powered/pump/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/pump/attack_hand(var/mob/user as mob)
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -85,9 +85,6 @@
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/scrubber/attack_hand(var/mob/user as mob)
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -184,9 +184,6 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/autolathe/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
@@ -52,18 +52,6 @@
|
||||
user << "<span class='danger'>[src]'s parts look very loose!</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
src.health -= M.melee_damage_upper
|
||||
src.visible_message("\red <B>[M] has [M.attacktext] [src]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/blood/oil(src.loc)
|
||||
healthcheck()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!locked)
|
||||
|
||||
@@ -96,9 +96,6 @@
|
||||
src.icon_state = "medibot[src.on]"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/bot/medbot/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/bot/medbot/attack_hand(mob/user as mob)
|
||||
. = ..()
|
||||
if (.)
|
||||
|
||||
@@ -260,6 +260,12 @@ Auto Patrol: []"},
|
||||
src.mode = 0
|
||||
walk_to(src,0)
|
||||
|
||||
// We re-assess human targets, before bashing their head in, in case their credentials change
|
||||
if(target && istype(target, /mob/living/carbon/human))
|
||||
var/threat = src.assess_perp(target, idcheck, check_records)
|
||||
if(threat < 4)
|
||||
target = null
|
||||
|
||||
if(target) // make sure target exists
|
||||
if(!lasercolor && Adjacent(target)) // If right next to perp. Lasertag bots do not arrest anyone, just patrol and shoot and whatnot
|
||||
if(istype(src.target,/mob/living/carbon))
|
||||
@@ -643,7 +649,7 @@ Auto Patrol: []"},
|
||||
continue
|
||||
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
src.threatlevel = src.assess_perp(C, idcheck, check_records, lasercolor)
|
||||
src.threatlevel = src.assess_perp(C, idcheck, check_records)
|
||||
|
||||
else if(istype(M, /mob/living/simple_animal/hostile))
|
||||
if(M.stat == DEAD)
|
||||
@@ -669,6 +675,40 @@ Auto Patrol: []"},
|
||||
else
|
||||
continue
|
||||
|
||||
/obj/machinery/bot/secbot/on_assess_perp(mob/living/carbon/human/perp)
|
||||
if(lasercolor)
|
||||
return laser_check(perp, lasercolor)
|
||||
|
||||
var/threat = 0
|
||||
threat -= laser_check(perp, "b")
|
||||
threat -= laser_check(perp, "r")
|
||||
|
||||
return threat
|
||||
|
||||
/obj/machinery/bot/secbot/proc/laser_check(mob/living/carbon/human/perp, var/lasercolor)
|
||||
var/target_suit
|
||||
var/target_weapon
|
||||
var/threat = 0
|
||||
//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||
switch(lasercolor)
|
||||
if("b")
|
||||
target_suit = /obj/item/clothing/suit/redtag
|
||||
target_weapon = /obj/item/weapon/gun/energy/laser/redtag
|
||||
if("r")
|
||||
target_suit = /obj/item/clothing/suit/bluetag
|
||||
target_weapon = /obj/item/weapon/gun/energy/laser/bluetag
|
||||
|
||||
if((istype(perp.r_hand, target_weapon)) || (istype(perp.l_hand, target_weapon)))
|
||||
threat += 4
|
||||
|
||||
if(istype(perp, /mob/living/carbon/human))
|
||||
if(istype(perp.wear_suit, target_suit))
|
||||
threat += 4
|
||||
if(istype(perp.belt, target_weapon))
|
||||
threat += 2
|
||||
|
||||
return threat
|
||||
|
||||
/obj/machinery/bot/secbot/is_assess_emagged()
|
||||
return emagged == 2
|
||||
|
||||
|
||||
@@ -121,8 +121,7 @@
|
||||
/obj/machinery/clonepod/attack_ai(mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
return attack_hand(user)
|
||||
/obj/machinery/clonepod/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/clonepod/attack_hand(mob/user as mob)
|
||||
if ((isnull(src.occupant)) || (stat & NOPOWER))
|
||||
return
|
||||
|
||||
@@ -43,9 +43,6 @@ var/global/list/holodeck_programs = list(
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
|
||||
if(..())
|
||||
@@ -316,15 +313,6 @@ var/global/list/holodeck_programs = list(
|
||||
return
|
||||
// HOLOFLOOR DOES NOT GIVE A FUCK
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/table/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
@@ -335,13 +323,6 @@ var/global/list/holodeck_programs = list(
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
|
||||
|
||||
/obj/structure/table/holotable/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/table/holotable/attack_animal(mob/living/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/table/holotable/attack_hand(mob/user as mob)
|
||||
return // HOLOTABLE DOES NOT GIVE A FUCK
|
||||
|
||||
@@ -529,10 +510,6 @@ var/global/list/holodeck_programs = list(
|
||||
user << "The station AI is not to interact with these devices!"
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/attack_paw(mob/user as mob)
|
||||
user << "You are too primitive to use this device."
|
||||
return
|
||||
|
||||
/obj/machinery/readybutton/New()
|
||||
..()
|
||||
|
||||
@@ -541,10 +518,14 @@ var/global/list/holodeck_programs = list(
|
||||
user << "The device is a solid button, there's nothing you can do with it!"
|
||||
|
||||
/obj/machinery/readybutton/attack_hand(mob/user as mob)
|
||||
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
user << "This device is not powered."
|
||||
return
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
currentarea = get_area(src.loc)
|
||||
if(!currentarea)
|
||||
del(src)
|
||||
|
||||
@@ -59,9 +59,6 @@
|
||||
/obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/aifixer/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/aifixer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -56,9 +56,6 @@
|
||||
/obj/machinery/computer/arcade/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/arcade/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/arcade/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
check_eye(var/mob/user as mob)
|
||||
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
|
||||
return null
|
||||
|
||||
@@ -72,9 +72,6 @@
|
||||
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/card/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/card/attack_hand(mob/user as mob)
|
||||
if(..()) return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
@@ -69,9 +69,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/cloning/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -276,11 +276,6 @@
|
||||
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -44,9 +44,6 @@
|
||||
/obj/machinery/computer/med_data/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/med_data/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/med_data/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -110,11 +110,6 @@
|
||||
/obj/machinery/computer/pod/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -21,19 +21,9 @@ var/prison_shuttle_timeleft = 0
|
||||
var/allowedtocall = 0
|
||||
var/prison_break = 0
|
||||
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/robotics/attack_paw(var/mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -50,9 +50,6 @@
|
||||
/obj/machinery/computer/secure_data/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/secure_data/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
//Someone needs to break down the dat += into chunks instead of long ass lines.
|
||||
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
/obj/machinery/computer/skills/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/skills/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
//Someone needs to break down the dat += into chunks instead of long ass lines.
|
||||
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
|
||||
@@ -248,9 +248,6 @@ var/specops_shuttle_timeleft = 0
|
||||
/obj/machinery/computer/specops_shuttle/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/specops_shuttle/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
|
||||
|
||||
@@ -184,9 +184,6 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
/obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
|
||||
|
||||
@@ -20,9 +20,6 @@ var/global/list/frozen_items = list()
|
||||
circuit = "/obj/item/weapon/circuitboard/cryopodcontrol"
|
||||
var/mode = null
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_paw()
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_ai()
|
||||
src.attack_hand()
|
||||
|
||||
|
||||
@@ -41,9 +41,6 @@
|
||||
else
|
||||
user << "Error, no route to host."
|
||||
|
||||
/obj/machinery/door_control/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door_control/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
/* For later implementation
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
@@ -155,9 +152,6 @@
|
||||
/obj/machinery/driver_button/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
|
||||
@@ -606,8 +606,6 @@ About the new airlock wires panel:
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return ..()
|
||||
/obj/machinery/door/airlock/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door/airlock/attack_hand(mob/user as mob)
|
||||
if(!istype(usr, /mob/living/silicon))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/normalspeed = 1
|
||||
var/heat_proof = 0 // For glass airlocks/opacity firedoors
|
||||
var/air_properties_vary_with_direction = 0
|
||||
var/maxhealth = 500
|
||||
var/maxhealth = 300
|
||||
var/health
|
||||
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
|
||||
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
|
||||
@@ -127,13 +127,14 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/bullet_act(var/obj/item/projectile/Proj)
|
||||
..()
|
||||
|
||||
//Tasers and the like should not damage doors.
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
return
|
||||
|
||||
if(Proj.damage)
|
||||
take_damage(round(Proj.damage * 4))
|
||||
..()
|
||||
take_damage(Proj.damage)
|
||||
|
||||
/obj/machinery/door/hitby(AM as mob|obj)
|
||||
|
||||
@@ -152,11 +153,6 @@
|
||||
/obj/machinery/door/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/door/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/door/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
/obj/machinery/embedded_controller/attack_ai(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/embedded_controller/attack_paw(mob/user as mob)
|
||||
user << "You do not have the dexterity to use this."
|
||||
return
|
||||
|
||||
/obj/machinery/embedded_controller/attack_hand(mob/user as mob)
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/embedded_controller/ui_interact()
|
||||
|
||||
@@ -122,9 +122,6 @@
|
||||
/obj/machinery/flasher_button/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/flasher_button/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@
|
||||
/obj/machinery/holosign_switch/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
/
|
||||
obj/machinery/holosign_switch/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/holosign_switch/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
/obj/machinery/igniter/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/igniter/attack_paw(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/machinery/igniter/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
@@ -121,9 +118,6 @@
|
||||
/obj/machinery/ignition_switch/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/ignition_switch/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
@@ -62,9 +62,6 @@
|
||||
else
|
||||
src.overlays += image('icons/obj/kitchen.dmi', "gridle")
|
||||
|
||||
/obj/machinery/gibber/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/gibber/relaymove(mob/user as mob)
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
@@ -53,9 +53,6 @@
|
||||
src.updateUsrDialog()
|
||||
return 0
|
||||
|
||||
/obj/machinery/juicer/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/juicer/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -138,9 +138,6 @@
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/microwave/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/microwave/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -218,9 +218,6 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
if(..(user, 1))
|
||||
user << "A light switch. It is [on? "on" : "off"]."
|
||||
|
||||
|
||||
/obj/machinery/light_switch/attack_paw(mob/user)
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/light_switch/attack_hand(mob/user)
|
||||
|
||||
on = !on
|
||||
|
||||
@@ -249,9 +249,6 @@ Class Procs:
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/attack_hand(mob/user as mob)
|
||||
if(inoperable(MAINT))
|
||||
return 1
|
||||
@@ -333,7 +330,7 @@ Class Procs:
|
||||
/obj/machinery/proc/is_assess_emagged()
|
||||
return emagged
|
||||
|
||||
/obj/machinery/proc/assess_perp(mob/living/carbon/human/perp, var/auth_weapons, var/check_records, var/lasercolor)
|
||||
/obj/machinery/proc/assess_perp(mob/living/carbon/human/perp, var/auth_weapons, var/check_records)
|
||||
var/threatcount = 0 //the integer returned
|
||||
|
||||
if(is_assess_emagged())
|
||||
@@ -343,54 +340,25 @@ Class Procs:
|
||||
if(threatcount >= 10)
|
||||
return threatcount
|
||||
|
||||
//Agent cards lower threatlevel.
|
||||
var/obj/item/weapon/card/id/id = GetIdCard(perp)
|
||||
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
|
||||
if(auth_weapons && !src.allowed(perp))
|
||||
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
|
||||
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
|
||||
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee))
|
||||
if(!istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag) \
|
||||
&& !istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag) \
|
||||
&& !istype(perp.belt, /obj/item/weapon/gun/energy/laser/practice))
|
||||
threatcount += 2
|
||||
|
||||
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
|
||||
threatcount += 2
|
||||
|
||||
//Agent cards lower threatlevel.
|
||||
if(perp.wear_id && istype(perp.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
|
||||
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||
threatcount = 0//They will not, however shoot at people who have guns, because it gets really fucking annoying
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
threatcount += 4
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/redtag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/redtag)))
|
||||
threatcount += 4
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
threatcount += 2
|
||||
|
||||
if(lasercolor == "r")
|
||||
threatcount = 0
|
||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
threatcount += 4
|
||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
||||
threatcount += 4
|
||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
threatcount += 2
|
||||
|
||||
if(check_records)
|
||||
var/perpname = perp.name
|
||||
if(perp.wear_id)
|
||||
var/obj/item/weapon/card/id/id = perp.wear_id.GetID()
|
||||
if(id)
|
||||
perpname = id.registered_name
|
||||
|
||||
|
||||
@@ -126,10 +126,11 @@
|
||||
attack_ai(var/mob/user)
|
||||
interact(user, 1)
|
||||
|
||||
attack_paw()
|
||||
return
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
interact(user, 0)
|
||||
|
||||
interact(var/mob/user, var/ai = 0)
|
||||
|
||||
@@ -243,8 +243,13 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/newscaster/attack_hand(mob/user as mob) //########### THE MAIN BEEF IS HERE! And in the proc below this...############
|
||||
|
||||
if(!src.ispowered || src.isbroken)
|
||||
return
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) )
|
||||
var/mob/living/human_or_robot_user = user
|
||||
var/dat
|
||||
@@ -773,11 +778,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
|
||||
|
||||
|
||||
/obj/machinery/newscaster/attack_paw(mob/user as mob)
|
||||
user << "<font color='blue'>The newscaster controls are far too complicated for your tiny brain!</font>"
|
||||
return
|
||||
|
||||
/datum/news_photo
|
||||
var/is_synth = 0
|
||||
var/obj/item/weapon/photo/photo = null
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
var/unwrenched = 0
|
||||
var/wait = 0
|
||||
|
||||
/obj/machinery/pipedispenser/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/pipedispenser/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
128
code/game/machinery/portable_tag_turret.dm
Normal file
128
code/game/machinery/portable_tag_turret.dm
Normal file
@@ -0,0 +1,128 @@
|
||||
#define TURRET_PRIORITY_TARGET 2
|
||||
#define TURRET_SECONDARY_TARGET 1
|
||||
#define TURRET_NOT_TARGET 0
|
||||
|
||||
/obj/machinery/porta_turret/tag
|
||||
// Reasonable defaults, in case someone manually spawns us
|
||||
var/lasercolor = "r" //Something to do with lasertag turrets, blame Sieve for not adding a comment.
|
||||
installation = /obj/item/weapon/gun/energy/laser/redtag
|
||||
|
||||
/obj/machinery/porta_turret/tag/red
|
||||
|
||||
/obj/machinery/porta_turret/tag/blue
|
||||
lasercolor = "b"
|
||||
installation = /obj/item/weapon/gun/energy/laser/bluetag
|
||||
|
||||
/obj/machinery/porta_turret/tag/New()
|
||||
..()
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
|
||||
/obj/machinery/porta_turret/tag/weapon_setup(var/obj/item/weapon/gun/energy/E)
|
||||
switch(E.type)
|
||||
if(/obj/item/weapon/gun/energy/laser/bluetag)
|
||||
eprojectile = /obj/item/weapon/gun/energy/laser/bluetag
|
||||
lasercolor = "b"
|
||||
req_access = list(access_maint_tunnels, access_theatre)
|
||||
check_records = 0
|
||||
auth_weapons = 1
|
||||
stun_all = 0
|
||||
check_anomalies = 0
|
||||
shot_delay = 30
|
||||
|
||||
if(/obj/item/weapon/gun/energy/laser/redtag)
|
||||
eprojectile = /obj/item/weapon/gun/energy/laser/redtag
|
||||
lasercolor = "r"
|
||||
req_access = list(access_maint_tunnels, access_theatre)
|
||||
check_records = 0
|
||||
auth_weapons = 1
|
||||
stun_all = 0
|
||||
check_anomalies = 0
|
||||
shot_delay = 30
|
||||
iconholder = 1
|
||||
|
||||
/obj/machinery/porta_turret/tag/interact(mob/user)
|
||||
var/dat
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(lasercolor == "b" && istype(H.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
return
|
||||
if(lasercolor == "r" && istype(H.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
return
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>"},
|
||||
|
||||
"<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>" )
|
||||
|
||||
|
||||
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
||||
onclose(user, "autosec")
|
||||
return
|
||||
|
||||
/obj/machinery/porta_turret/tag/update_icon()
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[lasercolor]destroyed_target_prism"
|
||||
else
|
||||
if(powered())
|
||||
if(on)
|
||||
if(iconholder)
|
||||
//lasers have a orange icon
|
||||
icon_state = "[lasercolor]orange_target_prism"
|
||||
else
|
||||
//almost everything has a blue icon
|
||||
icon_state = "[lasercolor]target_prism"
|
||||
else
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
else
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
|
||||
/obj/machinery/porta_turret/tag/bullet_act(obj/item/projectile/Proj)
|
||||
..()
|
||||
|
||||
if(lasercolor == "b" && disabled == 0)
|
||||
if(istype(Proj, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
disabled = 1
|
||||
del(Proj) // qdel
|
||||
sleep(100)
|
||||
disabled = 0
|
||||
if(lasercolor == "r" && disabled == 0)
|
||||
if(istype(Proj, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
disabled = 1
|
||||
del(Proj) // qdel
|
||||
sleep(100)
|
||||
disabled = 0
|
||||
|
||||
/obj/machinery/porta_turret/tag/assess_living(var/mob/living/L)
|
||||
if(!L)
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(L.lying)
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
var/target_suit
|
||||
var/target_weapon
|
||||
switch(lasercolor)
|
||||
if("b")
|
||||
target_suit = /obj/item/clothing/suit/redtag
|
||||
target_weapon = /obj/item/weapon/gun/energy/laser/redtag
|
||||
if("r")
|
||||
target_suit = /obj/item/clothing/suit/bluetag
|
||||
target_weapon = /obj/item/weapon/gun/energy/laser/bluetag
|
||||
|
||||
|
||||
if(target_suit)//Lasertag turrets target the opposing team, how great is that? -Sieve
|
||||
if((istype(L.r_hand, target_weapon)) || (istype(L.l_hand, target_weapon)))
|
||||
return TURRET_PRIORITY_TARGET
|
||||
|
||||
if(istype(L, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(istype(H.wear_suit, target_suit))
|
||||
return TURRET_PRIORITY_TARGET
|
||||
if(istype(H.belt, target_weapon))
|
||||
return TURRET_SECONDARY_TARGET
|
||||
|
||||
return TURRET_NOT_TARGET
|
||||
@@ -3,10 +3,6 @@
|
||||
This code is slightly more documented than normal, as requested by XSI on IRC.
|
||||
*/
|
||||
|
||||
#define TURRET_PRIORITY_TARGET 2
|
||||
#define TURRET_SECONDARY_TARGET 1
|
||||
#define TURRET_NOT_TARGET 0
|
||||
|
||||
/obj/machinery/porta_turret
|
||||
name = "turret"
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
@@ -22,7 +18,6 @@
|
||||
req_one_access = list(access_security, access_heads)
|
||||
power_channel = EQUIP //drains power from the EQUIPMENT channel
|
||||
|
||||
var/lasercolor = "" //Something to do with lasertag turrets, blame Sieve for not adding a comment.
|
||||
var/raised = 0 //if the turret cover is "open" and the turret is raised
|
||||
var/raising= 0 //if the turret is currently opening or closing its cover
|
||||
var/health = 80 //the turret's health
|
||||
@@ -51,6 +46,7 @@
|
||||
var/attacked = 0 //if set to 1, the turret gets pissed off and shoots at people nearby (unless they have sec access!)
|
||||
|
||||
var/on = 1 //determines if the turret is on
|
||||
var/lethal = 0 //whether in lethal or stun mode
|
||||
var/disabled = 0
|
||||
|
||||
var/shot_sound //what sound should play when the turret fires
|
||||
@@ -60,7 +56,7 @@
|
||||
|
||||
/obj/machinery/porta_turret/New()
|
||||
..()
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
icon_state = "grey_target_prism"
|
||||
//Sets up a spark system
|
||||
spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
@@ -71,7 +67,6 @@
|
||||
setup()
|
||||
|
||||
/obj/machinery/porta_turret/proc/setup()
|
||||
|
||||
var/obj/item/weapon/gun/energy/E = new installation //All energy-based weapons are applicable
|
||||
//var/obj/item/ammo_casing/shottype = E.projectile_type
|
||||
|
||||
@@ -80,28 +75,9 @@
|
||||
shot_sound = E.fire_sound
|
||||
eshot_sound = shot_sound
|
||||
|
||||
switch(E.type)
|
||||
if(/obj/item/weapon/gun/energy/laser/bluetag)
|
||||
eprojectile = /obj/item/weapon/gun/energy/laser/bluetag
|
||||
lasercolor = "b"
|
||||
req_access = list(access_maint_tunnels, access_theatre)
|
||||
check_records = 0
|
||||
auth_weapons = 1
|
||||
stun_all = 0
|
||||
check_anomalies = 0
|
||||
shot_delay = 30
|
||||
|
||||
if(/obj/item/weapon/gun/energy/laser/redtag)
|
||||
eprojectile = /obj/item/weapon/gun/energy/laser/redtag
|
||||
lasercolor = "r"
|
||||
req_access = list(access_maint_tunnels, access_theatre)
|
||||
check_records = 0
|
||||
auth_weapons = 1
|
||||
stun_all = 0
|
||||
check_anomalies = 0
|
||||
shot_delay = 30
|
||||
iconholder = 1
|
||||
weapon_setup(E)
|
||||
|
||||
/obj/machinery/porta_turret/proc/weapon_setup(var/obj/item/weapon/gun/energy/E)
|
||||
if(/obj/item/weapon/gun/energy/laser/practice)
|
||||
iconholder = 1
|
||||
eprojectile = /obj/item/projectile/beam
|
||||
@@ -140,6 +116,25 @@
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
egun = 1
|
||||
|
||||
/obj/machinery/porta_turret/update_icon()
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
icon_state = "destroyed_target_prism"
|
||||
else
|
||||
if(powered())
|
||||
if(on)
|
||||
if(iconholder)
|
||||
//lasers have a orange icon
|
||||
icon_state = "orange_target_prism"
|
||||
else
|
||||
//almost everything has a blue icon
|
||||
icon_state = "target_prism"
|
||||
else
|
||||
icon_state = "grey_target_prism"
|
||||
else
|
||||
icon_state = "grey_target_prism"
|
||||
|
||||
/obj/machinery/porta_turret/Del()
|
||||
//deletes its own cover with it
|
||||
@@ -158,11 +153,10 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/dat
|
||||
interact(user)
|
||||
|
||||
//The browse() text, similar to ED-209s and beepskies.
|
||||
if(!lasercolor) //Lasertag turrets have less options
|
||||
dat += text({"
|
||||
/obj/machinery/porta_turret/interact(mob/user)
|
||||
var/dat = text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]"},
|
||||
@@ -182,19 +176,6 @@
|
||||
"<A href='?src=\ref[src];operation=checkrecords'>[check_records ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=\ref[src];operation=shootall'>[stun_all ? "Yes" : "No"]</A>",
|
||||
"<A href='?src=\ref[src];operation=checkxenos'>[check_anomalies ? "Yes" : "No"]</A>" )
|
||||
else
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(lasercolor == "b" && istype(H.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
return
|
||||
if(lasercolor == "r" && istype(H.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
return
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>"},
|
||||
|
||||
"<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>" )
|
||||
|
||||
|
||||
user << browse("<HEAD><TITLE>Automatic Portable Turret Installation</TITLE></HEAD>[dat]", "window=autosec")
|
||||
onclose(user, "autosec")
|
||||
@@ -227,29 +208,13 @@
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/power_change()
|
||||
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[lasercolor]destroyed_target_prism"
|
||||
else
|
||||
if(powered())
|
||||
if(on)
|
||||
if(iconholder)
|
||||
//lasers have a orange icon
|
||||
icon_state = "[lasercolor]orange_target_prism"
|
||||
else
|
||||
//almost everything has a blue icon
|
||||
icon_state = "[lasercolor]target_prism"
|
||||
else
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
stat &= ~NOPOWER
|
||||
update_icon()
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
stat |= NOPOWER
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
|
||||
@@ -258,14 +223,13 @@
|
||||
//If the turret is destroyed, you can remove it with a crowbar to
|
||||
//try and salvage its components
|
||||
user << "<span class='notice'>You begin prying the metal coverings off.</span>"
|
||||
sleep(20)
|
||||
if(do_after(user, 20))
|
||||
if(prob(70))
|
||||
user << "<span class='notice'>You remove the turret and salvage some components.</span>"
|
||||
if(installation)
|
||||
var/obj/item/weapon/gun/energy/Gun = new installation(loc)
|
||||
Gun.power_supply.charge = gun_charge
|
||||
Gun.update_icon()
|
||||
lasercolor = null
|
||||
if(prob(50))
|
||||
new /obj/item/stack/sheet/metal(loc, rand(1,4))
|
||||
if(prob(50))
|
||||
@@ -292,15 +256,15 @@
|
||||
if(!anchored && !isinspace())
|
||||
anchored = 1
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
update_icon()
|
||||
user << "<span class='notice'>You secure the exterior bolts on the turret.</span>"
|
||||
cover = new /obj/machinery/porta_turret_cover(loc) //create a new turret. While this is handled in process(), this is to workaround a bug where the turret becomes invisible for a split second
|
||||
cover.Parent_Turret = src //make the cover's parent src
|
||||
else if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='notice'>You unsecure the exterior bolts on the turret.</span>"
|
||||
icon_state = "turretCover"
|
||||
invisibility = 0
|
||||
update_icon()
|
||||
del(cover) //deletes the cover, and the turret instance itself becomes its own cover. - qdel
|
||||
|
||||
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
|
||||
@@ -345,20 +309,6 @@
|
||||
if(health <= 0)
|
||||
die() //the death process :(
|
||||
|
||||
if(lasercolor == "b" && disabled == 0)
|
||||
if(istype(Proj, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
disabled = 1
|
||||
del(Proj) // qdel
|
||||
sleep(100)
|
||||
disabled = 0
|
||||
if(lasercolor == "r" && disabled == 0)
|
||||
if(istype(Proj, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
disabled = 1
|
||||
del(Proj) // qdel
|
||||
sleep(100)
|
||||
disabled = 0
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/emp_act(severity)
|
||||
if(on)
|
||||
//if the turret is on, the EMP no matter how severe disables the turret for a while
|
||||
@@ -386,10 +336,10 @@
|
||||
health = 0
|
||||
density = 0
|
||||
stat |= BROKEN //enables the BROKEN bit
|
||||
icon_state = "[lasercolor]destroyed_target_prism"
|
||||
invisibility = 0
|
||||
spark_system.start() //creates some sparks because they look cool
|
||||
density = 1
|
||||
update_icon()
|
||||
del(cover) //deletes the cover - no need on keeping it there! - del
|
||||
|
||||
|
||||
@@ -445,8 +395,9 @@
|
||||
if(!L)
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(emagged && !isAI(L)) //if emagged, target everything (except the AI, otherwise lethal-set turrets attempt to fire at it in the core)
|
||||
return TURRET_PRIORITY_TARGET
|
||||
// If emagged not even the dead get a rest
|
||||
if(emagged)
|
||||
return L.stat ? TURRET_SECONDARY_TARGET : TURRET_PRIORITY_TARGET
|
||||
|
||||
if(issilicon(L)) // Don't target silica
|
||||
return TURRET_NOT_TARGET
|
||||
@@ -460,26 +411,20 @@
|
||||
|
||||
if(ai) //If it's set to attack all non-silicons, target them!
|
||||
if(L.lying)
|
||||
if(lasercolor)
|
||||
return TURRET_NOT_TARGET
|
||||
else
|
||||
return TURRET_SECONDARY_TARGET
|
||||
else
|
||||
return TURRET_PRIORITY_TARGET
|
||||
|
||||
if(iscuffed(L)) // If the target is handcuffed, leave it alone
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(isanimal(L)) // Animals are not so dangerous
|
||||
if(isanimal(L) || ismonkey(L)) // Animals are not so dangerous
|
||||
return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
if(isxenomorph(L) || isalien(L)) // Xenos are dangerous
|
||||
return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET
|
||||
|
||||
if(ishuman(L)) //if the target is a human, analyze threat level
|
||||
if(assess_perp(L, auth_weapons, check_records, lasercolor) < 4)
|
||||
if(assess_perp(L, auth_weapons, check_records) < 4)
|
||||
return TURRET_NOT_TARGET //if threat level < 4, keep going
|
||||
else if(ismonkey(L))
|
||||
return TURRET_NOT_TARGET //Don't target monkeys or borgs/AIs
|
||||
|
||||
if(L.lying) //if the perp is lying down, it's still a target but a less-important target
|
||||
return TURRET_SECONDARY_TARGET
|
||||
@@ -509,6 +454,7 @@
|
||||
cover.icon_state = "openTurretCover"
|
||||
raised = 1
|
||||
layer = 4
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/porta_turret/proc/popDown() //pops the turret down
|
||||
if(disabled)
|
||||
@@ -525,7 +471,7 @@
|
||||
cover.icon_state = "turretCover"
|
||||
raised = 0
|
||||
invisibility = 2
|
||||
icon_state = "[lasercolor]grey_target_prism"
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/on_assess_perp(mob/living/carbon/human/perp)
|
||||
@@ -549,7 +495,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/porta_turret/proc/shootAt(var/mob/living/target)
|
||||
if(!emagged) //if it hasn't been emagged, it has to obey a cooldown rate
|
||||
//any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
|
||||
if(!(emagged || lethal)) //if it hasn't been emagged, it has to obey a cooldown rate
|
||||
if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged
|
||||
return
|
||||
last_fired = 1
|
||||
@@ -565,20 +512,17 @@
|
||||
if(!raised) //the turret has to be raised in order to fire - makes sense, right?
|
||||
return
|
||||
|
||||
//any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
|
||||
if(iconholder)
|
||||
icon_state = "[lasercolor]orange_target_prism"
|
||||
else
|
||||
icon_state = "[lasercolor]target_prism"
|
||||
|
||||
update_icon()
|
||||
var/obj/item/projectile/A
|
||||
if(emagged)
|
||||
if(emagged || lethal)
|
||||
A = new eprojectile(loc)
|
||||
playsound(loc, eshot_sound, 75, 1)
|
||||
else
|
||||
A = new projectile(loc)
|
||||
playsound(loc, shot_sound, 75, 1)
|
||||
A.original = target
|
||||
if(!emagged)
|
||||
if(!(emagged || lethal))
|
||||
use_power(reqpower)
|
||||
else
|
||||
use_power(reqpower * 2)
|
||||
@@ -589,12 +533,12 @@
|
||||
spawn(1)
|
||||
A.process()
|
||||
|
||||
/obj/machinery/porta_turret/proc/setState(var/on, var/emagged)
|
||||
/obj/machinery/porta_turret/proc/setState(var/on, var/lethal)
|
||||
if(controllock)
|
||||
return
|
||||
src.on = on
|
||||
src.emagged = emagged
|
||||
src.iconholder = emagged
|
||||
src.lethal = lethal
|
||||
src.iconholder = lethal
|
||||
src.power_change()
|
||||
|
||||
/*
|
||||
@@ -607,6 +551,7 @@
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
icon_state = "turret_frame"
|
||||
density=1
|
||||
var/target_type = /obj/machinery/porta_turret // The type we intend to build
|
||||
var/build_step = 0 //the current step in the building process
|
||||
var/finish_name="turret" //the name applied to the product turret
|
||||
var/installation = null //the gun type installed
|
||||
@@ -686,6 +631,12 @@
|
||||
installation = I.type //installation becomes I.type
|
||||
gun_charge = E.power_supply.charge //the gun's charge is stored in gun_charge
|
||||
user << "<span class='notice'>You add [I] to the turret.</span>"
|
||||
|
||||
if(istype(installation, /obj/item/weapon/gun/energy/laser/bluetag) || istype(installation, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
target_type = /obj/machinery/porta_turret/tag
|
||||
else
|
||||
target_type = /obj/machinery/porta_turret
|
||||
|
||||
build_step = 4
|
||||
del(I) //delete the gun :( qdel
|
||||
return
|
||||
@@ -748,7 +699,7 @@
|
||||
user << "<span class='notice'>You weld the turret's armor down.</span>"
|
||||
|
||||
//The final step: create a full turret
|
||||
var/obj/machinery/porta_turret/Turret = new/obj/machinery/porta_turret(loc)
|
||||
var/obj/machinery/porta_turret/Turret = new target_type(loc)
|
||||
Turret.name = finish_name
|
||||
Turret.installation = installation
|
||||
Turret.gun_charge = gun_charge
|
||||
@@ -831,7 +782,7 @@
|
||||
if(.)
|
||||
return
|
||||
var/dat
|
||||
if(!Parent_Turret.lasercolor)
|
||||
if(!istype(Parent_Turret, /obj/machinery/porta_turret/tag))
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
@@ -855,9 +806,10 @@
|
||||
else
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(Parent_Turret.lasercolor == "b" && istype(H.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
var/obj/machinery/porta_turret/tag/laser_turret = Parent_Turret
|
||||
if(laser_turret.lasercolor == "b" && istype(H.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
return
|
||||
if(Parent_Turret.lasercolor == "r" && istype(H.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
if(laser_turret.lasercolor == "r" && istype(H.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
return
|
||||
dat += text({"
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
@@ -949,7 +901,7 @@
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/stationary
|
||||
emagged = 1
|
||||
lethal = 1
|
||||
|
||||
New()
|
||||
installation = /obj/item/weapon/gun/energy/laser
|
||||
|
||||
@@ -65,9 +65,6 @@ obj/machinery/recharger/attack_hand(mob/user as mob)
|
||||
charging = null
|
||||
update_icon()
|
||||
|
||||
obj/machinery/recharger/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
obj/machinery/recharger/process()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
update_use_power(0)
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
else
|
||||
user << "The robot part maker is full. Please remove metal from the robot part maker in order to insert more."
|
||||
|
||||
/obj/machinery/robotic_fabricator/attack_paw(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/robotic_fabricator/attack_hand(user as mob)
|
||||
var/dat
|
||||
if (..())
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
return
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
if(src.panelopen) //The maintenance panel is open. Time for some shady stuff
|
||||
dat+= "<HEAD><TITLE>Suit storage unit: Maintenance panel</TITLE></HEAD>"
|
||||
dat+= "<Font color ='black'><B>Maintenance panel controls</B></font><HR>"
|
||||
@@ -559,12 +561,6 @@
|
||||
/obj/machinery/suit_storage_unit/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/attack_paw(mob/user as mob)
|
||||
user << "<font color='blue'>The console controls are far too complicated for your tiny brain!</font>"
|
||||
return
|
||||
|
||||
|
||||
//////////////////////////////REMINDER: Make it lock once you place some fucker inside.
|
||||
|
||||
//God this entire file is fucking awful
|
||||
@@ -657,10 +653,6 @@
|
||||
/obj/machinery/suit_cycler/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/suit_cycler/attack_paw(mob/user as mob)
|
||||
user << "\blue The console controls are far too complicated for your tiny brain!"
|
||||
return
|
||||
|
||||
/obj/machinery/suit_cycler/attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
if(electrified != 0)
|
||||
@@ -776,6 +768,9 @@
|
||||
if(..() || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
if(electrified != 0)
|
||||
if(src.shock(user, 100))
|
||||
return
|
||||
|
||||
@@ -77,9 +77,6 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/computer/teleporter/attack_paw()
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/teleport/station/attack_ai()
|
||||
src.attack_hand()
|
||||
|
||||
@@ -311,9 +308,6 @@
|
||||
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W)
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/teleport/station/attack_paw()
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/teleport/station/attack_ai()
|
||||
src.attack_hand()
|
||||
|
||||
|
||||
@@ -41,6 +41,18 @@
|
||||
//don't have to check if control_area is path, since get_area_all_atoms can take path.
|
||||
return
|
||||
|
||||
/obj/machinery/turretid/proc/can_use(mob/user)
|
||||
if (get_dist(src, user) > 0 && !issilicon(user))
|
||||
user << "<span class='notice'>You are too far away.</span>"
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
return 0
|
||||
|
||||
if(ailock && issilicon(user))
|
||||
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user)
|
||||
if(stat & BROKEN) return
|
||||
if (istype(user, /mob/living/silicon))
|
||||
@@ -73,17 +85,8 @@
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
|
||||
/obj/machinery/turretid/attack_ai(mob/user as mob)
|
||||
if(!ailock)
|
||||
return attack_hand(user)
|
||||
else
|
||||
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
|
||||
/obj/machinery/turretid/attack_hand(mob/user as mob)
|
||||
if (get_dist(src, user) > 0 && !issilicon(user))
|
||||
user << "<span class='notice'>You are too far away.</span>"
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
if(!can_use(user))
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
@@ -106,7 +109,7 @@
|
||||
|
||||
//user << browse(t, "window=turretid")
|
||||
//onclose(user, "turretid")
|
||||
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])")
|
||||
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])", 500, 200)
|
||||
popup.set_content(t)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
@@ -115,14 +118,9 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(ailock)
|
||||
usr << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
if(!can_use(usr))
|
||||
return 1
|
||||
|
||||
if (src.locked)
|
||||
if (!istype(usr, /mob/living/silicon))
|
||||
usr << "Control panel is locked!"
|
||||
return 1
|
||||
if (href_list["toggleOn"])
|
||||
src.enabled = !src.enabled
|
||||
src.updateTurrets()
|
||||
@@ -131,7 +129,7 @@
|
||||
src.updateTurrets()
|
||||
|
||||
if(!nowindow)
|
||||
updateDialog()
|
||||
attack_hand(usr)
|
||||
|
||||
/obj/machinery/turretid/updateDialog()
|
||||
if (stat & (BROKEN|MAINT))
|
||||
|
||||
@@ -338,18 +338,18 @@
|
||||
spawn(13)
|
||||
del(src)
|
||||
|
||||
/obj/machinery/turret/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(!(stat & BROKEN))
|
||||
visible_message("\red <B>[M] [M.attacktext] [src]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
//src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
src.health -= M.melee_damage_upper
|
||||
/obj/machinery/turret/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
if(!damage)
|
||||
return 0
|
||||
if(stat & BROKEN)
|
||||
user << "That object is useless to you."
|
||||
return 0
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
src.health -= damage
|
||||
if (src.health <= 0)
|
||||
src.die()
|
||||
else
|
||||
M << "\red That object is useless to you."
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/structure/turret/gun_turret
|
||||
name = "Gun Turret"
|
||||
|
||||
@@ -274,10 +274,6 @@
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Error: Unable to access your account. Please contact technical support if problem persists.</span>"
|
||||
|
||||
|
||||
/obj/machinery/vending/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/vending/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -657,7 +653,7 @@
|
||||
vend_power_usage = 85000 //85 kJ to heat a 250 mL cup of coffee
|
||||
products = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 25,/obj/item/weapon/reagent_containers/food/drinks/tea = 25,/obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 25)
|
||||
contraband = list(/obj/item/weapon/reagent_containers/food/drinks/ice = 10)
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 25, /obj/item/weapon/reagent_containers/food/drinks/tea = 25, /obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 25)
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 3, /obj/item/weapon/reagent_containers/food/drinks/tea = 3, /obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 3)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -454,28 +454,6 @@
|
||||
src.log_append_to_last("Armor saved.")
|
||||
return
|
||||
|
||||
/obj/mecha/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/mecha/attack_animal(mob/living/user as mob)
|
||||
src.log_message("Attack by simple animal. Attacker - [user].",1)
|
||||
if(user.melee_damage_upper == 0)
|
||||
user.emote("[user.friendly] [src]")
|
||||
else
|
||||
if(!prob(src.deflect_chance))
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
src.take_damage(damage)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
visible_message("\red <B>[user]</B> [user.attacktext] [src]!")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
else
|
||||
src.log_append_to_last("Armor saved.")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
src.occupant_message("\blue The [user]'s attack is stopped by the armor.")
|
||||
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
return
|
||||
|
||||
/obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper
|
||||
..()
|
||||
src.log_message("Hit by [A].",1)
|
||||
@@ -1735,6 +1713,27 @@
|
||||
icon_state = initial(icon_state)
|
||||
return icon_state
|
||||
|
||||
/obj/mecha/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
if(!damage)
|
||||
return 0
|
||||
|
||||
src.log_message("Attack by an animal. Attacker - [user].",1)
|
||||
|
||||
if(!prob(src.deflect_chance))
|
||||
src.take_damage(damage)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
visible_message("\red <B>[user]</B> [attack_message] [src]!")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
else
|
||||
src.log_append_to_last("Armor saved.")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
src.occupant_message("\blue The [user]'s attack is stopped by the armor.")
|
||||
visible_message("\blue The [user] rebounds off [src.name]'s armor!")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
|
||||
return 1
|
||||
|
||||
|
||||
//////////////////////////////////////////
|
||||
//////// Mecha global iterators ////////
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -127,9 +127,6 @@
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
var/aforce = W.force
|
||||
|
||||
@@ -659,10 +659,6 @@ steam.start() -- spawns the effect
|
||||
if(metal==1 || prob(50))
|
||||
del(src)
|
||||
|
||||
attack_paw(var/mob/user)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
if ((HULK in user.mutations) || (prob(75 - metal*25)))
|
||||
user << "\blue You smash through the metal foam wall."
|
||||
|
||||
@@ -152,30 +152,6 @@
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/attack_paw(mob/user as mob)
|
||||
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
for(var/mob/M in range(1, src.loc))
|
||||
if (M.s_active == src.loc)
|
||||
if (M.client)
|
||||
M.client.screen -= src
|
||||
src.throwing = 0
|
||||
if (src.loc == user)
|
||||
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
|
||||
if(istype(src, /obj/item/clothing) && !src:canremove)
|
||||
return
|
||||
else
|
||||
user.u_equip(src)
|
||||
else
|
||||
if(istype(src.loc, /mob/living))
|
||||
return
|
||||
src.pickup(user)
|
||||
user.next_move = max(user.next_move+2,world.time + 2)
|
||||
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
// Due to storage type consolidation this should get used more now.
|
||||
// I have cleaned it up a little, but it could probably use more. -Sayu
|
||||
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -144,6 +144,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
detonate = 0
|
||||
//toff = 1
|
||||
|
||||
/obj/item/device/pda/ert
|
||||
default_cartridge = /obj/item/weapon/cartridge/captain
|
||||
icon_state = "pda-h"
|
||||
detonate = 0
|
||||
hidden = 1
|
||||
|
||||
/obj/item/device/pda/cargo
|
||||
default_cartridge = /obj/item/weapon/cartridge/quartermaster
|
||||
icon_state = "pda-cargo"
|
||||
|
||||
@@ -58,11 +58,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
attack_paw()
|
||||
return
|
||||
|
||||
attack_ai()
|
||||
return
|
||||
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
spawn (0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/device/radio/intercom/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
if(!user || !src) return 0
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/title = "Sheet-Glass"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
@@ -145,7 +144,6 @@
|
||||
if(!user || !src) return 0
|
||||
if(!istype(user.loc,/turf)) return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/title = "Sheet Reinf. Glass"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
SetValue(src.value)
|
||||
//testing("[name]: DNA2 SE blocks after SetValue: [english_list(buf.dna.SE)]")
|
||||
|
||||
/obj/item/weapon/dnainjector/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/GetRealBlock(var/selblock)
|
||||
if(selblock==0)
|
||||
return block
|
||||
|
||||
@@ -109,6 +109,3 @@
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/grenade/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
"/obj/item/stack/cable_coil",
|
||||
"/obj/item/device/t_scanner",
|
||||
"/obj/item/device/analyzer",
|
||||
"/obj/item/taperoll/engineering")
|
||||
"/obj/item/taperoll/engineering",
|
||||
"/obj/item/device/robotanalyzer")
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility/full/New()
|
||||
@@ -82,7 +83,7 @@
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 21
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/grenade/flashbang",
|
||||
"/obj/item/weapon/grenade",
|
||||
"/obj/item/weapon/reagent_containers/spray/pepper",
|
||||
"/obj/item/weapon/handcuffs",
|
||||
"/obj/item/device/flash",
|
||||
|
||||
@@ -31,9 +31,6 @@
|
||||
if(..(user, 1))
|
||||
user << text("The service panel is [src.open ? "open" : "closed"].")
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(locked)
|
||||
if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/structure
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
|
||||
var/climbable
|
||||
var/breakable
|
||||
var/parts
|
||||
@@ -14,22 +15,12 @@
|
||||
if(breakable)
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
|
||||
destroy()
|
||||
attack_generic(user,1,"smashes")
|
||||
else if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(user))
|
||||
visible_message("<span class='danger'>[H] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/attack_animal(mob/living/user)
|
||||
if(breakable)
|
||||
if(user.wall_smash)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/attack_paw(mob/user)
|
||||
if(breakable) attack_hand(user)
|
||||
attack_generic(user,1,"slices")
|
||||
return
|
||||
|
||||
/obj/structure/blob_act()
|
||||
if(prob(50))
|
||||
@@ -176,3 +167,10 @@
|
||||
user << "<span class='notice'>You need hands for this.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/attack_generic(var/mob/user, var/damage, var/attack_verb, var/wallbreaker)
|
||||
if(!breakable || !damage || !wallbreaker)
|
||||
return 0
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
|
||||
spawn(1) destroy()
|
||||
return 1
|
||||
@@ -138,12 +138,6 @@ LINEN BINS
|
||||
hidden = I
|
||||
user << "<span class='notice'>You hide [I] among the sheets.</span>"
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
@@ -174,13 +174,6 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/user as mob)
|
||||
if(user.wall_smash)
|
||||
visible_message("\red [user] destroys the [src]. ")
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
@@ -267,10 +260,6 @@
|
||||
spawn(30)
|
||||
lastbang = 0
|
||||
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
src.toggle(user)
|
||||
@@ -309,3 +298,11 @@
|
||||
if(istype(A,/obj/))
|
||||
var/obj/O = A
|
||||
O.hear_talk(M, text)
|
||||
|
||||
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
dump_contents()
|
||||
spawn(1) del(src)
|
||||
return 1
|
||||
@@ -181,10 +181,6 @@
|
||||
usr << "\blue The [src.name] is closed."
|
||||
update_icon()
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "\red The security of the cabinet is compromised."
|
||||
|
||||
@@ -104,9 +104,6 @@
|
||||
else
|
||||
src.toggle(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
|
||||
@@ -76,9 +76,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
|
||||
@@ -54,11 +54,6 @@
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = "extinguisher_closed"
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
var/state = 0
|
||||
var/health = 200
|
||||
|
||||
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return 0
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
spawn(1) dismantle()
|
||||
return 1
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj, /obj/item/projectile/beam))
|
||||
health -= Proj.damage
|
||||
..()
|
||||
@@ -17,7 +23,7 @@
|
||||
|
||||
return
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
if(anchored && !istype(src,/obj/structure/girder/displaced))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
@@ -158,30 +164,23 @@
|
||||
else
|
||||
..()
|
||||
|
||||
proc/dismantle()
|
||||
/obj/structure/girder/proc/dismantle()
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
/obj/structure/girder/attack_hand(mob/user as mob)
|
||||
if (HULK in user.mutations)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
dismantle()
|
||||
return
|
||||
return ..()
|
||||
|
||||
attack_animal(mob/living/simple_animal/user)
|
||||
if(user.wall_smash)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
dismantle()
|
||||
return
|
||||
return ..()
|
||||
|
||||
blob_act()
|
||||
/obj/structure/girder/blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
/obj/structure/girder/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
@@ -219,7 +218,7 @@
|
||||
layer = 2
|
||||
var/health = 250
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "\blue Now disassembling the girder"
|
||||
@@ -240,11 +239,11 @@
|
||||
new /obj/effect/decal/remains/human(get_turf(src))
|
||||
del(src)
|
||||
|
||||
blob_act()
|
||||
/obj/structure/cultgirder/blob_act()
|
||||
if(prob(40))
|
||||
del(src)
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
||||
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
@@ -253,7 +252,7 @@
|
||||
|
||||
return
|
||||
|
||||
ex_act(severity)
|
||||
/obj/structure/cultgirder/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
|
||||
@@ -26,27 +26,17 @@
|
||||
/obj/structure/grille/Bumped(atom/user)
|
||||
if(ismob(user)) shock(user, 70)
|
||||
|
||||
|
||||
/obj/structure/grille/attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
|
||||
var/damage_dealt
|
||||
var/damage_dealt = 1
|
||||
var/attack_message = "kicks"
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(H))
|
||||
attack_message = "mangles"
|
||||
damage_dealt = 5
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
if(!damage_dealt)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='warning'>You kick [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
if(shock(user, 70))
|
||||
return
|
||||
@@ -56,35 +46,7 @@
|
||||
else
|
||||
damage_dealt += 1
|
||||
|
||||
health -= damage_dealt
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/user as mob)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if (!S.is_adult)
|
||||
return
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
health -= rand(2,3)
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
health -= M.melee_damage_upper
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
attack_generic(user,damage_dealt,attack_message)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
@@ -226,3 +188,9 @@
|
||||
health -= 1
|
||||
healthcheck()
|
||||
..()
|
||||
|
||||
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||
health -= damage
|
||||
spawn(1) healthcheck()
|
||||
return 1
|
||||
@@ -26,34 +26,31 @@
|
||||
var/health = 50.0
|
||||
|
||||
|
||||
New(location)
|
||||
/obj/structure/inflatable/New(location)
|
||||
..()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
Del()
|
||||
/obj/structure/inflatable/Del()
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
/obj/structure/inflatable/proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master)
|
||||
return 0
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 0
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
/obj/structure/inflatable/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
@@ -66,46 +63,17 @@
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
/obj/structure/inflatable/blob_act()
|
||||
deflate(1)
|
||||
|
||||
|
||||
meteorhit()
|
||||
//world << "glass at [x],[y],[z] Mhit"
|
||||
/obj/structure/inflatable/meteorhit()
|
||||
deflate(1)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return attack_generic(user, 15)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
/obj/structure/inflatable/attack_hand(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
proc/attack_generic(mob/user as mob, damage = 0) //used by attack_animal and attack_slime
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
||||
deflate(1)
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
|
||||
|
||||
attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
|
||||
attack_slime(mob/user as mob)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if (!S.is_adult)
|
||||
return
|
||||
attack_generic(user, rand(10, 15))
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/inflatable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!istype(W)) return
|
||||
|
||||
if (can_puncture(W))
|
||||
@@ -116,15 +84,14 @@
|
||||
..()
|
||||
return
|
||||
|
||||
proc/hit(var/damage, var/sound_effect = 1)
|
||||
/obj/structure/inflatable/proc/hit(var/damage, var/sound_effect = 1)
|
||||
health = max(0, health - damage)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
|
||||
|
||||
proc/deflate(var/violent=0)
|
||||
/obj/structure/inflatable/proc/deflate(var/violent=0)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
|
||||
if(violent)
|
||||
visible_message("[src] rapidly deflates!")
|
||||
@@ -139,7 +106,7 @@
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
|
||||
verb/hand_deflate()
|
||||
/obj/structure/inflatable/verb/hand_deflate()
|
||||
set name = "Deflate"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
@@ -149,6 +116,15 @@
|
||||
|
||||
deflate()
|
||||
|
||||
/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] [attack_verb] open the [src]!</span>")
|
||||
spawn(1) deflate(1)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] [attack_verb] at [src]!</span>")
|
||||
return 1
|
||||
|
||||
/obj/item/inflatable/door/
|
||||
name = "inflatable door"
|
||||
desc = "A folded membrane which rapidly expands into a simple door on activation."
|
||||
@@ -175,33 +151,24 @@
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
|
||||
//Bumped(atom/user)
|
||||
// ..()
|
||||
// if(!state)
|
||||
// return TryToSwitchState(user)
|
||||
// return
|
||||
|
||||
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
/obj/structure/inflatable/door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
/obj/structure/inflatable/door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group)
|
||||
return state
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
proc/TryToSwitchState(atom/user)
|
||||
/obj/structure/inflatable/door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
@@ -216,16 +183,15 @@
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
proc/SwitchState()
|
||||
/obj/structure/inflatable/door/proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
update_nearby_tiles()
|
||||
|
||||
proc/Open()
|
||||
/obj/structure/inflatable/door/proc/Open()
|
||||
isSwitchingStates = 1
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("door_opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
@@ -234,9 +200,8 @@
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
proc/Close()
|
||||
/obj/structure/inflatable/door/proc/Close()
|
||||
isSwitchingStates = 1
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("door_closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
@@ -245,13 +210,13 @@
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
update_icon()
|
||||
/obj/structure/inflatable/door/update_icon()
|
||||
if(state)
|
||||
icon_state = "door_open"
|
||||
else
|
||||
icon_state = "door_closed"
|
||||
|
||||
deflate(var/violent=0)
|
||||
/obj/structure/inflatable/door/deflate(var/violent=0)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
|
||||
if(violent)
|
||||
visible_message("[src] rapidly deflates!")
|
||||
@@ -259,14 +224,12 @@
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
else
|
||||
//user << "\blue You slowly deflate the inflatable wall."
|
||||
visible_message("[src] slowly deflates.")
|
||||
spawn(50)
|
||||
var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/inflatable/torn
|
||||
name = "torn inflatable wall"
|
||||
desc = "A folded membrane which rapidly expands into a large cubical shape on activation. It is too torn to be usable."
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(usr)
|
||||
|
||||
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab))
|
||||
|
||||
@@ -66,8 +66,5 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -72,9 +72,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/lamarr/attack_hand(mob/user as mob)
|
||||
if (src.destroyed)
|
||||
return
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user