mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
More than 2 hands!? WHAAAAAAT
This commit is contained in:
@@ -17,25 +17,25 @@
|
|||||||
#define slot_back 1
|
#define slot_back 1
|
||||||
#define slot_wear_mask 2
|
#define slot_wear_mask 2
|
||||||
#define slot_handcuffed 3
|
#define slot_handcuffed 3
|
||||||
#define slot_l_hand 4
|
#define slot_hands 4 //wherever you provide a slot for hands you provide slot_hands AND a hand index (1 to held_items.len)
|
||||||
#define slot_r_hand 5
|
//there are various helper procs to find an appropriate index
|
||||||
#define slot_belt 6
|
#define slot_belt 5
|
||||||
#define slot_wear_id 7
|
#define slot_wear_id 6
|
||||||
#define slot_ears 8
|
#define slot_ears 7
|
||||||
#define slot_glasses 9
|
#define slot_glasses 8
|
||||||
#define slot_gloves 10
|
#define slot_gloves 9
|
||||||
#define slot_head 11
|
#define slot_head 10
|
||||||
#define slot_shoes 12
|
#define slot_shoes 11
|
||||||
#define slot_wear_suit 13
|
#define slot_wear_suit 12
|
||||||
#define slot_w_uniform 14
|
#define slot_w_uniform 13
|
||||||
#define slot_l_store 15
|
#define slot_l_store 14
|
||||||
#define slot_r_store 16
|
#define slot_r_store 15
|
||||||
#define slot_s_store 17
|
#define slot_s_store 16
|
||||||
#define slot_in_backpack 18
|
#define slot_in_backpack 17
|
||||||
#define slot_legcuffed 19
|
#define slot_legcuffed 18
|
||||||
#define slot_generic_dextrous_storage 20
|
#define slot_generic_dextrous_storage 19
|
||||||
|
|
||||||
#define slots_amt 20 // Keep this up to date!
|
#define slots_amt 19 // Keep this up to date!
|
||||||
|
|
||||||
//I hate that this has to exist
|
//I hate that this has to exist
|
||||||
/proc/slotdefine2slotbit(slotdefine) //Keep this up to date with the value of SLOT BITMASKS and SLOTS (the two define sections above)
|
/proc/slotdefine2slotbit(slotdefine) //Keep this up to date with the value of SLOT BITMASKS and SLOTS (the two define sections above)
|
||||||
|
|||||||
@@ -30,33 +30,32 @@
|
|||||||
#define FRIDAY_13TH "Friday the 13th"
|
#define FRIDAY_13TH "Friday the 13th"
|
||||||
|
|
||||||
//Human Overlays Indexes/////////
|
//Human Overlays Indexes/////////
|
||||||
#define MUTATIONS_LAYER 26 //mutations. Tk headglows, cold resistance glow, etc
|
#define MUTATIONS_LAYER 25 //mutations. Tk headglows, cold resistance glow, etc
|
||||||
#define BODY_BEHIND_LAYER 25 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
#define BODY_BEHIND_LAYER 24 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
||||||
#define BODYPARTS_LAYER 24 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
|
#define BODYPARTS_LAYER 23 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
|
||||||
#define BODY_ADJ_LAYER 23 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
#define BODY_ADJ_LAYER 22 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
||||||
#define BODY_LAYER 22 //underwear, undershirts, socks, eyes, lips(makeup)
|
#define BODY_LAYER 21 //underwear, undershirts, socks, eyes, lips(makeup)
|
||||||
#define FRONT_MUTATIONS_LAYER 21 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
#define FRONT_MUTATIONS_LAYER 20 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||||
#define DAMAGE_LAYER 20 //damage indicators (cuts and burns)
|
#define DAMAGE_LAYER 19 //damage indicators (cuts and burns)
|
||||||
#define UNIFORM_LAYER 19
|
#define UNIFORM_LAYER 18
|
||||||
#define ID_LAYER 18
|
#define ID_LAYER 17
|
||||||
#define SHOES_LAYER 17
|
#define SHOES_LAYER 16
|
||||||
#define GLOVES_LAYER 16
|
#define GLOVES_LAYER 15
|
||||||
#define EARS_LAYER 15
|
#define EARS_LAYER 14
|
||||||
#define SUIT_LAYER 14
|
#define SUIT_LAYER 13
|
||||||
#define GLASSES_LAYER 13
|
#define GLASSES_LAYER 12
|
||||||
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
|
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
|
||||||
#define SUIT_STORE_LAYER 11
|
#define SUIT_STORE_LAYER 10
|
||||||
#define BACK_LAYER 10
|
#define BACK_LAYER 9
|
||||||
#define HAIR_LAYER 9 //TODO: make part of head layer?
|
#define HAIR_LAYER 8 //TODO: make part of head layer?
|
||||||
#define FACEMASK_LAYER 8
|
#define FACEMASK_LAYER 7
|
||||||
#define HEAD_LAYER 7
|
#define HEAD_LAYER 6
|
||||||
#define HANDCUFF_LAYER 6
|
#define HANDCUFF_LAYER 5
|
||||||
#define LEGCUFF_LAYER 5
|
#define LEGCUFF_LAYER 4
|
||||||
#define L_HAND_LAYER 4
|
#define HANDS_LAYER 3
|
||||||
#define R_HAND_LAYER 3 //Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands
|
|
||||||
#define BODY_FRONT_LAYER 2
|
#define BODY_FRONT_LAYER 2
|
||||||
#define FIRE_LAYER 1 //If you're on fire
|
#define FIRE_LAYER 1 //If you're on fire
|
||||||
#define TOTAL_LAYERS 26 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
#define TOTAL_LAYERS 25 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||||
|
|
||||||
//Human Overlay Index Shortcuts for alternate_worn_layer, layers
|
//Human Overlay Index Shortcuts for alternate_worn_layer, layers
|
||||||
//Because I *KNOW* somebody will think layer+1 means "above"
|
//Because I *KNOW* somebody will think layer+1 means "above"
|
||||||
@@ -82,8 +81,7 @@
|
|||||||
#define UNDER_HEAD_LAYER HEAD_LAYER+1
|
#define UNDER_HEAD_LAYER HEAD_LAYER+1
|
||||||
#define UNDER_HANDCUFF_LAYER HANDCUFF_LAYER+1
|
#define UNDER_HANDCUFF_LAYER HANDCUFF_LAYER+1
|
||||||
#define UNDER_LEGCUFF_LAYER LEGCUFF_LAYER+1
|
#define UNDER_LEGCUFF_LAYER LEGCUFF_LAYER+1
|
||||||
#define UNDER_L_HAND_LAYER L_HAND_LAYER+1
|
#define UNDER_HANDS_LAYER HANDS_LAYER+1
|
||||||
#define UNDER_R_HAND_LAYER R_HAND_LAYER+1
|
|
||||||
#define UNDER_BODY_FRONT_LAYER BODY_FRONT_LAYER+1
|
#define UNDER_BODY_FRONT_LAYER BODY_FRONT_LAYER+1
|
||||||
#define UNDER_FIRE_LAYER FIRE_LAYER+1
|
#define UNDER_FIRE_LAYER FIRE_LAYER+1
|
||||||
|
|
||||||
@@ -109,8 +107,7 @@
|
|||||||
#define ABOVE_HEAD_LAYER HEAD_LAYER-1
|
#define ABOVE_HEAD_LAYER HEAD_LAYER-1
|
||||||
#define ABOVE_HANDCUFF_LAYER HANDCUFF_LAYER-1
|
#define ABOVE_HANDCUFF_LAYER HANDCUFF_LAYER-1
|
||||||
#define ABOVE_LEGCUFF_LAYER LEGCUFF_LAYER-1
|
#define ABOVE_LEGCUFF_LAYER LEGCUFF_LAYER-1
|
||||||
#define ABOVE_L_HAND_LAYER L_HAND_LAYER-1
|
#define ABOVE_HANDS_LAYER HANDS_LAYER-1
|
||||||
#define ABOVE_R_HAND_LAYER R_HAND_LAYER-1
|
|
||||||
#define ABOVE_BODY_FRONT_LAYER BODY_FRONT_LAYER-1
|
#define ABOVE_BODY_FRONT_LAYER BODY_FRONT_LAYER-1
|
||||||
#define ABOVE_FIRE_LAYER FIRE_LAYER-1
|
#define ABOVE_FIRE_LAYER FIRE_LAYER-1
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ Proc for attack log creation, because really why not
|
|||||||
|
|
||||||
var/target_loc = target.loc
|
var/target_loc = target.loc
|
||||||
|
|
||||||
var/holding = user.get_active_hand()
|
var/holding = user.get_active_held_item()
|
||||||
var/datum/progressbar/progbar
|
var/datum/progressbar/progbar
|
||||||
if (progress)
|
if (progress)
|
||||||
progbar = new(user, time, target)
|
progbar = new(user, time, target)
|
||||||
@@ -213,7 +213,7 @@ Proc for attack log creation, because really why not
|
|||||||
drifting = 0
|
drifting = 0
|
||||||
user_loc = user.loc
|
user_loc = user.loc
|
||||||
|
|
||||||
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
|
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying )
|
||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
if (progress)
|
if (progress)
|
||||||
@@ -233,7 +233,7 @@ Proc for attack log creation, because really why not
|
|||||||
if(!user.Process_Spacemove(0) && user.inertia_dir)
|
if(!user.Process_Spacemove(0) && user.inertia_dir)
|
||||||
drifting = 1
|
drifting = 1
|
||||||
|
|
||||||
var/holding = user.get_active_hand()
|
var/holding = user.get_active_held_item()
|
||||||
|
|
||||||
var/holdingnull = 1 //User's hand started out empty, check for an empty hand
|
var/holdingnull = 1 //User's hand started out empty, check for an empty hand
|
||||||
if(holding)
|
if(holding)
|
||||||
@@ -270,7 +270,7 @@ Proc for attack log creation, because really why not
|
|||||||
if(!holding)
|
if(!holding)
|
||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
if(user.get_active_hand() != holding)
|
if(user.get_active_held_item() != holding)
|
||||||
. = 0
|
. = 0
|
||||||
break
|
break
|
||||||
if (progress)
|
if (progress)
|
||||||
@@ -291,7 +291,7 @@ Proc for attack log creation, because really why not
|
|||||||
for(var/atom/target in targets)
|
for(var/atom/target in targets)
|
||||||
originalloc[target] = target.loc
|
originalloc[target] = target.loc
|
||||||
|
|
||||||
var/holding = user.get_active_hand()
|
var/holding = user.get_active_held_item()
|
||||||
var/datum/progressbar/progbar
|
var/datum/progressbar/progbar
|
||||||
if(progress)
|
if(progress)
|
||||||
progbar = new(user, time, targets[1])
|
progbar = new(user, time, targets[1])
|
||||||
@@ -315,7 +315,7 @@ Proc for attack log creation, because really why not
|
|||||||
user_loc = user.loc
|
user_loc = user.loc
|
||||||
|
|
||||||
for(var/atom/target in targets)
|
for(var/atom/target in targets)
|
||||||
if((!drifting && user_loc != user.loc) || originalloc[target] != target.loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
|
if((!drifting && user_loc != user.loc) || originalloc[target] != target.loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying )
|
||||||
. = 0
|
. = 0
|
||||||
break mainloop
|
break mainloop
|
||||||
if(progbar)
|
if(progbar)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
/mob/living/carbon/CanMobAutoclick(atom/object, location, params)
|
/mob/living/carbon/CanMobAutoclick(atom/object, location, params)
|
||||||
if(!object.IsAutoclickable())
|
if(!object.IsAutoclickable())
|
||||||
return
|
return
|
||||||
var/obj/item/h = get_active_hand()
|
var/obj/item/h = get_active_held_item()
|
||||||
if(h)
|
if(h)
|
||||||
. = h.CanItemAutoclick(object, location, params)
|
. = h.CanItemAutoclick(object, location, params)
|
||||||
|
|
||||||
|
|||||||
@@ -98,16 +98,12 @@
|
|||||||
throw_item(A)
|
throw_item(A)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/W = get_active_hand()
|
var/obj/item/W = get_active_held_item()
|
||||||
|
|
||||||
|
|
||||||
if(W == A)
|
if(W == A)
|
||||||
W.attack_self(src)
|
W.attack_self(src)
|
||||||
if(hand)
|
update_inv_hands()
|
||||||
update_inv_l_hand(0)
|
|
||||||
else
|
|
||||||
update_inv_r_hand(0)
|
|
||||||
return
|
|
||||||
|
|
||||||
// operate three levels deep here (item in backpack in src; item in box in backpack in src, not any deeper)
|
// operate three levels deep here (item in backpack in src; item in box in backpack in src, not any deeper)
|
||||||
if(A.ClickAccessible(src, depth=INVENTORY_DEPTH))
|
if(A.ClickAccessible(src, depth=INVENTORY_DEPTH))
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
aicamera.captureimage(A, usr)
|
aicamera.captureimage(A, usr)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/W = get_active_hand()
|
var/obj/item/W = get_active_held_item()
|
||||||
|
|
||||||
// Cyborgs have no range-checking unless there is item use
|
// Cyborgs have no range-checking unless there is item use
|
||||||
if(!W)
|
if(!W)
|
||||||
|
|||||||
@@ -33,11 +33,21 @@
|
|||||||
#define ui_id "CENTER-4:12,SOUTH:5"
|
#define ui_id "CENTER-4:12,SOUTH:5"
|
||||||
#define ui_belt "CENTER-3:14,SOUTH:5"
|
#define ui_belt "CENTER-3:14,SOUTH:5"
|
||||||
#define ui_back "CENTER-2:14,SOUTH:5"
|
#define ui_back "CENTER-2:14,SOUTH:5"
|
||||||
#define ui_rhand "CENTER:-16,SOUTH:5"
|
|
||||||
#define ui_lhand "CENTER: 16,SOUTH:5"
|
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
|
||||||
#define ui_equip "CENTER:-16,SOUTH+1:5"
|
var/x_off = -(!(i % 2))
|
||||||
#define ui_swaphand1 "CENTER:-16,SOUTH+1:5"
|
var/y_off = round((i-1) / 2)
|
||||||
#define ui_swaphand2 "CENTER: 16,SOUTH+1:5"
|
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"
|
||||||
|
|
||||||
|
/proc/ui_equip_position(mob/M)
|
||||||
|
var/y_off = round((M.held_items.len-1) / 2) //values based on old equip ui position (CENTER: +/-16,SOUTH+1:5)
|
||||||
|
return "CENTER:-16,SOUTH+[y_off+1]:5"
|
||||||
|
|
||||||
|
/proc/ui_swaphand_position(mob/M, which = 1) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
|
||||||
|
var/x_off = which == 1 ? -1 : 0
|
||||||
|
var/y_off = round((M.held_items.len-1) / 2)
|
||||||
|
return "CENTER+[x_off]:16,SOUTH+[y_off+1]:5"
|
||||||
|
|
||||||
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
||||||
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
||||||
|
|
||||||
@@ -141,3 +151,4 @@
|
|||||||
#define ui_deityhealth "EAST-1:28,CENTER-2:13"
|
#define ui_deityhealth "EAST-1:28,CENTER-2:13"
|
||||||
#define ui_deitypower "EAST-1:28,CENTER-1:15"
|
#define ui_deitypower "EAST-1:28,CENTER-1:15"
|
||||||
#define ui_deityfollowers "EAST-1:28,CENTER:17"
|
#define ui_deityfollowers "EAST-1:28,CENTER:17"
|
||||||
|
|
||||||
|
|||||||
@@ -39,39 +39,24 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
var/obj/screen/using
|
var/obj/screen/using
|
||||||
var/obj/screen/inventory/inv_box
|
|
||||||
|
|
||||||
//equippable shit
|
//equippable shit
|
||||||
|
|
||||||
//hands
|
//hands
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
build_hand_slots('icons/mob/screen_alien.dmi')
|
||||||
inv_box.name = "right hand"
|
|
||||||
inv_box.icon = 'icons/mob/screen_alien.dmi'
|
|
||||||
inv_box.icon_state = "hand_r"
|
|
||||||
inv_box.screen_loc = ui_rhand
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
|
||||||
inv_box.name = "left hand"
|
|
||||||
inv_box.icon = 'icons/mob/screen_alien.dmi'
|
|
||||||
inv_box.icon_state = "hand_l"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
//begin buttons
|
//begin buttons
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = 'icons/mob/screen_alien.dmi'
|
using.icon = 'icons/mob/screen_alien.dmi'
|
||||||
using.icon_state = "swap_1"
|
using.icon_state = "swap_1"
|
||||||
using.screen_loc = ui_swaphand1
|
using.screen_loc = ui_swaphand_position(owner,1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = 'icons/mob/screen_alien.dmi'
|
using.icon = 'icons/mob/screen_alien.dmi'
|
||||||
using.icon_state = "swap_2"
|
using.icon_state = "swap_2"
|
||||||
using.screen_loc = ui_swaphand2
|
using.screen_loc = ui_swaphand_position(owner,2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/act_intent/alien()
|
using = new /obj/screen/act_intent/alien()
|
||||||
@@ -136,17 +121,13 @@
|
|||||||
return
|
return
|
||||||
var/mob/living/carbon/alien/humanoid/H = mymob
|
var/mob/living/carbon/alien/humanoid/H = mymob
|
||||||
if(hud_version != HUD_STYLE_NOHUD)
|
if(hud_version != HUD_STYLE_NOHUD)
|
||||||
if(H.r_hand)
|
for(var/obj/item/I in H.held_items)
|
||||||
H.r_hand.screen_loc = ui_rhand
|
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
|
||||||
H.client.screen += H.r_hand
|
H.client.screen += I
|
||||||
if(H.l_hand)
|
|
||||||
H.l_hand.screen_loc = ui_lhand
|
|
||||||
H.client.screen += H.l_hand
|
|
||||||
else
|
else
|
||||||
if(H.r_hand)
|
for(var/obj/item/I in H.held_items)
|
||||||
H.r_hand.screen_loc = null
|
I.screen_loc = null
|
||||||
if(H.l_hand)
|
H.client.screen -= I
|
||||||
H.l_hand.screen_loc = null
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/create_mob_hud()
|
/mob/living/carbon/alien/humanoid/create_mob_hud()
|
||||||
if(client && !hud_used)
|
if(client && !hud_used)
|
||||||
|
|||||||
@@ -159,11 +159,11 @@
|
|||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/blob/NodeBlob()
|
using = new /obj/screen/blob/NodeBlob()
|
||||||
using.screen_loc = ui_rhand
|
using.screen_loc = ui_hand_position(2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/blob/FactoryBlob()
|
using = new /obj/screen/blob/FactoryBlob()
|
||||||
using.screen_loc = ui_lhand
|
using.screen_loc = ui_hand_position(1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/blob/ReadaptChemical()
|
using = new /obj/screen/blob/ReadaptChemical()
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||||
..()
|
..()
|
||||||
var/obj/screen/using
|
var/obj/screen/using
|
||||||
var/obj/screen/inventory/inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/drop()
|
using = new /obj/screen/drop()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
@@ -18,27 +17,13 @@
|
|||||||
pull_icon.screen_loc = ui_drone_pull
|
pull_icon.screen_loc = ui_drone_pull
|
||||||
static_inventory += pull_icon
|
static_inventory += pull_icon
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
build_hand_slots(ui_style)
|
||||||
inv_box.name = "right hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_r"
|
|
||||||
inv_box.screen_loc = ui_rhand
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
|
||||||
inv_box.name = "left hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_l"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/inventory()
|
using = new /obj/screen/inventory()
|
||||||
using.name = "hand"
|
using.name = "hand"
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_1_m"
|
using.icon_state = "swap_1_m"
|
||||||
using.screen_loc = ui_swaphand1
|
using.screen_loc = ui_swaphand_position(owner,1)
|
||||||
using.layer = HUD_LAYER
|
using.layer = HUD_LAYER
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
@@ -46,7 +31,7 @@
|
|||||||
using.name = "hand"
|
using.name = "hand"
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_2"
|
using.icon_state = "swap_2"
|
||||||
using.screen_loc = ui_swaphand2
|
using.screen_loc = ui_swaphand_position(owner,2)
|
||||||
using.layer = HUD_LAYER
|
using.layer = HUD_LAYER
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
@@ -65,17 +50,13 @@
|
|||||||
var/mob/living/carbon/true_devil/D = mymob
|
var/mob/living/carbon/true_devil/D = mymob
|
||||||
|
|
||||||
if(hud_version != HUD_STYLE_NOHUD)
|
if(hud_version != HUD_STYLE_NOHUD)
|
||||||
if(D.r_hand)
|
for(var/obj/item/I in D.held_items)
|
||||||
D.r_hand.screen_loc = ui_rhand
|
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
|
||||||
D.client.screen += D.r_hand
|
D.client.screen += I
|
||||||
if(D.l_hand)
|
|
||||||
D.l_hand.screen_loc = ui_lhand
|
|
||||||
D.client.screen += D.l_hand
|
|
||||||
else
|
else
|
||||||
if(D.r_hand)
|
for(var/obj/item/I in D.held_items)
|
||||||
D.r_hand.screen_loc = null
|
I.screen_loc = null
|
||||||
if(D.l_hand)
|
D.client.screen -= I
|
||||||
D.l_hand.screen_loc = null
|
|
||||||
|
|
||||||
/mob/living/carbon/true_devil/create_mob_hud()
|
/mob/living/carbon/true_devil/create_mob_hud()
|
||||||
if(client && !hud_used)
|
if(client && !hud_used)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
/datum/hud/dextrous/New(mob/living/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
/datum/hud/dextrous/New(mob/living/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||||
..()
|
..()
|
||||||
var/obj/screen/using
|
var/obj/screen/using
|
||||||
var/obj/screen/inventory/inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/drop()
|
using = new /obj/screen/drop()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
@@ -15,32 +14,18 @@
|
|||||||
pull_icon.screen_loc = ui_drone_pull
|
pull_icon.screen_loc = ui_drone_pull
|
||||||
static_inventory += pull_icon
|
static_inventory += pull_icon
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
build_hand_slots(ui_style)
|
||||||
inv_box.name = "right hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_r"
|
|
||||||
inv_box.screen_loc = ui_rhand
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
|
||||||
inv_box.name = "left hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_l"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_1_m"
|
using.icon_state = "swap_1_m"
|
||||||
using.screen_loc = ui_swaphand1
|
using.screen_loc = ui_swaphand_position(owner,1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_2"
|
using.icon_state = "swap_2"
|
||||||
using.screen_loc = ui_swaphand2
|
using.screen_loc = ui_swaphand_position(owner,2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
zone_select = new /obj/screen/zone_sel()
|
zone_select = new /obj/screen/zone_sel()
|
||||||
@@ -68,14 +53,10 @@
|
|||||||
return
|
return
|
||||||
var/mob/living/D = mymob
|
var/mob/living/D = mymob
|
||||||
if(hud_version != HUD_STYLE_NOHUD)
|
if(hud_version != HUD_STYLE_NOHUD)
|
||||||
if(D.r_hand)
|
for(var/obj/item/I in D.held_items)
|
||||||
D.r_hand.screen_loc = ui_rhand
|
I.screen_loc = ui_hand_position(D.get_held_index_of_item(I))
|
||||||
D.client.screen += D.r_hand
|
D.client.screen += I
|
||||||
if(D.l_hand)
|
|
||||||
D.l_hand.screen_loc = ui_lhand
|
|
||||||
D.client.screen += D.l_hand
|
|
||||||
else
|
else
|
||||||
if(D.r_hand)
|
for(var/obj/item/I in D.held_items)
|
||||||
D.r_hand.screen_loc = null
|
I.screen_loc = null
|
||||||
if(D.l_hand)
|
D.client.screen -= I
|
||||||
D.l_hand.screen_loc = null
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
infodisplay += healths
|
infodisplay += healths
|
||||||
|
|
||||||
using = new /obj/screen/guardian/Manifest()
|
using = new /obj/screen/guardian/Manifest()
|
||||||
using.screen_loc = ui_rhand
|
using.screen_loc = ui_hand_position(2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/guardian/Recall()
|
using = new /obj/screen/guardian/Recall()
|
||||||
using.screen_loc = ui_lhand
|
using.screen_loc = ui_hand_position(1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new owner.toggle_button_type()
|
using = new owner.toggle_button_type()
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
|
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
|
||||||
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
|
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
|
||||||
var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID.
|
var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID.
|
||||||
|
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||||
|
|
||||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||||
var/action_buttons_hidden = 0
|
var/action_buttons_hidden = 0
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
mymob = owner
|
mymob = owner
|
||||||
hide_actions_toggle = new
|
hide_actions_toggle = new
|
||||||
hide_actions_toggle.InitialiseIcon(mymob)
|
hide_actions_toggle.InitialiseIcon(mymob)
|
||||||
|
hand_slots = list()
|
||||||
|
|
||||||
/datum/hud/Destroy()
|
/datum/hud/Destroy()
|
||||||
if(mymob.hud_used == src)
|
if(mymob.hud_used == src)
|
||||||
@@ -159,10 +161,10 @@
|
|||||||
screenmob.client.screen += infodisplay
|
screenmob.client.screen += infodisplay
|
||||||
|
|
||||||
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
||||||
if(inv_slots[slot_l_hand])
|
for(var/h in hand_slots)
|
||||||
screenmob.client.screen += inv_slots[slot_l_hand] //we want the hands to be visible
|
var/obj/screen/hand = hand_slots[h]
|
||||||
if(inv_slots[slot_r_hand])
|
if(hand)
|
||||||
screenmob.client.screen += inv_slots[slot_r_hand] //we want the hands to be visible
|
screenmob.client.screen += hand
|
||||||
if(action_intent)
|
if(action_intent)
|
||||||
screenmob.client.screen += action_intent //we want the intent switcher visible
|
screenmob.client.screen += action_intent //we want the intent switcher visible
|
||||||
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||||
@@ -210,3 +212,34 @@
|
|||||||
else
|
else
|
||||||
usr << "<span class ='warning'>This mob type does not use a HUD.</span>"
|
usr << "<span class ='warning'>This mob type does not use a HUD.</span>"
|
||||||
|
|
||||||
|
|
||||||
|
//(re)builds the hand ui slots, throwing away old ones
|
||||||
|
//not really worth jugglying existing ones so we just scrap+rebuild
|
||||||
|
//9/10 this is only called once per mob and only for 2 hands
|
||||||
|
/datum/hud/proc/build_hand_slots(ui_style = 'icons/mob/screen_midnight.dmi')
|
||||||
|
for(var/h in hand_slots)
|
||||||
|
var/obj/screen/inventory/hand/H = hand_slots[h]
|
||||||
|
if(H)
|
||||||
|
static_inventory -= H
|
||||||
|
hand_slots = list()
|
||||||
|
var/obj/screen/inventory/hand/hand_box
|
||||||
|
for(var/i in 1 to mymob.held_items.len)
|
||||||
|
hand_box = new /obj/screen/inventory/hand()
|
||||||
|
hand_box.name = mymob.get_held_index_name(i)
|
||||||
|
hand_box.icon = ui_style
|
||||||
|
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
|
||||||
|
hand_box.screen_loc = ui_hand_position(i)
|
||||||
|
hand_box.held_index = i
|
||||||
|
hand_slots["[i]"] = hand_box
|
||||||
|
hand_box.hud = src
|
||||||
|
static_inventory += hand_box
|
||||||
|
hand_box.update_icon()
|
||||||
|
|
||||||
|
var/i = 1
|
||||||
|
for(var/obj/screen/swap_hand/SH in static_inventory)
|
||||||
|
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
|
||||||
|
i++
|
||||||
|
for(var/obj/screen/human/equip/E in static_inventory)
|
||||||
|
E.screen_loc = ui_equip_position(mymob)
|
||||||
|
|
||||||
|
show_hud(HUD_STYLE_STANDARD,mymob)
|
||||||
@@ -133,32 +133,18 @@
|
|||||||
inv_box.screen_loc = ui_oclothing
|
inv_box.screen_loc = ui_oclothing
|
||||||
toggleable_inventory += inv_box
|
toggleable_inventory += inv_box
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
build_hand_slots(ui_style)
|
||||||
inv_box.name = "right hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_r"
|
|
||||||
inv_box.screen_loc = ui_rhand
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
|
||||||
inv_box.name = "left hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_l"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_1"
|
using.icon_state = "swap_1"
|
||||||
using.screen_loc = ui_swaphand1
|
using.screen_loc = ui_swaphand_position(owner,1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_2"
|
using.icon_state = "swap_2"
|
||||||
using.screen_loc = ui_swaphand2
|
using.screen_loc = ui_swaphand_position(owner,2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
inv_box = new /obj/screen/inventory()
|
||||||
@@ -227,7 +213,7 @@
|
|||||||
|
|
||||||
using = new /obj/screen/human/equip()
|
using = new /obj/screen/human/equip()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.screen_loc = ui_equip
|
using.screen_loc = ui_equip_position(mymob)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
inv_box = new /obj/screen/inventory()
|
||||||
@@ -407,17 +393,13 @@
|
|||||||
screenmob.client.screen -= H.r_store
|
screenmob.client.screen -= H.r_store
|
||||||
|
|
||||||
if(hud_version != HUD_STYLE_NOHUD)
|
if(hud_version != HUD_STYLE_NOHUD)
|
||||||
if(H.r_hand)
|
for(var/obj/item/I in H.held_items)
|
||||||
H.r_hand.screen_loc = ui_rhand
|
I.screen_loc = ui_hand_position(H.get_held_index_of_item(I))
|
||||||
screenmob.client.screen += H.r_hand
|
H.client.screen += I
|
||||||
if(H.l_hand)
|
|
||||||
H.l_hand.screen_loc = ui_lhand
|
|
||||||
screenmob.client.screen += H.l_hand
|
|
||||||
else
|
else
|
||||||
if(H.r_hand)
|
for(var/obj/item/I in H.held_items)
|
||||||
screenmob.client.screen -= H.r_hand
|
I.screen_loc = null
|
||||||
if(H.l_hand)
|
H.client.screen -= I
|
||||||
screenmob.client.screen -= H.l_hand
|
|
||||||
|
|
||||||
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
||||||
set category = "OOC"
|
set category = "OOC"
|
||||||
|
|||||||
@@ -21,32 +21,18 @@
|
|||||||
using.screen_loc = ui_drop_throw
|
using.screen_loc = ui_drop_throw
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
build_hand_slots(ui_style)
|
||||||
inv_box.name = "right hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_r"
|
|
||||||
inv_box.screen_loc = ui_rhand
|
|
||||||
inv_box.slot_id = slot_r_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory/hand()
|
|
||||||
inv_box.name = "left hand"
|
|
||||||
inv_box.icon = ui_style
|
|
||||||
inv_box.icon_state = "hand_l"
|
|
||||||
inv_box.screen_loc = ui_lhand
|
|
||||||
inv_box.slot_id = slot_l_hand
|
|
||||||
static_inventory += inv_box
|
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_1_m" //extra wide!
|
using.icon_state = "swap_1_m" //extra wide!
|
||||||
using.screen_loc = ui_swaphand1
|
using.screen_loc = ui_swaphand_position(owner,1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/swap_hand()
|
using = new /obj/screen/swap_hand()
|
||||||
using.icon = ui_style
|
using.icon = ui_style
|
||||||
using.icon_state = "swap_2"
|
using.icon_state = "swap_2"
|
||||||
using.screen_loc = ui_swaphand2
|
using.screen_loc = ui_swaphand_position(owner,2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
inv_box = new /obj/screen/inventory()
|
inv_box = new /obj/screen/inventory()
|
||||||
@@ -142,17 +128,13 @@
|
|||||||
M.head.screen_loc = null
|
M.head.screen_loc = null
|
||||||
|
|
||||||
if(hud_version != HUD_STYLE_NOHUD)
|
if(hud_version != HUD_STYLE_NOHUD)
|
||||||
if(M.r_hand)
|
for(var/obj/item/I in M.held_items)
|
||||||
M.r_hand.screen_loc = ui_rhand
|
I.screen_loc = ui_hand_position(M.get_held_index_of_item(I))
|
||||||
M.client.screen += M.r_hand
|
M.client.screen += I
|
||||||
if(M.l_hand)
|
|
||||||
M.l_hand.screen_loc = ui_lhand
|
|
||||||
M.client.screen += M.l_hand
|
|
||||||
else
|
else
|
||||||
if(M.r_hand)
|
for(var/obj/item/I in M.held_items)
|
||||||
M.r_hand.screen_loc = null
|
I.screen_loc = null
|
||||||
if(M.l_hand)
|
M.client.screen -= I
|
||||||
M.l_hand.screen_loc = null
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/create_mob_hud()
|
/mob/living/carbon/monkey/create_mob_hud()
|
||||||
if(client && !hud_used)
|
if(client && !hud_used)
|
||||||
|
|||||||
@@ -153,9 +153,9 @@
|
|||||||
infodisplay += healths
|
infodisplay += healths
|
||||||
|
|
||||||
//Installed Module
|
//Installed Module
|
||||||
mymob.hands = new /obj/screen/robot/module()
|
mymobR.hands = new /obj/screen/robot/module()
|
||||||
mymob.hands.screen_loc = ui_borg_module
|
mymobR.hands.screen_loc = ui_borg_module
|
||||||
static_inventory += mymob.hands
|
static_inventory += mymobR.hands
|
||||||
|
|
||||||
//Store
|
//Store
|
||||||
module_store_icon = new /obj/screen/robot/store()
|
module_store_icon = new /obj/screen/robot/store()
|
||||||
|
|||||||
@@ -90,8 +90,7 @@
|
|||||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||||
return 1
|
return 1
|
||||||
if(usr.attack_ui(slot_id))
|
if(usr.attack_ui(slot_id))
|
||||||
usr.update_inv_l_hand(0)
|
usr.update_inv_hands()
|
||||||
usr.update_inv_r_hand(0)
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/screen/inventory/update_icon()
|
/obj/screen/inventory/update_icon()
|
||||||
@@ -108,13 +107,15 @@
|
|||||||
var/image/active_overlay
|
var/image/active_overlay
|
||||||
var/image/handcuff_overlay
|
var/image/handcuff_overlay
|
||||||
var/image/blocked_overlay
|
var/image/blocked_overlay
|
||||||
|
var/held_index = 0
|
||||||
|
|
||||||
/obj/screen/inventory/hand/update_icon()
|
/obj/screen/inventory/hand/update_icon()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
if(!active_overlay)
|
if(!active_overlay)
|
||||||
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
||||||
if(!handcuff_overlay)
|
if(!handcuff_overlay)
|
||||||
var/state = (slot_id == slot_r_hand) ? "markus" : "gabrielle"
|
var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
|
||||||
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
|
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
|
||||||
if(!blocked_overlay)
|
if(!blocked_overlay)
|
||||||
blocked_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"="blocked")
|
blocked_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"="blocked")
|
||||||
@@ -126,18 +127,15 @@
|
|||||||
var/mob/living/carbon/C = hud.mymob
|
var/mob/living/carbon/C = hud.mymob
|
||||||
if(C.handcuffed)
|
if(C.handcuffed)
|
||||||
add_overlay(handcuff_overlay)
|
add_overlay(handcuff_overlay)
|
||||||
if(slot_id == slot_r_hand)
|
|
||||||
if(!C.has_right_hand())
|
if(held_index)
|
||||||
add_overlay(blocked_overlay)
|
if(!C.has_hand_for_held_index(held_index))
|
||||||
else if(slot_id == slot_l_hand)
|
|
||||||
if(!C.has_left_hand())
|
|
||||||
add_overlay(blocked_overlay)
|
add_overlay(blocked_overlay)
|
||||||
|
|
||||||
if(slot_id == slot_l_hand && hud.mymob.hand)
|
if(held_index == hud.mymob.active_hand_index)
|
||||||
add_overlay(active_overlay)
|
|
||||||
else if(slot_id == slot_r_hand && !hud.mymob.hand)
|
|
||||||
add_overlay(active_overlay)
|
add_overlay(active_overlay)
|
||||||
|
|
||||||
|
|
||||||
/obj/screen/inventory/hand/Click()
|
/obj/screen/inventory/hand/Click()
|
||||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||||
// We don't even know if it's a middle click
|
// We don't even know if it's a middle click
|
||||||
@@ -150,11 +148,7 @@
|
|||||||
|
|
||||||
if(ismob(usr))
|
if(ismob(usr))
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
switch(name)
|
M.swap_hand(held_index)
|
||||||
if("right hand", "r_hand")
|
|
||||||
M.activate_hand("r")
|
|
||||||
if("left hand", "l_hand")
|
|
||||||
M.activate_hand("l")
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/screen/close
|
/obj/screen/close
|
||||||
@@ -239,12 +233,10 @@
|
|||||||
C << "<span class='warning'>You are not wearing an internals mask!</span>"
|
C << "<span class='warning'>You are not wearing an internals mask!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(C.l_hand, /obj/item/weapon/tank))
|
var/obj/item/I = C.is_holding_item_of_type(/obj/item/weapon/tank)
|
||||||
C << "<span class='notice'>You are now running on internals from the [C.l_hand] on your left hand.</span>"
|
if(I)
|
||||||
C.internal = C.l_hand
|
C << "<span class='notice'>You are now running on internals from the [I] on your [C.get_held_index_name(C.get_held_index_of_item(I))].</span>"
|
||||||
else if(istype(C.r_hand, /obj/item/weapon/tank))
|
C.internal = I
|
||||||
C << "<span class='notice'>You are now running on internals from the [C.r_hand] on your right hand.</span>"
|
|
||||||
C.internal = C.r_hand
|
|
||||||
else if(ishuman(C))
|
else if(ishuman(C))
|
||||||
var/mob/living/carbon/human/H = C
|
var/mob/living/carbon/human/H = C
|
||||||
if(istype(H.s_store, /obj/item/weapon/tank))
|
if(istype(H.s_store, /obj/item/weapon/tank))
|
||||||
@@ -328,7 +320,7 @@
|
|||||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||||
return 1
|
return 1
|
||||||
if(master)
|
if(master)
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if(I)
|
if(I)
|
||||||
master.attackby(I, usr, params)
|
master.attackby(I, usr, params)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -68,11 +68,11 @@
|
|||||||
var/obj/screen/using
|
var/obj/screen/using
|
||||||
|
|
||||||
using = new /obj/screen/swarmer/FabricateTrap()
|
using = new /obj/screen/swarmer/FabricateTrap()
|
||||||
using.screen_loc = ui_rhand
|
using.screen_loc = ui_hand_position(2)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/swarmer/Barricade()
|
using = new /obj/screen/swarmer/Barricade()
|
||||||
using.screen_loc = ui_lhand
|
using.screen_loc = ui_hand_position(1)
|
||||||
static_inventory += using
|
static_inventory += using
|
||||||
|
|
||||||
using = new /obj/screen/swarmer/Replicate()
|
using = new /obj/screen/swarmer/Replicate()
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ var/const/tk_maxrange = 15
|
|||||||
|
|
||||||
//stops TK grabs being equipped anywhere but into hands
|
//stops TK grabs being equipped anywhere but into hands
|
||||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||||
if( (slot == slot_l_hand) || (slot== slot_r_hand) )
|
if(slot == slot_hands)
|
||||||
return
|
return
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ BONUS
|
|||||||
M << "<span notice='warning'>[pick("You swallow excess mucus.", "You lightly cough.")]</span>"
|
M << "<span notice='warning'>[pick("You swallow excess mucus.", "You lightly cough.")]</span>"
|
||||||
else
|
else
|
||||||
M.emote("cough")
|
M.emote("cough")
|
||||||
var/obj/item/I = M.get_active_hand()
|
var/obj/item/I = M.get_active_held_item()
|
||||||
if(I && I.w_class == 1)
|
if(I && I.w_class == 1)
|
||||||
M.drop_item()
|
M.drop_item()
|
||||||
return
|
return
|
||||||
@@ -78,12 +78,9 @@ STI KALY - blind
|
|||||||
else
|
else
|
||||||
var/mob/living/carbon/H = affected_mob
|
var/mob/living/carbon/H = affected_mob
|
||||||
if(prob(chance))
|
if(prob(chance))
|
||||||
if(!istype(H.r_hand, /obj/item/weapon/staff))
|
var/obj/item/weapon/staff/S = new(H)
|
||||||
H.drop_r_hand()
|
if(!H.put_in_hands(S))
|
||||||
H.put_in_r_hand( new /obj/item/weapon/staff(H) )
|
qdel(S)
|
||||||
return
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/datum/disease/wizarditis/proc/teleport()
|
/datum/disease/wizarditis/proc/teleport()
|
||||||
|
|||||||
@@ -333,8 +333,7 @@
|
|||||||
else
|
else
|
||||||
A.start_pulling(D, 1)
|
A.start_pulling(D, 1)
|
||||||
if(A.pulling)
|
if(A.pulling)
|
||||||
D.drop_r_hand()
|
D.drop_all_held_items()
|
||||||
D.drop_l_hand()
|
|
||||||
D.stop_pulling()
|
D.stop_pulling()
|
||||||
add_logs(A, D, "grabbed", addition="aggressively")
|
add_logs(A, D, "grabbed", addition="aggressively")
|
||||||
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
|
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
|
||||||
|
|||||||
@@ -130,16 +130,10 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi
|
|||||||
if(check_streak(A,D))
|
if(check_streak(A,D))
|
||||||
return 1
|
return 1
|
||||||
if(prob(60))
|
if(prob(60))
|
||||||
if(D.hand)
|
var/obj/item/I = D.get_active_held_item()
|
||||||
if(istype(D.l_hand, /obj/item))
|
if(I)
|
||||||
var/obj/item/I = D.l_hand
|
D.drop_item()
|
||||||
D.drop_item()
|
A.put_in_hands(I)
|
||||||
A.put_in_hands(I)
|
|
||||||
else
|
|
||||||
if(istype(D.r_hand, /obj/item))
|
|
||||||
var/obj/item/I = D.r_hand
|
|
||||||
D.drop_item()
|
|
||||||
A.put_in_hands(I)
|
|
||||||
D.visible_message("<span class='danger'>[A] has disarmed [D]!</span>", \
|
D.visible_message("<span class='danger'>[A] has disarmed [D]!</span>", \
|
||||||
"<span class='userdanger'>[A] has disarmed [D]!</span>")
|
"<span class='userdanger'>[A] has disarmed [D]!</span>")
|
||||||
playsound(D, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
playsound(D, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ var/list/wire_color_directory = list()
|
|||||||
return
|
return
|
||||||
var/target_wire = params["wire"]
|
var/target_wire = params["wire"]
|
||||||
var/mob/living/L = usr
|
var/mob/living/L = usr
|
||||||
var/obj/item/I = L.get_active_hand()
|
var/obj/item/I = L.get_active_held_item()
|
||||||
switch(action)
|
switch(action)
|
||||||
if("cut")
|
if("cut")
|
||||||
if(istype(I, /obj/item/weapon/wirecutters) || IsAdminGhost(usr))
|
if(istype(I, /obj/item/weapon/wirecutters) || IsAdminGhost(usr))
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
if("healing")
|
if("healing")
|
||||||
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null))
|
M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null))
|
||||||
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(null))
|
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(null))
|
||||||
M.equip_to_slot_or_del(new /obj/item/weapon/gun/magic/staff/healing(M), slot_r_hand)
|
M.put_in_hands_or_del(new /obj/item/weapon/gun/magic/staff/healing(M))
|
||||||
M << "<B>Your service has not gone unrewarded, however. Studying under [usr.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall."
|
M << "<B>Your service has not gone unrewarded, however. Studying under [usr.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall."
|
||||||
if("robeless")
|
if("robeless")
|
||||||
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
|
M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
|
||||||
|
|||||||
@@ -21,32 +21,28 @@
|
|||||||
var/weapon_name_simple
|
var/weapon_name_simple
|
||||||
|
|
||||||
/obj/effect/proc_holder/changeling/weapon/try_to_sting(mob/user, mob/target)
|
/obj/effect/proc_holder/changeling/weapon/try_to_sting(mob/user, mob/target)
|
||||||
if(check_weapon(user, user.r_hand, 1))
|
for(var/obj/item/I in user.held_items)
|
||||||
return
|
if(check_weapon(user, I))
|
||||||
if(check_weapon(user, user.l_hand, 0))
|
return
|
||||||
return
|
|
||||||
..(user, target)
|
..(user, target)
|
||||||
|
|
||||||
/obj/effect/proc_holder/changeling/weapon/proc/check_weapon(mob/user, obj/item/hand_item, right_hand=1)
|
/obj/effect/proc_holder/changeling/weapon/proc/check_weapon(mob/user, obj/item/hand_item)
|
||||||
if(istype(hand_item, weapon_type))
|
if(istype(hand_item, weapon_type))
|
||||||
playsound(user, 'sound/effects/blobattack.ogg', 30, 1)
|
playsound(user, 'sound/effects/blobattack.ogg', 30, 1)
|
||||||
qdel(hand_item)
|
qdel(hand_item)
|
||||||
user.visible_message("<span class='warning'>With a sickening crunch, [user] reforms their [weapon_name_simple] into an arm!</span>", "<span class='notice'>We assimilate the [weapon_name_simple] back into our body.</span>", "<span class='italics>You hear organic matter ripping and tearing!</span>")
|
user.visible_message("<span class='warning'>With a sickening crunch, [user] reforms their [weapon_name_simple] into an arm!</span>", "<span class='notice'>We assimilate the [weapon_name_simple] back into our body.</span>", "<span class='italics>You hear organic matter ripping and tearing!</span>")
|
||||||
if(right_hand)
|
user.update_inv_hands()
|
||||||
user.update_inv_r_hand()
|
|
||||||
else
|
|
||||||
user.update_inv_l_hand()
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/effect/proc_holder/changeling/weapon/sting_action(mob/living/user)
|
/obj/effect/proc_holder/changeling/weapon/sting_action(mob/living/user)
|
||||||
if(!user.drop_item())
|
if(!user.drop_item())
|
||||||
user << "<span class='warning'>The [user.get_active_hand()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!</span>"
|
user << "<span class='warning'>The [user.get_active_held_item()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!</span>"
|
||||||
return
|
return
|
||||||
var/limb_regen = 0
|
var/limb_regen = 0
|
||||||
if(user.hand) //we regen the arm before changing it into the weapon
|
if(user.active_hand_index % 2 == 0) //we regen the arm before changing it into the weapon
|
||||||
limb_regen = user.regenerate_limb("l_arm", 1)
|
|
||||||
else
|
|
||||||
limb_regen = user.regenerate_limb("r_arm", 1)
|
limb_regen = user.regenerate_limb("r_arm", 1)
|
||||||
|
else
|
||||||
|
limb_regen = user.regenerate_limb("l_arm", 1)
|
||||||
if(limb_regen)
|
if(limb_regen)
|
||||||
user.visible_message("<span class='warning'>[user]'s missing arm reforms, making a loud, grotesque sound!</span>", "<span class='userdanger'>Your arm regrows, making a loud, crunchy sound and giving you great pain!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
user.visible_message("<span class='warning'>[user]'s missing arm reforms, making a loud, grotesque sound!</span>", "<span class='userdanger'>Your arm regrows, making a loud, crunchy sound and giving you great pain!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||||
user.emote("scream")
|
user.emote("scream")
|
||||||
@@ -56,8 +52,9 @@
|
|||||||
return W
|
return W
|
||||||
|
|
||||||
/obj/effect/proc_holder/changeling/weapon/on_refund(mob/user)
|
/obj/effect/proc_holder/changeling/weapon/on_refund(mob/user)
|
||||||
check_weapon(user, user.r_hand, 1)
|
for(var/obj/item/I in user.held_items)
|
||||||
check_weapon(user, user.l_hand, 0)
|
check_weapon(user, I)
|
||||||
|
|
||||||
|
|
||||||
//Parent to space suits and armor.
|
//Parent to space suits and armor.
|
||||||
/obj/effect/proc_holder/changeling/suit
|
/obj/effect/proc_holder/changeling/suit
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
add_logs(user, target, "stung", object="falso armblade sting")
|
add_logs(user, target, "stung", object="falso armblade sting")
|
||||||
|
|
||||||
if(!target.drop_item())
|
if(!target.drop_item())
|
||||||
user << "<span class='warning'>The [target.get_active_hand()] is stuck to their hand, you cannot grow a false armblade over it!</span>"
|
user << "<span class='warning'>The [target.get_active_held_item()] is stuck to their hand, you cannot grow a false armblade over it!</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(ismonkey(target))
|
if(ismonkey(target))
|
||||||
@@ -162,8 +162,7 @@
|
|||||||
"<span class='italics>You hear organic matter ripping and tearing!</span>")
|
"<span class='italics>You hear organic matter ripping and tearing!</span>")
|
||||||
|
|
||||||
qdel(blade)
|
qdel(blade)
|
||||||
target.update_inv_l_hand()
|
target.update_inv_hands()
|
||||||
target.update_inv_r_hand()
|
|
||||||
|
|
||||||
/obj/effect/proc_holder/changeling/sting/extract_dna
|
/obj/effect/proc_holder/changeling/sting/extract_dna
|
||||||
name = "Extract DNA Sting"
|
name = "Extract DNA Sting"
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
if(/datum/action/item_action/clock/guvax)
|
if(/datum/action/item_action/clock/guvax)
|
||||||
if(!nonhuman_usable && !ishuman(user))
|
if(!nonhuman_usable && !ishuman(user))
|
||||||
return
|
return
|
||||||
if(src == user.get_active_hand())
|
if(src == user.get_active_held_item())
|
||||||
var/datum/clockwork_scripture/guvax/convert = new
|
var/datum/clockwork_scripture/guvax/convert = new
|
||||||
convert.slab = src
|
convert.slab = src
|
||||||
convert.invoker = user
|
convert.invoker = user
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
if(/datum/action/item_action/clock/vanguard)
|
if(/datum/action/item_action/clock/vanguard)
|
||||||
if(!nonhuman_usable && !ishuman(user))
|
if(!nonhuman_usable && !ishuman(user))
|
||||||
return
|
return
|
||||||
if(src == user.get_active_hand())
|
if(src == user.get_active_held_item())
|
||||||
var/datum/clockwork_scripture/vanguard/antistun = new
|
var/datum/clockwork_scripture/vanguard/antistun = new
|
||||||
antistun.slab = src
|
antistun.slab = src
|
||||||
antistun.invoker = user
|
antistun.invoker = user
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
return 0
|
return 0
|
||||||
switch(action)
|
switch(action)
|
||||||
if("Recital")
|
if("Recital")
|
||||||
if(user.get_active_hand() != src)
|
if(user.get_active_held_item() != src)
|
||||||
user << "<span class='warning'>You need to hold the slab in your active hand to recite scripture!</span>"
|
user << "<span class='warning'>You need to hold the slab in your active hand to recite scripture!</span>"
|
||||||
return
|
return
|
||||||
recite_scripture(user)
|
recite_scripture(user)
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
var/datum/clockwork_scripture/C = S
|
var/datum/clockwork_scripture/C = S
|
||||||
if("[initial(C.name)] ([initial(C.descname)])" == chosen_scripture)
|
if("[initial(C.name)] ([initial(C.descname)])" == chosen_scripture)
|
||||||
scripture_to_recite = new C
|
scripture_to_recite = new C
|
||||||
if(!scripture_to_recite || user.get_active_hand() != src)
|
if(!scripture_to_recite || user.get_active_held_item() != src)
|
||||||
return 0
|
return 0
|
||||||
tiers_of_scripture = scripture_unlock_check()
|
tiers_of_scripture = scripture_unlock_check()
|
||||||
if(!ratvar_awakens && !no_cost && !tiers_of_scripture[scripture_to_recite.tier])
|
if(!ratvar_awakens && !no_cost && !tiers_of_scripture[scripture_to_recite.tier])
|
||||||
@@ -517,7 +517,7 @@
|
|||||||
user << "<span class='warning'>[src] is still gathering power!</span>"
|
user << "<span class='warning'>[src] is still gathering power!</span>"
|
||||||
return 0
|
return 0
|
||||||
var/mob/living/carbon/C = user
|
var/mob/living/carbon/C = user
|
||||||
if(C.l_hand && C.r_hand)
|
if(!user.get_empty_held_indexes())
|
||||||
C << "<span class='warning'>You require a free hand to utilize [src]'s power!</span>"
|
C << "<span class='warning'>You require a free hand to utilize [src]'s power!</span>"
|
||||||
return 0
|
return 0
|
||||||
C.visible_message("<span class='warning'>[C]'s hand is enveloped in violet flames!<span>", "<span class='brass'><i>You harness [src]'s power. <b>Direct it at a tile at any range</b> to unleash it, or use the action button again to dispel it.</i></span>")
|
C.visible_message("<span class='warning'>[C]'s hand is enveloped in violet flames!<span>", "<span class='brass'><i>You harness [src]'s power. <b>Direct it at a tile at any range</b> to unleash it, or use the action button again to dispel it.</i></span>")
|
||||||
|
|||||||
@@ -261,7 +261,7 @@
|
|||||||
if(amount > 0)
|
if(amount > 0)
|
||||||
combattimer = world.time + initial(combattimer)
|
combattimer = world.time + initial(combattimer)
|
||||||
for(var/mob/living/L in view(2, src))
|
for(var/mob/living/L in view(2, src))
|
||||||
if(istype(L.l_hand, /obj/item/weapon/nullrod) || istype(L.r_hand, /obj/item/weapon/nullrod)) //hand-held holy weapons increase the damage it takes
|
if(L.is_holding_item_of_type(/obj/item/weapon/nullrod))
|
||||||
src << "<span class='userdanger'>The presence of a brandished holy artifact weakens your armor!</span>"
|
src << "<span class='userdanger'>The presence of a brandished holy artifact weakens your armor!</span>"
|
||||||
amount *= 4 //if a wielded null rod is nearby, it takes four times the health damage
|
amount *= 4 //if a wielded null rod is nearby, it takes four times the health damage
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/action/innate/function_call/Activate()
|
/datum/action/innate/function_call/Activate()
|
||||||
if(owner.l_hand && owner.r_hand)
|
if(!owner.get_empty_held_indexes())
|
||||||
usr << "<span class='warning'>You need an empty to hand to call forth your spear!</span>"
|
usr << "<span class='warning'>You need an empty to hand to call forth your spear!</span>"
|
||||||
return 0
|
return 0
|
||||||
owner.visible_message("<span class='warning'>A strange spear materializes in [owner]'s hands!</span>", "<span class='brass'>You call forth your spear!</span>")
|
owner.visible_message("<span class='warning'>A strange spear materializes in [owner]'s hands!</span>", "<span class='brass'>You call forth your spear!</span>")
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
return 0
|
return 0
|
||||||
var/input_target_key = input(invoker, "Choose a target to form a rift to.", "Spatial Gateway") as null|anything in possible_targets
|
var/input_target_key = input(invoker, "Choose a target to form a rift to.", "Spatial Gateway") as null|anything in possible_targets
|
||||||
var/atom/movable/target = possible_targets[input_target_key]
|
var/atom/movable/target = possible_targets[input_target_key]
|
||||||
if(!src || !target || !invoker || !invoker.canUseTopic(src, BE_CLOSE) || !is_servant_of_ratvar(invoker) || (istype(src, /obj/item) && invoker.get_active_hand() != src))
|
if(!src || !target || !invoker || !invoker.canUseTopic(src, BE_CLOSE) || !is_servant_of_ratvar(invoker) || (istype(src, /obj/item) && invoker.get_active_held_item() != src))
|
||||||
return 0 //if any of the involved things no longer exist, the invoker is stunned, too far away to use the object, or does not serve ratvar, or if the object is an item and not in the mob's active hand, fail
|
return 0 //if any of the involved things no longer exist, the invoker is stunned, too far away to use the object, or does not serve ratvar, or if the object is an item and not in the mob's active hand, fail
|
||||||
var/istargetobelisk = istype(target, /obj/structure/clockwork/powered/clockwork_obelisk)
|
var/istargetobelisk = istype(target, /obj/structure/clockwork/powered/clockwork_obelisk)
|
||||||
if(istargetobelisk)
|
if(istargetobelisk)
|
||||||
|
|||||||
@@ -139,9 +139,7 @@
|
|||||||
var/list/slots = list(
|
var/list/slots = list(
|
||||||
"backpack" = slot_in_backpack,
|
"backpack" = slot_in_backpack,
|
||||||
"left pocket" = slot_l_store,
|
"left pocket" = slot_l_store,
|
||||||
"right pocket" = slot_r_store,
|
"right pocket" = slot_r_store
|
||||||
"left hand" = slot_l_hand,
|
|
||||||
"right hand" = slot_r_hand,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var/T = new item_path(mob)
|
var/T = new item_path(mob)
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
|||||||
|
|
||||||
/mob/proc/bible_check() //The bible, if held, might protect against certain things
|
/mob/proc/bible_check() //The bible, if held, might protect against certain things
|
||||||
var/obj/item/weapon/storage/book/bible/B = locate() in src
|
var/obj/item/weapon/storage/book/bible/B = locate() in src
|
||||||
if(B && (l_hand == B || r_hand == B))
|
if(is_holding(B))
|
||||||
return B
|
return B
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,7 @@
|
|||||||
/mob/living/carbon/true_devil/death(gibbed)
|
/mob/living/carbon/true_devil/death(gibbed)
|
||||||
stat = DEAD
|
stat = DEAD
|
||||||
..(gibbed)
|
..(gibbed)
|
||||||
drop_l_hand()
|
drop_all_held_items()
|
||||||
drop_r_hand()
|
|
||||||
spawn (0)
|
spawn (0)
|
||||||
mind.devilinfo.beginResurrectionCheck(src)
|
mind.devilinfo.beginResurrectionCheck(src)
|
||||||
|
|
||||||
@@ -61,18 +60,12 @@
|
|||||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <b>[src]</b>!\n"
|
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <b>[src]</b>!\n"
|
||||||
|
|
||||||
//Left hand items
|
//Left hand items
|
||||||
if(l_hand && !(l_hand.flags&ABSTRACT))
|
for(var/obj/item/I in held_items)
|
||||||
if(l_hand.blood_DNA)
|
if(!(I.flags & ABSTRACT))
|
||||||
msg += "<span class='warning'>It is holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in its left hand!</span>\n"
|
if(I.blood_DNA)
|
||||||
else
|
msg += "<span class='warning'>It is holding \icon[I] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
|
||||||
msg += "It is holding \icon[l_hand] \a [l_hand] in its left hand.\n"
|
else
|
||||||
|
msg += "It is holding \icon[I] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
|
||||||
//Right hand items
|
|
||||||
if(r_hand && !(r_hand.flags&ABSTRACT))
|
|
||||||
if(r_hand.blood_DNA)
|
|
||||||
msg += "<span class='warning'>It is holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in its right hand!</span>\n"
|
|
||||||
else
|
|
||||||
msg += "It is holding \icon[r_hand] \a [r_hand] in its right hand.\n"
|
|
||||||
|
|
||||||
//Braindead
|
//Braindead
|
||||||
if(!client && stat != DEAD)
|
if(!client && stat != DEAD)
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/mob/living/carbon/true_devil/proc/update_inv_hands()
|
/mob/living/carbon/true_devil/update_inv_hands()
|
||||||
//TODO LORDPIDEY: Figure out how to make the hands line up properly. the l/r_hand_image should use the down sprite when facing down, left, or right, and the up sprite when facing up.
|
//TODO LORDPIDEY: Figure out how to make the hands line up properly. the l/r_hand_image should use the down sprite when facing down, left, or right, and the up sprite when facing up.
|
||||||
remove_overlay(DEVIL_HANDS_LAYER)
|
remove_overlay(DEVIL_HANDS_LAYER)
|
||||||
var/list/hands_overlays = list()
|
var/list/hands_overlays = list()
|
||||||
|
var/obj/item/l_hand = get_item_for_held_index(1) //hardcoded 2-hands only, for now.
|
||||||
|
var/obj/item/r_hand = get_item_for_held_index(2)
|
||||||
|
|
||||||
if(r_hand)
|
if(r_hand)
|
||||||
|
|
||||||
@@ -21,7 +23,7 @@
|
|||||||
|
|
||||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||||
r_hand.layer = ABOVE_HUD_LAYER
|
r_hand.layer = ABOVE_HUD_LAYER
|
||||||
r_hand.screen_loc = ui_rhand
|
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
|
||||||
client.screen |= r_hand
|
client.screen |= r_hand
|
||||||
|
|
||||||
if(l_hand)
|
if(l_hand)
|
||||||
@@ -36,19 +38,12 @@
|
|||||||
|
|
||||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||||
l_hand.layer = ABOVE_HUD_LAYER
|
l_hand.layer = ABOVE_HUD_LAYER
|
||||||
l_hand.screen_loc = ui_lhand
|
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
|
||||||
client.screen |= l_hand
|
client.screen |= l_hand
|
||||||
if(hands_overlays.len)
|
if(hands_overlays.len)
|
||||||
devil_overlays[DEVIL_HANDS_LAYER] = hands_overlays
|
devil_overlays[DEVIL_HANDS_LAYER] = hands_overlays
|
||||||
apply_overlay(DEVIL_HANDS_LAYER)
|
apply_overlay(DEVIL_HANDS_LAYER)
|
||||||
|
|
||||||
/mob/living/carbon/true_devil/update_inv_l_hand()
|
|
||||||
update_inv_hands()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/true_devil/update_inv_r_hand()
|
|
||||||
update_inv_hands()
|
|
||||||
|
|
||||||
/mob/living/carbon/true_devil/remove_overlay(cache_index)
|
/mob/living/carbon/true_devil/remove_overlay(cache_index)
|
||||||
if(devil_overlays[cache_index])
|
if(devil_overlays[cache_index])
|
||||||
overlays -= devil_overlays[cache_index]
|
overlays -= devil_overlays[cache_index]
|
||||||
|
|||||||
@@ -115,9 +115,7 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple"
|
|||||||
var/list/slots = list (
|
var/list/slots = list (
|
||||||
"backpack" = slot_in_backpack,
|
"backpack" = slot_in_backpack,
|
||||||
"left pocket" = slot_l_store,
|
"left pocket" = slot_l_store,
|
||||||
"right pocket" = slot_r_store,
|
"right pocket" = slot_r_store
|
||||||
"left hand" = slot_l_hand,
|
|
||||||
"right hand" = slot_r_hand,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
. = 0
|
. = 0
|
||||||
|
|||||||
@@ -59,8 +59,7 @@
|
|||||||
M.icon = disguise.icon
|
M.icon = disguise.icon
|
||||||
M.icon_state = disguise.icon_state
|
M.icon_state = disguise.icon_state
|
||||||
M.overlays = disguise.overlays
|
M.overlays = disguise.overlays
|
||||||
M.update_inv_r_hand()
|
M.update_inv_hands()
|
||||||
M.update_inv_l_hand()
|
|
||||||
|
|
||||||
/obj/item/clothing/suit/armor/abductor/vest/proc/DeactivateStealth()
|
/obj/item/clothing/suit/armor/abductor/vest/proc/DeactivateStealth()
|
||||||
if(!stealth_active)
|
if(!stealth_active)
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
entry.name = target.name
|
entry.name = target.name
|
||||||
entry.icon = target.icon
|
entry.icon = target.icon
|
||||||
entry.icon_state = target.icon_state
|
entry.icon_state = target.icon_state
|
||||||
entry.overlays = target.get_overlays_copy(list(L_HAND_LAYER,R_HAND_LAYER))
|
entry.overlays = target.get_overlays_copy(list(HANDS_LAYER,HANDS_LAYER))
|
||||||
for(var/i=1,i<=disguises.len,i++)
|
for(var/i=1,i<=disguises.len,i++)
|
||||||
var/datum/icon_snapshot/temp = disguises[i]
|
var/datum/icon_snapshot/temp = disguises[i]
|
||||||
if(temp.name == entry.name)
|
if(temp.name == entry.name)
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
synd_mind.current << "<B>In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.</B>"
|
synd_mind.current << "<B>In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.</B>"
|
||||||
|
|
||||||
var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
|
var/obj/item/device/nuclear_challenge/challenge = new /obj/item/device/nuclear_challenge
|
||||||
synd_mind.current.equip_to_slot_or_del(challenge, slot_r_hand)
|
synd_mind.current.put_in_hands_or_del(challenge)
|
||||||
|
|
||||||
var/list/foundIDs = synd_mind.current.search_contents_for(/obj/item/weapon/card/id)
|
var/list/foundIDs = synd_mind.current.search_contents_for(/obj/item/weapon/card/id)
|
||||||
if(foundIDs.len)
|
if(foundIDs.len)
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
P.name = "nuclear bomb code"
|
P.name = "nuclear bomb code"
|
||||||
var/mob/living/carbon/human/H = synd_mind.current
|
var/mob/living/carbon/human/H = synd_mind.current
|
||||||
P.loc = H.loc
|
P.loc = H.loc
|
||||||
H.equip_to_slot_or_del(P, slot_r_hand, 0)
|
H.put_in_hands_or_del(P)
|
||||||
H.update_icons()
|
H.update_icons()
|
||||||
else
|
else
|
||||||
nuke_code = "code will be provided later"
|
nuke_code = "code will be provided later"
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ var/bomb_set
|
|||||||
. = TRUE
|
. = TRUE
|
||||||
if("insert_disk")
|
if("insert_disk")
|
||||||
if(!auth)
|
if(!auth)
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if(istype(I, /obj/item/weapon/disk/nuclear))
|
if(istype(I, /obj/item/weapon/disk/nuclear))
|
||||||
usr.drop_item()
|
usr.drop_item()
|
||||||
I.forceMove(src)
|
I.forceMove(src)
|
||||||
|
|||||||
@@ -137,9 +137,7 @@
|
|||||||
var/list/slots = list (
|
var/list/slots = list (
|
||||||
"backpack" = slot_in_backpack,
|
"backpack" = slot_in_backpack,
|
||||||
"left pocket" = slot_l_store,
|
"left pocket" = slot_l_store,
|
||||||
"right pocket" = slot_r_store,
|
"right pocket" = slot_r_store
|
||||||
"left hand" = slot_l_hand,
|
|
||||||
"right hand" = slot_r_hand,
|
|
||||||
)
|
)
|
||||||
var/where = mob.equip_in_one_of_slots(T, slots)
|
var/where = mob.equip_in_one_of_slots(T, slots)
|
||||||
var/where2 = mob.equip_in_one_of_slots(C, slots)
|
var/where2 = mob.equip_in_one_of_slots(C, slots)
|
||||||
|
|||||||
@@ -367,9 +367,7 @@
|
|||||||
var/list/slots = list (
|
var/list/slots = list (
|
||||||
"backpack" = slot_in_backpack,
|
"backpack" = slot_in_backpack,
|
||||||
"left pocket" = slot_l_store,
|
"left pocket" = slot_l_store,
|
||||||
"right pocket" = slot_r_store,
|
"right pocket" = slot_r_store
|
||||||
"left hand" = slot_l_hand,
|
|
||||||
"right hand" = slot_r_hand,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var/where = "At your feet"
|
var/where = "At your feet"
|
||||||
|
|||||||
@@ -191,8 +191,8 @@
|
|||||||
H.equip_to_slot_or_del(new hat(H), slot_head)
|
H.equip_to_slot_or_del(new hat(H), slot_head)
|
||||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), slot_w_uniform)
|
H.equip_to_slot_or_del(new /obj/item/clothing/under/roman(H), slot_w_uniform)
|
||||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), slot_shoes)
|
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(H), slot_shoes)
|
||||||
H.equip_to_slot_or_del(new /obj/item/weapon/shield/riot/roman(H), slot_l_hand)
|
H.put_in_hands_or_del(new /obj/item/weapon/shield/riot/roman(H))
|
||||||
H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_r_hand)
|
H.put_in_hands_or_del(new /obj/item/weapon/claymore(H))
|
||||||
H.equip_to_slot_or_del(new /obj/item/weapon/twohanded/spear(H), slot_back)
|
H.equip_to_slot_or_del(new /obj/item/weapon/twohanded/spear(H), slot_back)
|
||||||
|
|
||||||
|
|
||||||
@@ -337,15 +337,15 @@ var/global/list/multiverse = list()
|
|||||||
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_ears)
|
||||||
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/glasses/sunglasses(M), slot_glasses)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/really_black(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/really_black(M), slot_w_uniform)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("roman")
|
if("roman")
|
||||||
var/hat = pick(/obj/item/clothing/head/helmet/roman, /obj/item/clothing/head/helmet/roman/legionaire)
|
var/hat = pick(/obj/item/clothing/head/helmet/roman, /obj/item/clothing/head/helmet/roman/legionaire)
|
||||||
M.equip_to_slot_or_del(new hat(M), slot_head)
|
M.equip_to_slot_or_del(new hat(M), slot_head)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/roman(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/roman(M), slot_w_uniform)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(M), slot_shoes)
|
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/roman(M), slot_shoes)
|
||||||
M.equip_to_slot_or_del(new /obj/item/weapon/shield/riot/roman(M), slot_l_hand)
|
M.put_in_hands_or_del(new /obj/item/weapon/shield/riot/roman(M))
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("wizard")
|
if("wizard")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), slot_w_uniform)
|
||||||
@@ -353,13 +353,13 @@ var/global/list/multiverse = list()
|
|||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
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_ears)
|
||||||
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/clothing/head/wizard/red(M), slot_head)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
if("cyborg")
|
if("cyborg")
|
||||||
for(var/X in M.bodyparts)
|
for(var/X in M.bodyparts)
|
||||||
var/obj/item/bodypart/affecting = X
|
var/obj/item/bodypart/affecting = X
|
||||||
affecting.change_bodypart_status(ORGAN_ROBOTIC)
|
affecting.change_bodypart_status(ORGAN_ROBOTIC)
|
||||||
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/glasses/thermal/eyepatch(M), slot_glasses)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("syndicate")
|
if("syndicate")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
|
||||||
@@ -369,34 +369,34 @@ var/global/list/multiverse = list()
|
|||||||
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_ears)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
|
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M),slot_wear_mask)
|
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M),slot_wear_mask)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("assistant")
|
if("assistant")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
|
||||||
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_ears)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
|
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("animu")
|
if("animu")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
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_ears)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/kitty(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/kitty(M), slot_head)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/schoolgirl/red(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/schoolgirl/red(M), slot_w_uniform)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("cultist")
|
if("cultist")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(M), slot_head)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(M), slot_wear_suit)
|
M.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(M), slot_wear_suit)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(M), slot_shoes)
|
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(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_ears)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("highlander")
|
if("highlander")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(M), slot_w_uniform)
|
||||||
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_ears)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret(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/shoes/combat(M), slot_shoes)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("clown")
|
if("clown")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
|
||||||
@@ -404,7 +404,7 @@ var/global/list/multiverse = list()
|
|||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
|
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
|
||||||
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/mask/gas/clown_hat(M), slot_wear_mask)
|
||||||
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_l_store)
|
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_l_store)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("killer")
|
if("killer")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
|
||||||
@@ -416,7 +416,7 @@ var/global/list/multiverse = list()
|
|||||||
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/clothing/suit/apron(M), slot_wear_suit)
|
||||||
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_store)
|
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_store)
|
||||||
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
|
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
for(var/obj/item/carried_item in M.contents)
|
for(var/obj/item/carried_item in M.contents)
|
||||||
if(!istype(carried_item, /obj/item/weapon/implant))
|
if(!istype(carried_item, /obj/item/weapon/implant))
|
||||||
carried_item.add_mob_blood(M)
|
carried_item.add_mob_blood(M)
|
||||||
@@ -427,7 +427,7 @@ var/global/list/multiverse = list()
|
|||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
|
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
|
||||||
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_ears)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("soviet")
|
if("soviet")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/pirate/captain(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/pirate/captain(M), slot_head)
|
||||||
@@ -436,7 +436,7 @@ var/global/list/multiverse = list()
|
|||||||
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_ears)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/pirate/captain(M), slot_wear_suit)
|
M.equip_to_slot_or_del(new /obj/item/clothing/suit/pirate/captain(M), slot_wear_suit)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("officer")
|
if("officer")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/beret(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/beret(M), slot_head)
|
||||||
@@ -447,14 +447,14 @@ var/global/list/multiverse = list()
|
|||||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/jacket/miljacket(M), slot_wear_suit)
|
M.equip_to_slot_or_del(new /obj/item/clothing/suit/jacket/miljacket(M), slot_wear_suit)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
|
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
if("gladiator")
|
if("gladiator")
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/gladiator(M), slot_head)
|
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/gladiator(M), slot_head)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/gladiator(M), slot_w_uniform)
|
M.equip_to_slot_or_del(new /obj/item/clothing/under/gladiator(M), slot_w_uniform)
|
||||||
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_ears)
|
||||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), slot_shoes)
|
||||||
M.equip_to_slot_or_del(sword, slot_r_hand)
|
M.put_in_hands_or_del(sword)
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -137,7 +137,9 @@
|
|||||||
qdel(wizard_mob.wear_suit)
|
qdel(wizard_mob.wear_suit)
|
||||||
qdel(wizard_mob.head)
|
qdel(wizard_mob.head)
|
||||||
qdel(wizard_mob.shoes)
|
qdel(wizard_mob.shoes)
|
||||||
qdel(wizard_mob.r_hand)
|
for(var/obj/item/I in wizard_mob.held_items)
|
||||||
|
wizard_mob.unEquip(I)
|
||||||
|
qdel(I)
|
||||||
qdel(wizard_mob.r_store)
|
qdel(wizard_mob.r_store)
|
||||||
qdel(wizard_mob.l_store)
|
qdel(wizard_mob.l_store)
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@
|
|||||||
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(wizard_mob), slot_r_store)
|
wizard_mob.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(wizard_mob), slot_r_store)
|
||||||
var/obj/item/weapon/spellbook/spellbook = new /obj/item/weapon/spellbook(wizard_mob)
|
var/obj/item/weapon/spellbook/spellbook = new /obj/item/weapon/spellbook(wizard_mob)
|
||||||
spellbook.owner = wizard_mob
|
spellbook.owner = wizard_mob
|
||||||
wizard_mob.equip_to_slot_or_del(spellbook, slot_r_hand)
|
wizard_mob.put_in_hands_or_del(spellbook)
|
||||||
|
|
||||||
wizard_mob << "You will find a list of available spells in your spell book. Choose your magic arsenal carefully."
|
wizard_mob << "You will find a list of available spells in your spell book. Choose your magic arsenal carefully."
|
||||||
wizard_mob << "The spellbook is bound to you, and others cannot use it."
|
wizard_mob << "The spellbook is bound to you, and others cannot use it."
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
user << "<span class='warning'>There is already a PDA inside!</span>"
|
user << "<span class='warning'>There is already a PDA inside!</span>"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
var/obj/item/device/pda/P = user.get_active_hand()
|
var/obj/item/device/pda/P = user.get_active_held_item()
|
||||||
if(istype(P))
|
if(istype(P))
|
||||||
if(!user.drop_item())
|
if(!user.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ var/time_last_changed_position = 0
|
|||||||
region_access = null
|
region_access = null
|
||||||
head_subordinates = null
|
head_subordinates = null
|
||||||
else
|
else
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if (istype(I, /obj/item/weapon/card/id))
|
if (istype(I, /obj/item/weapon/card/id))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
@@ -329,7 +329,7 @@ var/time_last_changed_position = 0
|
|||||||
scan.verb_pickup()
|
scan.verb_pickup()
|
||||||
scan = null
|
scan = null
|
||||||
else
|
else
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if (istype(I, /obj/item/weapon/card/id))
|
if (istype(I, /obj/item/weapon/card/id))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -270,7 +270,7 @@
|
|||||||
src.menu = 4
|
src.menu = 4
|
||||||
|
|
||||||
else if (src.menu == 4)
|
else if (src.menu == 4)
|
||||||
var/obj/item/weapon/card/id/C = usr.get_active_hand()
|
var/obj/item/weapon/card/id/C = usr.get_active_held_item()
|
||||||
if (istype(C)||istype(C, /obj/item/device/pda))
|
if (istype(C)||istype(C, /obj/item/device/pda))
|
||||||
if(src.check_access(C))
|
if(src.check_access(C))
|
||||||
src.temp = "[src.active_record.fields["name"]] => Record deleted."
|
src.temp = "[src.active_record.fields["name"]] => Record deleted."
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
|||||||
src.state = STATE_DEFAULT
|
src.state = STATE_DEFAULT
|
||||||
if("login")
|
if("login")
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
var/obj/item/weapon/card/id/I = M.get_active_held_item()
|
||||||
if (istype(I, /obj/item/device/pda))
|
if (istype(I, /obj/item/device/pda))
|
||||||
var/obj/item/device/pda/pda = I
|
var/obj/item/device/pda/pda = I
|
||||||
I = pda.id
|
I = pda.id
|
||||||
@@ -82,7 +82,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
|||||||
|
|
||||||
if("swipeidseclevel")
|
if("swipeidseclevel")
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
var/obj/item/weapon/card/id/I = M.get_active_held_item()
|
||||||
if (istype(I, /obj/item/device/pda))
|
if (istype(I, /obj/item/device/pda))
|
||||||
var/obj/item/device/pda/pda = I
|
var/obj/item/device/pda/pda = I
|
||||||
I = pda.id
|
I = pda.id
|
||||||
|
|||||||
@@ -91,14 +91,14 @@
|
|||||||
beacon = findbeacon()
|
beacon = findbeacon()
|
||||||
if("handle_id")
|
if("handle_id")
|
||||||
if(id)
|
if(id)
|
||||||
if(!usr.get_active_hand())
|
if(!usr.get_active_held_item())
|
||||||
usr.put_in_hands(id)
|
usr.put_in_hands(id)
|
||||||
id = null
|
id = null
|
||||||
else
|
else
|
||||||
id.forceMove(get_turf(src))
|
id.forceMove(get_turf(src))
|
||||||
id = null
|
id = null
|
||||||
else
|
else
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -212,13 +212,13 @@
|
|||||||
src.temp = null
|
src.temp = null
|
||||||
if(href_list["scan"])
|
if(href_list["scan"])
|
||||||
if(src.scan)
|
if(src.scan)
|
||||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_held_item())
|
||||||
usr.put_in_hands(scan)
|
usr.put_in_hands(scan)
|
||||||
else
|
else
|
||||||
scan.loc = get_turf(src)
|
scan.loc = get_turf(src)
|
||||||
src.scan = null
|
src.scan = null
|
||||||
else
|
else
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if(istype(I, /obj/item/weapon/card/id))
|
if(istype(I, /obj/item/weapon/card/id))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
if(href_list["id"])
|
if(href_list["id"])
|
||||||
if(href_list["id"] =="insert" && !inserted_id)
|
if(href_list["id"] =="insert" && !inserted_id)
|
||||||
var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
|
var/obj/item/weapon/card/id/prisoner/I = usr.get_active_held_item()
|
||||||
if(istype(I))
|
if(istype(I))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -295,13 +295,13 @@ What a mess.*/
|
|||||||
|
|
||||||
if("Confirm Identity")
|
if("Confirm Identity")
|
||||||
if(scan)
|
if(scan)
|
||||||
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand())
|
if(istype(usr,/mob/living/carbon/human) && !usr.get_active_held_item())
|
||||||
usr.put_in_hands(scan)
|
usr.put_in_hands(scan)
|
||||||
else
|
else
|
||||||
scan.loc = get_turf(src)
|
scan.loc = get_turf(src)
|
||||||
scan = null
|
scan = null
|
||||||
else
|
else
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if(istype(I, /obj/item/weapon/card/id))
|
if(istype(I, /obj/item/weapon/card/id))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
@@ -740,8 +740,8 @@ What a mess.*/
|
|||||||
if(selection)
|
if(selection)
|
||||||
P = new()
|
P = new()
|
||||||
P.photocreate(selection.fields["icon"], selection.fields["img"], selection.fields["desc"])
|
P.photocreate(selection.fields["icon"], selection.fields["img"], selection.fields["desc"])
|
||||||
else if(istype(user.get_active_hand(), /obj/item/weapon/photo))
|
else if(istype(user.get_active_held_item(), /obj/item/weapon/photo))
|
||||||
P = user.get_active_hand()
|
P = user.get_active_held_item()
|
||||||
return P
|
return P
|
||||||
|
|
||||||
/obj/machinery/computer/secure_data/emp_act(severity)
|
/obj/machinery/computer/secure_data/emp_act(severity)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
|
|||||||
user << "<span class='notice'>The [src] already has an uplink in it.</span>"
|
user << "<span class='notice'>The [src] already has an uplink in it.</span>"
|
||||||
return
|
return
|
||||||
if(O.hidden_uplink)
|
if(O.hidden_uplink)
|
||||||
var/obj/item/I = user.get_active_hand()
|
var/obj/item/I = user.get_active_held_item()
|
||||||
if(!user.drop_item())
|
if(!user.drop_item())
|
||||||
return
|
return
|
||||||
uplinkholder = I
|
uplinkholder = I
|
||||||
|
|||||||
@@ -81,14 +81,14 @@
|
|||||||
switch(action)
|
switch(action)
|
||||||
if("handle_id")
|
if("handle_id")
|
||||||
if(inserted_id)
|
if(inserted_id)
|
||||||
if(!usr.get_active_hand())
|
if(!usr.get_active_held_item())
|
||||||
usr.put_in_hands(inserted_id)
|
usr.put_in_hands(inserted_id)
|
||||||
inserted_id = null
|
inserted_id = null
|
||||||
else
|
else
|
||||||
inserted_id.forceMove(get_turf(src))
|
inserted_id.forceMove(get_turf(src))
|
||||||
inserted_id = null
|
inserted_id = null
|
||||||
else
|
else
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = usr.get_active_held_item()
|
||||||
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
if(istype(I, /obj/item/weapon/card/id/prisoner))
|
||||||
if(!usr.drop_item())
|
if(!usr.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -791,8 +791,8 @@ var/list/obj/machinery/newscaster/allCasters = list()
|
|||||||
else
|
else
|
||||||
qdel(photo)
|
qdel(photo)
|
||||||
photo = null
|
photo = null
|
||||||
if(istype(user.get_active_hand(), /obj/item/weapon/photo))
|
if(istype(user.get_active_held_item(), /obj/item/weapon/photo))
|
||||||
photo = user.get_active_hand()
|
photo = user.get_active_held_item()
|
||||||
if(!user.drop_item())
|
if(!user.drop_item())
|
||||||
return
|
return
|
||||||
photo.loc = src
|
photo.loc = src
|
||||||
|
|||||||
@@ -548,10 +548,7 @@
|
|||||||
if(allowed(perp) && !lasercolor) //if the perp has security access, return 0
|
if(allowed(perp) && !lasercolor) //if the perp has security access, return 0
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/revolver/doublebarrel)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
|
if(perp.is_holding_item_of_type(/obj/item/weapon/gun) || perp.is_holding_item_of_type(/obj/item/weapon/melee/baton))
|
||||||
threatcount += 4
|
|
||||||
|
|
||||||
if((istype(perp.r_hand, /obj/item/weapon/gun) && !istype(perp.r_hand, /obj/item/weapon/gun/projectile/revolver/doublebarrel)) || istype(perp.r_hand, /obj/item/weapon/melee/baton))
|
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
|
|
||||||
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee/baton))
|
if(istype(perp.belt, /obj/item/weapon/gun) || istype(perp.belt, /obj/item/weapon/melee/baton))
|
||||||
@@ -561,7 +558,7 @@
|
|||||||
threatcount = 0 //But does not target anyone else
|
threatcount = 0 //But does not target anyone else
|
||||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
if(istype(perp.wear_suit, /obj/item/clothing/suit/redtag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if(istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/redtag) || istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/redtag))
|
if(perp.is_holding_item_of_type(/obj/item/weapon/gun/energy/laser/redtag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
|
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/redtag))
|
||||||
threatcount += 2
|
threatcount += 2
|
||||||
@@ -570,7 +567,7 @@
|
|||||||
threatcount = 0
|
threatcount = 0
|
||||||
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
if(istype(perp.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if((istype(perp.r_hand,/obj/item/weapon/gun/energy/laser/bluetag)) || (istype(perp.l_hand,/obj/item/weapon/gun/energy/laser/bluetag)))
|
if(perp.is_holding_item_of_type(/obj/item/weapon/gun/energy/laser/bluetag))
|
||||||
threatcount += 4
|
threatcount += 4
|
||||||
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
if(istype(perp.belt, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||||
threatcount += 2
|
threatcount += 2
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
// insert cell
|
// insert cell
|
||||||
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand()
|
var/obj/item/weapon/stock_parts/cell/C = usr.get_active_held_item()
|
||||||
if(istype(C))
|
if(istype(C))
|
||||||
if(!user.drop_item())
|
if(!user.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
// You need a multitool to use this, or be silicon
|
// You need a multitool to use this, or be silicon
|
||||||
if(!issilicon(user))
|
if(!issilicon(user))
|
||||||
// istype returns false if the value is null
|
// istype returns false if the value is null
|
||||||
if(!istype(user.get_active_hand(), /obj/item/device/multitool))
|
if(!istype(user.get_active_held_item(), /obj/item/device/multitool))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(stat & (BROKEN|NOPOWER))
|
if(stat & (BROKEN|NOPOWER))
|
||||||
@@ -133,14 +133,14 @@
|
|||||||
|
|
||||||
var/obj/item/device/multitool/P = null
|
var/obj/item/device/multitool/P = null
|
||||||
// Let's double check
|
// Let's double check
|
||||||
if(!issilicon(user) && istype(user.get_active_hand(), /obj/item/device/multitool))
|
if(!issilicon(user) && istype(user.get_active_held_item(), /obj/item/device/multitool))
|
||||||
P = user.get_active_hand()
|
P = user.get_active_held_item()
|
||||||
else if(isAI(user))
|
else if(isAI(user))
|
||||||
var/mob/living/silicon/ai/U = user
|
var/mob/living/silicon/ai/U = user
|
||||||
P = U.aiMulti
|
P = U.aiMulti
|
||||||
else if(isrobot(user) && in_range(user, src))
|
else if(isrobot(user) && in_range(user, src))
|
||||||
if(istype(user.get_active_hand(), /obj/item/device/multitool))
|
if(istype(user.get_active_held_item(), /obj/item/device/multitool))
|
||||||
P = user.get_active_hand()
|
P = user.get_active_held_item()
|
||||||
return P
|
return P
|
||||||
|
|
||||||
// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
|
// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(!issilicon(usr))
|
if(!issilicon(usr))
|
||||||
if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
if(!istype(usr.get_active_held_item(), /obj/item/device/multitool))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/device/multitool/P = get_multitool(usr)
|
var/obj/item/device/multitool/P = get_multitool(usr)
|
||||||
|
|||||||
@@ -426,7 +426,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
coin.loc = loc
|
coin.loc = loc
|
||||||
if(!usr.get_active_hand())
|
if(!usr.get_active_held_item())
|
||||||
usr.put_in_hands(coin)
|
usr.put_in_hands(coin)
|
||||||
usr << "<span class='notice'>You remove [coin] from [src].</span>"
|
usr << "<span class='notice'>You remove [coin] from [src].</span>"
|
||||||
coin = null
|
coin = null
|
||||||
|
|||||||
@@ -130,8 +130,7 @@
|
|||||||
|
|
||||||
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||||
chainsaw.flags |= NODROP
|
chainsaw.flags |= NODROP
|
||||||
victim.drop_r_hand()
|
victim.drop_all_held_items()
|
||||||
victim.drop_l_hand()
|
|
||||||
victim.put_in_hands(chainsaw)
|
victim.put_in_hands(chainsaw)
|
||||||
chainsaw.attack_self(victim)
|
chainsaw.attack_self(victim)
|
||||||
chainsaw.wield(victim)
|
chainsaw.wield(victim)
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
|||||||
user << "<span class='notice'>You put out the fire on [src].</span>"
|
user << "<span class='notice'>You put out the fire on [src].</span>"
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>You burn your hand on [src]!</span>"
|
user << "<span class='warning'>You burn your hand on [src]!</span>"
|
||||||
var/obj/item/bodypart/affecting = H.get_bodypart("[user.hand ? "l" : "r" ]_arm")
|
var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
|
||||||
if(affecting && affecting.take_damage( 0, 5 )) // 5 burn damage
|
if(affecting && affecting.take_damage( 0, 5 )) // 5 burn damage
|
||||||
H.update_damage_overlays(0)
|
H.update_damage_overlays(0)
|
||||||
H.updatehealth()
|
H.updatehealth()
|
||||||
@@ -367,7 +367,7 @@ obj/item/proc/item_action_slot_check(slot, mob/user)
|
|||||||
if(usr.incapacitated() || !Adjacent(usr) || usr.lying)
|
if(usr.incapacitated() || !Adjacent(usr) || usr.lying)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(usr.get_active_hand() == null) // Let me know if this has any problems -Yota
|
if(usr.get_active_held_item() == null) // Let me know if this has any problems -Yota
|
||||||
usr.UnarmedAttack(src)
|
usr.UnarmedAttack(src)
|
||||||
|
|
||||||
//This proc is executed when someone clicks the on-screen UI button.
|
//This proc is executed when someone clicks the on-screen UI button.
|
||||||
@@ -545,11 +545,7 @@ obj/item/proc/item_action_slot_check(slot, mob/user)
|
|||||||
if(ismob(location))
|
if(ismob(location))
|
||||||
var/mob/M = location
|
var/mob/M = location
|
||||||
var/success = FALSE
|
var/success = FALSE
|
||||||
if(src == M.get_item_by_slot(slot_l_hand))
|
if(src == M.get_item_by_slot(slot_wear_mask))
|
||||||
success = TRUE
|
|
||||||
else if(src == M.get_item_by_slot(slot_r_hand))
|
|
||||||
success = TRUE
|
|
||||||
else if(src == M.get_item_by_slot(slot_wear_mask))
|
|
||||||
success = TRUE
|
success = TRUE
|
||||||
if(success)
|
if(success)
|
||||||
location = get_turf(M)
|
location = get_turf(M)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
|
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
|
||||||
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
|
if (istype(I, /obj/item/weapon/pen) || istype(I, /obj/item/toy/crayon))
|
||||||
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
|
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
|
||||||
if(user.get_active_hand() != I)
|
if(user.get_active_held_item() != I)
|
||||||
return
|
return
|
||||||
if(!in_range(src, user) && loc != user)
|
if(!in_range(src, user) && loc != user)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
if(O)
|
if(O)
|
||||||
if (istype(loc, /mob))
|
if (istype(loc, /mob))
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
if(M.get_active_hand() == null)
|
if(M.get_active_held_item() == null)
|
||||||
M.put_in_hands(O)
|
M.put_in_hands(O)
|
||||||
usr << "<span class='notice'>You remove \the [O] from \the [src].</span>"
|
usr << "<span class='notice'>You remove \the [O] from \the [src].</span>"
|
||||||
return
|
return
|
||||||
@@ -721,14 +721,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
if (id)
|
if (id)
|
||||||
remove_id()
|
remove_id()
|
||||||
else
|
else
|
||||||
var/obj/item/I = user.get_active_hand()
|
var/obj/item/I = user.get_active_held_item()
|
||||||
if (istype(I, /obj/item/weapon/card/id))
|
if (istype(I, /obj/item/weapon/card/id))
|
||||||
if(!user.unEquip(I))
|
if(!user.unEquip(I))
|
||||||
return 0
|
return 0
|
||||||
I.loc = src
|
I.loc = src
|
||||||
id = I
|
id = I
|
||||||
else
|
else
|
||||||
var/obj/item/weapon/card/I = user.get_active_hand()
|
var/obj/item/weapon/card/I = user.get_active_held_item()
|
||||||
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
|
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
|
||||||
if(!user.unEquip(I))
|
if(!user.unEquip(I))
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||||
if(loc == user)
|
if(loc == user)
|
||||||
if(mytape)
|
if(mytape)
|
||||||
if(user.l_hand != src && user.r_hand != src)
|
if(!user.is_holding(src))
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
eject(user)
|
eject(user)
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
return
|
return
|
||||||
icon_state = "latexballon_blow"
|
icon_state = "latexballon_blow"
|
||||||
item_state = "latexballon"
|
item_state = "latexballon"
|
||||||
user.update_inv_r_hand()
|
user.update_inv_hands()
|
||||||
user.update_inv_l_hand()
|
|
||||||
user << "<span class='notice'>You blow up [src] with [tank].</span>"
|
user << "<span class='notice'>You blow up [src] with [tank].</span>"
|
||||||
air_contents = tank.remove_air_volume(3)
|
air_contents = tank.remove_air_volume(3)
|
||||||
|
|
||||||
@@ -29,8 +28,7 @@
|
|||||||
item_state = "lgloves"
|
item_state = "lgloves"
|
||||||
if(istype(src.loc, /mob/living))
|
if(istype(src.loc, /mob/living))
|
||||||
var/mob/living/user = src.loc
|
var/mob/living/user = src.loc
|
||||||
user.update_inv_r_hand()
|
user.update_inv_hands()
|
||||||
user.update_inv_l_hand()
|
|
||||||
loc.assume_air(air_contents)
|
loc.assume_air(air_contents)
|
||||||
|
|
||||||
/obj/item/latexballon/ex_act(severity, target)
|
/obj/item/latexballon/ex_act(severity, target)
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||||
B.loc = get_turf(src)
|
B.loc = get_turf(src)
|
||||||
user << "<span class='notice'>You arm the robot frame.</span>"
|
user << "<span class='notice'>You arm the robot frame.</span>"
|
||||||
if (user.get_inactive_hand()==src)
|
if (user.get_inactive_held_item()==src)
|
||||||
user.unEquip(src)
|
user.unEquip(src)
|
||||||
user.put_in_inactive_hand(B)
|
user.put_in_inactive_hand(B)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/mob/living/living_user = usr
|
var/mob/living/living_user = usr
|
||||||
var/obj/item/item_in_hand = living_user.get_active_hand()
|
var/obj/item/item_in_hand = living_user.get_active_held_item()
|
||||||
if(!istype(item_in_hand, /obj/item/device/multitool))
|
if(!istype(item_in_hand, /obj/item/device/multitool))
|
||||||
living_user << "<span class='warning'>You need a multitool!</span>"
|
living_user << "<span class='warning'>You need a multitool!</span>"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
|||||||
"<span class='italics'>You hear welding.</span>")
|
"<span class='italics'>You hear welding.</span>")
|
||||||
var/obj/item/stack/rods/R = src
|
var/obj/item/stack/rods/R = src
|
||||||
src = null
|
src = null
|
||||||
var/replace = (user.get_inactive_hand()==R)
|
var/replace = (user.get_inactive_held_item()==R)
|
||||||
R.use(2)
|
R.use(2)
|
||||||
if (!R && replace)
|
if (!R && replace)
|
||||||
user.put_in_hands(new_item)
|
user.put_in_hands(new_item)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
RG.add_fingerprint(user)
|
RG.add_fingerprint(user)
|
||||||
var/obj/item/stack/sheet/glass/G = src
|
var/obj/item/stack/sheet/glass/G = src
|
||||||
src = null
|
src = null
|
||||||
var/replace = (user.get_inactive_hand()==G)
|
var/replace = (user.get_inactive_held_item()==G)
|
||||||
V.use(1)
|
V.use(1)
|
||||||
G.use(1)
|
G.use(1)
|
||||||
if (!G && replace)
|
if (!G && replace)
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.specflags)) // golems, etc
|
if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.specflags)) // golems, etc
|
||||||
H << "<span class='warning'>[src] cuts into your hand!</span>"
|
H << "<span class='warning'>[src] cuts into your hand!</span>"
|
||||||
var/organ = (H.hand ? "l_" : "r_") + "arm"
|
var/organ = ((H.active_hand_index % 2 == 0) ? "r_" : "l_") + "arm"
|
||||||
var/obj/item/bodypart/affecting = H.get_bodypart(organ)
|
var/obj/item/bodypart/affecting = H.get_bodypart(organ)
|
||||||
if(affecting && affecting.take_damage(force / 2))
|
if(affecting && affecting.take_damage(force / 2))
|
||||||
H.update_damage_overlays(0)
|
H.update_damage_overlays(0)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
/obj/item/stack/Topic(href, href_list)
|
/obj/item/stack/Topic(href, href_list)
|
||||||
..()
|
..()
|
||||||
if (usr.restrained() || usr.stat || (usr.get_active_hand() != src && usr.get_inactive_hand() != src))
|
if (usr.restrained() || usr.stat || !usr.is_holding(src))
|
||||||
return
|
return
|
||||||
if (href_list["make"])
|
if (href_list["make"])
|
||||||
if (src.get_amount() < 1) qdel(src) //Never should happen
|
if (src.get_amount() < 1) qdel(src) //Never should happen
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/stack/attack_hand(mob/user)
|
/obj/item/stack/attack_hand(mob/user)
|
||||||
if (user.get_inactive_hand() == src)
|
if (user.get_inactive_held_item() == src)
|
||||||
if(zero_amount())
|
if(zero_amount())
|
||||||
return
|
return
|
||||||
change_stack(user,1)
|
change_stack(user,1)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
"<span class='italics'>You hear welding.</span>")
|
"<span class='italics'>You hear welding.</span>")
|
||||||
var/obj/item/stack/rods/R = src
|
var/obj/item/stack/rods/R = src
|
||||||
src = null
|
src = null
|
||||||
var/replace = (user.get_inactive_hand()==R)
|
var/replace = (user.get_inactive_held_item()==R)
|
||||||
R.use(4)
|
R.use(4)
|
||||||
if (!R && replace)
|
if (!R && replace)
|
||||||
user.put_in_hands(new_item)
|
user.put_in_hands(new_item)
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"<span class='italics'>You hear welding.</span>")
|
"<span class='italics'>You hear welding.</span>")
|
||||||
var/obj/item/stack/rods/R = src
|
var/obj/item/stack/rods/R = src
|
||||||
src = null
|
src = null
|
||||||
var/replace = (user.get_inactive_hand()==R)
|
var/replace = (user.get_inactive_held_item()==R)
|
||||||
R.use(4)
|
R.use(4)
|
||||||
if (!R && replace)
|
if (!R && replace)
|
||||||
user.put_in_hands(new_item)
|
user.put_in_hands(new_item)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
var/obj/item/I = target
|
var/obj/item/I = target
|
||||||
if(istype(I, /obj/item/smallDelivery))
|
if(istype(I, /obj/item/smallDelivery))
|
||||||
return
|
return
|
||||||
if(user.r_hand == I || user.l_hand == I)
|
if(user.is_holding(I))
|
||||||
if(!user.unEquip(I))
|
if(!user.unEquip(I))
|
||||||
return
|
return
|
||||||
else if(!isturf(I.loc))
|
else if(!isturf(I.loc))
|
||||||
|
|||||||
@@ -260,12 +260,7 @@
|
|||||||
|
|
||||||
if(active)
|
if(active)
|
||||||
icon_state = "swordrainbow"
|
icon_state = "swordrainbow"
|
||||||
// Updating overlays, copied from welder code.
|
user.update_inv_hands()
|
||||||
// I tried calling attack_self twice, which looked cool, except it somehow didn't update the overlays!!
|
|
||||||
if(user.r_hand == src)
|
|
||||||
user.update_inv_r_hand(0)
|
|
||||||
else if(user.l_hand == src)
|
|
||||||
user.update_inv_l_hand(0)
|
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>It's already fabulous!</span>"
|
user << "<span class='warning'>It's already fabulous!</span>"
|
||||||
else
|
else
|
||||||
@@ -777,11 +772,7 @@
|
|||||||
var/obj/screen/inventory/hand/H = over_object
|
var/obj/screen/inventory/hand/H = over_object
|
||||||
if(!remove_item_from_storage(M))
|
if(!remove_item_from_storage(M))
|
||||||
M.unEquip(src)
|
M.unEquip(src)
|
||||||
switch(H.slot_id)
|
M.put_in_hand(src, H.held_index)
|
||||||
if(slot_r_hand)
|
|
||||||
M.put_in_r_hand(src)
|
|
||||||
if(slot_l_hand)
|
|
||||||
M.put_in_l_hand(src)
|
|
||||||
usr << "<span class='notice'>You pick up the deck.</span>"
|
usr << "<span class='notice'>You pick up the deck.</span>"
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -822,7 +813,7 @@
|
|||||||
var/mob/living/carbon/human/cardUser = usr
|
var/mob/living/carbon/human/cardUser = usr
|
||||||
var/O = src
|
var/O = src
|
||||||
if(href_list["pick"])
|
if(href_list["pick"])
|
||||||
if (cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
|
if (cardUser.is_holding(src))
|
||||||
var/choice = href_list["pick"]
|
var/choice = href_list["pick"]
|
||||||
var/obj/item/toy/cards/singlecard/C = new/obj/item/toy/cards/singlecard(cardUser.loc)
|
var/obj/item/toy/cards/singlecard/C = new/obj/item/toy/cards/singlecard(cardUser.loc)
|
||||||
src.currenthand -= choice
|
src.currenthand -= choice
|
||||||
@@ -899,7 +890,7 @@
|
|||||||
/obj/item/toy/cards/singlecard/examine(mob/user)
|
/obj/item/toy/cards/singlecard/examine(mob/user)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/cardUser = user
|
var/mob/living/carbon/human/cardUser = user
|
||||||
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
|
if(cardUser.is_holding(src))
|
||||||
cardUser.visible_message("[cardUser] checks \his card.", "<span class='notice'>The card reads: [src.cardname]</span>")
|
cardUser.visible_message("[cardUser] checks \his card.", "<span class='notice'>The card reads: [src.cardname]</span>")
|
||||||
else
|
else
|
||||||
cardUser << "<span class='warning'>You need to have the card in your hand to check it!</span>"
|
cardUser << "<span class='warning'>You need to have the card in your hand to check it!</span>"
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
|
var/obj/item/weapon/gun/energy/chrono_gun/gun = null
|
||||||
|
|
||||||
/obj/item/projectile/energy/chrono_beam/fire()
|
/obj/item/projectile/energy/chrono_beam/fire()
|
||||||
gun = firer.get_active_hand()
|
gun = firer.get_active_held_item()
|
||||||
if(istype(gun))
|
if(istype(gun))
|
||||||
return ..()
|
return ..()
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -193,8 +193,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
M.update_inv_wear_mask()
|
M.update_inv_wear_mask()
|
||||||
M.update_inv_l_hand()
|
M.update_inv_hands()
|
||||||
M.update_inv_r_hand()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
|
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
|
||||||
@@ -472,7 +471,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
icon_state = lit ? "[icon_state]_on" : "[initial(icon_state)]"
|
icon_state = lit ? "[icon_state]_on" : "[initial(icon_state)]"
|
||||||
|
|
||||||
/obj/item/weapon/lighter/attack_self(mob/living/user)
|
/obj/item/weapon/lighter/attack_self(mob/living/user)
|
||||||
if(user.r_hand == src || user.l_hand == src)
|
if(user.is_holding(src))
|
||||||
if(!lit)
|
if(!lit)
|
||||||
lit = 1
|
lit = 1
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -486,7 +485,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
if(prob(75))
|
if(prob(75))
|
||||||
user.visible_message("After a few attempts, [user] manages to light [src].", "<span class='notice'>After a few attempts, you manage to light [src].</span>")
|
user.visible_message("After a few attempts, [user] manages to light [src].", "<span class='notice'>After a few attempts, you manage to light [src].</span>")
|
||||||
else
|
else
|
||||||
var/hitzone = user.r_hand == src ? "r_hand" : "l_hand"
|
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? "r_hand" : "l_hand"
|
||||||
user.apply_damage(5, BURN, hitzone)
|
user.apply_damage(5, BURN, hitzone)
|
||||||
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - they however burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
|
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - they however burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
|
||||||
|
|
||||||
|
|||||||
@@ -94,20 +94,10 @@
|
|||||||
var/mob/M = src.loc
|
var/mob/M = src.loc
|
||||||
if(istype(over_object, /obj/screen/inventory/hand))
|
if(istype(over_object, /obj/screen/inventory/hand))
|
||||||
var/obj/screen/inventory/hand/H = over_object
|
var/obj/screen/inventory/hand/H = over_object
|
||||||
|
if(!M.unEquip(src))
|
||||||
|
return
|
||||||
|
M.put_in_hand(src, H.held_index)
|
||||||
|
|
||||||
switch(H.slot_id)
|
|
||||||
if(slot_r_hand)
|
|
||||||
if(M.r_hand)
|
|
||||||
return
|
|
||||||
if(!M.unEquip(src))
|
|
||||||
return
|
|
||||||
M.put_in_r_hand(src)
|
|
||||||
if(slot_l_hand)
|
|
||||||
if(M.l_hand)
|
|
||||||
return
|
|
||||||
if(!M.unEquip(src))
|
|
||||||
return
|
|
||||||
M.put_in_l_hand(src)
|
|
||||||
|
|
||||||
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
|
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
|
||||||
if(W == paddles)
|
if(W == paddles)
|
||||||
@@ -334,7 +324,7 @@
|
|||||||
if(!req_defib)
|
if(!req_defib)
|
||||||
return ..()
|
return ..()
|
||||||
if(user)
|
if(user)
|
||||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
|
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_held_item()
|
||||||
if(istype(O))
|
if(istype(O))
|
||||||
O.unwield()
|
O.unwield()
|
||||||
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
|
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/c4/attack_self(mob/user)
|
/obj/item/weapon/c4/attack_self(mob/user)
|
||||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
||||||
if(user.get_active_hand() == src)
|
if(user.get_active_held_item() == src)
|
||||||
newtime = Clamp(newtime, 10, 60000)
|
newtime = Clamp(newtime, 10, 60000)
|
||||||
timer = newtime
|
timer = newtime
|
||||||
user << "Timer set for [timer] seconds."
|
user << "Timer set for [timer] seconds."
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
var/turf/location = loc
|
var/turf/location = loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/))
|
||||||
var/mob/M = location
|
var/mob/M = location
|
||||||
if(M.l_hand == src || M.r_hand == src)
|
if(M.is_holding(src))
|
||||||
location = M.loc
|
location = M.loc
|
||||||
if(isturf(location)) //start a fire if possible
|
if(isturf(location)) //start a fire if possible
|
||||||
location.hotspot_expose(700, 2)
|
location.hotspot_expose(700, 2)
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
|
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
|
||||||
if(flag) return // too close
|
if(flag) return // too close
|
||||||
// Make sure our user is still holding us
|
// Make sure our user is still holding us
|
||||||
if(user && user.get_active_hand() == src)
|
if(user && user.get_active_held_item() == src)
|
||||||
var/turf/target_turf = get_turf(target)
|
var/turf/target_turf = get_turf(target)
|
||||||
if(target_turf)
|
if(target_turf)
|
||||||
var/turflist = getline(user, target_turf)
|
var/turflist = getline(user, target_turf)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
nadeassembly.attack_self(user)
|
nadeassembly.attack_self(user)
|
||||||
return
|
return
|
||||||
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
|
||||||
if(user.get_active_hand() == src)
|
if(user.get_active_held_item() == src)
|
||||||
newtime = Clamp(newtime, 10, 60000)
|
newtime = Clamp(newtime, 10, 60000)
|
||||||
det_time = newtime
|
det_time = newtime
|
||||||
user << "Timer set for [det_time] seconds."
|
user << "Timer set for [det_time] seconds."
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user, params)
|
/obj/item/weapon/implantcase/attackby(obj/item/weapon/W, mob/user, params)
|
||||||
if(istype(W, /obj/item/weapon/pen))
|
if(istype(W, /obj/item/weapon/pen))
|
||||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||||
if(user.get_active_hand() != W)
|
if(user.get_active_held_item() != W)
|
||||||
return
|
return
|
||||||
if(!in_range(src, user) && loc != user)
|
if(!in_range(src, user) && loc != user)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
/obj/item/weapon/implanter/attackby(obj/item/weapon/W, mob/user, params)
|
||||||
if(istype(W, /obj/item/weapon/pen))
|
if(istype(W, /obj/item/weapon/pen))
|
||||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||||
if(user.get_active_hand() != W)
|
if(user.get_active_held_item() != W)
|
||||||
return
|
return
|
||||||
if(!in_range(src, user) && loc != user)
|
if(!in_range(src, user) && loc != user)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/implantpad/attack_hand(mob/user)
|
/obj/item/weapon/implantpad/attack_hand(mob/user)
|
||||||
if(case && (user.l_hand == src || user.r_hand == src))
|
if(case && user.is_holding(src))
|
||||||
user.put_in_active_hand(case)
|
user.put_in_active_hand(case)
|
||||||
|
|
||||||
case.add_fingerprint(user)
|
case.add_fingerprint(user)
|
||||||
|
|||||||
@@ -202,12 +202,7 @@
|
|||||||
|
|
||||||
if(active)
|
if(active)
|
||||||
icon_state = "swordrainbow"
|
icon_state = "swordrainbow"
|
||||||
// Updating overlays, copied from welder code.
|
user.update_inv_hands()
|
||||||
// I tried calling attack_self twice, which looked cool, except it somehow didn't update the overlays!!
|
|
||||||
if(user.r_hand == src)
|
|
||||||
user.update_inv_r_hand(0)
|
|
||||||
else if(user.l_hand == src)
|
|
||||||
user.update_inv_l_hand(0)
|
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>It's already fabulous!</span>"
|
user << "<span class='warning'>It's already fabulous!</span>"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/paint/anycolor/attack_self(mob/user)
|
/obj/item/weapon/paint/anycolor/attack_self(mob/user)
|
||||||
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "violet", "black", "white")
|
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "violet", "black", "white")
|
||||||
if ((user.get_active_hand() != src || user.stat || user.restrained()))
|
if ((user.get_active_held_item() != src || user.stat || user.restrained()))
|
||||||
return
|
return
|
||||||
switch(t1)
|
switch(t1)
|
||||||
if("red")
|
if("red")
|
||||||
|
|||||||
@@ -47,8 +47,7 @@
|
|||||||
var/obj/item/I = new foldable(get_turf(src))
|
var/obj/item/I = new foldable(get_turf(src))
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
user.put_in_hands(I)
|
user.put_in_hands(I)
|
||||||
user.update_inv_l_hand()
|
user.update_inv_hands()
|
||||||
user.update_inv_r_hand()
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/attackby(obj/item/W, mob/user, params)
|
/obj/item/weapon/storage/box/attackby(obj/item/W, mob/user, params)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
name = "\improper [name] packet"
|
name = "\improper [name] packet"
|
||||||
|
|
||||||
/obj/item/weapon/storage/fancy/cigarettes/AltClick(mob/user)
|
/obj/item/weapon/storage/fancy/cigarettes/AltClick(mob/user)
|
||||||
if(user.get_active_hand())
|
if(user.get_active_held_item())
|
||||||
return
|
return
|
||||||
for(var/obj/item/weapon/lighter/lighter in src)
|
for(var/obj/item/weapon/lighter/lighter in src)
|
||||||
remove_from_storage(lighter, user.loc)
|
remove_from_storage(lighter, user.loc)
|
||||||
|
|||||||
@@ -142,11 +142,7 @@
|
|||||||
var/obj/screen/inventory/hand/H = over_object
|
var/obj/screen/inventory/hand/H = over_object
|
||||||
if(!M.unEquip(src))
|
if(!M.unEquip(src))
|
||||||
return
|
return
|
||||||
switch(H.slot_id)
|
M.put_in_hand(src,H.held_index)
|
||||||
if(slot_r_hand)
|
|
||||||
M.put_in_r_hand(src)
|
|
||||||
if(slot_l_hand)
|
|
||||||
M.put_in_l_hand(src)
|
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
return
|
return
|
||||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||||
|
|||||||
@@ -61,11 +61,7 @@
|
|||||||
var/obj/screen/inventory/hand/H = over_object
|
var/obj/screen/inventory/hand/H = over_object
|
||||||
if(!M.unEquip(src))
|
if(!M.unEquip(src))
|
||||||
return
|
return
|
||||||
switch(H.slot_id)
|
M.put_in_hand(src,H.held_index)
|
||||||
if(slot_r_hand)
|
|
||||||
M.put_in_r_hand(src)
|
|
||||||
if(slot_l_hand)
|
|
||||||
M.put_in_l_hand(src)
|
|
||||||
|
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
|
|
||||||
@@ -75,7 +71,7 @@
|
|||||||
var/obj/item/I = O
|
var/obj/item/I = O
|
||||||
if(iscarbon(user) || isdrone(user))
|
if(iscarbon(user) || isdrone(user))
|
||||||
var/mob/living/L = user
|
var/mob/living/L = user
|
||||||
if(!L.incapacitated() && I == L.get_active_hand())
|
if(!L.incapacitated() && I == L.get_active_held_item())
|
||||||
if(can_be_inserted(I, 0))
|
if(can_be_inserted(I, 0))
|
||||||
handle_item_insertion(I, 0 , L)
|
handle_item_insertion(I, 0 , L)
|
||||||
|
|
||||||
@@ -439,11 +435,11 @@
|
|||||||
|
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(H.l_store == src && !H.get_active_hand()) //Prevents opening if it's in a pocket.
|
if(H.l_store == src && !H.get_active_held_item()) //Prevents opening if it's in a pocket.
|
||||||
H.put_in_hands(src)
|
H.put_in_hands(src)
|
||||||
H.l_store = null
|
H.l_store = null
|
||||||
return
|
return
|
||||||
if(H.r_store == src && !H.get_active_hand())
|
if(H.r_store == src && !H.get_active_held_item())
|
||||||
H.put_in_hands(src)
|
H.put_in_hands(src)
|
||||||
H.r_store = null
|
H.r_store = null
|
||||||
return
|
return
|
||||||
@@ -542,7 +538,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/storage/attack_self(mob/user)
|
/obj/item/weapon/storage/attack_self(mob/user)
|
||||||
//Clicking on itself will empty it, if it has the verb to do that.
|
//Clicking on itself will empty it, if it has the verb to do that.
|
||||||
if(user.get_active_hand() == src)
|
if(user.get_active_held_item() == src)
|
||||||
if(verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
|
if(verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
|
||||||
quick_empty()
|
quick_empty()
|
||||||
|
|
||||||
|
|||||||
@@ -83,19 +83,10 @@
|
|||||||
var/mob/M = src.loc
|
var/mob/M = src.loc
|
||||||
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
|
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
|
||||||
var/obj/screen/inventory/hand/H = over_object
|
var/obj/screen/inventory/hand/H = over_object
|
||||||
switch(H.slot_id)
|
if(!M.unEquip(src))
|
||||||
if(slot_r_hand)
|
return
|
||||||
if(M.r_hand)
|
M.put_in_hand(src, H.held_index)
|
||||||
return
|
|
||||||
if(!M.unEquip(src))
|
|
||||||
return
|
|
||||||
M.put_in_r_hand(src)
|
|
||||||
if(slot_l_hand)
|
|
||||||
if(M.l_hand)
|
|
||||||
return
|
|
||||||
if(!M.unEquip(src))
|
|
||||||
return
|
|
||||||
M.put_in_l_hand(src)
|
|
||||||
|
|
||||||
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user, params)
|
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user, params)
|
||||||
if(W == noz)
|
if(W == noz)
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ Frequency:
|
|||||||
if(turfs.len)
|
if(turfs.len)
|
||||||
L["None (Dangerous)"] = pick(turfs)
|
L["None (Dangerous)"] = pick(turfs)
|
||||||
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
|
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
|
||||||
if (user.get_active_hand() != src || user.incapacitated())
|
if (user.get_active_held_item() != src || user.incapacitated())
|
||||||
return
|
return
|
||||||
if(active_portals >= 3)
|
if(active_portals >= 3)
|
||||||
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
|
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
|
||||||
|
|||||||
@@ -363,8 +363,7 @@
|
|||||||
//mob icon update
|
//mob icon update
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
M.update_inv_r_hand(0)
|
M.update_inv_hands(0)
|
||||||
M.update_inv_l_hand(0)
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
|
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
|
||||||
if(unwieldsound)
|
if(unwieldsound)
|
||||||
playsound(loc, unwieldsound, 50, 1)
|
playsound(loc, unwieldsound, 50, 1)
|
||||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
|
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_held_item()
|
||||||
if(O && istype(O))
|
if(O && istype(O))
|
||||||
O.unwield()
|
O.unwield()
|
||||||
return
|
return
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
if(istype(user,/mob/living/carbon/monkey) )
|
if(istype(user,/mob/living/carbon/monkey) )
|
||||||
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
|
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
|
||||||
return
|
return
|
||||||
if(user.get_inactive_hand())
|
if(user.get_inactive_held_item())
|
||||||
user << "<span class='warning'>You need your other hand to be empty!</span>"
|
user << "<span class='warning'>You need your other hand to be empty!</span>"
|
||||||
return
|
return
|
||||||
if(user.get_num_arms() < 2)
|
if(user.get_num_arms() < 2)
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
..()
|
..()
|
||||||
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
|
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
|
||||||
if(user)
|
if(user)
|
||||||
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
|
var/obj/item/weapon/twohanded/O = user.get_inactive_held_item()
|
||||||
if(istype(O))
|
if(istype(O))
|
||||||
O.unwield(user)
|
O.unwield(user)
|
||||||
return unwield(user)
|
return unwield(user)
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/item/weapon/twohanded/required/attack_hand(mob/user)//Can't even pick it up without both hands empty
|
/obj/item/weapon/twohanded/required/attack_hand(mob/user)//Can't even pick it up without both hands empty
|
||||||
var/obj/item/weapon/twohanded/required/H = user.get_inactive_hand()
|
var/obj/item/weapon/twohanded/required/H = user.get_inactive_held_item()
|
||||||
if(get_dist(src,user) > 1)
|
if(get_dist(src,user) > 1)
|
||||||
return 0
|
return 0
|
||||||
if(H != null)
|
if(H != null)
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/twohanded/required/equipped(mob/user, slot)
|
/obj/item/weapon/twohanded/required/equipped(mob/user, slot)
|
||||||
..()
|
..()
|
||||||
if(slot == slot_l_hand || slot == slot_r_hand)
|
if(slot == slot_hands)
|
||||||
wield(user)
|
wield(user)
|
||||||
else
|
else
|
||||||
unwield(user)
|
unwield(user)
|
||||||
@@ -431,9 +431,8 @@
|
|||||||
else
|
else
|
||||||
hitsound = "swing_hit"
|
hitsound = "swing_hit"
|
||||||
|
|
||||||
if(src == user.get_active_hand()) //update inhands
|
if(src == user.get_active_held_item()) //update inhands
|
||||||
user.update_inv_l_hand()
|
user.update_inv_hands()
|
||||||
user.update_inv_r_hand()
|
|
||||||
for(var/X in actions)
|
for(var/X in actions)
|
||||||
var/datum/action/A = X
|
var/datum/action/A = X
|
||||||
A.UpdateButtonIcon()
|
A.UpdateButtonIcon()
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
if(user.canmove)
|
if(user.canmove)
|
||||||
climb_structure(user)
|
climb_structure(user)
|
||||||
return
|
return
|
||||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
|
||||||
return
|
return
|
||||||
if(isrobot(user))
|
if(isrobot(user))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -80,10 +80,8 @@
|
|||||||
if(!usr.canUseTopic(src))
|
if(!usr.canUseTopic(src))
|
||||||
return
|
return
|
||||||
if(ishuman(usr))
|
if(ishuman(usr))
|
||||||
if(!usr.get_active_hand())
|
if(!usr.put_in_hands(O))
|
||||||
usr.put_in_hands(O)
|
O.forceMove(get_turf(src))
|
||||||
else
|
|
||||||
O.loc = get_turf(src)
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/structure/guncase/shotgun
|
/obj/structure/guncase/shotgun
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
if(istype(P, /obj/item/weapon/pen))
|
if(istype(P, /obj/item/weapon/pen))
|
||||||
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
|
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
|
||||||
if (user.get_active_hand() != P)
|
if (user.get_active_held_item() != P)
|
||||||
return
|
return
|
||||||
if ((!in_range(src, usr) && src.loc != user))
|
if ((!in_range(src, usr) && src.loc != user))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -60,15 +60,12 @@
|
|||||||
var/obj/item/P = locate(href_list["write"])
|
var/obj/item/P = locate(href_list["write"])
|
||||||
|
|
||||||
if((P && P.loc == src)) //ifthe paper's on the board
|
if((P && P.loc == src)) //ifthe paper's on the board
|
||||||
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
|
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/weapon/pen)
|
||||||
|
if(I) //check hand for pen
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
P.attackby(usr.r_hand, usr) //then do ittttt
|
P.attackby(I, usr)
|
||||||
else
|
else
|
||||||
if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
|
usr << "<span class='notice'>You'll need something to write with!</span>"
|
||||||
add_fingerprint(usr)
|
|
||||||
P.attackby(usr.l_hand, usr)
|
|
||||||
else
|
|
||||||
usr << "<span class='notice'>You'll need something to write with!</span>"
|
|
||||||
|
|
||||||
if(href_list["read"])
|
if(href_list["read"])
|
||||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ FLOOR SAFES
|
|||||||
var/mob/living/carbon/human/user = usr
|
var/mob/living/carbon/human/user = usr
|
||||||
|
|
||||||
var/canhear = 0
|
var/canhear = 0
|
||||||
if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
|
if(user.is_holding_item_of_type(/obj/item/clothing/tie/stethoscope))
|
||||||
canhear = 1
|
canhear = 1
|
||||||
|
|
||||||
if(href_list["open"])
|
if(href_list["open"])
|
||||||
|
|||||||
@@ -484,7 +484,7 @@
|
|||||||
. = . || mover.checkpass(PASSTABLE)
|
. = . || mover.checkpass(PASSTABLE)
|
||||||
|
|
||||||
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
||||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
|
||||||
return
|
return
|
||||||
if(!user.drop_item())
|
if(!user.drop_item())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
pinned_target.nullPinnedLoc()
|
pinned_target.nullPinnedLoc()
|
||||||
nullPinnedTarget()
|
nullPinnedTarget()
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
if(!user.get_active_hand())
|
if(!user.get_active_held_item())
|
||||||
user.put_in_hands(pinned_target)
|
user.put_in_hands(pinned_target)
|
||||||
user << "<span class='notice'>You take the target out of the stake.</span>"
|
user << "<span class='notice'>You take the target out of the stake.</span>"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -251,10 +251,8 @@
|
|||||||
var/mob/living/carbon/M = L
|
var/mob/living/carbon/M = L
|
||||||
. = 1
|
. = 1
|
||||||
check_heat(M)
|
check_heat(M)
|
||||||
if(M.r_hand)
|
for(var/obj/item/I in M.held_items)
|
||||||
M.r_hand.clean_blood()
|
I.clean_blood()
|
||||||
if(M.l_hand)
|
|
||||||
M.l_hand.clean_blood()
|
|
||||||
if(M.back)
|
if(M.back)
|
||||||
if(M.back.clean_blood())
|
if(M.back.clean_blood())
|
||||||
M.update_inv_back(0)
|
M.update_inv_back(0)
|
||||||
|
|||||||
@@ -100,8 +100,8 @@
|
|||||||
if(!(lube&SLIDE_ICE))
|
if(!(lube&SLIDE_ICE))
|
||||||
playsound(C.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
playsound(C.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||||
|
|
||||||
C.accident(C.l_hand)
|
for(var/obj/item/I in C.held_items)
|
||||||
C.accident(C.r_hand)
|
C.accident(I)
|
||||||
|
|
||||||
var/olddir = C.dir
|
var/olddir = C.dir
|
||||||
if(!(lube&SLIDE_ICE))
|
if(!(lube&SLIDE_ICE))
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
if(do_after(user, slicing_duration/W.toolspeed, target = src))
|
if(do_after(user, slicing_duration/W.toolspeed, target = src))
|
||||||
if( !istype(src, /turf/closed/wall) || !user || !WT || !WT.isOn() || !T )
|
if( !istype(src, /turf/closed/wall) || !user || !WT || !WT.isOn() || !T )
|
||||||
return 1
|
return 1
|
||||||
if( user.loc == T && user.get_active_hand() == WT )
|
if( user.loc == T && user.get_active_held_item() == WT )
|
||||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||||
dismantle_wall()
|
dismantle_wall()
|
||||||
return 1
|
return 1
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
if(do_after(user, slicing_duration*0.6, target = src)) // plasma cutter is faster than welding tool
|
if(do_after(user, slicing_duration*0.6, target = src)) // plasma cutter is faster than welding tool
|
||||||
if( !istype(src, /turf/closed/wall) || !user || !W || !T )
|
if( !istype(src, /turf/closed/wall) || !user || !W || !T )
|
||||||
return 1
|
return 1
|
||||||
if( user.loc == T && user.get_active_hand() == W )
|
if( user.loc == T && user.get_active_held_item() == W )
|
||||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||||
dismantle_wall()
|
dismantle_wall()
|
||||||
visible_message("The wall was sliced apart by [user]!", "<span class='italics'>You hear metal being sliced apart.</span>")
|
visible_message("The wall was sliced apart by [user]!", "<span class='italics'>You hear metal being sliced apart.</span>")
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
||||||
if( !istype(src, /turf/closed/wall) || !user || !W || !T )
|
if( !istype(src, /turf/closed/wall) || !user || !W || !T )
|
||||||
return 1
|
return 1
|
||||||
if( user.loc == T && user.get_active_hand() == W )
|
if( user.loc == T && user.get_active_held_item() == W )
|
||||||
D.playDigSound()
|
D.playDigSound()
|
||||||
dismantle_wall()
|
dismantle_wall()
|
||||||
visible_message("<span class='warning'>[user] smashes through the [name] with the [W.name]!</span>", "<span class='italics'>You hear the grinding of metal.</span>")
|
visible_message("<span class='warning'>[user] smashes through the [name] with the [W.name]!</span>", "<span class='italics'>You hear the grinding of metal.</span>")
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user