mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-31 12:33:08 +00:00
Merge pull request #9286 from Zuhayr/dev
Fixes, clothes stripping refactor.
This commit is contained in:
@@ -24,44 +24,6 @@
|
||||
if (prob(75))
|
||||
DIFFMUT = rand(0,20)
|
||||
|
||||
/* Old, for reference (so I don't accidentally activate something) - N3X
|
||||
var/list/avnums = new/list()
|
||||
var/tempnum
|
||||
|
||||
avnums.Add(2)
|
||||
avnums.Add(12)
|
||||
avnums.Add(10)
|
||||
avnums.Add(8)
|
||||
avnums.Add(4)
|
||||
avnums.Add(11)
|
||||
avnums.Add(13)
|
||||
avnums.Add(6)
|
||||
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
HULKBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
TELEBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
FIREBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
XRAYBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
CLUMSYBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
FAKEBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
DEAFBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
BLINDBLOCK = tempnum
|
||||
*/
|
||||
var/list/numsToAssign=new()
|
||||
for(var/i=1;i<DNA_SE_LENGTH;i++)
|
||||
numsToAssign += i
|
||||
@@ -119,126 +81,3 @@
|
||||
assignedToBlock=blocks_assigned[G.block]
|
||||
assignedToBlock.Add(G.name)
|
||||
blocks_assigned[G.block]=assignedToBlock
|
||||
//testing("DNA2: Gene [G.name] assigned to block [G.block].")
|
||||
|
||||
//testing("DNA2: [numsToAssign.len] blocks are unused: [english_list(numsToAssign)]")
|
||||
|
||||
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
|
||||
|
||||
/*
|
||||
for(var/x in typesof(/datum/mutations) - /datum/mutations)
|
||||
var/datum/mutations/mut = new x
|
||||
|
||||
for(var/i = 1, i <= mut.required, i++)
|
||||
var/datum/mutationreq/require = new/datum/mutationreq
|
||||
require.block = rand(1, 13)
|
||||
require.subblock = rand(1, 3)
|
||||
|
||||
// Create random requirement identification
|
||||
require.reqID = pick("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", \
|
||||
"B", "C", "D", "E", "F")
|
||||
|
||||
mut.requirements += require
|
||||
|
||||
|
||||
global_mutations += mut// add to global mutations list!
|
||||
*/
|
||||
|
||||
/* This was used for something before, I think, but is not worth the effort to process now.
|
||||
/proc/setupcorpses()
|
||||
for (var/obj/effect/landmark/A in landmarks_list)
|
||||
if (A.name == "Corpse")
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
qdel(A)
|
||||
continue
|
||||
if (A.name == "Corpse-Engineer")
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/pda/engineering(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
|
||||
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
|
||||
//M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
|
||||
else
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
|
||||
qdel(A)
|
||||
continue
|
||||
if (A.name == "Corpse-Engineer-Space")
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space(M), slot_wear_suit)
|
||||
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
|
||||
else
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
|
||||
else
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
|
||||
qdel(A)
|
||||
continue
|
||||
if (A.name == "Corpse-Engineer-Chief")
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt(M), slot_belt)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(M), slot_w_uniform)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
|
||||
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
|
||||
else
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
|
||||
qdel(A)
|
||||
continue
|
||||
if (A.name == "Corpse-Syndicate")
|
||||
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
|
||||
M.real_name = "Corpse"
|
||||
M.death()
|
||||
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
|
||||
//M.equip_to_slot_or_del(new /obj/item/weapon/gun/revolver(M), slot_belt)
|
||||
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/shoes/black(M), slot_shoes)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
|
||||
M.equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack(M), slot_back)
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate(M), slot_wear_suit)
|
||||
if (prob(50))
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
|
||||
else
|
||||
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate(M), slot_head)
|
||||
else
|
||||
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/head/helmet/swat(M), slot_head)
|
||||
qdel(A)
|
||||
continue
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/machinery/autolathe
|
||||
name = "\improper autolathe"
|
||||
name = "autolathe"
|
||||
desc = "It produces items using metal and glass."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
@@ -140,6 +140,9 @@
|
||||
if(O.loc != user && !(istype(O,/obj/item/stack)))
|
||||
return 0
|
||||
|
||||
if(is_robot_module(O))
|
||||
return 0
|
||||
|
||||
//Resources are being loaded.
|
||||
var/obj/item/eating = O
|
||||
if(!eating.matter)
|
||||
|
||||
@@ -217,27 +217,27 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg")))
|
||||
user << "\red You can't apply a splint there!"
|
||||
if(!(affecting.limb_name in list("l_arm","r_arm","l_leg","r_leg")))
|
||||
user << "<span class='danger'>You can't apply a splint there!</span>"
|
||||
return
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
user << "\red [M]'s [limb] is already splinted!"
|
||||
user << "<span class='danger'>[M]'s [limb] is already splinted!</span>"
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You start to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if((!user.hand && affecting.name == "r_arm") || (user.hand && affecting.name == "l_arm"))
|
||||
user << "\red You can't apply a splint to the arm you're using!"
|
||||
if((!user.hand && affecting.limb_name == "r_arm") || (user.hand && affecting.limb_name == "l_arm"))
|
||||
user << "<span class='danger'>You can't apply a splint to the arm you're using!</span>"
|
||||
return
|
||||
user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
if(do_after(user, 50))
|
||||
if (M != user)
|
||||
user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] finishes applying \the [src] to [M]'s [limb].</span>", "<span class='danger'>You finish applying \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if(prob(25))
|
||||
user.visible_message("\red [user] successfully applies \the [src] to their [limb].", "\red You successfully apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] successfully applies \the [src] to their [limb].</span>", "<span class='danger'>You successfully apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
|
||||
user.visible_message("<span class='danger'>[user] fumbles \the [src].</span>", "<span class='danger'>You fumble \the [src].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
return
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
use(1)
|
||||
|
||||
@@ -98,101 +98,41 @@
|
||||
/obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob)
|
||||
if (!istype(M, /mob))
|
||||
return
|
||||
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
if (!usr.IsAdvancedToolUser())
|
||||
return
|
||||
if(inuse)
|
||||
return 0
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] is trying to inject \the [M] with \the [src]!</span>")
|
||||
inuse = 1
|
||||
s_time = world.time
|
||||
spawn(50)
|
||||
inuse = 0
|
||||
|
||||
if(!do_after(user,50))
|
||||
return
|
||||
|
||||
M.visible_message("<span class='danger'>\The [M] has been injected with \the [src] by \the [user].</span>")
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!istype(H))
|
||||
user << "<span class='warning'>Apparently it didn't work...</span>"
|
||||
return
|
||||
|
||||
// Used by admin log.
|
||||
var/injected_with_monkey = ""
|
||||
if((buf.types & DNA2_BUF_SE) && (block ? (GetState() && block == MONKEYBLOCK) : GetState(MONKEYBLOCK)))
|
||||
injected_with_monkey = " <span class='danger'>(MONKEY)</span>"
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
|
||||
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src][injected_with_monkey]")
|
||||
|
||||
if (user)
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if(!inuse)
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = M
|
||||
O.item = src
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = M.loc
|
||||
O.place = "dnainjector"
|
||||
src.inuse = 1
|
||||
spawn(50) // Not the best fix. There should be an failure proc, for /effect/equip_e/, which is called when the first initital checks fail
|
||||
inuse = 0
|
||||
M.requests += O
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if(block)// Isolated injector
|
||||
testing("Isolated block [block] injector with contents: [GetValue()]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
testing("DNA injector with contents: [english_list(buf.dna.SE)]")
|
||||
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
else
|
||||
if(!inuse)
|
||||
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
|
||||
//Foreach goto(192)
|
||||
if (!(istype(M, /mob/living/carbon/human)))
|
||||
user << "\red Apparently it didn't work."
|
||||
return
|
||||
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if(block)// Isolated injector
|
||||
testing("Isolated block [block] injector with contents: [GetValue()]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
testing("DNA injector with contents: [english_list(buf.dna.SE)]")
|
||||
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
inuse = 1
|
||||
inject(M, user)//Now we actually do the heavy lifting.
|
||||
spawn(50)
|
||||
inuse = 0
|
||||
/*
|
||||
A user injecting themselves could mean their own transformation and deletion of mob.
|
||||
I don't have the time to figure out how this code works so this will do for now.
|
||||
I did rearrange things a bit.
|
||||
*/
|
||||
if(user)//If the user still exists. Their mob may not.
|
||||
if(M)//Runtime fix: If the mob doesn't exist, mob.name doesnt work. - Nodrak
|
||||
user.show_message(text("\red You inject [M.name]"))
|
||||
else
|
||||
user.show_message(text("\red You finish the injection."))
|
||||
// Apply the DNA shit.
|
||||
inject(M, user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
|
||||
@@ -15,58 +15,76 @@
|
||||
var/dispenser = 0
|
||||
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
|
||||
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
|
||||
var/cuff_type = "handcuffs"
|
||||
|
||||
/obj/item/weapon/handcuffs/attack(mob/living/carbon/C as mob, mob/user as mob)
|
||||
if (!istype(user, /mob/living/carbon/human))
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
/obj/item/weapon/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
user << "\red Uh ... how do those things work?!"
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "<span class='warning'>Uh ... how do those things work?!</span>"
|
||||
place_handcuffs(user, user)
|
||||
return
|
||||
|
||||
if(!C.handcuffed)
|
||||
if (C == user)
|
||||
place_handcuffs(user, user)
|
||||
return
|
||||
|
||||
//check for an aggressive grab
|
||||
for (var/obj/item/weapon/grab/G in C.grabbed_by)
|
||||
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
|
||||
place_handcuffs(C, user)
|
||||
return
|
||||
user << "\red You need to have a firm grip on [C] before you can put \the [src] on!"
|
||||
//check for an aggressive grab (or robutts)
|
||||
var/can_place
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
can_place = 1
|
||||
else
|
||||
for (var/obj/item/weapon/grab/G in C.grabbed_by)
|
||||
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
|
||||
can_place = 1
|
||||
break
|
||||
|
||||
if(can_place)
|
||||
place_handcuffs(C, user)
|
||||
else
|
||||
user << "<span class='danger'>You need to have a firm grip on [C] before you can put \the [src] on!</span>"
|
||||
|
||||
/obj/item/weapon/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user)
|
||||
playsound(src.loc, cuff_sound, 30, 1, -2)
|
||||
|
||||
if (ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "<span class='danger'>\The [H] needs at least two wrists before you can cuff them together!</span>"
|
||||
return
|
||||
|
||||
if(istype(H.gloves,/obj/item/clothing/gloves/rig)) // Can't cuff someone who's in a deployed hardsuit.
|
||||
user << "<span class='danger'>The cuffs won't fit around \the [H.gloves]!</span>"
|
||||
return
|
||||
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = H
|
||||
O.item = user.get_active_hand()
|
||||
O.s_loc = user.loc
|
||||
O.t_loc = H.loc
|
||||
O.place = "handcuff"
|
||||
H.requests += O
|
||||
spawn( 0 )
|
||||
feedback_add_details("handcuffs","H")
|
||||
O.process()
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "<span class='danger'>\The [H] needs at least two wrists before you can cuff them together!</span>"
|
||||
return
|
||||
|
||||
if(istype(H.gloves,/obj/item/clothing/gloves/rig)) // Can't cuff someone who's in a deployed hardsuit.
|
||||
user << "<span class='danger'>The cuffs won't fit around \the [H.gloves]!</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] is attempting to put [cuff_type] on \the [H]!</span>")
|
||||
|
||||
if(!do_after(user,30))
|
||||
return
|
||||
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to handcuff [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
|
||||
feedback_add_details("handcuffs","H")
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] has put [cuff_type] on \the [H]!</span>")
|
||||
|
||||
// Apply cuffs.
|
||||
var/obj/item/weapon/handcuffs/cuffs = src
|
||||
if(dispenser)
|
||||
cuffs = new(get_turf(user))
|
||||
else
|
||||
user.drop_from_inventory(cuffs)
|
||||
cuffs.loc = target
|
||||
target.handcuffed = cuffs
|
||||
target.update_inv_handcuffed()
|
||||
return
|
||||
|
||||
var/last_chew = 0
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
|
||||
if (A != src) return ..()
|
||||
@@ -98,6 +116,7 @@ var/last_chew = 0
|
||||
icon_state = "cuff_white"
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuff_sound = 'sound/weapons/cablecuff.ogg'
|
||||
cuff_type = "cable restraints"
|
||||
|
||||
/obj/item/weapon/handcuffs/cable/red
|
||||
color = "#DD0000"
|
||||
@@ -138,22 +157,3 @@ var/last_chew = 0
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg
|
||||
dispenser = 1
|
||||
|
||||
/obj/item/weapon/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob)
|
||||
if(!C.handcuffed)
|
||||
var/turf/p_loc = user.loc
|
||||
var/turf/p_loc_m = C.loc
|
||||
playsound(src.loc, cuff_sound, 30, 1, -2)
|
||||
user.visible_message("\red <B>[user] is trying to put handcuffs on [C]!</B>")
|
||||
|
||||
if (ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if (!H.has_organ_for_slot(slot_handcuffed))
|
||||
user << "\red \The [H] needs at least two wrists before you can cuff them together!"
|
||||
return
|
||||
|
||||
spawn(30)
|
||||
if(!C) return
|
||||
if(p_loc == user.loc && p_loc_m == C.loc)
|
||||
C.handcuffed = new /obj/item/weapon/handcuffs(C)
|
||||
C.update_inv_handcuffed()
|
||||
|
||||
@@ -334,26 +334,27 @@
|
||||
src.welding = !( src.welding )
|
||||
if (src.welding)
|
||||
if (remove_fuel(1))
|
||||
usr << "\blue You switch the [src] on."
|
||||
usr << "<span class='notice'>You switch the [src] on.</span>"
|
||||
src.force = 15
|
||||
src.damtype = "fire"
|
||||
src.icon_state = "welder1"
|
||||
src.w_class = 4
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
usr << "\blue Need more fuel!"
|
||||
usr << "<span class='notice'>You need more fuel!</span>"
|
||||
src.welding = 0
|
||||
return
|
||||
else
|
||||
if(!message)
|
||||
usr << "\blue You switch the [src] off."
|
||||
usr << "<span class='notice'>You switch \the [src] off.</span>"
|
||||
else
|
||||
usr << "\blue The [src] shuts off!"
|
||||
usr << "<span class='notice'>\The [src] shuts off!</span>"
|
||||
src.force = 3
|
||||
src.damtype = "brute"
|
||||
src.icon_state = "welder"
|
||||
src.welding = 0
|
||||
src.w_class = initial(src.w_class)
|
||||
usr.update_inv_l_hand()
|
||||
usr.update_inv_r_hand()
|
||||
|
||||
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
|
||||
//Note: This should probably be moved to mob
|
||||
|
||||
@@ -231,7 +231,14 @@ var/list/mechtoys = list(
|
||||
var/list/clear_turfs = list()
|
||||
|
||||
for(var/turf/T in area_shuttle)
|
||||
if(T.density || T.contents.len) continue
|
||||
if(T.density) continue
|
||||
var/contcount
|
||||
for(var/atom/A in T.contents)
|
||||
if(A.simulated)
|
||||
continue
|
||||
contcount++
|
||||
if(contcount)
|
||||
continue
|
||||
clear_turfs += T
|
||||
|
||||
for(var/S in shoppinglist)
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!istype(H.loc, /turf))
|
||||
H << "<span class='warning'>You cannot teleport out of your current location.</span>"
|
||||
return 0
|
||||
|
||||
var/turf/T
|
||||
if(target)
|
||||
T = get_turf(target)
|
||||
|
||||
@@ -142,7 +142,8 @@
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.min_cold_protection_temperature = min_cold_protection_temperature
|
||||
piece.max_heat_protection_temperature = max_heat_protection_temperature
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation.
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
piece.permeability_coefficient = permeability_coefficient
|
||||
piece.unacidable = unacidable
|
||||
if(islist(armor)) piece.armor = armor.Copy()
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
slowdown = 0
|
||||
|
||||
chest_type = /obj/item/clothing/suit/space/rig/light/ninja
|
||||
glove_type = /obj/item/clothing/gloves/rig/light/ninja
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
@@ -80,6 +81,10 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/rig/light/ninja
|
||||
name = "insulated gloves"
|
||||
siemens_coefficient = 0
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light/ninja
|
||||
breach_threshold = 38 //comparable to regular hardsuits
|
||||
|
||||
|
||||
@@ -401,25 +401,6 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
|
||||
//generates realistic-ish pulse output based on preset levels
|
||||
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
|
||||
var/temp = 0 //see setup.dm:694
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
set_species(new_species,1)
|
||||
else
|
||||
set_species()
|
||||
|
||||
|
||||
if(species)
|
||||
real_name = species.get_random_name(gender)
|
||||
name = real_name
|
||||
if(mind)
|
||||
mind.name = real_name
|
||||
|
||||
|
||||
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
||||
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
@@ -230,33 +230,41 @@
|
||||
suit = w_uniform
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
|
||||
<BR><B>Gloves:</B> <A href='?src=\ref[src];item=gloves'>[(gloves ? gloves : "Nothing")]</A>
|
||||
<BR><B>Eyes:</B> <A href='?src=\ref[src];item=eyes'>[(glasses ? glasses : "Nothing")]</A>
|
||||
<BR><B>Left Ear:</B> <A href='?src=\ref[src];item=l_ear'>[(l_ear ? l_ear : "Nothing")]</A>
|
||||
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
|
||||
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
|
||||
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A> [(suit) ? ((suit.has_sensor == 1) ? text(" <A href='?src=\ref[];item=sensor'>Sensors</A>", src) : "") :]
|
||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
|
||||
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
|
||||
<BR>[(legcuffed ? text("<A href='?src=\ref[src];item=legcuff'>Legcuffed</A>") : text(""))]
|
||||
<BR>[(suit) ? ((suit.accessories.len) ? text(" <A href='?src=\ref[];item=tie'>Remove Accessory</A>", src) : "") :]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
<BR><A href='?src=\ref[src];item=splints'>Remove Splints</A>
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
var/dat = "<B><HR><FONT size=3>[name]</FONT></B><BR><HR>"
|
||||
|
||||
for(var/entry in species.hud.gear)
|
||||
var/list/slot_ref = species.hud.gear[entry]
|
||||
if((slot_ref["slot"] in list(slot_l_store, slot_r_store)))
|
||||
continue
|
||||
var/obj/item/thing_in_slot = get_equipped_item(slot_ref["slot"])
|
||||
dat += "<BR><B>[slot_ref["name"]]:</b> <a href='?src=\ref[src];item=[slot_ref["slot"]]'>[istype(thing_in_slot) ? thing_in_slot : "nothing"]</a>"
|
||||
|
||||
dat += "<BR><HR>"
|
||||
|
||||
if(species.hud.has_hands)
|
||||
dat += "<BR><b>Left hand:</b> <A href='?src=\ref[src];item=[slot_l_hand]'>[istype(l_hand) ? l_hand : "nothing"]</A>"
|
||||
dat += "<BR><b>Right hand:</b> <A href='?src=\ref[src];item=[slot_r_hand]'>[istype(r_hand) ? r_hand : "nothing"]</A>"
|
||||
|
||||
// Do they get an option to set internals?
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space))
|
||||
if(istype(back, /obj/item/weapon/tank) || istype(belt, /obj/item/weapon/tank) || istype(s_store, /obj/item/weapon/tank))
|
||||
dat += "<BR><A href='?src=\ref[src];item=internals'>Toggle internals.</A>"
|
||||
|
||||
// Other incidentals.
|
||||
if(istype(suit) && suit.has_sensor == 1)
|
||||
dat += "<BR><A href='?src=\ref[src];item=sensors'>Set sensors.</A>"
|
||||
if(handcuffed)
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_handcuffed]'>Handcuffed</A>"
|
||||
if(legcuffed)
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
|
||||
|
||||
if(suit && suit.accessories.len)
|
||||
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
|
||||
dat += "<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>"
|
||||
|
||||
user << browse(dat, text("window=mob[name];size=340x540"))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
@@ -371,6 +379,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/Topic(href, href_list)
|
||||
|
||||
if (href_list["refresh"])
|
||||
if((machine)&&(in_range(src, usr)))
|
||||
show_inv(machine)
|
||||
@@ -380,18 +389,8 @@
|
||||
unset_machine()
|
||||
src << browse(null, t1)
|
||||
|
||||
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = usr
|
||||
O.target = src
|
||||
O.item = usr.get_active_hand()
|
||||
O.s_loc = usr.loc
|
||||
O.t_loc = loc
|
||||
O.place = href_list["item"]
|
||||
requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
if(href_list["item"])
|
||||
handle_strip(href_list["item"],usr)
|
||||
|
||||
if (href_list["criminal"])
|
||||
if(hasHUD(usr,"security"))
|
||||
|
||||
@@ -46,25 +46,32 @@
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
|
||||
if(istype(H) && health < config.health_threshold_crit)
|
||||
|
||||
if(istype(H) && health < config.health_threshold_crit && health > config.health_threshold_dead)
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove your mask!</B>"
|
||||
H << "<span class='notice'>Remove your mask!</span>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove [src]'s mask!</B>"
|
||||
H << "<span class='notice'>Remove [src]'s mask!</span>"
|
||||
return 0
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn(0)
|
||||
O.process()
|
||||
if (!cpr_time)
|
||||
return 0
|
||||
|
||||
cpr_time = 0
|
||||
spawn(30)
|
||||
cpr_time = 1
|
||||
|
||||
H.visible_message("<span class='danger'>\The [H] is trying perform CPR on \the [src]!</span>")
|
||||
|
||||
if(!do_after(H, 30))
|
||||
return
|
||||
|
||||
adjustOxyLoss(-(min(getOxyLoss(), 5)))
|
||||
updatehealth()
|
||||
H.visible_message("<span class='danger'>\The [H] performs CPR on \the [src]!</span>")
|
||||
src << "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>"
|
||||
H << "<span class='warning'>Repeat at least every 7 seconds.</span>"
|
||||
|
||||
else
|
||||
help_shake_act(M)
|
||||
return 1
|
||||
|
||||
@@ -340,473 +340,23 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
|
||||
/mob/living/carbon/human/get_equipped_item(var/slot)
|
||||
switch(slot)
|
||||
if(slot_wear_suit) return wear_suit
|
||||
if(slot_gloves) return gloves
|
||||
if(slot_shoes) return shoes
|
||||
if(slot_belt) return belt
|
||||
if(slot_glasses) return glasses
|
||||
if(slot_head) return head
|
||||
if(slot_l_ear) return l_ear
|
||||
if(slot_r_ear) return r_ear
|
||||
if(slot_w_uniform) return w_uniform
|
||||
if(slot_wear_id) return wear_id
|
||||
if(slot_l_store) return l_store
|
||||
if(slot_r_store) return r_store
|
||||
if(slot_s_store) return s_store
|
||||
if(slot_back) return back
|
||||
if(slot_legcuffed) return legcuffed
|
||||
if(slot_handcuffed) return handcuffed
|
||||
if(slot_legcuffed) return legcuffed
|
||||
if(slot_l_store) return l_store
|
||||
if(slot_r_store) return r_store
|
||||
if(slot_wear_mask) return wear_mask
|
||||
if(slot_l_hand) return l_hand
|
||||
if(slot_r_hand) return r_hand
|
||||
if(slot_wear_id) return wear_id
|
||||
if(slot_glasses) return glasses
|
||||
if(slot_gloves) return gloves
|
||||
if(slot_head) return head
|
||||
if(slot_shoes) return shoes
|
||||
if(slot_belt) return belt
|
||||
if(slot_wear_suit) return wear_suit
|
||||
if(slot_w_uniform) return w_uniform
|
||||
if(slot_s_store) return s_store
|
||||
if(slot_l_ear) return l_ear
|
||||
if(slot_r_ear) return r_ear
|
||||
return ..()
|
||||
|
||||
///Bizarre equip effect system below
|
||||
|
||||
/*
|
||||
MouseDrop human inventory menu
|
||||
*/
|
||||
|
||||
/obj/effect/equip_e
|
||||
name = "equip e"
|
||||
var/mob/source = null
|
||||
var/s_loc = null //source location
|
||||
var/t_loc = null //target location
|
||||
var/obj/item/item = null
|
||||
var/place = null
|
||||
|
||||
/obj/effect/equip_e/human
|
||||
name = "human"
|
||||
var/mob/living/carbon/human/target = null
|
||||
|
||||
/obj/effect/equip_e/process()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/proc/done()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/New()
|
||||
if (!ticker)
|
||||
qdel(src)
|
||||
spawn(100)
|
||||
qdel(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/equip_e/human/process()
|
||||
if (item)
|
||||
item.add_fingerprint(source)
|
||||
else
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (!( target.wear_mask ))
|
||||
qdel(src)
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
qdel(src)
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
qdel(src)
|
||||
if("suit")
|
||||
if (!( target.wear_suit ))
|
||||
qdel(src)
|
||||
if("uniform")
|
||||
if (!( target.w_uniform ))
|
||||
qdel(src)
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
qdel(src)
|
||||
if("syringe")
|
||||
return
|
||||
if("pill")
|
||||
return
|
||||
if("fuel")
|
||||
return
|
||||
if("drink")
|
||||
return
|
||||
if("dnainjector")
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
qdel(src)
|
||||
if("id")
|
||||
if ((!( target.wear_id ) || !( target.w_uniform )))
|
||||
qdel(src)
|
||||
if("splints")
|
||||
var/count = 0
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/obj/item/organ/external/o = target.organs_by_name[organ]
|
||||
if(o.status & ORGAN_SPLINTED)
|
||||
count = 1
|
||||
break
|
||||
if(count == 0)
|
||||
qdel(src)
|
||||
return
|
||||
if("sensor")
|
||||
if (! target.w_uniform )
|
||||
qdel(src)
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && (istype(target.back, /obj/item/weapon/tank) || istype(target.belt, /obj/item/weapon/tank) || istype(target.s_store, /obj/item/weapon/tank)) && !( target.internal )) ) && !( target.internal )))
|
||||
qdel(src)
|
||||
|
||||
var/list/L = list( "syringe", "pill", "drink", "dnainjector", "fuel", "sensor", "internal", "tie")
|
||||
if ((item && !( L.Find(place) )))
|
||||
if(isrobot(source) && place != "handcuff")
|
||||
qdel(src)
|
||||
for(var/mob/O in viewers(target, null))
|
||||
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
|
||||
else
|
||||
|
||||
var/target_part = null
|
||||
var/obj/item/target_item = null
|
||||
var/message = null
|
||||
|
||||
switch(place)
|
||||
if("mask")
|
||||
target_part = "head"
|
||||
target_item = target.wear_mask
|
||||
if("l_hand")
|
||||
target_part = "left hand"
|
||||
target_item = target.l_hand
|
||||
if("r_hand")
|
||||
target_part = "right hand"
|
||||
target_item = target.r_hand
|
||||
if("gloves")
|
||||
target_part = "hands"
|
||||
target_item = target.gloves
|
||||
if("eyes")
|
||||
target_part = "eyes"
|
||||
target_item = target.glasses
|
||||
if("l_ear")
|
||||
target_part = "left ear"
|
||||
target_item = target.l_ear
|
||||
if("r_ear")
|
||||
target_part = "right ear"
|
||||
target_item = target.r_ear
|
||||
if("head")
|
||||
target_part = "head"
|
||||
target_item = target.head
|
||||
if("shoes")
|
||||
target_part = "feet"
|
||||
target_item = target.shoes
|
||||
if("belt")
|
||||
target_part = "waist"
|
||||
target_item = target.belt
|
||||
if("suit")
|
||||
target_part = "body"
|
||||
target_item = target.wear_suit
|
||||
if("back")
|
||||
target_part = "back"
|
||||
target_item = target.back
|
||||
if("s_store")
|
||||
target_part = "suit"
|
||||
target_item = target.s_store
|
||||
if("id")
|
||||
target_part = "uniform"
|
||||
target_item = target.wear_id
|
||||
|
||||
if("syringe")
|
||||
message = "\red <B>[source] is trying to inject [target]!</B>"
|
||||
if("pill")
|
||||
message = "\red <B>[source] is trying to force [target] to swallow [item]!</B>"
|
||||
if("drink")
|
||||
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
|
||||
if("dnainjector")
|
||||
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
|
||||
if("uniform")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
|
||||
if(target.w_uniform && !target.w_uniform.canremove)
|
||||
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
if("handcuff")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unhandcuffed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unhandcuff [target.name]'s ([target.ckey])</font>")
|
||||
message = "\red <B>[source] is trying to unhandcuff [target]!</B>"
|
||||
if("legcuff")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unlegcuffed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unlegcuff [target.name]'s ([target.ckey])</font>")
|
||||
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
if(suit.accessories.len)
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
target.attack_log += "\[[time_stamp()]\] <font color='orange'>Has had their accessory ([A]) removed by [source.name] ([source.ckey])</font>"
|
||||
source.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) accessory ([A])</font>"
|
||||
if(istype(A, /obj/item/clothing/accessory/badge) || istype(A, /obj/item/clothing/accessory/medal))
|
||||
for(var/mob/M in viewers(target, null))
|
||||
M.show_message("\red <B>[source] tears off \the [A] from [target]'s [suit]!</B>" , 1)
|
||||
done()
|
||||
return
|
||||
else
|
||||
message = "\red <B>[source] is trying to take off \a [A] from [target]'s [suit]!</B>"
|
||||
if("pockets")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
|
||||
for(var/obj/item/I in list(target.l_store, target.r_store))
|
||||
if(I.on_found(source))
|
||||
return
|
||||
message = "\red <B>[source] is trying to empty [target]'s pockets.</B>"
|
||||
if("CPR")
|
||||
if (!target.cpr_time)
|
||||
qdel(src)
|
||||
target.cpr_time = 0
|
||||
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
|
||||
if("internal")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their internals toggled by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) internals</font>")
|
||||
if (target.internal)
|
||||
message = "\red <B>[source] is trying to remove [target]'s internals</B>"
|
||||
else
|
||||
message = "\red <B>[source] is trying to set on [target]'s internals.</B>"
|
||||
if("splints")
|
||||
message = text("\red <B>[] is trying to remove []'s splints!</B>", source, target)
|
||||
if("sensor")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) sensors</font>")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
if (suit.has_sensor >= 2)
|
||||
source << "The controls are locked."
|
||||
return
|
||||
message = "\red <B>[source] is trying to set [target]'s suit sensors!</B>"
|
||||
|
||||
if(target_item)
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their [target_item] removed by [source.name] ([source.ckey])</font>")
|
||||
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) [target_item]</font>")
|
||||
|
||||
if(target_item.canremove)
|
||||
message = "<span class='danger'>[source] is trying to take off \a [target_item] from [target]'s [target_part]!</span>"
|
||||
else
|
||||
source.visible_message("<span class='danger'>[source] fails to take off \a [target_item] from [target]'s [target_part]!</span>")
|
||||
return
|
||||
|
||||
source.visible_message(message)
|
||||
|
||||
spawn( HUMAN_STRIP_DELAY )
|
||||
done()
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
This proc equips stuff (or does something else) when removing stuff manually from the character window when you click and drag.
|
||||
It works in conjuction with the process() above.
|
||||
This proc works for humans only. Aliens stripping humans and the like will all use this proc. Stripping monkeys or somesuch will use their version of this proc.
|
||||
The first if statement for "mask" and such refers to items that are already equipped and un-equipping them.
|
||||
The else statement is for equipping stuff to empty slots.
|
||||
!canremove refers to variable of /obj/item/clothing which either allows or disallows that item to be removed.
|
||||
It can still be worn/put on as normal.
|
||||
*/
|
||||
/obj/effect/equip_e/human/done() //TODO: And rewrite this :< ~Carn
|
||||
target.cpr_time = 1
|
||||
if(isanimal(source)) return //animals cannot strip people
|
||||
if(!source || !target) return //Target or source no longer exist
|
||||
if(source.loc != s_loc) return //source has moved
|
||||
if(target.loc != t_loc) return //target has moved
|
||||
if(LinkBlocked(s_loc,t_loc)) return //Use a proxi!
|
||||
if(item && source.get_active_hand() != item) return //Swapped hands / removed item from the active one
|
||||
if ((source.restrained() || source.stat)) return //Source restrained or unconscious / dead
|
||||
|
||||
var/slot_to_process
|
||||
var/obj/item/strip_item //this will tell us which item we will be stripping - if any.
|
||||
|
||||
switch(place) //here we go again...
|
||||
if("mask")
|
||||
slot_to_process = slot_wear_mask
|
||||
if (target.wear_mask && target.wear_mask.canremove)
|
||||
strip_item = target.wear_mask
|
||||
if("gloves")
|
||||
slot_to_process = slot_gloves
|
||||
if (target.gloves && target.gloves.canremove)
|
||||
strip_item = target.gloves
|
||||
if("eyes")
|
||||
slot_to_process = slot_glasses
|
||||
if (target.glasses)
|
||||
strip_item = target.glasses
|
||||
if("belt")
|
||||
slot_to_process = slot_belt
|
||||
if (target.belt)
|
||||
strip_item = target.belt
|
||||
if("s_store")
|
||||
slot_to_process = slot_s_store
|
||||
if (target.s_store)
|
||||
strip_item = target.s_store
|
||||
if("head")
|
||||
slot_to_process = slot_head
|
||||
if (target.head && target.head.canremove)
|
||||
strip_item = target.head
|
||||
if("l_ear")
|
||||
slot_to_process = slot_l_ear
|
||||
if (target.l_ear)
|
||||
strip_item = target.l_ear
|
||||
if("r_ear")
|
||||
slot_to_process = slot_r_ear
|
||||
if (target.r_ear)
|
||||
strip_item = target.r_ear
|
||||
if("shoes")
|
||||
slot_to_process = slot_shoes
|
||||
if (target.shoes && target.shoes.canremove)
|
||||
strip_item = target.shoes
|
||||
if("l_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
qdel(src)
|
||||
slot_to_process = slot_l_hand
|
||||
if (target.l_hand)
|
||||
strip_item = target.l_hand
|
||||
if("r_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
qdel(src)
|
||||
slot_to_process = slot_r_hand
|
||||
if (target.r_hand)
|
||||
strip_item = target.r_hand
|
||||
if("uniform")
|
||||
slot_to_process = slot_w_uniform
|
||||
if(target.w_uniform && target.w_uniform.canremove)
|
||||
strip_item = target.w_uniform
|
||||
if("suit")
|
||||
slot_to_process = slot_wear_suit
|
||||
if (target.wear_suit && target.wear_suit.canremove)
|
||||
strip_item = target.wear_suit
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
//var/obj/item/clothing/accessory/tie = suit.hastie
|
||||
/*if(tie)
|
||||
if (istype(tie,/obj/item/clothing/accessory/storage))
|
||||
var/obj/item/clothing/accessory/storage/W = tie
|
||||
if (W.hold)
|
||||
W.hold.close(usr)
|
||||
usr.put_in_hands(tie)
|
||||
suit.hastie = null*/
|
||||
if(suit && suit.accessories.len)
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
A.on_removed(usr)
|
||||
suit.accessories -= A
|
||||
target.update_inv_w_uniform()
|
||||
if("id")
|
||||
slot_to_process = slot_wear_id
|
||||
if (target.wear_id)
|
||||
strip_item = target.wear_id
|
||||
if("back")
|
||||
slot_to_process = slot_back
|
||||
if (target.back)
|
||||
strip_item = target.back
|
||||
if("handcuff")
|
||||
slot_to_process = slot_handcuffed
|
||||
if (target.handcuffed)
|
||||
strip_item = target.handcuffed
|
||||
else if (source != target && ishuman(source))
|
||||
//check that we are still grabbing them
|
||||
var/grabbing = 0
|
||||
for (var/obj/item/weapon/grab/G in target.grabbed_by)
|
||||
if (G.loc == source && G.state >= GRAB_AGGRESSIVE)
|
||||
grabbing = 1
|
||||
break
|
||||
if (!grabbing)
|
||||
slot_to_process = null
|
||||
source << "\red Your grasp was broken before you could restrain [target]!"
|
||||
|
||||
if("legcuff")
|
||||
slot_to_process = slot_legcuffed
|
||||
if (target.legcuffed)
|
||||
strip_item = target.legcuffed
|
||||
if("splints")
|
||||
var/can_reach_splints = 1
|
||||
if(target.wear_suit && istype(target.wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/suit = target.wear_suit
|
||||
if(suit.supporting_limbs && suit.supporting_limbs.len)
|
||||
source << "You cannot remove the splints - [target]'s [suit] is supporting some of the breaks."
|
||||
can_reach_splints = 0
|
||||
|
||||
if(can_reach_splints)
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/obj/item/organ/external/o = target.get_organ(organ)
|
||||
if (o && o.status & ORGAN_SPLINTED)
|
||||
var/obj/item/W = new /obj/item/stack/medical/splint(amount=1)
|
||||
o.status &= ~ORGAN_SPLINTED
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
if("CPR")
|
||||
if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit))
|
||||
var/suff = min(target.getOxyLoss(), 5) //Pre-merge level, less healing, more prevention of dieing.
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] performs CPR on [target]!", 1)
|
||||
target << "\blue <b>You feel a breath of fresh air enter your lungs. It feels good.</b>"
|
||||
source << "\red Repeat at least every 7 seconds."
|
||||
if("dnainjector")
|
||||
var/obj/item/weapon/dnainjector/S = item
|
||||
if(S)
|
||||
S.add_fingerprint(source)
|
||||
if (!( istype(S, /obj/item/weapon/dnainjector) ))
|
||||
S.inuse = 0
|
||||
qdel(src)
|
||||
S.inject(target, source)
|
||||
if (S.s_time >= world.time + 30)
|
||||
S.inuse = 0
|
||||
qdel(src)
|
||||
S.s_time = world.time
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] injects [target] with the DNA Injector!", 1)
|
||||
S.inuse = 0
|
||||
if("pockets")
|
||||
if (!item || (target.l_store && target.r_store)) // Only empty pockets when hand is empty or both pockets are full
|
||||
slot_to_process = slot_l_store
|
||||
strip_item = target.l_store //We'll do both
|
||||
else if (target.l_store)
|
||||
slot_to_process = slot_r_store
|
||||
else
|
||||
slot_to_process = slot_l_store
|
||||
if("sensor")
|
||||
var/obj/item/clothing/under/suit = target.w_uniform
|
||||
if (suit)
|
||||
if(suit.has_sensor >= 2)
|
||||
source << "The controls are locked."
|
||||
else
|
||||
suit.set_sensors(source)
|
||||
if("internal")
|
||||
if (target.internal)
|
||||
target.internal.add_fingerprint(source)
|
||||
target.internal = null
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal0"
|
||||
else
|
||||
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(target.back, /obj/item/weapon/tank))
|
||||
target.internal = target.back
|
||||
else if (istype(target.s_store, /obj/item/weapon/tank))
|
||||
target.internal = target.s_store
|
||||
else if (istype(target.belt, /obj/item/weapon/tank))
|
||||
target.internal = target.belt
|
||||
if (target.internal)
|
||||
for(var/mob/M in viewers(target, 1))
|
||||
M.show_message("[target] is now running on internals.", 1)
|
||||
target.internal.add_fingerprint(source)
|
||||
if (target.internals)
|
||||
target.internals.icon_state = "internal1"
|
||||
if(slot_to_process)
|
||||
if(strip_item) //Stripping an item from the mob
|
||||
if(strip_item.mob_can_unequip(target, slot_to_process, 0))
|
||||
target.drop_from_inventory(strip_item)
|
||||
source.put_in_hands(strip_item)
|
||||
strip_item.add_fingerprint(source)
|
||||
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
|
||||
if(target.r_store)
|
||||
target.drop_from_inventory(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
|
||||
else
|
||||
source << "<span class='warning'>You fail to remove \the [strip_item] from [target]!</span>"
|
||||
else if(item)
|
||||
if(target.has_organ_for_slot(slot_to_process) && item.mob_can_equip(target, slot_to_process, 0)) //Placing an item on the mob
|
||||
source.drop_from_inventory(item)
|
||||
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
||||
else
|
||||
source << "<span class='warning'>You fail to place \the [item] on [target]!</span>"
|
||||
|
||||
if(source && target)
|
||||
if(source.machine == target)
|
||||
target.show_inv(source)
|
||||
qdel(src)
|
||||
@@ -265,10 +265,6 @@
|
||||
/datum/species/proc/build_hud(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
// Grabs the window recieved when you click-drag someone onto you.
|
||||
/datum/species/proc/get_inventory_dialogue(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
//Used by xenos understanding larvae and dionaea understanding nymphs.
|
||||
/datum/species/proc/can_understand(var/mob/other)
|
||||
return
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
// to be drawn for the mob. This is fairly delicate, try to avoid messing with it
|
||||
// unless you know exactly what it does.
|
||||
var/list/gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_oclothing, "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"mask" = list("loc" = ui_mask, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"gloves" = list("loc" = ui_gloves, "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
|
||||
"eyes" = list("loc" = ui_glasses, "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
|
||||
"l_ear" = list("loc" = ui_l_ear, "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"r_ear" = list("loc" = ui_r_ear, "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_head, "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"shoes" = list("loc" = ui_shoes, "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_oclothing, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"mask" = list("loc" = ui_mask, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"gloves" = list("loc" = ui_gloves, "name" = "Gloves", "slot" = slot_gloves, "state" = "gloves", "toggle" = 1),
|
||||
"eyes" = list("loc" = ui_glasses, "name" = "Glasses", "slot" = slot_glasses, "state" = "glasses","toggle" = 1),
|
||||
"l_ear" = list("loc" = ui_l_ear, "name" = "Left Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"r_ear" = list("loc" = ui_r_ear, "name" = "Right Ear", "slot" = slot_r_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_head, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"shoes" = list("loc" = ui_shoes, "name" = "Shoes", "slot" = slot_shoes, "state" = "shoes", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
|
||||
)
|
||||
|
||||
/datum/hud_data/New()
|
||||
@@ -55,20 +55,20 @@
|
||||
/datum/hud_data/diona
|
||||
has_internals = 0
|
||||
gear = list(
|
||||
"i_clothing" = list("loc" = ui_iclothing, "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_shoes, "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"l_ear" = list("loc" = ui_gloves, "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_oclothing, "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "slot" = slot_belt, "state" = "belt")
|
||||
"i_clothing" = list("loc" = ui_iclothing, "name" = "Uniform", "slot" = slot_w_uniform, "state" = "center", "toggle" = 1, "dir" = SOUTH),
|
||||
"o_clothing" = list("loc" = ui_shoes, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "toggle" = 1, "dir" = SOUTH),
|
||||
"l_ear" = list("loc" = ui_gloves, "name" = "Ear", "slot" = slot_l_ear, "state" = "ears", "toggle" = 1),
|
||||
"head" = list("loc" = ui_oclothing, "name" = "Hat", "slot" = slot_head, "state" = "hair", "toggle" = 1),
|
||||
"suit storage" = list("loc" = ui_sstore1, "name" = "Suit Storage", "slot" = slot_s_store, "state" = "belt", "dir" = 8),
|
||||
"back" = list("loc" = ui_back, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"id" = list("loc" = ui_id, "name" = "ID", "slot" = slot_wear_id, "state" = "id", "dir" = NORTH),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
"belt" = list("loc" = ui_belt, "name" = "Belt", "slot" = slot_belt, "state" = "belt")
|
||||
)
|
||||
|
||||
/datum/hud_data/monkey
|
||||
gear = list(
|
||||
"mask" = list("loc" = ui_shoes, "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"back" = list("loc" = ui_sstore1, "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
"mask" = list("loc" = ui_shoes, "name" = "Mask", "slot" = slot_wear_mask, "state" = "equip", "toggle" = 1, "dir" = NORTH),
|
||||
"back" = list("loc" = ui_sstore1, "name" = "Back", "slot" = slot_back, "state" = "back", "dir" = NORTH),
|
||||
)
|
||||
@@ -29,6 +29,20 @@
|
||||
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
|
||||
has_limbs = list(
|
||||
"chest" = list("path" = /obj/item/organ/external/chest/slime),
|
||||
"groin" = list("path" = /obj/item/organ/external/groin/slime),
|
||||
"head" = list("path" = /obj/item/organ/external/head/slime),
|
||||
"l_arm" = list("path" = /obj/item/organ/external/arm/slime),
|
||||
"r_arm" = list("path" = /obj/item/organ/external/arm/right/slime),
|
||||
"l_leg" = list("path" = /obj/item/organ/external/leg/slime),
|
||||
"r_leg" = list("path" = /obj/item/organ/external/leg/right/slime),
|
||||
"l_hand" = list("path" = /obj/item/organ/external/hand/slime),
|
||||
"r_hand" = list("path" = /obj/item/organ/external/hand/right/slime),
|
||||
"l_foot" = list("path" = /obj/item/organ/external/foot/slime),
|
||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/slime)
|
||||
)
|
||||
|
||||
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
|
||||
spawn(1)
|
||||
if(H)
|
||||
|
||||
@@ -303,8 +303,8 @@
|
||||
has_internals = 0
|
||||
|
||||
gear = list(
|
||||
"o_clothing" = list("loc" = ui_belt, "slot" = slot_wear_suit, "state" = "equip", "dir" = SOUTH),
|
||||
"head" = list("loc" = ui_id, "slot" = slot_head, "state" = "hair"),
|
||||
"storage1" = list("loc" = ui_storage1, "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "slot" = slot_r_store, "state" = "pocket"),
|
||||
"o_clothing" = list("loc" = ui_belt, "name" = "Suit", "slot" = slot_wear_suit, "state" = "equip", "dir" = SOUTH),
|
||||
"head" = list("loc" = ui_id, "name" = "Hat", "slot" = slot_head, "state" = "hair"),
|
||||
"storage1" = list("loc" = ui_storage1, "name" = "Left Pocket", "slot" = slot_l_store, "state" = "pocket"),
|
||||
"storage2" = list("loc" = ui_storage2, "name" = "Right Pocket", "slot" = slot_r_store, "state" = "pocket"),
|
||||
)
|
||||
@@ -47,42 +47,3 @@ Des: Removes all infected images from the alien.
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/* TODO: Convert this over.
|
||||
/mob/living/carbon/human/alien/show_inv(mob/user as mob)
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? text("[]", l_hand) : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? text("[]", r_hand) : "Nothing")]</A>
|
||||
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? text("[]", head) : "Nothing")]</A>
|
||||
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? text("[]", wear_suit) : "Nothing")]</A>
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pouches</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
user << browse(dat, text("window=mob[name];size=340x480"))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
*/
|
||||
|
||||
/* TODO: Convert this over.
|
||||
/mob/living/carbon/human/alien/queen/large
|
||||
icon = 'icons/mob/alienqueen.dmi'
|
||||
icon_state = "queen_s"
|
||||
pixel_x = -16
|
||||
|
||||
/mob/living/carbon/human/alien/queen/large/update_icons()
|
||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
||||
update_hud() //TODO: remove the need for this to be here
|
||||
overlays.Cut()
|
||||
if(lying)
|
||||
if(resting) icon_state = "queen_sleep"
|
||||
else icon_state = "queen_l"
|
||||
for(var/image/I in overlays_lying)
|
||||
overlays += I
|
||||
else
|
||||
icon_state = "queen_s"
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I*/
|
||||
158
code/modules/mob/living/carbon/human/stripping.dm
Normal file
158
code/modules/mob/living/carbon/human/stripping.dm
Normal file
@@ -0,0 +1,158 @@
|
||||
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip,var/mob/living/user)
|
||||
|
||||
if(!slot_to_strip || !istype(user))
|
||||
return
|
||||
|
||||
var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip))
|
||||
|
||||
switch(slot_to_strip)
|
||||
// Handle things that are part of this interface but not removing/replacing a given item.
|
||||
if("pockets")
|
||||
visible_message("<span class='danger'>\The [user] is trying to empty \the [src]'s pockets!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
empty_pockets(user)
|
||||
return
|
||||
if("splints")
|
||||
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s splints!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
remove_splints(user)
|
||||
return
|
||||
if("sensors")
|
||||
visible_message("<span class='danger'>\The [user] is trying to set \the [src]'s sensors!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
toggle_sensors(user)
|
||||
return
|
||||
if("internals")
|
||||
visible_message("<span class='danger'>\The [usr] is trying to set \the [src]'s internals!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY))
|
||||
toggle_internals(user)
|
||||
return
|
||||
if("tie")
|
||||
var/obj/item/clothing/under/suit = w_uniform
|
||||
if(!istype(suit) || !suit.accessories.len)
|
||||
return
|
||||
var/obj/item/clothing/accessory/A = suit.accessories[1]
|
||||
if(!istype(A))
|
||||
return
|
||||
visible_message("<span class='danger'>\The [usr] is trying to remove \the [src]'s [A.name]!</span>")
|
||||
|
||||
if(!do_after(user,HUMAN_STRIP_DELAY))
|
||||
return
|
||||
|
||||
if(!A || suit.loc != src || !(A in suit.accessories))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/item/clothing/accessory/badge) || istype(A, /obj/item/clothing/accessory/medal))
|
||||
user.visible_message("<span class='danger'>\The [user] tears off \the [A] from [src]'s [suit.name]!</span>")
|
||||
attack_log += "\[[time_stamp()]\] <font color='orange'>Has had \the [A] removed by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [name]'s ([ckey]) [A.name]</font>"
|
||||
A.on_removed(user)
|
||||
suit.accessories -= A
|
||||
update_inv_w_uniform()
|
||||
return
|
||||
|
||||
// Are we placing or stripping?
|
||||
var/stripping
|
||||
var/obj/item/held = user.get_active_hand()
|
||||
if(!istype(held) || is_robot_module(held))
|
||||
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
|
||||
return
|
||||
if(!target_slot.canremove)
|
||||
user << "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>"
|
||||
stripping = 1
|
||||
|
||||
if(stripping)
|
||||
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s [target_slot.name]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
|
||||
|
||||
if(!do_after(user,HUMAN_STRIP_DELAY))
|
||||
return
|
||||
|
||||
if(!stripping && user.get_active_hand() != held)
|
||||
return
|
||||
|
||||
if(stripping)
|
||||
attack_log += "\[[time_stamp()]\] <font color='orange'>Has had \the [target_slot] removed by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <font color='red'>Attempted to remove [name]'s ([ckey]) [target_slot.name]</font>"
|
||||
drop_from_inventory(target_slot)
|
||||
else
|
||||
user.drop_from_inventory(held)
|
||||
equip_to_slot_if_possible(held, text2num(slot_to_strip), 0, 1, 1)
|
||||
if(held.loc != src)
|
||||
user.put_in_hands(held)
|
||||
|
||||
// Empty out everything in the target's pockets.
|
||||
/mob/living/carbon/human/proc/empty_pockets(var/mob/living/user)
|
||||
if(!r_store && !l_store)
|
||||
user << "<span class='warning'>\The [src] has nothing in their pockets.</span>"
|
||||
return
|
||||
if(r_store)
|
||||
drop_from_inventory(r_store)
|
||||
if(l_store)
|
||||
drop_from_inventory(l_store)
|
||||
visible_message("<span class='danger'>\The [user] empties \the [src]'s pockets!</span>")
|
||||
|
||||
// Modify the current target sensor level.
|
||||
/mob/living/carbon/human/proc/toggle_sensors(var/mob/living/user)
|
||||
var/obj/item/clothing/under/suit = w_uniform
|
||||
if(!suit)
|
||||
user << "<span class='warning'>\The [src] is not wearing a suit with sensors.</span>"
|
||||
return
|
||||
if (suit.has_sensor >= 2)
|
||||
user << "<span class='warning'>\The [src]'s suit sensor controls are locked.</span>"
|
||||
return
|
||||
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their sensors toggled by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [name]'s ([ckey]) sensors</font>")
|
||||
suit.set_sensors(user)
|
||||
|
||||
// Remove all splints.
|
||||
/mob/living/carbon/human/proc/remove_splints(var/mob/living/user)
|
||||
|
||||
var/can_reach_splints = 1
|
||||
if(istype(wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/suit = wear_suit
|
||||
if(suit.supporting_limbs && suit.supporting_limbs.len)
|
||||
user << "<span class='warning'>You cannot remove the splints - [src]'s [suit] is supporting some of the breaks.</span>"
|
||||
can_reach_splints = 0
|
||||
|
||||
if(can_reach_splints)
|
||||
var/removed_splint
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
var/obj/item/organ/external/o = get_organ(organ)
|
||||
if (o && o.status & ORGAN_SPLINTED)
|
||||
var/obj/item/W = new /obj/item/stack/medical/splint(get_turf(src), 1)
|
||||
o.status &= ~ORGAN_SPLINTED
|
||||
W.add_fingerprint(user)
|
||||
removed_splint = 1
|
||||
if(removed_splint)
|
||||
visible_message("<span class='danger'>\The [user] removes \the [src]'s splints!</span>")
|
||||
else
|
||||
user << "<span class='warning'>\The [src] has no splints to remove.</span>"
|
||||
|
||||
// Set internals on or off.
|
||||
/mob/living/carbon/human/proc/toggle_internals(var/mob/living/user)
|
||||
if(internal)
|
||||
internal.add_fingerprint(user)
|
||||
internal = null
|
||||
if(internals)
|
||||
internals.icon_state = "internal0"
|
||||
else
|
||||
// Check for airtight mask/helmet.
|
||||
if(!(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space)))
|
||||
return
|
||||
// Find an internal source.
|
||||
if(istype(back, /obj/item/weapon/tank))
|
||||
internal = back
|
||||
else if(istype(s_store, /obj/item/weapon/tank))
|
||||
internal = s_store
|
||||
else if(istype(belt, /obj/item/weapon/tank))
|
||||
internal = belt
|
||||
|
||||
if(internal)
|
||||
visible_message("<span class='warning'>\The [src] is now running on internals!</span>")
|
||||
internal.add_fingerprint(user)
|
||||
if (internals)
|
||||
internals.icon_state = "internal1"
|
||||
else
|
||||
visible_message("<span class='danger'>\The [user] disables \the [src]'s internals!</span>")
|
||||
@@ -396,9 +396,6 @@
|
||||
/mob/living/carbon/slime/var/co2overloadtime = null
|
||||
/mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
|
||||
/mob/living/carbon/slime/show_inv(mob/user)
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/toggle_throw_mode()
|
||||
return
|
||||
|
||||
|
||||
@@ -265,6 +265,13 @@
|
||||
return 0
|
||||
else if(istype(card.loc,/mob))
|
||||
var/mob/holder = card.loc
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
for(var/obj/item/organ/external/affecting in H.organs)
|
||||
if(affecting.hidden == card)
|
||||
affecting.take_damage(rand(30,50))
|
||||
H.visible_message("<span class='danger'>\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!</span>")
|
||||
break
|
||||
holder.drop_from_inventory(card)
|
||||
else if(istype(card.loc,/obj/item/device/pda))
|
||||
var/obj/item/device/pda/holder = card.loc
|
||||
|
||||
@@ -56,6 +56,10 @@
|
||||
if(src.Adjacent(C))
|
||||
choices += C
|
||||
|
||||
if(!choices.len)
|
||||
src << "There are no viable hosts within range..."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
|
||||
|
||||
if(!M || !src) return
|
||||
|
||||
@@ -40,240 +40,3 @@
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "stomps"
|
||||
|
||||
//LOOK AT THIS - ..()??
|
||||
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/wirecutters))
|
||||
if(prob(50))
|
||||
user << "\red \b This kills the crab."
|
||||
health -= 20
|
||||
death()
|
||||
else
|
||||
GetMad()
|
||||
get
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
if(stat != DEAD)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
if(health < maxHealth)
|
||||
if(MED.amount >= 1)
|
||||
health = min(maxHealth, health + MED.heal_brute)
|
||||
MED.amount -= 1
|
||||
if(MED.amount <= 0)
|
||||
qdel(MED)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\blue [user] applies the [MED] on [src]")
|
||||
else
|
||||
user << "\blue this [src] is dead, medical items won't bring it back to life."
|
||||
else
|
||||
if(O.force)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
/mob/living/simple_animal/crab/Topic(href, href_list)
|
||||
if(usr.stat) return
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
name = real_name
|
||||
desc = initial(desc)
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks")
|
||||
emote_see = list("clacks")
|
||||
desc = "Free crabs!"
|
||||
src.sd_set_light(0)
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
if("mask")
|
||||
if(inventory_mask)
|
||||
inventory_mask.loc = src.loc
|
||||
inventory_mask = null
|
||||
else
|
||||
usr << "\red There is nothing to remove from its [remove_from]."
|
||||
return
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(get_dist(src,usr) > 1 || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/add_to = href_list["add_inv"]
|
||||
if(!usr.get_active_hand())
|
||||
usr << "\red You have nothing in your hand to put on its [add_to]."
|
||||
return
|
||||
switch(add_to)
|
||||
if("head")
|
||||
if(inventory_head)
|
||||
usr << "\red It's is already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
//Many hats added, Some will probably be removed, just want to see which ones are popular.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/head/helmet,
|
||||
/obj/item/clothing/glasses/sunglasses,
|
||||
/obj/item/clothing/head/caphat,
|
||||
/obj/item/clothing/head/collectable/captain,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/that,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/head/collectable/kitty,
|
||||
/obj/item/clothing/head/rabbitears,
|
||||
/obj/item/clothing/head/collectable/rabbitears,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/head/collectable/beret,
|
||||
/obj/item/clothing/head/det_hat,
|
||||
/obj/item/clothing/head/nursehat,
|
||||
/obj/item/clothing/head/pirate,
|
||||
/obj/item/clothing/head/collectable/pirate,
|
||||
/obj/item/clothing/head/chefhat,
|
||||
/obj/item/clothing/head/collectable/chef,
|
||||
/obj/item/clothing/head/collectable/police,
|
||||
/obj/item/clothing/head/wizard/fake,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/collectable/wizard,
|
||||
/obj/item/clothing/head/hardhat,
|
||||
/obj/item/clothing/head/collectable/hardhat,
|
||||
/obj/item/clothing/head/hardhat/white,
|
||||
/obj/item/weapon/bedsheet,
|
||||
/obj/item/clothing/head/soft
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red It doesn't seem too keen on wearing that item."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_head = item_to_add
|
||||
regenerate_icons()
|
||||
|
||||
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
|
||||
|
||||
|
||||
switch(inventory_head && inventory_head.type)
|
||||
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
|
||||
name = "Captain [real_name]"
|
||||
desc = "Probably better than the last captain."
|
||||
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
|
||||
name = "Runtime"
|
||||
emote_see = list("coughs up a furball", "stretches")
|
||||
emote_hear = list("purrs")
|
||||
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
|
||||
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
|
||||
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
|
||||
name = "Hoppy"
|
||||
emote_see = list("twitches its nose", "hops around a bit")
|
||||
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
|
||||
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
|
||||
name = "Yann"
|
||||
desc = "Mon dieu! C'est un chien!"
|
||||
speak = list("le woof!", "le bark!", "JAPPE!!")
|
||||
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of /him")
|
||||
if(/obj/item/clothing/head/det_hat)
|
||||
name = "Detective [real_name]"
|
||||
desc = "[name] sees through your lies..."
|
||||
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
|
||||
if(/obj/item/clothing/head/nursehat)
|
||||
name = "Nurse [real_name]"
|
||||
desc = "[name] needs 100cc of beef jerky...STAT!"
|
||||
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
|
||||
name = "'[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]'"
|
||||
desc = "Yaarghh!! Thar' be a scurvy dog!"
|
||||
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
|
||||
emote_hear = list("growls ferociously", "snarls")
|
||||
speak = list("Arrrrgh!!","Grrrrrr!")
|
||||
if(/obj/item/clothing/head/collectable/police)
|
||||
name = "Officer [real_name]"
|
||||
emote_see = list("drools","looks for donuts")
|
||||
desc = "Stop right there criminal scum!"
|
||||
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
|
||||
name = "Grandwizard [real_name]"
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
|
||||
if(/obj/item/weapon/bedsheet)
|
||||
name = "\improper Ghost"
|
||||
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
|
||||
emote_see = list("stumbles around", "shivers")
|
||||
emote_hear = list("howls","groans")
|
||||
desc = "Spooky!"
|
||||
if(/obj/item/clothing/head/soft)
|
||||
name = "Corgi Tech [real_name]"
|
||||
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")
|
||||
desc = "The reason your yellow gloves have chew-marks."
|
||||
|
||||
if("mask")
|
||||
if(inventory_mask)
|
||||
usr << "\red It's already wearing something."
|
||||
return
|
||||
else
|
||||
var/obj/item/item_to_add = usr.get_active_hand()
|
||||
if(!item_to_add)
|
||||
return
|
||||
|
||||
//Corgis are supposed to be simpler, so only a select few objects can actually be put
|
||||
//to be compatible with them. The objects are below.
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/obj/item/clothing/suit/armor/vest,
|
||||
/obj/item/device/radio
|
||||
)
|
||||
|
||||
if( ! ( item_to_add.type in allowed_types ) )
|
||||
usr << "\red This object won't fit."
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
src.inventory_mask = item_to_add
|
||||
regenerate_icons()
|
||||
|
||||
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/crab/GetMad()
|
||||
name = "MEGAMADCRAB"
|
||||
real_name = "MEGAMADCRAB"
|
||||
desc = "OH NO YOU DUN IT NOW."
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "madcrab"
|
||||
icon_living = "madcrab"
|
||||
icon_dead = "madcrab_dead"
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks with fury", "clicks angrily")
|
||||
emote_see = list("clacks")
|
||||
speak_chance = 1
|
||||
turns_per_move = 15//Gotta go fast
|
||||
maxHealth = 100//So they don't die as quickly
|
||||
health = 100
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 10//Kill them. Kill them all
|
||||
if(inventory_head)//Drops inventory so it doesn't have to be dealt with
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
if(inventory_mask)
|
||||
inventory_mask.loc = src.loc
|
||||
inventory_mask = null*/
|
||||
@@ -92,7 +92,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
if(health < 1)
|
||||
if(health <= 0)
|
||||
death()
|
||||
return
|
||||
|
||||
|
||||
@@ -136,23 +136,8 @@
|
||||
client.eye = loc
|
||||
return
|
||||
|
||||
|
||||
// This is not needed short of simple_animal and carbon/alien / carbon/human, who reimplement it.
|
||||
/mob/proc/show_inv(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<B><HR><FONT size=3>[name]</FONT></B>
|
||||
<BR><HR>
|
||||
<BR><B>Head(Mask):</B> <A href='?src=\ref[src];item=mask'>[(wear_mask ? wear_mask : "Nothing")]</A>
|
||||
<BR><B>Left Hand:</B> <A href='?src=\ref[src];item=l_hand'>[(l_hand ? l_hand : "Nothing")]</A>
|
||||
<BR><B>Right Hand:</B> <A href='?src=\ref[src];item=r_hand'>[(r_hand ? r_hand : "Nothing")]</A>
|
||||
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A> [((istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : "")]
|
||||
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
|
||||
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
|
||||
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
|
||||
<BR><A href='?src=\ref[user];mach_close=mob[name]'>Close</A>
|
||||
<BR>"}
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
|
||||
//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
|
||||
|
||||
@@ -341,4 +341,49 @@
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/stack/vox
|
||||
name = "vox cortical stack"
|
||||
name = "vox cortical stack"
|
||||
|
||||
// Slime limbs.
|
||||
/obj/item/organ/external/chest/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/groin/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/arm/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/arm/right/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/leg/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/leg/right/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/foot/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/foot/right/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/hand/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/hand/right/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
/obj/item/organ/external/head/slime
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
user << "<span class='warning'>\The [blocked] is in the way!</span>"
|
||||
return
|
||||
|
||||
M << "<span class='notice'>You swallow \the [src].</span>"
|
||||
M << "<span class='notice'>You swallow \the [src].</span>"
|
||||
M.drop_from_inventory(src) //icon update
|
||||
if(reagents.total_volume)
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
@@ -43,28 +43,29 @@
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
|
||||
return
|
||||
|
||||
var/obj/item/blocked = H.check_mouth_coverage()
|
||||
|
||||
if(blocked)
|
||||
user << "<span class='warning'>\The [blocked] is in the way!</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] attempts to force [M] to swallow \the [src].</span>")
|
||||
user.visible_message("<span class='warning'>[user] attempts to force [M] to swallow \the [src].</span>")
|
||||
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
|
||||
user.drop_from_inventory(src) //icon update
|
||||
user.visible_message("<span class='warning'>[user] forces [M] to swallow \the [src].</span>")
|
||||
user.drop_from_inventory(src) //icon update
|
||||
user.visible_message("<span class='warning'>[user] forces [M] to swallow \the [src].</span>")
|
||||
|
||||
var/contained = reagentlist()
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [name] by [user.name] ([user.ckey]) Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [name] by [M.name] ([M.ckey]) Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(reagents.total_volume)
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -85,8 +86,8 @@
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
for(var/mob/O in viewers(2, user))
|
||||
O.show_message("<span class='warning'>[user] puts something in \the [target].</span>", 1)
|
||||
|
||||
qdel(src)
|
||||
|
||||
qdel(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user