mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Pretty much all new click code
This commit is contained in:
@@ -8,16 +8,14 @@
|
||||
item_state = ""
|
||||
w_class = 1
|
||||
|
||||
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob)
|
||||
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(!in_range(I, user))
|
||||
return
|
||||
|
||||
if(!istype(I) || I.anchored == 1)
|
||||
return ..()
|
||||
|
||||
if(istype(I, /obj/item/weapon/storage))
|
||||
return ..()
|
||||
|
||||
if(istype(I, /obj/item/weapon/evidencebag))
|
||||
user << "<span class='notice'>You find putting an evidence bag in another evidence bag to be slightly absurd.</span>"
|
||||
return
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
/obj/item/weapon/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!")
|
||||
if(do_after(user,30))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/list/stored = list()
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
attackby(obj/item/weapon/f_card/W as obj, mob/user as mob)
|
||||
@@ -64,9 +64,8 @@
|
||||
user << "\blue Blood type: [M.blood_DNA[blood]]\nDNA: [blood]"
|
||||
return
|
||||
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob)
|
||||
if(!in_range(A,user))
|
||||
return
|
||||
afterattack(atom/A as obj|turf|area, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(loc != user)
|
||||
return
|
||||
if(istype(A,/obj/machinery/computer/forensic_scanning)) //breaks shit.
|
||||
|
||||
@@ -592,15 +592,6 @@ var/list/admin_verbs_mod = list(
|
||||
log_admin("[key_name(usr)] used 'kill air'.")
|
||||
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
|
||||
|
||||
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
|
||||
set name = "Toggle NewClickProc"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder) return
|
||||
using_new_click_proc = !using_new_click_proc
|
||||
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
|
||||
feedback_add_details("admin_verb","TNCP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/deadmin_self()
|
||||
set name = "De-admin self"
|
||||
set category = "Admin"
|
||||
|
||||
@@ -1409,7 +1409,7 @@
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
@@ -1426,7 +1426,7 @@
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
@@ -1442,7 +1442,7 @@
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
if(!istype(H.ears, /obj/item/device/radio/headset))
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
|
||||
@@ -667,7 +667,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/chaplain_hood(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(M), slot_l_store)
|
||||
@@ -689,7 +689,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/latex(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchenknife(M), slot_l_store)
|
||||
@@ -706,7 +706,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wcoat(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(M), slot_l_store)
|
||||
@@ -747,7 +747,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/representative(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), slot_l_ear)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
pda.owner = M.real_name
|
||||
@@ -772,7 +772,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/officer(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/officer(M), slot_head)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
@@ -797,7 +797,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_if_possible(new /obj/item/clothing/under/rank/centcom/captain(M), slot_w_uniform)
|
||||
M.equip_if_possible(new /obj/item/clothing/shoes/centcom(M), slot_shoes)
|
||||
M.equip_if_possible(new /obj/item/clothing/gloves/white(M), slot_gloves)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_if_possible(new /obj/item/clothing/head/beret/centcom/captain(M), slot_head)
|
||||
|
||||
var/obj/item/device/pda/heads/pda = new(M)
|
||||
@@ -821,7 +821,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
@@ -840,7 +840,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/swat/officer(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/havana(M), slot_wear_mask)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), slot_head)
|
||||
@@ -861,7 +861,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
|
||||
@@ -873,7 +873,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
|
||||
@@ -885,7 +885,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/lightpurple(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/marisa(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/marisa(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
|
||||
@@ -896,7 +896,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
|
||||
|
||||
@@ -77,15 +77,15 @@
|
||||
largest_move_time = M.next_move - world.time
|
||||
else
|
||||
largest_move_time = 1
|
||||
if(M.lastDblClick >= largest_click_time)
|
||||
if(M.next_click >= largest_click_time)
|
||||
largest_click_mob = M
|
||||
if(M.lastDblClick > world.time)
|
||||
largest_click_time = M.lastDblClick - world.time
|
||||
if(M.next_click > world.time)
|
||||
largest_click_time = M.next_click - world.time
|
||||
else
|
||||
largest_click_time = 0
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.lastDblClick] world.time = [world.time]")
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] next_click = [M.next_click] world.time = [world.time]")
|
||||
M.next_move = 1
|
||||
M.lastDblClick = 0
|
||||
M.next_click = 0
|
||||
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
|
||||
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
|
||||
message_admins("world.time = [world.time]", 1)
|
||||
|
||||
@@ -101,7 +101,7 @@ var/global/sent_honksquad = 0
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
R.set_frequency(1442)
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(src), slot_back)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(src), slot_in_backpack)
|
||||
if(src.gender == FEMALE)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
del(I)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes)
|
||||
|
||||
@@ -125,7 +125,7 @@ var/global/sent_strike_team = 0
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
R.set_frequency(1441)
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
if (leader_selected == 0)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/green(src), slot_w_uniform)
|
||||
else
|
||||
|
||||
@@ -131,7 +131,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
|
||||
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/swat(src), slot_shoes)
|
||||
if (!syndicate_leader_selected)
|
||||
|
||||
@@ -4,7 +4,7 @@ var/global/vox_tick = 1
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
|
||||
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/vox/vox_robes(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(src), slot_shoes) // REPLACE THESE WITH CODED VOX ALTERNATIVES.
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if(src.corpsegloves)
|
||||
M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
|
||||
if(src.corpseradio)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_l_ear)
|
||||
if(src.corpseglasses)
|
||||
M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
|
||||
if(src.corpsemask)
|
||||
|
||||
@@ -35,6 +35,54 @@
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_EARS
|
||||
|
||||
/obj/item/clothing/ears/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
|
||||
if (src.loc != user || !istype(user,/mob/living/carbon/human))
|
||||
..()
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_ear != src && H.r_ear != src)
|
||||
..()
|
||||
return
|
||||
|
||||
if(!canremove)
|
||||
return
|
||||
|
||||
var/obj/item/clothing/ears/O
|
||||
if(slot_flags & SLOT_TWOEARS )
|
||||
O = (H.l_ear == src ? H.r_ear : H.l_ear)
|
||||
user.u_equip(O)
|
||||
if(!istype(src,/obj/item/clothing/ears/offear))
|
||||
del(O)
|
||||
O = src
|
||||
else
|
||||
O = src
|
||||
|
||||
user.u_equip(src)
|
||||
|
||||
if (O)
|
||||
user.put_in_hands(O)
|
||||
O.add_fingerprint(user)
|
||||
|
||||
if(istype(src,/obj/item/clothing/ears/offear))
|
||||
del(src)
|
||||
|
||||
/obj/item/clothing/ears/offear
|
||||
name = "Other ear"
|
||||
w_class = 5.0
|
||||
icon = 'icons/mob/screen1_Midnight.dmi'
|
||||
icon_state = "block"
|
||||
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
||||
|
||||
New(var/obj/O)
|
||||
name = O.name
|
||||
desc = O.desc
|
||||
icon = O.icon
|
||||
icon_state = O.icon_state
|
||||
dir = O.dir
|
||||
|
||||
/obj/item/clothing/ears/earmuffs
|
||||
name = "earmuffs"
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
@@ -94,6 +142,9 @@ BLIND // can't see anything
|
||||
cell.reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
// Called just before an attack_hand(), in mob/UnarmedAttack()
|
||||
/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
|
||||
return 0 // return 1 to cancel attack_hand()
|
||||
|
||||
//Head
|
||||
/obj/item/clothing/head
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
/obj/item/clothing/gloves/space_ninja
|
||||
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
|
||||
name = "ninja gloves"
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
siemens_coefficient = 0.2
|
||||
var/draining = 0
|
||||
var/candrain = 0
|
||||
var/mindrain = 200
|
||||
var/maxdrain = 400
|
||||
|
||||
/obj/item/clothing/gloves/captain
|
||||
desc = "Regal blue gloves, with a nice gold trim. Swanky."
|
||||
name = "captain's gloves"
|
||||
|
||||
@@ -362,7 +362,7 @@ ________________________________________________________________________________
|
||||
del(gloves)
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
if(gender==FEMALE)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
|
||||
else
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
/datum/hud/proc/ghost_hud()
|
||||
return
|
||||
@@ -89,6 +89,7 @@
|
||||
if(W)
|
||||
if(client) client.screen -= W
|
||||
u_equip(W)
|
||||
if(!W) return 1 // self destroying objects (tk, grabs)
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = loc
|
||||
|
||||
@@ -194,7 +195,8 @@
|
||||
|
||||
if(hasvar(src,"back")) if(src:back) items += src:back
|
||||
if(hasvar(src,"belt")) if(src:belt) items += src:belt
|
||||
if(hasvar(src,"ears")) if(src:ears) items += src:ears
|
||||
if(hasvar(src,"l_ear")) if(src:l_ear) items += src:l_ear
|
||||
if(hasvar(src,"r_ear")) if(src:r_ear) items += src:r_ear
|
||||
if(hasvar(src,"glasses")) if(src:glasses) items += src:glasses
|
||||
if(hasvar(src,"gloves")) if(src:gloves) items += src:gloves
|
||||
if(hasvar(src,"head")) if(src:head) items += src:head
|
||||
@@ -255,9 +257,13 @@
|
||||
if(!src.wear_id && src.w_uniform)
|
||||
src.wear_id = W
|
||||
equipped = 1
|
||||
if(slot_ears)
|
||||
if(!src.ears)
|
||||
src.ears = W
|
||||
if(slot_l_ear)
|
||||
if(!src.l_ear)
|
||||
src.l_ear = W
|
||||
equipped = 1
|
||||
if(slot_r_ear)
|
||||
if(!src.r_ear)
|
||||
src.r_ear = W
|
||||
equipped = 1
|
||||
if(slot_glasses)
|
||||
if(!src.glasses)
|
||||
|
||||
@@ -133,24 +133,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (M.a_intent == "hurt")
|
||||
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!ismonkey(M)) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
@@ -305,9 +287,9 @@
|
||||
return
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
if (M == src || anchored)
|
||||
return
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
|
||||
@@ -139,29 +139,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/hand_p(mob/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (M.a_intent == "hurt")
|
||||
if (istype(M.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
/datum/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
|
||||
|
||||
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
|
||||
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
mymob.blind.name = " "
|
||||
mymob.blind.screen_loc = "1,1"
|
||||
mymob.blind.layer = 0
|
||||
@@ -135,10 +135,10 @@
|
||||
if(istext(selhand))
|
||||
selhand = lowertext(selhand)
|
||||
|
||||
if(selhand == "right" || selhand == "r")
|
||||
selhand = 0
|
||||
if(selhand == "left" || selhand == "l")
|
||||
selhand = 1
|
||||
if(selhand == "right" || selhand == "r")
|
||||
selhand = 0
|
||||
if(selhand == "left" || selhand == "l")
|
||||
selhand = 1
|
||||
|
||||
if(selhand != src.hand)
|
||||
swap_hand()
|
||||
@@ -221,95 +221,95 @@
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
/mob/living/carbon/proc/handle_ventcrawl() // -- TLE -- Merged by Carn
|
||||
|
||||
if(!stat)
|
||||
if(!lying)
|
||||
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "\red That vent is welded."
|
||||
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents[0]
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
if(temp_vent.welded)
|
||||
continue
|
||||
var/turf/T = get_turf(temp_vent)
|
||||
|
||||
if(!T || T.z != loc.z)
|
||||
continue
|
||||
|
||||
var/i = 1
|
||||
var/index = "[T.loc.name]\[[i]\]"
|
||||
while(index in vents)
|
||||
i++
|
||||
index = "[T.loc.name]\[[i]\]"
|
||||
vents[index] = temp_vent
|
||||
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortList(vents)
|
||||
|
||||
if(!selection)
|
||||
return
|
||||
|
||||
if(!do_after(src, 45))
|
||||
return
|
||||
|
||||
if(!src||!selection)
|
||||
return
|
||||
|
||||
if(loc==startloc)
|
||||
if(contents.len)
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
|
||||
if(target_vent)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent
|
||||
|
||||
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
|
||||
|
||||
spawn(travel_time)
|
||||
|
||||
if(!target_vent) return
|
||||
for(var/mob/O in hearers(target_vent,null))
|
||||
O.show_message("You hear something squeezing through the ventilation ducts.",2)
|
||||
|
||||
sleep(travel_time)
|
||||
|
||||
if(!target_vent) return
|
||||
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
|
||||
target_vent = vent_found //travel back. No additional time required.
|
||||
src << "\red The vent you were heading to appears to be welded."
|
||||
loc = target_vent.loc
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
|
||||
else
|
||||
src << "You need to remain still while entering a vent."
|
||||
else
|
||||
src << "This vent is not connected to anything."
|
||||
|
||||
else
|
||||
src << "You must be standing on or beside an air vent to enter it."
|
||||
|
||||
else
|
||||
src << "You can't vent crawl while you're stunned!"
|
||||
|
||||
else
|
||||
/mob/living/carbon/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null) // -- TLE -- Merged by Carn
|
||||
if(stat)
|
||||
src << "You must be conscious to do this!"
|
||||
return
|
||||
return
|
||||
if(lying)
|
||||
src << "You can't vent crawl while you're stunned!"
|
||||
return
|
||||
|
||||
if(vent_found) // one was passed in, probably from vent/AltClick()
|
||||
if(vent_found.welded)
|
||||
src << "That vent is welded shut."
|
||||
return
|
||||
if(!vent_found.Adjacent(src))
|
||||
return // don't even acknowledge that
|
||||
else
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
if(v.Adjacent(src))
|
||||
vent_found = v
|
||||
if(!vent_found)
|
||||
src << "You'll need a non-welded vent to crawl into!"
|
||||
return
|
||||
if(!vent_found.network || !vent_found.network.normal_members.len)
|
||||
src << "This vent is not connected to anything."
|
||||
return
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.welded)
|
||||
continue
|
||||
if(temp_vent in loc)
|
||||
continue
|
||||
var/turf/T = get_turf(temp_vent)
|
||||
|
||||
if(!T || T.z != loc.z)
|
||||
continue
|
||||
|
||||
var/i = 1
|
||||
var/index = "[T.loc.name]\[[i]\]"
|
||||
while(index in vents)
|
||||
i++
|
||||
index = "[T.loc.name]\[[i]\]"
|
||||
vents[index] = temp_vent
|
||||
if(!vents.len)
|
||||
src << "\red There are no available vents to travel to, they could be welded."
|
||||
return
|
||||
|
||||
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortAssoc(vents)
|
||||
if(!selection) return
|
||||
|
||||
if(!vent_found.Adjacent(src))
|
||||
src << "Never mind, you left."
|
||||
return
|
||||
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
return
|
||||
if(isslime(src))
|
||||
var/mob/living/carbon/slime/S = src
|
||||
if(S.Victim)
|
||||
src << "\red You'll have to let [S.Victim] go or finish eating \him first."
|
||||
return
|
||||
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection]
|
||||
if(!target_vent)
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent
|
||||
|
||||
var/travel_time = round(get_dist(loc, target_vent.loc) / 2)
|
||||
|
||||
spawn(travel_time)
|
||||
|
||||
if(!target_vent) return
|
||||
for(var/mob/O in hearers(target_vent,null))
|
||||
O.show_message("You hear something squeezing through the ventilation ducts.",2)
|
||||
|
||||
sleep(travel_time)
|
||||
|
||||
if(!target_vent) return
|
||||
if(target_vent.welded) //the vent can be welded while alien scrolled through the list or travelled.
|
||||
target_vent = vent_found //travel back. No additional time required.
|
||||
src << "\red The vent you were heading to appears to be welded."
|
||||
loc = target_vent.loc
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
|
||||
|
||||
/mob/living/carbon/clean_blood()
|
||||
@@ -331,24 +331,6 @@
|
||||
//Throwing stuff
|
||||
|
||||
/mob/living/carbon/proc/toggle_throw_mode()
|
||||
var/obj/item/W = get_active_hand()
|
||||
if( !W )//Not holding anything
|
||||
if( client && (TK in mutations) )
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.remoteview_target)
|
||||
H << "\red Your mind is too busy remote viewing."
|
||||
return
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
put_in_active_hand(O)
|
||||
O.host = src
|
||||
return
|
||||
|
||||
if( istype(W,/obj/item/tk_grab) )
|
||||
if(hand) del(l_hand)
|
||||
else del(r_hand)
|
||||
return
|
||||
|
||||
if (src.in_throw_mode)
|
||||
throw_mode_off()
|
||||
else
|
||||
@@ -362,7 +344,10 @@
|
||||
src.in_throw_mode = 1
|
||||
src.throw_icon.icon_state = "act_throw_on"
|
||||
|
||||
/mob/living/carbon/proc/throw_item(atom/target)
|
||||
/mob/proc/throw_item(atom/target)
|
||||
return
|
||||
|
||||
/mob/living/carbon/throw_item(atom/target)
|
||||
src.throw_mode_off()
|
||||
if(usr.stat || !target)
|
||||
return
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
mob/living/carbon/verb/give()
|
||||
/mob/living/carbon/verb/give()
|
||||
set category = "IC"
|
||||
set name = "Give"
|
||||
set src in view(1)
|
||||
if(src.stat == 2 || usr.stat == 2|| src.client == null)
|
||||
if(src.stat == 2 || usr.stat == 2 || src.client == null)
|
||||
return
|
||||
if(src == usr)
|
||||
usr << "I feel stupider, suddenly."
|
||||
usr << "\red I feel stupider, suddenly."
|
||||
return
|
||||
var/obj/item/I
|
||||
if(!usr.hand && usr.r_hand == null)
|
||||
usr << "You don't have anything in your right hand to give to [src.name]"
|
||||
usr << "\red You don't have anything in your right hand to give to [src.name]"
|
||||
return
|
||||
if(usr.hand && usr.l_hand == null)
|
||||
usr << "You don't have anything in your left hand to give to [src.name]"
|
||||
usr << "\red You don't have anything in your left hand to give to [src.name]"
|
||||
return
|
||||
if(usr.hand)
|
||||
I = usr.l_hand
|
||||
@@ -20,64 +20,29 @@ mob/living/carbon/verb/give()
|
||||
I = usr.r_hand
|
||||
if(!I)
|
||||
return
|
||||
if(src.r_hand == null)
|
||||
if(src.r_hand == null || src.l_hand == null)
|
||||
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
|
||||
if("Yes")
|
||||
if(!I)
|
||||
return
|
||||
if(!check_can_reach(usr,src))
|
||||
usr << "You need to keep in reaching distance."
|
||||
src << "[usr.name] moved too far away."
|
||||
if(!Adjacent(usr))
|
||||
usr << "\red You need to stay in reaching distance while giving an object."
|
||||
src << "\red [usr.name] moved too far away."
|
||||
return
|
||||
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
|
||||
usr << "You need to keep the item in your active hand."
|
||||
src << "[usr.name] seem to have given up on giving \the [I.name] to you."
|
||||
usr << "\red You need to keep the item in your active hand."
|
||||
src << "\red [usr.name] seem to have given up on giving \the [I.name] to you."
|
||||
return
|
||||
if(src.r_hand != null && src.l_hand != null)
|
||||
src << "\red Your hands are full."
|
||||
usr << "\red Their hands are full."
|
||||
return
|
||||
if(src.r_hand != null)
|
||||
if(src.l_hand == null)
|
||||
usr.drop_item()
|
||||
src.l_hand = I
|
||||
else
|
||||
src << "Your hands are full."
|
||||
usr << "Their hands are full."
|
||||
return
|
||||
else
|
||||
usr.drop_item()
|
||||
src.r_hand = I
|
||||
I.loc = src
|
||||
I.layer = 20
|
||||
I.add_fingerprint(src)
|
||||
src.update_inv_l_hand()
|
||||
src.update_inv_r_hand()
|
||||
usr.update_inv_l_hand()
|
||||
usr.update_inv_r_hand()
|
||||
src.visible_message("[usr.name] handed \the [I.name] to [src.name].")
|
||||
if("No")
|
||||
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
|
||||
else if(src.l_hand == null)
|
||||
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
|
||||
if("Yes")
|
||||
if(!I)
|
||||
return
|
||||
if(!check_can_reach(usr,src))
|
||||
usr << "You need to keep in reaching distance."
|
||||
src << "[usr.name] moved too far away."
|
||||
return
|
||||
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
|
||||
usr << "You need to keep the item in your active hand."
|
||||
src << "[usr.name] seem to have given up on giving \the [I.name] to you."
|
||||
return
|
||||
if(src.l_hand != null)
|
||||
if(src.r_hand == null)
|
||||
usr.drop_item()
|
||||
src.r_hand = I
|
||||
else
|
||||
src << "Your hands are full."
|
||||
usr << "Their hands are full."
|
||||
return
|
||||
else
|
||||
usr.drop_item()
|
||||
src.l_hand = I
|
||||
src.l_hand = I
|
||||
I.loc = src
|
||||
I.layer = 20
|
||||
I.add_fingerprint(src)
|
||||
@@ -85,8 +50,8 @@ mob/living/carbon/verb/give()
|
||||
src.update_inv_r_hand()
|
||||
usr.update_inv_l_hand()
|
||||
usr.update_inv_r_hand()
|
||||
src.visible_message("[usr.name] handed \the [I.name] to [src.name].")
|
||||
src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].")
|
||||
if("No")
|
||||
src.visible_message("[usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
|
||||
src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
|
||||
else
|
||||
usr << "[src.name]'s hands are full."
|
||||
usr << "\red [src.name]'s hands are full."
|
||||
@@ -163,9 +163,13 @@
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[glasses] \a [glasses] covering [t_his] eyes.\n"
|
||||
|
||||
//ears
|
||||
if(ears && !skipears)
|
||||
msg += "[t_He] [t_has] \icon[ears] \a [ears] on [t_his] ears.\n"
|
||||
//left ear
|
||||
if(l_ear && !skipears)
|
||||
msg += "[t_He] [t_has] \icon[l_ear] \a [l_ear] on [t_his] left ear.\n"
|
||||
|
||||
//right ear
|
||||
if(r_ear && !skipears)
|
||||
msg += "[t_He] [t_has] \icon[r_ear] \a [r_ear] on [t_his] right ear.\n"
|
||||
|
||||
//ID
|
||||
if(wear_id)
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "ears"
|
||||
inv_box.screen_loc = ui_ears
|
||||
inv_box.slot_id = slot_ears
|
||||
inv_box.slot_id = slot_l_ear
|
||||
inv_box.layer = 19
|
||||
src.other += inv_box
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
b_loss = b_loss/1.5
|
||||
f_loss = f_loss/1.5
|
||||
|
||||
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
|
||||
if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
ear_damage += 30
|
||||
ear_deaf += 120
|
||||
if (prob(70) && !shielded)
|
||||
@@ -211,7 +211,7 @@
|
||||
b_loss += 30
|
||||
if (prob(getarmor(null, "bomb")))
|
||||
b_loss = b_loss/2
|
||||
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
|
||||
if (!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
ear_damage += 15
|
||||
ear_deaf += 60
|
||||
if (prob(50) && !shielded)
|
||||
@@ -278,24 +278,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/hand_p(mob/M as mob)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor = run_armor_check(affecting, "melee")
|
||||
apply_damage(rand(1,2), BRUTE, affecting, armor)
|
||||
if(armor >= 2) return
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
var/mob/living/carbon/human/H = src
|
||||
src = null
|
||||
src = H.monkeyize()
|
||||
contract_disease(D,1,0)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
@@ -406,7 +388,8 @@
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
|
||||
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves ? gloves : "Nothing")]</A>
|
||||
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses ? glasses : "Nothing")]</A>
|
||||
<BR><B>Ears:</B> <A href='?src=\ref[src];item=ears'>[(ears ? ears : "Nothing")]</A>
|
||||
<BR><B>Left Ear:</B> <A href='?src=\ref[src];item=l_ear'>[(l_ear ? l_ear : "Nothing")]</A>
|
||||
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
|
||||
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
|
||||
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A>
|
||||
@@ -865,7 +848,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/abiotic(var/full_body = 0)
|
||||
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.ears || src.gloves)))
|
||||
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
|
||||
return 1
|
||||
|
||||
if( (src.l_hand && !src.l_hand.abstract) || (src.r_hand && !src.r_hand.abstract) )
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
if ("help")
|
||||
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
|
||||
if ("grab")
|
||||
if(M == src) return
|
||||
if(M == src || anchored)
|
||||
return
|
||||
if (w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
|
||||
@@ -91,18 +91,23 @@
|
||||
return 1
|
||||
|
||||
if("grab")
|
||||
if(M == src) return 0
|
||||
if(w_uniform) w_uniform.add_fingerprint(M)
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, M, src)
|
||||
if(M == src || anchored)
|
||||
return 0
|
||||
if(w_uniform)
|
||||
w_uniform.add_fingerprint(M)
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
|
||||
if(buckled)
|
||||
M << "<span class='notice'>You cannot grab [src], \he is buckled in!</span>"
|
||||
if(!G) //the grab will delete itself in New if affecting is anchored
|
||||
return
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
grabbed_by += G
|
||||
G.synch()
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("\red [M] has grabbed [src] passively!")
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
return 1
|
||||
|
||||
if("hurt")
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
var/obj/item/gloves = null
|
||||
var/obj/item/glasses = null
|
||||
var/obj/item/head = null
|
||||
var/obj/item/ears = null
|
||||
var/obj/item/l_ear = null
|
||||
var/obj/item/r_ear = null
|
||||
var/obj/item/wear_id = null
|
||||
var/obj/item/r_store = null
|
||||
var/obj/item/l_store = null
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/mob/living/carbon/human/verb/quick_equip()
|
||||
set name = "quick-equip"
|
||||
set hidden = 1
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/I = H.get_active_hand()
|
||||
if(!I)
|
||||
H << "<span class='notice'>You are not holding anything to equip.</span>"
|
||||
return
|
||||
if(H.equip_to_appropriate_slot(I))
|
||||
if(hand)
|
||||
update_inv_l_hand(0)
|
||||
else
|
||||
update_inv_r_hand(0)
|
||||
else
|
||||
H << "\red You are unable to equip that."
|
||||
|
||||
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
|
||||
for (var/slot in slots)
|
||||
if (equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))
|
||||
@@ -31,7 +49,9 @@
|
||||
if(slot_wear_id)
|
||||
// the only relevant check for this is the uniform check
|
||||
return 1
|
||||
if(slot_ears)
|
||||
if(slot_l_ear)
|
||||
return has_organ("head")
|
||||
if(slot_r_ear)
|
||||
return has_organ("head")
|
||||
if(slot_glasses)
|
||||
return has_organ("head")
|
||||
@@ -92,8 +112,12 @@
|
||||
update_hair(0) //rebuild hair
|
||||
success = 1
|
||||
update_inv_head()
|
||||
else if (W == ears)
|
||||
ears = null
|
||||
else if (W == l_ear)
|
||||
l_ear = null
|
||||
success = 1
|
||||
update_inv_ears()
|
||||
else if (W == r_ear)
|
||||
r_ear = null
|
||||
success = 1
|
||||
update_inv_ears()
|
||||
else if (W == shoes)
|
||||
@@ -215,8 +239,22 @@
|
||||
src.wear_id = W
|
||||
W.equipped(src, slot)
|
||||
update_inv_wear_id(redraw_mob)
|
||||
if(slot_ears)
|
||||
src.ears = W
|
||||
if(slot_l_ear)
|
||||
src.l_ear = W
|
||||
if(l_ear.slot_flags & SLOT_TWOEARS)
|
||||
var/obj/item/clothing/ears/offear/O = new(W)
|
||||
O.loc = src
|
||||
src.r_ear = O
|
||||
O.layer = 20
|
||||
W.equipped(src, slot)
|
||||
update_inv_ears(redraw_mob)
|
||||
if(slot_r_ear)
|
||||
src.r_ear = W
|
||||
if(r_ear.slot_flags & SLOT_TWOEARS)
|
||||
var/obj/item/clothing/ears/offear/O = new(W)
|
||||
O.loc = src
|
||||
src.l_ear = O
|
||||
O.layer = 20
|
||||
W.equipped(src, slot)
|
||||
update_inv_ears(redraw_mob)
|
||||
if(slot_glasses)
|
||||
@@ -404,14 +442,22 @@
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
|
||||
if("ears")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their ear item ([target.ears]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) ear item ([target.ears])</font>")
|
||||
if(target.ears && !target.ears.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.ears] from [target]'s ears!</B>"
|
||||
if("l_ear")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])</font>")
|
||||
if(target.l_ear && !target.l_ear.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.l_ear] from [target]'s left ear!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.ears] from [target]'s ears!</B>"
|
||||
message = "\red <B>[source] is trying to take off the [target.l_ear] from [target]'s left ear!</B>"
|
||||
if("r_ear")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])</font>")
|
||||
if(target.r_ear && !target.r_ear.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.r_ear] from [target]'s right ear!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off the [target.r_ear] from [target]'s right ear!</B>"
|
||||
if("head")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their hat ([target.head]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])</font>")
|
||||
@@ -553,10 +599,14 @@ It can still be worn/put on as normal.
|
||||
slot_to_process = slot_head
|
||||
if (target.head && target.head.canremove)
|
||||
strip_item = target.head
|
||||
if("ears")
|
||||
slot_to_process = slot_ears
|
||||
if (target.ears)
|
||||
strip_item = target.ears
|
||||
if("l_ear")
|
||||
slot_to_process = slot_l_ear
|
||||
if (target.l_ear)
|
||||
strip_item = target.l_ear
|
||||
if("r_ear")
|
||||
slot_to_process = slot_r_ear
|
||||
if (target.r_ear)
|
||||
strip_item = target.r_ear
|
||||
if("shoes")
|
||||
slot_to_process = slot_shoes
|
||||
if (target.shoes && target.shoes.canremove)
|
||||
|
||||
@@ -1071,7 +1071,7 @@
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
ear_deaf = max(ear_deaf-1, 0)
|
||||
else if(istype(ears, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster
|
||||
else if(istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster
|
||||
ear_damage = max(ear_damage-0.15, 0)
|
||||
ear_deaf = max(ear_deaf, 1)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
@@ -1473,14 +1473,14 @@
|
||||
|
||||
if (shock_stage >= 60)
|
||||
if(shock_stage == 60) emote("me",1,"'s body becomes limp.")
|
||||
if (prob(5))
|
||||
if (prob(5) && health <= 20)
|
||||
Stun(20)
|
||||
lying = 1
|
||||
|
||||
if(shock_stage == 80)
|
||||
src << "<font color='red'><b>"+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.")
|
||||
|
||||
if (shock_stage > 80)
|
||||
if (shock_stage > 100 && health <= 20)
|
||||
Paralyse(rand(15,28))
|
||||
|
||||
proc/handle_pulse()
|
||||
|
||||
@@ -627,12 +627,13 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
if(ears)
|
||||
var/dmi='icons/mob/ears.dmi'
|
||||
if(ears.custom)
|
||||
dmi = ears.icon
|
||||
overlays_lying[EARS_LAYER] = image("icon" = dmi, "icon_state" = "[ears.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = dmi, "icon_state" = "[ears.icon_state]")
|
||||
if(l_ear || r_ear)
|
||||
if(l_ear)
|
||||
overlays_lying[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[l_ear.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[l_ear.icon_state]")
|
||||
if(r_ear)
|
||||
overlays_lying[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[r_ear.icon_state]2")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[r_ear.icon_state]")
|
||||
else
|
||||
overlays_lying[EARS_LAYER] = null
|
||||
overlays_standing[EARS_LAYER] = null
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
sleep(15)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
if(Target.Adjacent(src))
|
||||
Target.attack_slime(src)
|
||||
//world << "retrun 1"
|
||||
return
|
||||
@@ -116,7 +116,7 @@
|
||||
sleep(25)
|
||||
Atkcool = 0
|
||||
|
||||
if(get_obstacle_ok(Target))
|
||||
if(Target.Adjacent(src))
|
||||
Target.attack_slime(src)
|
||||
|
||||
|
||||
@@ -124,16 +124,16 @@
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
if(!Atkcool && Target.Adjacent(src))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && get_obstacle_ok(Target))
|
||||
if(!Atkcool && Target.Adjacent(src))
|
||||
Feedon(Target)
|
||||
|
||||
else
|
||||
if(Target in view(7, src))
|
||||
if(get_obstacle_ok(Target))
|
||||
if(Target.Adjacent(src))
|
||||
step_to(src, Target)
|
||||
|
||||
else
|
||||
|
||||
@@ -635,89 +635,6 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
|
||||
/mob/living/carbon/slime/proc/get_obstacle_ok(atom/A)
|
||||
var/direct = get_dir(src, A)
|
||||
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
|
||||
var/ok = 0
|
||||
if ( (direct - 1) & direct)
|
||||
var/turf/Step_1
|
||||
var/turf/Step_2
|
||||
switch(direct)
|
||||
if(5.0)
|
||||
Step_1 = get_step(src, NORTH)
|
||||
Step_2 = get_step(src, EAST)
|
||||
|
||||
if(6.0)
|
||||
Step_1 = get_step(src, SOUTH)
|
||||
Step_2 = get_step(src, EAST)
|
||||
|
||||
if(9.0)
|
||||
Step_1 = get_step(src, NORTH)
|
||||
Step_2 = get_step(src, WEST)
|
||||
|
||||
if(10.0)
|
||||
Step_1 = get_step(src, SOUTH)
|
||||
Step_2 = get_step(src, WEST)
|
||||
|
||||
else
|
||||
if(Step_1 && Step_2)
|
||||
var/check_1 = 0
|
||||
var/check_2 = 0
|
||||
if(step_to(D, Step_1))
|
||||
check_1 = 1
|
||||
for(var/obj/border_obstacle in Step_1)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
check_1 = 0
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
check_1 = 0
|
||||
|
||||
D.loc = src.loc
|
||||
if(step_to(D, Step_2))
|
||||
check_2 = 1
|
||||
|
||||
for(var/obj/border_obstacle in Step_2)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
check_2 = 0
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
check_2 = 0
|
||||
if(check_1 || check_2)
|
||||
ok = 1
|
||||
else
|
||||
if(loc == src.loc)
|
||||
ok = 1
|
||||
else
|
||||
ok = 1
|
||||
|
||||
//Now, check objects to block exit that are on the border
|
||||
for(var/obj/border_obstacle in src.loc)
|
||||
if(border_obstacle.flags & ON_BORDER)
|
||||
if(!border_obstacle.CheckExit(D, A))
|
||||
ok = 0
|
||||
|
||||
//Next, check objects to block entry that are on the border
|
||||
for(var/obj/border_obstacle in get_turf(A))
|
||||
if((border_obstacle.flags & ON_BORDER) && (A != border_obstacle))
|
||||
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
|
||||
ok = 0
|
||||
|
||||
//del(D)
|
||||
//Garbage Collect Dummy
|
||||
D.loc = null
|
||||
D = null
|
||||
if (!( ok ))
|
||||
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/slime_extract
|
||||
name = "slime extract"
|
||||
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
|
||||
|
||||
@@ -175,24 +175,6 @@
|
||||
|
||||
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
|
||||
|
||||
/mob/living/carbon/monkey/hand_p(mob/M as mob)
|
||||
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
|
||||
if ((prob(75) && health > 0))
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
var/damage = rand(1, 5)
|
||||
if (HULK in mutations) damage += 10
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
contract_disease(D,1,0)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[M.name] has attempted to bite []!</B>", src), 1)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
|
||||
..()
|
||||
|
||||
@@ -272,10 +254,10 @@
|
||||
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
|
||||
else
|
||||
if (M.a_intent == "grab")
|
||||
if (M == src)
|
||||
if (M == src || anchored)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )
|
||||
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
|
||||
|
||||
M.put_in_active_hand(G)
|
||||
|
||||
|
||||
@@ -405,3 +405,241 @@
|
||||
if(update_slimes)
|
||||
for(var/mob/living/carbon/slime/M in view(1,src))
|
||||
M.UpdateFeed(src)
|
||||
|
||||
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
|
||||
var/mob/living/L = usr
|
||||
|
||||
//Resisting control by an alien mind.
|
||||
if(istype(src.loc,/mob/living/simple_animal/borer))
|
||||
var/mob/living/simple_animal/borer/B = src.loc
|
||||
var/mob/living/captive_brain/H = src
|
||||
|
||||
H << "\red <B>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</B>"
|
||||
B.host << "\red <B>You feel the captive mind of [src] begin to resist your control.</B>"
|
||||
|
||||
spawn(rand(350,450)+B.host.brainloss)
|
||||
|
||||
if(!B || !B.controlling)
|
||||
return
|
||||
|
||||
B.host.adjustBrainLoss(rand(5,10))
|
||||
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
|
||||
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
|
||||
B.controlling = 0
|
||||
|
||||
B.ckey = B.host.ckey
|
||||
B.host.ckey = H.ckey
|
||||
|
||||
H.ckey = null
|
||||
H.name = "host brain"
|
||||
H.real_name = "host brain"
|
||||
|
||||
verbs -= /mob/living/carbon/proc/release_control
|
||||
verbs -= /mob/living/carbon/proc/punish_host
|
||||
verbs -= /mob/living/carbon/proc/spawn_larvae
|
||||
|
||||
return
|
||||
|
||||
//resisting grabs (as if it helps anyone...)
|
||||
if ((!( L.stat ) && L.canmove && !( L.restrained() )))
|
||||
var/resisting = 0
|
||||
for(var/obj/O in L.requests)
|
||||
L.requests.Remove(O)
|
||||
del(O)
|
||||
resisting++
|
||||
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
|
||||
resisting++
|
||||
if (G.state == 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 2)
|
||||
if (prob(25))
|
||||
for(var/mob/O in viewers(L, null))
|
||||
O.show_message(text("\red [] has broken free of []'s grip!", L, G.assailant), 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 3)
|
||||
if (prob(5))
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red [] has broken free of []'s headlock!", L, G.assailant), 1)
|
||||
del(G)
|
||||
if(resisting)
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red <B>[] resists!</B>", L), 1)
|
||||
|
||||
|
||||
//unbuckling yourself
|
||||
if(L.buckled && (L.last_special <= world.time) )
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
if( C.handcuffed )
|
||||
C.next_move = world.time + 100
|
||||
C.last_special = world.time + 100
|
||||
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(L))
|
||||
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(!C.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(C))
|
||||
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
|
||||
C << "\blue You successfully unbuckle yourself."
|
||||
C.buckled.manual_unbuckle(C)
|
||||
else
|
||||
L.buckled.manual_unbuckle(L)
|
||||
|
||||
//Breaking out of a locker?
|
||||
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
|
||||
var/obj/structure/closet/C = L.loc
|
||||
if(C.opened)
|
||||
return //Door's open... wait, why are you in it's contents then?
|
||||
if(istype(L.loc, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = L.loc
|
||||
if(!SC.locked && !SC.welded)
|
||||
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
|
||||
else
|
||||
if(!C.welded)
|
||||
return //closed but not welded...
|
||||
// else Meh, lets just keep it at 2 minutes for now
|
||||
// breakout_time++ //Harder to get out of welded lockers than locked lockers
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
usr.next_move = world.time + 100
|
||||
L.last_special = world.time + 100
|
||||
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
|
||||
for(var/mob/O in viewers(usr.loc))
|
||||
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
|
||||
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(istype(L.loc, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = L.loc
|
||||
if(!SC.locked && !SC.welded)
|
||||
return
|
||||
else
|
||||
if(!C.welded)
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
if(istype(usr.loc, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = L.loc
|
||||
SC.desc = "It appears to be broken."
|
||||
SC.icon_state = SC.icon_off
|
||||
flick(SC.icon_broken, SC)
|
||||
sleep(10)
|
||||
flick(SC.icon_broken, SC)
|
||||
sleep(10)
|
||||
SC.broken = 1
|
||||
SC.locked = 0
|
||||
usr << "\red You successfully break out!"
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
|
||||
if(istype(SC.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
var/obj/structure/bigDelivery/BD = SC.loc
|
||||
BD.attack_hand(usr)
|
||||
SC.open()
|
||||
else
|
||||
C.welded = 0
|
||||
usr << "\red You successfully break out!"
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
|
||||
if(istype(C.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
|
||||
var/obj/structure/bigDelivery/BD = C.loc
|
||||
BD.attack_hand(usr)
|
||||
C.open()
|
||||
|
||||
//breaking out of handcuffs
|
||||
else if(iscarbon(L))
|
||||
var/mob/living/carbon/CM = L
|
||||
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, 50))
|
||||
if(!CM.handcuffed || CM.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
|
||||
CM << "\red You successfully break your handcuffs."
|
||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
del(CM.handcuffed)
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
else
|
||||
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
|
||||
var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(!CM.handcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
|
||||
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
|
||||
CM << "\blue You successfully remove \the [CM.handcuffed]."
|
||||
CM.handcuffed.loc = usr.loc
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, 50))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
|
||||
CM << "\red You successfully break your legcuffs."
|
||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
del(CM.legcuffed)
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
else
|
||||
var/obj/item/weapon/legcuffs/HC = CM.legcuffed
|
||||
var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
|
||||
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
|
||||
CM << "\blue You successfully remove \the [CM.legcuffed]."
|
||||
CM.legcuffed.loc = usr.loc
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
|
||||
@@ -59,8 +59,12 @@ var/list/department_radio_keys = list(
|
||||
if (!ishuman(src))
|
||||
return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.ears)
|
||||
var/obj/item/device/radio/headset/dongle = H.ears
|
||||
if (H.l_ear || H.r_ear)
|
||||
var/obj/item/device/radio/headset/dongle
|
||||
if(istype(H.l_ear,/obj/item/device/radio/headset))
|
||||
dongle = H.l_ear
|
||||
else
|
||||
dongle = H.r_ear
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_binary) return 1
|
||||
|
||||
@@ -68,10 +72,14 @@ var/list/department_radio_keys = list(
|
||||
if (isalien(src)) return 1
|
||||
if (!ishuman(src)) return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.ears)
|
||||
var/obj/item/device/radio/headset/dongle = H.ears
|
||||
if (H.l_ear || H.r_ear)
|
||||
var/obj/item/device/radio/headset/dongle
|
||||
if(istype(H.l_ear,/obj/item/device/radio/headset))
|
||||
dongle = H.l_ear
|
||||
else
|
||||
dongle = H.r_ear
|
||||
if(!istype(dongle)) return
|
||||
if(dongle.translate_hive) return 1
|
||||
if(dongle.translate_binary) return 1
|
||||
|
||||
/mob/living/say(var/message)
|
||||
|
||||
@@ -179,27 +187,31 @@ var/list/department_radio_keys = list(
|
||||
|
||||
switch (message_mode)
|
||||
if ("headset")
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message)
|
||||
used_radios += src:ears
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message)
|
||||
used_radios += src:l_ear
|
||||
is_speaking_radio = 1
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message)
|
||||
used_radios += src:r_ear
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("right hand")
|
||||
if (r_hand)
|
||||
r_hand.talk_into(src, message)
|
||||
used_radios += src:r_hand
|
||||
if ("right ear")
|
||||
if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message)
|
||||
used_radios += src:r_ear
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("left hand")
|
||||
if (l_hand)
|
||||
l_hand.talk_into(src, message)
|
||||
used_radios += src:l_hand
|
||||
if ("left ear")
|
||||
if (src:l_ear)
|
||||
src:l_ear.talk_into(src, message)
|
||||
used_radios += src:l_ear
|
||||
is_speaking_radio = 1
|
||||
|
||||
message_range = 1
|
||||
@@ -233,9 +245,13 @@ var/list/department_radio_keys = list(
|
||||
|
||||
if ("department")
|
||||
if(istype(src, /mob/living/carbon))
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:l_ear
|
||||
is_speaking_radio = 1
|
||||
if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:r_ear
|
||||
is_speaking_radio = 1
|
||||
else if(istype(src, /mob/living/silicon/robot))
|
||||
if (src:radio)
|
||||
@@ -267,9 +283,12 @@ var/list/department_radio_keys = list(
|
||||
R.radio.talk_into(src, message, message_mode)
|
||||
used_radios += R.radio
|
||||
else
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, message_mode)
|
||||
used_radios += src:r_ear
|
||||
message_range = 1
|
||||
italics = 1
|
||||
/////SPECIAL HEADSETS END
|
||||
|
||||
@@ -430,16 +430,6 @@ var/list/ai_list = list()
|
||||
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/attack_hand(mob/living/carbon/M as mob)
|
||||
if(ishuman(M))//Checks to see if they are ninja
|
||||
if(istype(M:gloves, /obj/item/clothing/gloves/space_ninja)&&M:gloves:candrain&&!M:gloves:draining)
|
||||
if(M:wear_suit:s_control)
|
||||
M:wear_suit:transfer_ai("AICORE", "NINJASUIT", src, M)
|
||||
else
|
||||
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
|
||||
@@ -62,18 +62,6 @@
|
||||
AI.cameraFollow = null
|
||||
AI.eyeobj.setLoc(src)
|
||||
|
||||
/mob/living/Click()
|
||||
if(isAI(usr))
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/DblClick()
|
||||
if(isAI(usr) && usr != src)
|
||||
var/mob/living/silicon/ai/A = usr
|
||||
A.ai_actual_track(src)
|
||||
return
|
||||
..()
|
||||
|
||||
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
|
||||
// This is handled in the proc below this one.
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/datum/hud/proc/ai_hud()
|
||||
return
|
||||
@@ -76,4 +76,125 @@
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
updateicon()
|
||||
updateicon()
|
||||
|
||||
|
||||
//Helper procs for cyborg modules on the UI.
|
||||
//These are hackish but they help clean up code elsewhere.
|
||||
|
||||
//module_selected(module) - Checks whether the module slot specified by "module" is currently selected.
|
||||
/mob/living/silicon/robot/proc/module_selected(var/module) //Module is 1-3
|
||||
return module == get_selected_module()
|
||||
|
||||
//module_active(module) - Checks whether there is a module active in the slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/module_active(var/module) //Module is 1-3
|
||||
if(module < 1 || module > 3) return 0
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_state_1)
|
||||
return 1
|
||||
if(2)
|
||||
if(module_state_2)
|
||||
return 1
|
||||
if(3)
|
||||
if(module_state_3)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//get_selected_module() - Returns the slot number of the currently selected module. Returns 0 if no modules are selected.
|
||||
/mob/living/silicon/robot/proc/get_selected_module()
|
||||
if(module_state_1 && module_active == module_state_1)
|
||||
return 1
|
||||
else if(module_state_2 && module_active == module_state_2)
|
||||
return 2
|
||||
else if(module_state_3 && module_active == module_state_3)
|
||||
return 3
|
||||
|
||||
return 0
|
||||
|
||||
//select_module(module) - Selects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/proc/select_module(var/module) //Module is 1-3
|
||||
if(module < 1 || module > 3) return
|
||||
|
||||
if(!module_active(module)) return
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_active != module_state_1)
|
||||
inv1.icon_state = "inv1 +a"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = module_state_1
|
||||
return
|
||||
if(2)
|
||||
if(module_active != module_state_2)
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2 +a"
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = module_state_2
|
||||
return
|
||||
if(3)
|
||||
if(module_active != module_state_3)
|
||||
inv1.icon_state = "inv1"
|
||||
inv2.icon_state = "inv2"
|
||||
inv3.icon_state = "inv3 +a"
|
||||
module_active = module_state_3
|
||||
return
|
||||
return
|
||||
|
||||
//deselect_module(module) - Deselects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/proc/deselect_module(var/module) //Module is 1-3
|
||||
if(module < 1 || module > 3) return
|
||||
|
||||
switch(module)
|
||||
if(1)
|
||||
if(module_active == module_state_1)
|
||||
inv1.icon_state = "inv1"
|
||||
module_active = null
|
||||
return
|
||||
if(2)
|
||||
if(module_active == module_state_2)
|
||||
inv2.icon_state = "inv2"
|
||||
module_active = null
|
||||
return
|
||||
if(3)
|
||||
if(module_active == module_state_3)
|
||||
inv3.icon_state = "inv3"
|
||||
module_active = null
|
||||
return
|
||||
return
|
||||
|
||||
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/toggle_module(var/module) //Module is 1-3
|
||||
if(module < 1 || module > 3) return
|
||||
|
||||
if(module_selected(module))
|
||||
deselect_module(module)
|
||||
else
|
||||
if(module_active(module))
|
||||
select_module(module)
|
||||
else
|
||||
deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module.
|
||||
return
|
||||
|
||||
//cycle_modules() - Cycles through the list of selected modules.
|
||||
/mob/living/silicon/robot/proc/cycle_modules()
|
||||
var/slot_start = get_selected_module()
|
||||
if(slot_start) deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
|
||||
var/slot_num
|
||||
if(slot_start == 0)
|
||||
slot_num = 1
|
||||
slot_start = 2
|
||||
else
|
||||
slot_num = slot_start + 1
|
||||
|
||||
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num++
|
||||
if(slot_num > 3) slot_num = 1 //Wrap around.
|
||||
|
||||
return
|
||||
|
||||
@@ -948,11 +948,6 @@
|
||||
user << "You remove \the [broken_device]."
|
||||
user.put_in_active_hand(broken_device)
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
if(check_access(null))
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if(src.corpsegloves)
|
||||
M.equip_to_slot_or_del(new src.corpsegloves(M), slot_gloves)
|
||||
if(src.corpseradio)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_ears)
|
||||
M.equip_to_slot_or_del(new src.corpseradio(M), slot_l_ear)
|
||||
if(src.corpseglasses)
|
||||
M.equip_to_slot_or_del(new src.corpseglasses(M), slot_glasses)
|
||||
if(src.corpsemask)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
|
||||
+15
-38
@@ -79,40 +79,6 @@
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message( message, 1, blind_message, 2)
|
||||
|
||||
|
||||
//This is awful
|
||||
/mob/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
//Holding a balloon will shield you from an item that is_sharp() ... cause that makes sense
|
||||
if (user.intent != "harm")
|
||||
if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W))
|
||||
return src.l_hand.attackby(W)
|
||||
if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W))
|
||||
return src.r_hand.attackby(W)
|
||||
|
||||
//If src is grabbing someone and facing the attacker, the src will use the grabbed person as a shield
|
||||
var/shielded = 0
|
||||
if (locate(/obj/item/weapon/grab, src))
|
||||
var/mob/safe = null
|
||||
if (istype(src.l_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = src.l_hand
|
||||
if ((G.state == 3 && get_dir(src, user) == src.dir))
|
||||
safe = G.affecting
|
||||
if (istype(src.r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = src.r_hand
|
||||
if ((G.state == 3 && get_dir(src, user) == src.dir))
|
||||
safe = G.affecting
|
||||
if (safe)
|
||||
return safe.attackby(W, user)
|
||||
|
||||
//If the mob is not wearing a shield or otherwise is not shielded
|
||||
if ((!( shielded ) || !( W.flags ) & NOSHIELD))
|
||||
spawn( 0 )
|
||||
if (W && istype(W, /obj/item)) //The istype is necessary for things like bodybags which are structures that do not have an attack() proc.
|
||||
W.attack(src, user)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/proc/findname(msg)
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.real_name == text("[]", msg))
|
||||
@@ -182,7 +148,8 @@ var/list/slot_equipment_priority = list( \
|
||||
slot_head,\
|
||||
slot_shoes,\
|
||||
slot_gloves,\
|
||||
slot_ears,\
|
||||
slot_l_ear,\
|
||||
slot_r_ear,\
|
||||
slot_glasses,\
|
||||
slot_belt,\
|
||||
slot_s_store,\
|
||||
@@ -270,7 +237,7 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
/mob/verb/mode()
|
||||
set name = "Activate Held Object"
|
||||
set category = "IC"
|
||||
set category = "Object"
|
||||
set src = usr
|
||||
|
||||
if(hand)
|
||||
@@ -283,6 +250,8 @@ var/list/slot_equipment_priority = list( \
|
||||
if (W)
|
||||
W.attack_self(src)
|
||||
update_inv_r_hand()
|
||||
if(next_move < world.time)
|
||||
next_move = world.time + 2
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -568,9 +537,8 @@ var/list/slot_equipment_priority = list( \
|
||||
..()
|
||||
if(M != usr) return
|
||||
if(usr == src) return
|
||||
if(get_dist(usr,src) > 1) return
|
||||
if(!Adjacent(usr)) return
|
||||
if(istype(M,/mob/living/silicon/ai)) return
|
||||
if(LinkBlocked(usr.loc,loc)) return
|
||||
show_inv(usr)
|
||||
|
||||
|
||||
@@ -725,6 +693,15 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
else
|
||||
stat(null,"MasterController-ERROR")
|
||||
|
||||
if(listed_turf && client)
|
||||
if(get_dist(listed_turf,src) > 1)
|
||||
listed_turf = null
|
||||
else
|
||||
statpanel(listed_turf.name, null, listed_turf)
|
||||
for(var/atom/A in listed_turf)
|
||||
if(A.invisibility > see_invisible)
|
||||
continue
|
||||
statpanel(listed_turf.name, null, A)
|
||||
|
||||
if(spell_list && spell_list.len)
|
||||
for(var/obj/effect/proc_holder/spell/S in spell_list)
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
var/disabilities = 0 //Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/next_move = null
|
||||
var/prev_move = null
|
||||
var/monkeyizing = null //Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
@@ -116,7 +115,6 @@
|
||||
var/a_intent = "help"//Living
|
||||
var/m_int = null//Living
|
||||
var/m_intent = "run"//Living
|
||||
var/lastDblClick = 0
|
||||
var/lastKnownIP = null
|
||||
var/obj/structure/stool/bed/buckled = null//Living
|
||||
var/obj/item/l_hand = null//Living
|
||||
@@ -218,4 +216,4 @@
|
||||
|
||||
var/immune_to_ssd = 0
|
||||
|
||||
var/turf/listed_turf = null
|
||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
||||
|
||||
+139
-225
@@ -1,94 +1,75 @@
|
||||
#define UPGRADE_COOLDOWN 40
|
||||
#define UPGRADE_KILL_TIMER 100
|
||||
|
||||
/obj/item/weapon/grab
|
||||
name = "grab"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "grabbed"
|
||||
var/obj/screen/grab/hud1 = null
|
||||
flags = NOBLUDGEON
|
||||
var/obj/screen/grab/hud = null
|
||||
var/mob/affecting = null
|
||||
var/atom/movable/structure = null // if the grab is not grabbing a mob
|
||||
var/mob/assailant = null
|
||||
var/state = 1.0
|
||||
|
||||
var/killing = 0.0 // 1 = about to kill, 2 = killing
|
||||
var/kill_loc = null
|
||||
|
||||
var/allow_upgrade = 1.0
|
||||
var/last_suffocate = 1.0
|
||||
var/state = GRAB_PASSIVE
|
||||
var/allow_upgrade = 1
|
||||
var/last_upgrade = 0
|
||||
|
||||
layer = 21
|
||||
abstract = 1.0
|
||||
abstract = 1
|
||||
item_state = "nothing"
|
||||
w_class = 5.0
|
||||
|
||||
|
||||
/obj/item/weapon/grab/proc/throw()
|
||||
/obj/item/weapon/grab/New(mob/user, mob/victim)
|
||||
..()
|
||||
loc = user
|
||||
assailant = user
|
||||
affecting = victim
|
||||
|
||||
if(affecting)
|
||||
if(state >= 2)
|
||||
var/grabee = affecting
|
||||
spawn(1)
|
||||
del(src)
|
||||
return grabee
|
||||
else
|
||||
spawn(1)
|
||||
del(src)
|
||||
return null
|
||||
|
||||
else if(structure)
|
||||
var/grabee = structure
|
||||
spawn(1)
|
||||
del(src)
|
||||
return grabee
|
||||
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/weapon/grab/proc/synch()
|
||||
if(affecting)
|
||||
if(affecting.anchored)//This will prevent from grabbing people that are anchored.
|
||||
del(src)
|
||||
if (assailant.r_hand == src)
|
||||
hud1.screen_loc = ui_rhand
|
||||
else
|
||||
hud1.screen_loc = ui_lhand
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grab/process()
|
||||
if(!assailant || (!affecting && !structure))
|
||||
if(affecting.anchored)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(affecting && !structure)
|
||||
if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1))))
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else if(!affecting && structure)
|
||||
if (!isturf(structure.loc) || !isturf(structure.loc) || (assailant.loc != structure.loc && get_dist(assailant, structure) > 1))
|
||||
del(src)
|
||||
return
|
||||
hud = new /obj/screen/grab(src)
|
||||
hud.icon_state = "reinforce"
|
||||
hud.name = "reinforce grab"
|
||||
hud.master = src
|
||||
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
|
||||
/obj/item/weapon/grab/proc/throw()
|
||||
if(affecting)
|
||||
if(affecting.buckled)
|
||||
return null
|
||||
if(state >= GRAB_AGGRESSIVE)
|
||||
return affecting
|
||||
return null
|
||||
|
||||
if (assailant.client)
|
||||
assailant.client.screen -= hud1
|
||||
assailant.client.screen += hud1
|
||||
if (assailant.pulling == affecting || assailant.pulling == structure)
|
||||
//This makes sure that the grab screen object is displayed in the correct hand.
|
||||
/obj/item/weapon/grab/proc/synch()
|
||||
if(affecting)
|
||||
if(assailant.r_hand == src)
|
||||
hud.screen_loc = ui_rhand
|
||||
else
|
||||
hud.screen_loc = ui_lhand
|
||||
|
||||
|
||||
/obj/item/weapon/grab/process()
|
||||
confirm()
|
||||
|
||||
if(assailant.client)
|
||||
assailant.client.screen -= hud
|
||||
assailant.client.screen += hud
|
||||
|
||||
if(assailant.pulling == affecting)
|
||||
assailant.stop_pulling()
|
||||
|
||||
if (structure)
|
||||
structure.loc = assailant.loc
|
||||
structure.layer = assailant.layer + 1
|
||||
|
||||
if (state <= 2)
|
||||
if(state <= GRAB_AGGRESSIVE)
|
||||
allow_upgrade = 1
|
||||
if ((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
|
||||
if((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
|
||||
var/obj/item/weapon/grab/G = assailant.l_hand
|
||||
if (G.affecting != affecting)
|
||||
if(G.affecting != affecting)
|
||||
allow_upgrade = 0
|
||||
if ((assailant.r_hand && assailant.r_hand != src && istype(assailant.r_hand, /obj/item/weapon/grab)))
|
||||
if((assailant.r_hand && assailant.r_hand != src && istype(assailant.r_hand, /obj/item/weapon/grab)))
|
||||
var/obj/item/weapon/grab/G = assailant.r_hand
|
||||
if (G.affecting != affecting)
|
||||
if(G.affecting != affecting)
|
||||
allow_upgrade = 0
|
||||
if (state == 2)
|
||||
if(state == GRAB_AGGRESSIVE)
|
||||
var/h = affecting.hand
|
||||
affecting.hand = 0
|
||||
affecting.drop_item()
|
||||
@@ -96,185 +77,120 @@
|
||||
affecting.drop_item()
|
||||
affecting.hand = h
|
||||
for(var/obj/item/weapon/grab/G in affecting.grabbed_by)
|
||||
if (G.state == 2)
|
||||
if(G == src) continue
|
||||
if(G.state == GRAB_AGGRESSIVE)
|
||||
allow_upgrade = 0
|
||||
if (allow_upgrade)
|
||||
hud1.icon_state = "reinforce"
|
||||
if(allow_upgrade)
|
||||
hud.icon_state = "reinforce"
|
||||
else
|
||||
hud1.icon_state = "!reinforce"
|
||||
hud.icon_state = "!reinforce"
|
||||
else
|
||||
if (!( affecting.buckled ))
|
||||
if(!affecting.buckled)
|
||||
affecting.loc = assailant.loc
|
||||
if ((killing == 2 && state == 3))
|
||||
if(assailant.loc != kill_loc)
|
||||
assailant.visible_message("\red [assailant] lost \his tightened grip on [affecting]'s neck!")
|
||||
killing = 0
|
||||
hud1.icon_state = "disarm/kill"
|
||||
return
|
||||
if(state >= GRAB_NECK)
|
||||
affecting.Stun(5) //It will hamper your voice, being choked and all.
|
||||
if(isliving(affecting))
|
||||
var/mob/living/L = affecting
|
||||
L.adjustOxyLoss(1)
|
||||
|
||||
if(ishuman(affecting))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
var/datum/organ/external/head = H.get_organ("head")
|
||||
head.add_autopsy_data("Strangulation", 0)
|
||||
|
||||
affecting.Weaken(5) // Should keep you down unless you get help.
|
||||
affecting.Stun(5) // It will hamper your voice, being choked and all.
|
||||
if(state >= GRAB_KILL)
|
||||
affecting.Weaken(5) //Should keep you down unless you get help.
|
||||
affecting.losebreath = min(affecting.losebreath + 2, 3)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grab/proc/s_click(obj/screen/S as obj)
|
||||
if (!affecting)
|
||||
/obj/item/weapon/grab/proc/s_click(obj/screen/S)
|
||||
if(!affecting)
|
||||
return
|
||||
if(killing)
|
||||
if(state == GRAB_UPGRADING)
|
||||
return
|
||||
if (assailant.next_move > world.time)
|
||||
if(assailant.next_move > world.time)
|
||||
return
|
||||
if ((!( assailant.canmove ) || assailant.lying))
|
||||
//SN src = null
|
||||
if(world.time < (last_upgrade + UPGRADE_COOLDOWN))
|
||||
return
|
||||
if(!assailant.canmove || assailant.lying)
|
||||
del(src)
|
||||
return
|
||||
switch(S.id)
|
||||
if(1.0)
|
||||
if (state >= 3)
|
||||
if (!( killing ))
|
||||
assailant.visible_message("\red [assailant] has temporarily tightened \his grip on [affecting]!")
|
||||
//Foreach goto(97)
|
||||
assailant.next_move = world.time + 10
|
||||
//affecting.stunned = max(2, affecting.stunned)
|
||||
//affecting.paralysis = max(1, affecting.paralysis)
|
||||
affecting.losebreath = min(affecting.losebreath + 1, 3)
|
||||
last_suffocate = world.time
|
||||
flick("disarm/killf", S)
|
||||
last_upgrade = world.time
|
||||
|
||||
if(state < GRAB_AGGRESSIVE)
|
||||
if(!allow_upgrade)
|
||||
return
|
||||
assailant.visible_message("<span class='warning'>[assailant] has grabbed [affecting] aggressively (now hands)!</span>")
|
||||
state = GRAB_AGGRESSIVE
|
||||
icon_state = "grabbed1"
|
||||
else
|
||||
if(state < GRAB_NECK)
|
||||
if(isslime(affecting))
|
||||
assailant << "<span class='notice'>You squeeze [affecting], but nothing interesting happens.</span>"
|
||||
return
|
||||
|
||||
assailant.visible_message("<span class='warning'>[assailant] has reinforced \his grip on [affecting] (now neck)!</span>")
|
||||
state = GRAB_NECK
|
||||
icon_state = "grabbed+1"
|
||||
if(!affecting.buckled)
|
||||
affecting.loc = assailant.loc
|
||||
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>"
|
||||
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>"
|
||||
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
|
||||
hud.icon_state = "disarm/kill"
|
||||
hud.name = "disarm/kill"
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grab/proc/s_dbclick(obj/screen/S as obj)
|
||||
//if ((assailant.next_move > world.time && !( last_suffocate < world.time + 2 )))
|
||||
// return
|
||||
|
||||
if (!affecting)
|
||||
return
|
||||
if ((!( assailant.canmove ) || assailant.lying))
|
||||
del(src)
|
||||
return
|
||||
if(killing)
|
||||
return
|
||||
|
||||
switch(S.id)
|
||||
if(1.0)
|
||||
if (state < 2)
|
||||
if (!( allow_upgrade ))
|
||||
return
|
||||
assailant.visible_message("\red [assailant] has grabbed [affecting] aggressively (now hands)!")
|
||||
state = 2
|
||||
icon_state = "grabbed1"
|
||||
/*if (prob(75))
|
||||
for(var/mob/O in viewers(assailant, null))
|
||||
O.show_message(text("\red [] has grabbed [] aggressively (now hands)!", assailant, affecting), 1)
|
||||
state = 2
|
||||
icon_state = "grabbed1"
|
||||
else
|
||||
for(var/mob/O in viewers(assailant, null))
|
||||
O.show_message(text("\red [] has failed to grab [] aggressively!", assailant, affecting), 1)
|
||||
del(src)
|
||||
return*/
|
||||
else
|
||||
if (state < 3)
|
||||
if(istype(affecting, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
if(FAT in H.mutations)
|
||||
assailant << "\blue You can't strangle [affecting] through all that fat!"
|
||||
return
|
||||
|
||||
/*Hrm might want to add this back in
|
||||
//we should be able to strangle the Captain if he is wearing a hat
|
||||
for(var/obj/item/clothing/C in list(H.head, H.wear_suit, H.wear_mask, H.w_uniform))
|
||||
if(C.body_parts_covered & HEAD)
|
||||
assailant << "\blue You have to take off [affecting]'s [C.name] first!"
|
||||
return
|
||||
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space) || istype(H.wear_suit, /obj/item/clothing/suit/armor) || istype(H.wear_suit, /obj/item/clothing/suit/bio_suit) || istype(H.wear_suit, /obj/item/clothing/suit/swat_suit))
|
||||
assailant << "\blue You can't strangle [affecting] through their suit collar!"
|
||||
return
|
||||
*/
|
||||
|
||||
if(istype(affecting, /mob/living/carbon/slime))
|
||||
assailant << "\blue You squeeze [affecting], but nothing interesting happens."
|
||||
if(state < GRAB_UPGRADING)
|
||||
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
|
||||
hud.icon_state = "disarm/kill1"
|
||||
state = GRAB_UPGRADING
|
||||
if(do_after(assailant, UPGRADE_KILL_TIMER))
|
||||
if(state == GRAB_KILL)
|
||||
return
|
||||
if(!affecting)
|
||||
del(src)
|
||||
return
|
||||
if(!assailant.canmove || assailant.lying)
|
||||
del(src)
|
||||
return
|
||||
state = GRAB_KILL
|
||||
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
|
||||
affecting.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>"
|
||||
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
|
||||
log_attack("<font color='red'>[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
|
||||
|
||||
assailant.visible_message("\red [assailant] has reinforced \his grip on [affecting] (now neck)!")
|
||||
state = 3
|
||||
icon_state = "grabbed+1"
|
||||
if (!( affecting.buckled ))
|
||||
affecting.loc = assailant.loc
|
||||
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their neck grabbed by [assailant.name] ([assailant.ckey])</font>")
|
||||
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Grabbed the neck of [affecting.name] ([affecting.ckey])</font>")
|
||||
msg_admin_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[assailant.x];Y=[assailant.y];Z=[assailant.z]'>JMP</a>)")
|
||||
hud1.icon_state = "disarm/kill"
|
||||
hud1.name = "disarm/kill"
|
||||
else
|
||||
if (state >= 3 && !killing)
|
||||
assailant.visible_message("\red [assailant] starts to tighten \his grip on [affecting]'s neck!")
|
||||
hud1.icon_state = "disarm/kill1"
|
||||
killing = 1
|
||||
if(do_after(assailant, 40))
|
||||
if(killing == 2)
|
||||
return
|
||||
if(!affecting)
|
||||
del(src)
|
||||
return
|
||||
if ((!( assailant.canmove ) || assailant.lying))
|
||||
del(src)
|
||||
return
|
||||
killing = 2
|
||||
kill_loc = assailant.loc
|
||||
assailant.visible_message("\red [assailant] has tightened \his grip on [affecting]'s neck!")
|
||||
affecting.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])</font>")
|
||||
assailant.attack_log += text("\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>")
|
||||
msg_admin_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[assailant.x];Y=[assailant.y];Z=[assailant.z]'>JMP</a>)")
|
||||
|
||||
assailant.next_move = world.time + 10
|
||||
affecting.losebreath += 1
|
||||
else
|
||||
assailant.visible_message("\red [assailant] was unable to tighten \his grip on [affecting]'s neck!")
|
||||
killing = 0
|
||||
hud1.icon_state = "disarm/kill"
|
||||
return
|
||||
assailant.next_move = world.time + 10
|
||||
affecting.losebreath += 1
|
||||
else
|
||||
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
|
||||
hud.icon_state = "disarm/kill"
|
||||
state = GRAB_NECK
|
||||
|
||||
|
||||
/obj/item/weapon/grab/New(var/location, mob/user as mob, mob/affected as mob)
|
||||
..()
|
||||
src.loc = location
|
||||
src.assailant = user
|
||||
src.affecting = affected
|
||||
// HUD
|
||||
hud1 = new /obj/screen/grab( src )
|
||||
hud1.icon_state = "reinforce"
|
||||
hud1.name = "Reinforce Grab"
|
||||
hud1.id = 1
|
||||
hud1.master = src
|
||||
return
|
||||
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
|
||||
/obj/item/weapon/grab/proc/confirm()
|
||||
if(!assailant || !affecting)
|
||||
del(src)
|
||||
return 0
|
||||
|
||||
if(affecting)
|
||||
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1) )
|
||||
del(src)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/grab/attack(mob/M as mob, mob/user as mob)
|
||||
if(!affecting) return
|
||||
if (M == affecting)
|
||||
if (state < 3)
|
||||
s_dbclick(hud1)
|
||||
else
|
||||
s_click(hud1)
|
||||
/obj/item/weapon/grab/attack(mob/M, mob/user)
|
||||
if(!affecting)
|
||||
return
|
||||
if(M == assailant && state >= 2)
|
||||
if( ( ishuman(user) && (FAT in user.mutations) && iscarbon(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
|
||||
|
||||
if(M == affecting)
|
||||
s_click(hud)
|
||||
return
|
||||
if(M == assailant && state >= GRAB_AGGRESSIVE)
|
||||
if( (ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
|
||||
var/mob/living/carbon/attacker = user
|
||||
user.visible_message("\red <B>[user] is attempting to devour [affecting]!</B>")
|
||||
user.visible_message("<span class='danger'>[user] is attempting to devour [affecting]!</span>")
|
||||
if(istype(user, /mob/living/carbon/alien/humanoid/hunter))
|
||||
if(!do_mob(user, affecting)||!do_after(user, 30)) return
|
||||
else
|
||||
if(!do_mob(user, affecting)||!do_after(user, 100)) return
|
||||
user.visible_message("\red <B>[user] devours [affecting]!</B>")
|
||||
user.visible_message("<span class='danger'>[user] devours [affecting]!</span>")
|
||||
affecting.loc = user
|
||||
attacker.stomach_contents.Add(affecting)
|
||||
del(src)
|
||||
@@ -282,10 +198,8 @@
|
||||
|
||||
/obj/item/weapon/grab/dropped()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grab/Del()
|
||||
del(hud1)
|
||||
del(hud)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -363,57 +363,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
|
||||
return 0
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
set name = "F12"
|
||||
set hidden = 1
|
||||
|
||||
if(hud_used)
|
||||
if(ishuman(src))
|
||||
if(!src.client) return
|
||||
|
||||
if(hud_used.hud_shown)
|
||||
hud_used.hud_shown = 0
|
||||
if(src.hud_used.adding)
|
||||
src.client.screen -= src.hud_used.adding
|
||||
if(src.hud_used.other)
|
||||
src.client.screen -= src.hud_used.other
|
||||
if(src.hud_used.hotkeybuttons)
|
||||
src.client.screen -= src.hud_used.hotkeybuttons
|
||||
if(src.hud_used.item_action_list)
|
||||
src.client.screen -= src.hud_used.item_action_list
|
||||
|
||||
//Due to some poor coding some things need special treatment:
|
||||
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
|
||||
src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible
|
||||
src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible
|
||||
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
|
||||
src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
|
||||
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
|
||||
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
|
||||
|
||||
else
|
||||
hud_used.hud_shown = 1
|
||||
if(src.hud_used.adding)
|
||||
src.client.screen += src.hud_used.adding
|
||||
if(src.hud_used.other && src.hud_used.inventory_shown)
|
||||
src.client.screen += src.hud_used.other
|
||||
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
|
||||
src.client.screen += src.hud_used.hotkeybuttons
|
||||
|
||||
|
||||
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
|
||||
src.client.screen += src.zone_sel //This one is a special snowflake
|
||||
|
||||
hud_used.hidden_inventory_update()
|
||||
hud_used.persistant_inventory_update()
|
||||
update_action_buttons()
|
||||
else
|
||||
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
|
||||
else
|
||||
usr << "\red This mob type does not use a HUD."
|
||||
|
||||
//converts intent-strings into numbers and back
|
||||
var/list/intents = list("help","disarm","grab","hurt")
|
||||
/proc/intent_numeric(argument)
|
||||
@@ -459,3 +408,22 @@ var/list/intents = list("help","disarm","grab","hurt")
|
||||
hud_used.action_intent.icon_state = "harm"
|
||||
else
|
||||
hud_used.action_intent.icon_state = "help"
|
||||
|
||||
|
||||
/mob/living/carbon/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.sleeping)
|
||||
usr << "\red You are already sleeping"
|
||||
return
|
||||
else
|
||||
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
|
||||
usr.sleeping = 20 //Short nap
|
||||
|
||||
/mob/living/verb/lay_down()
|
||||
set name = "Rest"
|
||||
set category = "IC"
|
||||
|
||||
resting = !resting
|
||||
src << "\blue You are now [resting ? "resting" : "getting up"]"
|
||||
@@ -70,73 +70,9 @@
|
||||
set hidden = 1
|
||||
if(istype(mob, /mob/living/carbon))
|
||||
mob:swap_hand()
|
||||
if(istype(mob,/mob/living/silicon/robot))//Oh nested logic loops, is there anything you can't do? -Sieve
|
||||
if(istype(mob,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = mob
|
||||
if(!R.module_active)
|
||||
if(!R.module_state_1)
|
||||
if(!R.module_state_2)
|
||||
if(!R.module_state_3)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3 +a"
|
||||
R:module_active = R:module_state_3
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2 +a"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_2
|
||||
else
|
||||
R:inv1.icon_state = "inv1 +a"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_1
|
||||
else
|
||||
if(R.module_active == R.module_state_1)
|
||||
if(!R.module_state_2)
|
||||
if(!R.module_state_3)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3 +a"
|
||||
R:module_active = R:module_state_3
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2 +a"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_2
|
||||
else if(R.module_active == R.module_state_2)
|
||||
if(!R.module_state_3)
|
||||
if(!R.module_state_1)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1 +a"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_1
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3 +a"
|
||||
R:module_active = R:module_state_3
|
||||
else if(R.module_active == R.module_state_3)
|
||||
if(!R.module_state_1)
|
||||
if(!R.module_state_2)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2 +a"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_2
|
||||
else
|
||||
R:inv1.icon_state = "inv1 +a"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_1
|
||||
else
|
||||
return
|
||||
R.cycle_modules()
|
||||
return
|
||||
|
||||
|
||||
@@ -176,7 +112,7 @@
|
||||
|
||||
|
||||
/atom/movable/Move(NewLoc, direct)
|
||||
if (direct & direct - 1)
|
||||
if (direct & (direct - 1))
|
||||
if (direct & 1)
|
||||
if (direct & 4)
|
||||
if (step(src, NORTH))
|
||||
@@ -277,9 +213,12 @@
|
||||
|
||||
if(mob.restrained())//Why being pulled while cuffed prevents you from moving
|
||||
for(var/mob/M in range(mob, 1))
|
||||
if(M.pulling == mob && !M.restrained() && M.stat == 0 && M.canmove)
|
||||
src << "\blue You're restrained! You can't move!"
|
||||
return 0
|
||||
if(M.pulling == mob)
|
||||
if(!M.restrained() && M.stat == 0 && M.canmove && mob.Adjacent(M))
|
||||
src << "\blue You're restrained! You can't move!"
|
||||
return 0
|
||||
else
|
||||
M.stop_pulling()
|
||||
|
||||
if(mob.pinned.len)
|
||||
src << "\blue You're pinned to a wall by [mob.pinned[1]]!"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
/datum/hud/proc/unplayer_hud()
|
||||
return
|
||||
@@ -1,845 +0,0 @@
|
||||
/obj/screen
|
||||
name = ""
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
layer = 20.0
|
||||
unacidable = 1
|
||||
var/id = 0.0
|
||||
var/obj/master
|
||||
var/gun_click_time = -100 //I'm lazy.
|
||||
|
||||
/obj/screen/text
|
||||
icon = null
|
||||
icon_state = null
|
||||
mouse_opacity = 0
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
maptext_height = 480
|
||||
maptext_width = 480
|
||||
|
||||
/obj/screen/inventory
|
||||
var/slot_id
|
||||
|
||||
/obj/screen/close
|
||||
name = "close"
|
||||
master = null
|
||||
|
||||
/obj/screen/close/DblClick()
|
||||
if (src.master)
|
||||
src.master:close(usr)
|
||||
return
|
||||
|
||||
/obj/screen/item_action
|
||||
var/obj/item/owner
|
||||
|
||||
/obj/screen/item_action/DblClick()
|
||||
if(!usr || !owner)
|
||||
return
|
||||
|
||||
if(usr.stat || usr.restrained() || usr.stunned || usr.lying)
|
||||
return
|
||||
|
||||
if(!(owner in usr))
|
||||
return
|
||||
|
||||
spawn()
|
||||
owner.ui_action_click()
|
||||
switch(owner.icon_action_button)
|
||||
if("action_hardhat", "action_welding")
|
||||
usr.update_inv_head()
|
||||
if("action_welding_g")
|
||||
usr.update_inv_glasses()
|
||||
if("action_jetpack")
|
||||
usr.update_inv_back()
|
||||
|
||||
//This is the proc used to update all the action buttons. It just returns for all mob types except humans.
|
||||
/mob/proc/update_action_buttons()
|
||||
return
|
||||
|
||||
/obj/screen/grab
|
||||
name = "grab"
|
||||
master = null
|
||||
|
||||
/obj/screen/storage
|
||||
name = "storage"
|
||||
master = null
|
||||
|
||||
/obj/screen/storage/attack_hand(mob/user)
|
||||
if(master)
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if(I)
|
||||
master.attackby(I, user)
|
||||
|
||||
/obj/screen/zone_sel
|
||||
name = "Damage Zone"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "zone_sel"
|
||||
var/selecting = "chest"
|
||||
screen_loc = ui_zonesel
|
||||
|
||||
/obj/screen/gun
|
||||
name = "gun"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
master = null
|
||||
dir = 2
|
||||
|
||||
move
|
||||
name = "Allow Walking"
|
||||
icon_state = "no_walk0"
|
||||
screen_loc = ui_gun2
|
||||
|
||||
run
|
||||
name = "Allow Running"
|
||||
icon_state = "no_run0"
|
||||
screen_loc = ui_gun3
|
||||
|
||||
item
|
||||
name = "Allow Item Use"
|
||||
icon_state = "no_item0"
|
||||
screen_loc = ui_gun1
|
||||
|
||||
mode
|
||||
name = "Toggle Gun Mode"
|
||||
icon_state = "gun0"
|
||||
screen_loc = ui_gun_select
|
||||
//dir = 1
|
||||
|
||||
|
||||
/obj/screen/zone_sel/MouseDown(location, control,params)
|
||||
// Changes because of 4.0
|
||||
var/list/PL = params2list(params)
|
||||
var/icon_x = text2num(PL["icon-x"])
|
||||
var/icon_y = text2num(PL["icon-y"])
|
||||
|
||||
if (icon_y < 2)
|
||||
return
|
||||
else if (icon_y < 5)
|
||||
if ((icon_x > 9 && icon_x < 23))
|
||||
if (icon_x < 16)
|
||||
selecting = "r_foot"
|
||||
else
|
||||
selecting = "l_foot"
|
||||
else if (icon_y < 11)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 16)
|
||||
selecting = "r_leg"
|
||||
else
|
||||
selecting = "l_leg"
|
||||
else if (icon_y < 12)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 14)
|
||||
selecting = "r_leg"
|
||||
else if (icon_x < 19)
|
||||
selecting = "groin"
|
||||
else
|
||||
selecting = "l_leg"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 13)
|
||||
if ((icon_x > 7 && icon_x < 25))
|
||||
if (icon_x < 12)
|
||||
selecting = "r_hand"
|
||||
else if (icon_x < 13)
|
||||
selecting = "r_leg"
|
||||
else if (icon_x < 20)
|
||||
selecting = "groin"
|
||||
else if (icon_x < 21)
|
||||
selecting = "l_leg"
|
||||
else
|
||||
selecting = "l_hand"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 14)
|
||||
if ((icon_x > 7 && icon_x < 25))
|
||||
if (icon_x < 12)
|
||||
selecting = "r_hand"
|
||||
else if (icon_x < 21)
|
||||
selecting = "groin"
|
||||
else
|
||||
selecting = "l_hand"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 16)
|
||||
if ((icon_x > 7 && icon_x < 25))
|
||||
if (icon_x < 13)
|
||||
selecting = "r_hand"
|
||||
else if (icon_x < 20)
|
||||
selecting = "chest"
|
||||
else
|
||||
selecting = "l_hand"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 23)
|
||||
if ((icon_x > 7 && icon_x < 25))
|
||||
if (icon_x < 12)
|
||||
selecting = "r_arm"
|
||||
else if (icon_x < 21)
|
||||
selecting = "chest"
|
||||
else
|
||||
selecting = "l_arm"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 24)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
selecting = "chest"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 25)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 16)
|
||||
selecting = "head"
|
||||
else if (icon_x < 17)
|
||||
selecting = "mouth"
|
||||
else
|
||||
selecting = "head"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 26)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 15)
|
||||
selecting = "head"
|
||||
else if (icon_x < 18)
|
||||
selecting = "mouth"
|
||||
else
|
||||
selecting = "head"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 27)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 15)
|
||||
selecting = "head"
|
||||
else if (icon_x < 16)
|
||||
selecting = "eyes"
|
||||
else if (icon_x < 17)
|
||||
selecting = "mouth"
|
||||
else if (icon_x < 18)
|
||||
selecting = "eyes"
|
||||
else
|
||||
selecting = "head"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 28)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 14)
|
||||
selecting = "head"
|
||||
else if (icon_x < 19)
|
||||
selecting = "eyes"
|
||||
else
|
||||
selecting = "head"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 29)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
if (icon_x < 15)
|
||||
selecting = "head"
|
||||
else if (icon_x < 16)
|
||||
selecting = "eyes"
|
||||
else if (icon_x < 17)
|
||||
selecting = "head"
|
||||
else if (icon_x < 18)
|
||||
selecting = "eyes"
|
||||
else
|
||||
selecting = "head"
|
||||
else
|
||||
return
|
||||
else if (icon_y < 31)
|
||||
if ((icon_x > 11 && icon_x < 21))
|
||||
selecting = "head"
|
||||
else
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
overlays.Cut()
|
||||
overlays += image('icons/mob/zone_sel.dmi', "[selecting]")
|
||||
|
||||
return
|
||||
|
||||
/obj/screen/grab/Click()
|
||||
master:s_click(src)
|
||||
return
|
||||
|
||||
/obj/screen/grab/DblClick()
|
||||
master:s_dbclick(src)
|
||||
return
|
||||
|
||||
/obj/screen/grab/attack_hand()
|
||||
return
|
||||
|
||||
/obj/screen/grab/attackby()
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/screen/MouseEntered(object,location,control,params)
|
||||
if(!ishuman(usr) && !istype(usr,/mob/living/carbon/alien/humanoid) && !islarva(usr) && !ismonkey(usr))
|
||||
return
|
||||
switch(name)
|
||||
if("act_intent")
|
||||
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
|
||||
usr.hud_used.action_intent.icon_state = "intent_[usr.a_intent]"
|
||||
|
||||
/obj/screen/MouseExited(object,location,control,params)
|
||||
if(!ishuman(usr) && !istype(usr,/mob/living/carbon/alien/humanoid) && !islarva(usr) && !ismonkey(usr))
|
||||
return
|
||||
switch(name)
|
||||
if("act_intent")
|
||||
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
|
||||
var/intent = usr.a_intent
|
||||
if(intent == "hurt")
|
||||
intent = "harm" //hurt and harm have different sprite names for some reason.
|
||||
usr.hud_used.action_intent.icon_state = "[intent]"
|
||||
*/
|
||||
|
||||
/obj/screen/Click(location, control, params)
|
||||
if(!usr) return
|
||||
switch(name)
|
||||
if("map")
|
||||
usr.clearmap()
|
||||
|
||||
if("other")
|
||||
if (usr.hud_used.inventory_shown)
|
||||
usr.hud_used.inventory_shown = 0
|
||||
usr.client.screen -= usr.hud_used.other
|
||||
else
|
||||
usr.hud_used.inventory_shown = 1
|
||||
usr.client.screen += usr.hud_used.other
|
||||
|
||||
usr.hud_used.hidden_inventory_update()
|
||||
|
||||
if("equip")
|
||||
usr.quick_equip()
|
||||
|
||||
if("resist")
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.resist()
|
||||
|
||||
if("maprefresh")
|
||||
var/obj/machinery/computer/security/seccomp = usr.machine
|
||||
|
||||
if(seccomp!=null)
|
||||
seccomp.drawmap(usr)
|
||||
else
|
||||
usr.clearmap()
|
||||
|
||||
if("mov_intent")
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.legcuffed)
|
||||
C << "\red You are legcuffed! You cannot run until you get your cuffs removed!"
|
||||
C.m_intent = "walk" //Just incase
|
||||
C.hud_used.move_intent.icon_state = "walking"
|
||||
return
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
usr.m_intent = "walk"
|
||||
usr.hud_used.move_intent.icon_state = "walking"
|
||||
if("walk")
|
||||
usr.m_intent = "run"
|
||||
usr.hud_used.move_intent.icon_state = "running"
|
||||
if(istype(usr,/mob/living/carbon/alien/humanoid)) usr.update_icons()
|
||||
if("m_intent")
|
||||
if (!( usr.m_int ))
|
||||
switch(usr.m_intent)
|
||||
if("run")
|
||||
usr.m_int = "13,14"
|
||||
if("walk")
|
||||
usr.m_int = "14,14"
|
||||
if("face")
|
||||
usr.m_int = "15,14"
|
||||
else
|
||||
usr.m_int = null
|
||||
if("walk")
|
||||
usr.m_intent = "walk"
|
||||
usr.m_int = "14,14"
|
||||
if("face")
|
||||
usr.m_intent = "face"
|
||||
usr.m_int = "15,14"
|
||||
if("run")
|
||||
usr.m_intent = "run"
|
||||
usr.m_int = "13,14"
|
||||
if("Reset Machine")
|
||||
usr.unset_machine()
|
||||
if("internal")
|
||||
if (( !usr.stat && !usr.stunned && !usr.paralysis && !usr.restrained() ))
|
||||
if (usr.internal)
|
||||
usr.internal = null
|
||||
usr << "\blue No longer running on internals."
|
||||
if (usr.internals)
|
||||
usr.internals.icon_state = "internal0"
|
||||
else
|
||||
if(ishuman(usr))
|
||||
if (!( istype(usr.wear_mask, /obj/item/clothing/mask) ))
|
||||
usr << "\red You are not wearing a mask"
|
||||
return
|
||||
else
|
||||
if (ishuman(usr) && istype(usr:s_store, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:s_store] on your [usr:wear_suit]."
|
||||
usr.internal = usr:s_store
|
||||
else if (ishuman(usr) && istype(usr:belt, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:belt] on your belt."
|
||||
usr.internal = usr:belt
|
||||
else if (istype(usr:l_store, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:l_store] in your left pocket."
|
||||
usr.internal = usr:l_store
|
||||
else if (istype(usr:r_store, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:r_store] in your right pocket."
|
||||
usr.internal = usr:r_store
|
||||
else if (istype(usr.back, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr.back] on your back."
|
||||
usr.internal = usr.back
|
||||
else if (istype(usr.l_hand, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr.l_hand] on your left hand."
|
||||
usr.internal = usr.l_hand
|
||||
else if (istype(usr.r_hand, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr.r_hand] on your right hand."
|
||||
usr.internal = usr.r_hand
|
||||
if (usr.internal)
|
||||
//for(var/mob/M in viewers(usr, 1))
|
||||
// M.show_message(text("[] is now running on internals.", usr), 1)
|
||||
if (usr.internals)
|
||||
usr.internals.icon_state = "internal1"
|
||||
else
|
||||
usr << "\blue You don't have an oxygen tank."
|
||||
if("act_intent")
|
||||
if(issilicon(usr))
|
||||
if(usr.a_intent == "help")
|
||||
usr.a_intent = "hurt"
|
||||
usr.hud_used.action_intent.icon_state = "harm"
|
||||
else
|
||||
usr.a_intent = "help"
|
||||
usr.hud_used.action_intent.icon_state = "help"
|
||||
else
|
||||
usr.a_intent_change("right")
|
||||
if("help")
|
||||
usr.a_intent = "help"
|
||||
usr.hud_used.action_intent.icon_state = "intent_help"
|
||||
if("harm")
|
||||
usr.a_intent = "hurt"
|
||||
usr.hud_used.action_intent.icon_state = "intent_hurt"
|
||||
if("grab")
|
||||
usr.a_intent = "grab"
|
||||
usr.hud_used.action_intent.icon_state = "intent_grab"
|
||||
if("disarm")
|
||||
usr.a_intent = "disarm"
|
||||
usr.hud_used.action_intent.icon_state = "intent_disarm"
|
||||
if("pull")
|
||||
usr.stop_pulling()
|
||||
if("throw")
|
||||
if (!usr.stat && isturf(usr.loc) && !usr.restrained())
|
||||
usr:toggle_throw_mode()
|
||||
if("drop")
|
||||
usr.drop_item_v()
|
||||
if("swap")
|
||||
usr:swap_hand()
|
||||
if("hand")
|
||||
usr:swap_hand()
|
||||
if("r_hand")
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.activate_hand("r")
|
||||
if("l_hand")
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.activate_hand("l")
|
||||
if("module")
|
||||
if(issilicon(usr))
|
||||
if(usr:module)
|
||||
return
|
||||
usr:pick_module()
|
||||
|
||||
if("radio")
|
||||
if(issilicon(usr))
|
||||
usr:radio_menu()
|
||||
if("panel")
|
||||
if(issilicon(usr))
|
||||
usr:installed_modules()
|
||||
|
||||
if("store")
|
||||
if(issilicon(usr))
|
||||
usr:uneq_active()
|
||||
|
||||
if("module1")
|
||||
if(usr:module_state_1)
|
||||
if(usr:module_active != usr:module_state_1)
|
||||
usr:inv1.icon_state = "inv1 +a"
|
||||
usr:inv2.icon_state = "inv2"
|
||||
usr:inv3.icon_state = "inv3"
|
||||
usr:module_active = usr:module_state_1
|
||||
else
|
||||
usr:inv1.icon_state = "inv1"
|
||||
usr:module_active = null
|
||||
|
||||
if("module2")
|
||||
if(usr:module_state_2)
|
||||
if(usr:module_active != usr:module_state_2)
|
||||
usr:inv1.icon_state = "inv1"
|
||||
usr:inv2.icon_state = "inv2 +a"
|
||||
usr:inv3.icon_state = "inv3"
|
||||
usr:module_active = usr:module_state_2
|
||||
else
|
||||
usr:inv2.icon_state = "inv2"
|
||||
usr:module_active = null
|
||||
|
||||
if("module3")
|
||||
if(usr:module_state_3)
|
||||
if(usr:module_active != usr:module_state_3)
|
||||
usr:inv1.icon_state = "inv1"
|
||||
usr:inv2.icon_state = "inv2"
|
||||
usr:inv3.icon_state = "inv3 +a"
|
||||
usr:module_active = usr:module_state_3
|
||||
else
|
||||
usr:inv3.icon_state = "inv3"
|
||||
usr:module_active = null
|
||||
|
||||
if("Allow Walking")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Walking")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Running")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Running")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Item Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
|
||||
if("Disallow Item Use")
|
||||
if(gun_click_time > world.time - 30) //give them 3 seconds between mode changes.
|
||||
return
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Toggle Gun Mode")
|
||||
usr.client.ToggleGunMode()
|
||||
|
||||
else
|
||||
DblClick()
|
||||
return
|
||||
|
||||
/obj/screen/inventory/attack_hand(mob/user as mob)
|
||||
user.attack_ui(slot_id)
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
return
|
||||
|
||||
/obj/screen/inventory/attack_paw(mob/user as mob)
|
||||
user.attack_ui(slot_id)
|
||||
user.update_inv_l_hand(0)
|
||||
user.update_inv_r_hand()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.sleeping)
|
||||
usr << "\red You are already sleeping"
|
||||
return
|
||||
else
|
||||
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
|
||||
usr.sleeping = 20 //Short nap
|
||||
|
||||
/mob/living/verb/lay_down()
|
||||
set name = "Rest"
|
||||
set category = "IC"
|
||||
|
||||
resting = !resting
|
||||
src << "\blue You are now [resting ? "resting" : "getting up"]"
|
||||
|
||||
/mob/verb/quick_equip()
|
||||
set name = "quick-equip"
|
||||
set hidden = 1
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(!I)
|
||||
usr << "\blue You are not holding anything to equip."
|
||||
return
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.equip_to_appropriate_slot(I)
|
||||
H.update_inv_l_hand(0)
|
||||
H.update_inv_r_hand()
|
||||
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(usr) || usr.next_move > world.time)
|
||||
return
|
||||
usr.next_move = world.time + 20
|
||||
|
||||
var/mob/living/L = usr
|
||||
|
||||
//Resisting control by an alien mind.
|
||||
if(istype(src.loc,/mob/living/simple_animal/borer))
|
||||
var/mob/living/simple_animal/borer/B = src.loc
|
||||
var/mob/living/captive_brain/H = src
|
||||
|
||||
H << "\red <B>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</B>"
|
||||
B.host << "\red <B>You feel the captive mind of [src] begin to resist your control.</B>"
|
||||
|
||||
spawn(rand(350,450)+B.host.brainloss)
|
||||
|
||||
if(!B || !B.controlling)
|
||||
return
|
||||
|
||||
B.host.adjustBrainLoss(rand(5,10))
|
||||
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
|
||||
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
|
||||
B.controlling = 0
|
||||
|
||||
B.ckey = B.host.ckey
|
||||
B.host.ckey = H.ckey
|
||||
|
||||
H.ckey = null
|
||||
H.name = "host brain"
|
||||
H.real_name = "host brain"
|
||||
|
||||
verbs -= /mob/living/carbon/proc/release_control
|
||||
verbs -= /mob/living/carbon/proc/punish_host
|
||||
verbs -= /mob/living/carbon/proc/spawn_larvae
|
||||
|
||||
return
|
||||
|
||||
//resisting grabs (as if it helps anyone...)
|
||||
if ((!( L.stat ) && L.canmove && !( L.restrained() )))
|
||||
var/resisting = 0
|
||||
for(var/obj/O in L.requests)
|
||||
L.requests.Remove(O)
|
||||
del(O)
|
||||
resisting++
|
||||
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
|
||||
resisting++
|
||||
if (G.state == 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 2)
|
||||
if (prob(25))
|
||||
for(var/mob/O in viewers(L, null))
|
||||
O.show_message(text("\red [] has broken free of []'s grip!", L, G.assailant), 1)
|
||||
del(G)
|
||||
else
|
||||
if (G.state == 3)
|
||||
if (prob(5))
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red [] has broken free of []'s headlock!", L, G.assailant), 1)
|
||||
del(G)
|
||||
if(resisting)
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(text("\red <B>[] resists!</B>", L), 1)
|
||||
return
|
||||
|
||||
|
||||
//unbuckling yourself
|
||||
if(L.buckled && (L.last_special <= world.time) )
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
if( C.handcuffed )
|
||||
C.next_move = world.time + 100
|
||||
C.last_special = world.time + 100
|
||||
C << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(L))
|
||||
O.show_message("\red <B>[usr] attempts to unbuckle themself!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 1200))
|
||||
if(!C.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(C))
|
||||
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
|
||||
C << "\blue You successfully unbuckle yourself."
|
||||
C.buckled.manual_unbuckle(C)
|
||||
else
|
||||
L.buckled.manual_unbuckle(L)
|
||||
|
||||
//Breaking out of a locker?
|
||||
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
|
||||
var/obj/structure/closet/C = L.loc
|
||||
if(C.opened)
|
||||
return //Door's open... wait, why are you in it's contents then?
|
||||
if(istype(L.loc, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = L.loc
|
||||
if(!SC.locked && !SC.welded)
|
||||
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
|
||||
else
|
||||
if(!C.welded)
|
||||
return //closed but not welded...
|
||||
// else Meh, lets just keep it at 2 minutes for now
|
||||
// breakout_time++ //Harder to get out of welded lockers than locked lockers
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
usr.next_move = world.time + 100
|
||||
L.last_special = world.time + 100
|
||||
L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about [breakout_time] minutes)"
|
||||
for(var/mob/O in viewers(usr.loc))
|
||||
O.show_message("\red <B>The [L.loc] begins to shake violently!</B>", 1)
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
|
||||
if(!C || !L || L.stat != CONSCIOUS || L.loc != C || C.opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(istype(L.loc, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = L.loc
|
||||
if(!SC.locked && !SC.welded)
|
||||
return
|
||||
else
|
||||
if(!C.welded)
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
if(istype(usr.loc, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = L.loc
|
||||
SC.desc = "It appears to be broken."
|
||||
SC.icon_state = SC.icon_off
|
||||
flick(SC.icon_broken, SC)
|
||||
sleep(10)
|
||||
flick(SC.icon_broken, SC)
|
||||
sleep(10)
|
||||
SC.broken = 1
|
||||
SC.locked = 0
|
||||
usr << "\red You successfully break out!"
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("\red <B>\the [usr] successfully broke out of \the [SC]!</B>", 1)
|
||||
if(istype(SC.loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
var/obj/structure/bigDelivery/BD = SC.loc
|
||||
BD.attack_hand(usr)
|
||||
SC.open()
|
||||
else
|
||||
C.welded = 0
|
||||
usr << "\red You successfully break out!"
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("\red <B>\the [usr] successfully broke out of \the [C]!</B>", 1)
|
||||
if(istype(C.loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
|
||||
var/obj/structure/bigDelivery/BD = C.loc
|
||||
BD.attack_hand(usr)
|
||||
C.open()
|
||||
|
||||
//Stop drop and roll & Handcuffs
|
||||
else if(iscarbon(L))
|
||||
var/mob/living/carbon/CM = L
|
||||
if(CM.on_fire && CM.canmove)
|
||||
CM.fire_stacks -= 5
|
||||
CM.weakened = 5
|
||||
CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
|
||||
"<span class='notice'>You stop, drop, and roll!</span>")
|
||||
if(fire_stacks <= 0)
|
||||
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
|
||||
"<span class='notice'>You extinguish yourself.</span>")
|
||||
ExtinguishMob()
|
||||
return
|
||||
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", CM), 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, 50))
|
||||
if(!CM.handcuffed || CM.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", CM), 1)
|
||||
CM << "\red You successfully break your handcuffs."
|
||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
del(CM.handcuffed)
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
else
|
||||
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
|
||||
var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(!CM.handcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
|
||||
O.show_message("\red <B>[CM] manages to remove the handcuffs!</B>", 1)
|
||||
CM << "\blue You successfully remove \the [CM.handcuffed]."
|
||||
CM.handcuffed.loc = usr.loc
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
else if(CM.legcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
if(isalienadult(CM) || (HULK in usr.mutations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\red You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] is trying to break the legcuffs!</B>", CM), 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, 50))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message(text("\red <B>[] manages to break the legcuffs!</B>", CM), 1)
|
||||
CM << "\red You successfully break your legcuffs."
|
||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
del(CM.legcuffed)
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
else
|
||||
var/obj/item/weapon/legcuffs/HC = CM.legcuffed
|
||||
var/breakouttime = 1200 //A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/legcuffs type
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
if(istype(HC)) //If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to legcuff you with toilet paper in the future...
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)"
|
||||
for(var/mob/O in viewers(CM))
|
||||
O.show_message( "\red <B>[usr] attempts to remove \the [HC]!</B>", 1)
|
||||
spawn(0)
|
||||
if(do_after(CM, breakouttime))
|
||||
if(!CM.legcuffed || CM.buckled)
|
||||
return // time leniency for lag which also might make this whole thing pointless but the server
|
||||
for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink
|
||||
O.show_message("\red <B>[CM] manages to remove the legcuffs!</B>", 1)
|
||||
CM << "\blue You successfully remove \the [CM.legcuffed]."
|
||||
CM.legcuffed.loc = usr.loc
|
||||
CM.legcuffed = null
|
||||
CM.update_inv_legcuffed()
|
||||
@@ -467,7 +467,8 @@
|
||||
organ= new /obj/item/weapon/organ/head(owner.loc, owner)
|
||||
owner.u_equip(owner.glasses)
|
||||
owner.u_equip(owner.head)
|
||||
owner.u_equip(owner.ears)
|
||||
owner.u_equip(owner.l_ear)
|
||||
owner.u_equip(owner.r_ear)
|
||||
owner.u_equip(owner.wear_mask)
|
||||
if(ARM_RIGHT)
|
||||
if(status & ORGAN_ROBOT)
|
||||
|
||||
@@ -66,6 +66,22 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/filingcabinet/attack_tk(mob/user)
|
||||
if(anchored)
|
||||
attack_self_tk(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/attack_self_tk(mob/user)
|
||||
if(contents.len)
|
||||
if(prob(40 + contents.len * 5))
|
||||
var/obj/item/I = pick(contents)
|
||||
I.loc = loc
|
||||
if(prob(25))
|
||||
step_rand(I)
|
||||
user << "<span class='notice'>You pull \a [I] out of [src] at random.</span>"
|
||||
return
|
||||
user << "<span class='notice'>You find nothing in [src].</span>"
|
||||
|
||||
/obj/structure/filingcabinet/Topic(href, href_list)
|
||||
if(href_list["retrieve"])
|
||||
@@ -88,7 +104,7 @@
|
||||
var/virgin = 1
|
||||
|
||||
|
||||
/obj/structure/filingcabinet/security/attack_hand(mob/user as mob)
|
||||
/obj/structure/filingcabinet/security/proc/populate()
|
||||
if(virgin)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
var/datum/data/record/S
|
||||
@@ -110,6 +126,13 @@
|
||||
//before the records have been generated, so we do this inside the loop.
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/security/attack_hand()
|
||||
populate()
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/security/attack_tk()
|
||||
populate()
|
||||
..()
|
||||
|
||||
/*
|
||||
* Medical Record Cabinets
|
||||
@@ -117,7 +140,7 @@
|
||||
/obj/structure/filingcabinet/medical
|
||||
var/virgin = 1
|
||||
|
||||
/obj/structure/filingcabinet/medical/attack_hand(mob/user as mob)
|
||||
/obj/structure/filingcabinet/medical/proc/populate()
|
||||
if(virgin)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
var/datum/data/record/M
|
||||
@@ -138,3 +161,11 @@
|
||||
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
|
||||
//before the records have been generated, so we do this inside the loop.
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/medical/attack_hand()
|
||||
populate()
|
||||
..()
|
||||
|
||||
/obj/structure/filingcabinet/medical/attack_tk()
|
||||
populate()
|
||||
..()
|
||||
@@ -7,7 +7,8 @@
|
||||
var/labels_left = 30
|
||||
var/mode = 0 //off or on.
|
||||
|
||||
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob)
|
||||
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(!mode) //if it's off, give up.
|
||||
return
|
||||
if(A == loc) // if placing the labeller into something (e.g. backpack)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
icon_state = "camera"
|
||||
item_state = "electropack"
|
||||
w_class = 2.0
|
||||
flags = FPRINT | CONDUCT | USEDELAY | TABLEPASS
|
||||
flags = FPRINT | CONDUCT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 2000
|
||||
var/pictures_max = 10
|
||||
@@ -273,7 +273,7 @@
|
||||
icon_state = "videocam"
|
||||
item_state = "videocam"
|
||||
w_class = 2.0
|
||||
flags = FPRINT | CONDUCT | USEDELAY | TABLEPASS
|
||||
flags = FPRINT | CONDUCT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 2000
|
||||
var/on = 0
|
||||
|
||||
@@ -529,11 +529,6 @@
|
||||
if(stat & (BROKEN|MAINT))
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("APC",src,user:wear_suit)
|
||||
return
|
||||
|
||||
// do APC interaction
|
||||
user.set_machine(src)
|
||||
src.interact(user)
|
||||
|
||||
@@ -67,11 +67,8 @@
|
||||
/obj/structure/cable/proc/get_powernet() //TODO: remove this as it is obsolete
|
||||
return powernet
|
||||
|
||||
/obj/structure/cable/attack_hand(mob/user)
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("WIRE",src,user:wear_suit)
|
||||
/obj/structure/cable/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
@@ -168,7 +165,7 @@
|
||||
throw_range = 5
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT
|
||||
flags = TABLEPASS | FPRINT | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
item_state = "coil_red"
|
||||
attack_verb = list("whipped", "lashed", "disciplined", "flogged")
|
||||
|
||||
@@ -69,8 +69,11 @@
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CELL",src,user:wear_suit)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/clothing/gloves/space_ninja/SNG = H.gloves
|
||||
if(!istype(SNG) || !SNG.candrain || !SNG.draining) return
|
||||
|
||||
SNG.drain("CELL",src,H.wear_suit)
|
||||
return
|
||||
|
||||
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)
|
||||
|
||||
@@ -501,9 +501,14 @@
|
||||
|
||||
if(prot > 0 || (COLD_RESISTANCE in user.mutations))
|
||||
user << "You remove the light [fitting]"
|
||||
else if(TK in user.mutations)
|
||||
user << "You telekinetically remove the light [fitting]."
|
||||
else
|
||||
user << "You try to remove the light [fitting], but it's too hot and you don't want to burn your hand."
|
||||
return // if burned, don't remove the light
|
||||
else
|
||||
user << "You remove the light [fitting]."
|
||||
|
||||
|
||||
// create a light tube/bulb item and put it in the user's hand
|
||||
var/obj/item/weapon/light/L = new light_type()
|
||||
@@ -525,6 +530,29 @@
|
||||
|
||||
// break the light and make sparks if was on
|
||||
|
||||
/obj/machinery/light/attack_tk(mob/user)
|
||||
if(status == LIGHT_EMPTY)
|
||||
user << "There is no [fitting] in this light."
|
||||
return
|
||||
|
||||
user << "You telekinetically remove the light [fitting]."
|
||||
// create a light tube/bulb item and put it in the user's hand
|
||||
var/obj/item/weapon/light/L = new light_type()
|
||||
L.status = status
|
||||
L.rigged = rigged
|
||||
L.brightness = brightness
|
||||
|
||||
// light item inherits the switchcount, then zero it
|
||||
L.switchcount = switchcount
|
||||
switchcount = 0
|
||||
|
||||
L.update()
|
||||
L.add_fingerprint(user)
|
||||
L.loc = loc
|
||||
|
||||
status = LIGHT_EMPTY
|
||||
update()
|
||||
|
||||
/obj/machinery/light/proc/broken(var/skip_sound_and_sparks = 0)
|
||||
if(status == LIGHT_EMPTY)
|
||||
return
|
||||
@@ -706,7 +734,8 @@
|
||||
// shatter light, unless it was an attempt to put it in a light socket
|
||||
// now only shatter if the intent was harm
|
||||
|
||||
/obj/item/weapon/light/afterattack(atom/target, mob/user)
|
||||
/obj/item/weapon/light/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(target, /obj/machinery/light))
|
||||
return
|
||||
if(user.a_intent != "hurt")
|
||||
|
||||
@@ -188,11 +188,6 @@
|
||||
add_fingerprint(user)
|
||||
if(stat & BROKEN) return
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("SMES",src,user:wear_suit)
|
||||
return
|
||||
|
||||
interact(user)
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "detective"
|
||||
item_state = "gun"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 2000
|
||||
w_class = 3.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
origin_tech = "combat=2;magnets=4"
|
||||
w_class = 4.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
charge_cost = 100
|
||||
projectile_type = "/obj/item/projectile/ion"
|
||||
@@ -33,7 +33,7 @@ obj/item/weapon/gun/energy/staff
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
charge_cost = 200
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow-solid"
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
|
||||
w_class = 3.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "pneumatic"
|
||||
item_state = "pneumatic"
|
||||
w_class = 5.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 20
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
max_shells = 4
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
caliber = "shotgun"
|
||||
origin_tech = "combat=4;materials=2"
|
||||
@@ -66,7 +66,7 @@
|
||||
max_shells = 2
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
caliber = "shotgun"
|
||||
origin_tech = "combat=3;materials=1"
|
||||
|
||||
@@ -65,7 +65,8 @@
|
||||
return 0
|
||||
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
|
||||
@@ -96,15 +96,9 @@
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user , flag)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user, proximity)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/examine()
|
||||
set src in view()
|
||||
..()
|
||||
@@ -1337,7 +1331,8 @@
|
||||
..()
|
||||
reagents.add_reagent("nutriment",10)
|
||||
|
||||
afterattack(obj/O as obj, mob/user as mob)
|
||||
afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(O,/obj/structure/sink) && !wrapped)
|
||||
user << "You place [name] under a stream of water..."
|
||||
loc = get_turf(O)
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
flags |= OPENCONTAINER
|
||||
update_icon()
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if (!is_open_container())
|
||||
return
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
|
||||
return 0
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
|
||||
flags = TABLEPASS|OPENCONTAINER|FPRINT|NOBLUDGEON
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = 2.0
|
||||
@@ -248,7 +248,8 @@
|
||||
reagents.add_reagent("plantbgone", 100)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray
|
||||
return
|
||||
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(!target.reagents) return
|
||||
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (istype(mover,/obj/item) && mover.throwing)
|
||||
var/obj/item/I = mover
|
||||
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
|
||||
if(istype(I, /obj/item/projectile))
|
||||
return
|
||||
if(prob(75))
|
||||
I.loc = src
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/obj/wrapped = null
|
||||
density = 1
|
||||
var/sortTag = 0
|
||||
flags = FPRINT
|
||||
flags = FPRINT | NOBLUDGEON
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
@@ -88,11 +88,11 @@
|
||||
var/amount = 25.0
|
||||
|
||||
|
||||
afterattack(var/obj/target as obj, mob/user as mob)
|
||||
afterattack(var/obj/target as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(!istype(target)) //this really shouldn't be necessary (but it is). -Pete
|
||||
return
|
||||
if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) \
|
||||
|| istype(target, /obj/item/smallDelivery) || istype(target,/obj/structure/bigDelivery) \
|
||||
if(istype(target, /obj/item/smallDelivery) || istype(target,/obj/structure/bigDelivery) \
|
||||
|| istype(target, /obj/item/weapon/gift) || istype(target, /obj/item/weapon/evidencebag))
|
||||
return
|
||||
if(target.anchored)
|
||||
@@ -218,7 +218,7 @@
|
||||
return
|
||||
|
||||
Bumped(var/atom/movable/AM) //Go straight into the chute
|
||||
if(istype(AM, /obj/item/projectile) || istype(AM, /obj/item/weapon/dummy)) return
|
||||
if(istype(AM, /obj/item/projectile)) return
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
if(AM.loc.y != src.loc.y+1) return
|
||||
|
||||
@@ -101,7 +101,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
user << "\The [name] must be linked to an R&D console first!"
|
||||
return 1
|
||||
if (O.is_open_container())
|
||||
return 1
|
||||
return
|
||||
if (!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium))
|
||||
user << "\red You cannot insert this item into the [name]!"
|
||||
return 1
|
||||
|
||||
@@ -55,7 +55,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
if (O.is_open_container())
|
||||
return 1
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (!opened)
|
||||
opened = 1
|
||||
|
||||
@@ -565,11 +565,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("RESEARCH",src,user:wear_suit)
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
files.RefreshResearch()
|
||||
|
||||
@@ -155,10 +155,6 @@
|
||||
if (shocked)
|
||||
shock(user,50)
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("RESEARCH",src,user:wear_suit)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
icon_state = "health"
|
||||
w_class = 2.0
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
|
||||
|
||||
/obj/item/device/antibody_scanner/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user