mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
TG: Modified TK to be more effective and polished. You can use the TK grab to
interact with machines and stuff from far away (but you cannot pick them up!). This means you can also bonk people with items you are holding with your TK grab. Changed the energy gun sprites to a better-looking version, made by Khodoque! More work on NTSL. Including the ability to create comments by using // and /* insert comment here */. Removed the traffic control machine from telecomms, as requested by Urist. NTSL is still a work in progress, and needs to be completely fool-proof before players can get anywhere near it. Revision: r3252 Author: vageyenaman
This commit is contained in:
@@ -191,3 +191,11 @@ proc/countJob(rank)
|
||||
for(var/mob/living/silicon/ai/M in world)
|
||||
if ((M.client && M.machine == subject))
|
||||
subject.attack_ai(M)
|
||||
|
||||
/proc/AutoUpdateTK(obj/subject)
|
||||
if (subject!=null)
|
||||
for(var/obj/item/tk_grab/T in world)
|
||||
if (T.host)
|
||||
var/mob/M = T.host
|
||||
if(M.client && M.machine == subject)
|
||||
subject.attack_hand(M)
|
||||
|
||||
@@ -158,8 +158,19 @@ Class Procs:
|
||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
|
||||
return 1
|
||||
|
||||
var/norange = 0
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(H.l_hand, /obj/item/tk_grab))
|
||||
norange = 1
|
||||
else if(istype(H.r_hand, /obj/item/tk_grab))
|
||||
norange = 1
|
||||
|
||||
if(!norange)
|
||||
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
|
||||
return 1
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
return 0
|
||||
|
||||
@@ -174,9 +185,9 @@ Class Procs:
|
||||
return 1
|
||||
if(user.lying || user.stat)
|
||||
return 1
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon) || \
|
||||
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
||||
istype(usr, /mob/living/silicon) || \
|
||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
/*
|
||||
|
||||
@@ -376,9 +376,18 @@ mob/proc/flash_weak_pain()
|
||||
step_away(Metroid, user)
|
||||
Metroid.canmove = 1
|
||||
|
||||
var/showname = "."
|
||||
if(user)
|
||||
showname = " by [user]."
|
||||
if(!(user in viewers(M, null)))
|
||||
showname = "."
|
||||
|
||||
for(var/mob/O in viewers(messagesource, null))
|
||||
O.show_message(text("\red <B>[] has been attacked with [][] </B>", M, src, (user ? text(" by [].", user) : ".")), 1)
|
||||
O.show_message(text("\red <B>[] has been attacked with [][] </B>", M, src, showname), 1)
|
||||
|
||||
if(!showname && user)
|
||||
if(user.client)
|
||||
user << "\red <B>You attack [M] with [src]. </B>"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)//TODO: go over this
|
||||
if(!target || !user) return
|
||||
if(last_throw+4 > world.time) return
|
||||
if(last_throw+3 > world.time) return
|
||||
if(!host)
|
||||
del(src)
|
||||
return
|
||||
@@ -51,19 +51,24 @@
|
||||
del(src)
|
||||
return
|
||||
if(!focus)
|
||||
focus_object(target)
|
||||
focus_object(target, user)
|
||||
return
|
||||
var/focusturf = get_turf(focus)
|
||||
if(get_dist(focusturf, target) <= 1 && !istype(target, /turf))
|
||||
target.attackby(focus, user, user:get_organ_target())
|
||||
|
||||
if((get_dist(target, user) <= 16) && (get_dist(focus, user) <= 10))
|
||||
else if(get_dist(focusturf, target) <= 16)
|
||||
apply_focus_overlay()
|
||||
focus.throw_at(target, 10, 1)
|
||||
last_throw = world.time
|
||||
return
|
||||
|
||||
|
||||
proc/focus_object(var/obj/target)
|
||||
proc/focus_object(var/obj/target, var/mob/living/user)
|
||||
if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored) return//No throwing anchored things
|
||||
if(target.anchored)
|
||||
target.attack_hand(user) // you can use shit now!
|
||||
return//No throwing anchored things
|
||||
focus = target
|
||||
update_icon()
|
||||
apply_focus_overlay()
|
||||
|
||||
@@ -8,12 +8,21 @@
|
||||
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
src.attack_ai(usr)
|
||||
|
||||
// check for TK users
|
||||
AutoUpdateTK(src)
|
||||
if (istype(usr, /mob/living/carbon/human))
|
||||
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
src.attack_hand(usr)
|
||||
|
||||
/obj/proc/updateDialog()
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
AutoUpdateAI(src)
|
||||
//AutoUpdateTK(src)
|
||||
|
||||
/obj/proc/update_icon()
|
||||
return
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
bmark.pixel_x--
|
||||
bmark.pixel_y--
|
||||
|
||||
if(Proj.damage >= 20)
|
||||
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/practice))
|
||||
bmark.icon_state = "scorch"
|
||||
bmark.dir = pick(NORTH,SOUTH,EAST,WEST) // random scorch design
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ proc/check_panel(mob/M)
|
||||
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
|
||||
if(M.hallucination < 15)
|
||||
return 1
|
||||
return 0 */
|
||||
return 0*/
|
||||
|
||||
/obj/fake_attacker
|
||||
icon = null
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
/obj/item/weapon/gun/energy/gun
|
||||
icon_state = "energy"
|
||||
name = "\improper Energy Gun"
|
||||
icon_state = "energystun100"
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun with two settings: Stun and kill."
|
||||
fire_sound = 'Taser.ogg'
|
||||
|
||||
charge_cost = 100 //How much energy is needed to fire.
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
modifystate = "energystun"
|
||||
|
||||
var
|
||||
mode = 0 //0 = stun, 1 = kill
|
||||
@@ -19,14 +20,16 @@
|
||||
mode = 1
|
||||
charge_cost = 100
|
||||
fire_sound = 'Laser.ogg'
|
||||
user << "\red [src] is now set to kill."
|
||||
user << "\red [src.name] is now set to kill."
|
||||
projectile_type = "/obj/item/projectile/beam"
|
||||
modifystate = "energykill"
|
||||
if(1)
|
||||
mode = 0
|
||||
charge_cost = 100
|
||||
fire_sound = 'Taser.ogg'
|
||||
user << "\red [src] is now set to stun."
|
||||
user << "\red [src.name] is now set to stun."
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
modifystate = "energystun"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user