mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 17:42:26 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
This commit is contained in:
@@ -32,13 +32,6 @@
|
||||
/obj/item/weapon/storage/backpack/cultpack/cultify()
|
||||
return
|
||||
|
||||
/obj/item/weapon/table_parts/cultify()
|
||||
new /obj/item/weapon/table_parts/wood(loc)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/table_parts/wood/cultify()
|
||||
return
|
||||
|
||||
/obj/machinery/cultify()
|
||||
// We keep the number of cultified machines down by only converting those that are dense
|
||||
// The alternative is to keep a separate file of exceptions.
|
||||
@@ -149,8 +142,12 @@
|
||||
..()
|
||||
|
||||
/obj/structure/table/cultify()
|
||||
new /obj/structure/table/woodentable(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/cultify()
|
||||
return
|
||||
// Make it a wood-reinforced wooden table.
|
||||
// There are cult materials available, but it'd make the table non-deconstructable with how holotables work.
|
||||
// Could possibly use a new material var for holographic-ness?
|
||||
material = name_to_material["wood"]
|
||||
reinforced = name_to_material["wood"]
|
||||
update_desc()
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
update_material()
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/var/const/access_tox = 7
|
||||
/var/const/access_tox_storage = 8
|
||||
/var/const/access_genetics = 9
|
||||
/var/const/access_engine = 10
|
||||
/var/const/access_engine = 10 //engineering hallways
|
||||
/var/const/access_engine_equip = 11
|
||||
/var/const/access_maint_tunnels = 12
|
||||
/var/const/access_external_airlocks = 13
|
||||
@@ -65,6 +65,7 @@
|
||||
/var/const/access_sec_doors = 63 // Security front doors
|
||||
/var/const/access_psychiatrist = 64 // Psychiatrist's office
|
||||
/var/const/access_xenoarch = 65
|
||||
/var/const/access_medical_equip = 66
|
||||
|
||||
//BEGIN CENTCOM ACCESS
|
||||
/*Should leave plenty of room if we need to add more access levels.
|
||||
@@ -174,7 +175,7 @@
|
||||
if(1) //security
|
||||
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
|
||||
if(2) //medbay
|
||||
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
|
||||
return list(access_medical, access_medical_equip, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
|
||||
if(3) //research
|
||||
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_xenoarch, access_rd)
|
||||
if(4) //engineering and maintenance
|
||||
@@ -213,7 +214,7 @@
|
||||
if(access_cargo_bot)
|
||||
return "Cargo Bot Delivery"
|
||||
if(access_security)
|
||||
return "Security"
|
||||
return "Security Equipment"
|
||||
if(access_brig)
|
||||
return "Holding Cells"
|
||||
if(access_court)
|
||||
@@ -337,7 +338,7 @@
|
||||
if(access_gateway)
|
||||
return "Gateway"
|
||||
if(access_sec_doors)
|
||||
return "Brig"
|
||||
return "Security"
|
||||
|
||||
/proc/get_centcom_access_desc(A)
|
||||
switch(A)
|
||||
|
||||
@@ -256,8 +256,8 @@
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_janitor, access_maint_tunnels)
|
||||
minimal_access = list(access_janitor, access_maint_tunnels)
|
||||
access = list(access_janitor, access_maint_tunnels, access_engine, access_research, access_sec_doors, access_medical)
|
||||
minimal_access = list(access_janitor, access_maint_tunnels, access_engine, access_research, access_sec_doors, access_medical)
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
supervisors = "the chief engineer"
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
|
||||
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||
minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
supervisors = "the chief engineer"
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_external_airlocks)
|
||||
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks)
|
||||
minimal_access = list(access_eva, access_engine, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks)
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
selection_color = "#ffddf0"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
access = list(access_medical, access_morgue, access_genetics, access_heads,
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads,
|
||||
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
|
||||
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva)
|
||||
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
|
||||
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva, access_external_airlocks)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads,
|
||||
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
|
||||
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva)
|
||||
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva, access_external_airlocks)
|
||||
minimal_player_age = 10
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -44,8 +44,8 @@
|
||||
spawn_positions = 3
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_morgue, access_surgery, access_virology)
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_virology)
|
||||
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -106,7 +106,7 @@
|
||||
spawn_positions = 2
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_chemistry)
|
||||
alt_titles = list("Pharmacist")
|
||||
|
||||
@@ -164,8 +164,8 @@
|
||||
spawn_positions = 1
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_psychiatrist)
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_psychiatrist)
|
||||
alt_titles = list("Psychologist")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -198,8 +198,8 @@
|
||||
spawn_positions = 2
|
||||
supervisors = "the chief medical officer"
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
|
||||
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_medical_equip, access_eva, access_maint_tunnels, access_external_airlocks)
|
||||
alt_titles = list("Emergency Medical Technician")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
req_admin_notify = 1
|
||||
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
|
||||
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
|
||||
minimal_player_age = 14
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
selection_color = "#ffdddd"
|
||||
idtype = /obj/item/weapon/card/id/silver
|
||||
req_admin_notify = 1
|
||||
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
|
||||
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
|
||||
minimal_player_age = 14
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -54,8 +54,8 @@
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels)
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_external_airlocks)
|
||||
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_external_airlocks)
|
||||
minimal_player_age = 5
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -133,8 +133,8 @@
|
||||
spawn_positions = 3
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_external_airlocks)
|
||||
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_external_airlocks)
|
||||
minimal_player_age = 3
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -138,8 +138,10 @@
|
||||
else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN)))
|
||||
if(weld(W, user))
|
||||
if (stat & BROKEN)
|
||||
new /obj/item/weapon/circuitboard/broken(src.loc)
|
||||
new /obj/item/stack/cable_coil(src.loc, length=2)
|
||||
stat &= ~BROKEN
|
||||
cancelCameraAlarm()
|
||||
update_icon()
|
||||
update_coverage()
|
||||
else if(assembly)
|
||||
assembly.loc = src.loc
|
||||
assembly.state = 1
|
||||
|
||||
@@ -179,6 +179,11 @@ Nah
|
||||
<A href='?src=\ref[src];dmake=7'>Chute</A><BR>
|
||||
<A href='?src=\ref[src];dmake=21'>Upwards</A><BR>
|
||||
<A href='?src=\ref[src];dmake=22'>Downwards</A><BR>
|
||||
<A href='?src=\ref[src];dmake=8'>Sorting</A><BR>
|
||||
<A href='?src=\ref[src];dmake=9'>Sorting (Wildcard)</A><BR>
|
||||
<A href='?src=\ref[src];dmake=10'>Sorting (Untagged)</A><BR>
|
||||
<A href='?src=\ref[src];dmake=11'>Tagger</A><BR>
|
||||
<A href='?src=\ref[src];dmake=12'>Tagger (Partial)</A><BR>
|
||||
"}
|
||||
///// Z-Level stuff
|
||||
|
||||
@@ -220,6 +225,19 @@ Nah
|
||||
if(7)
|
||||
C.ptype = 8
|
||||
C.density = 1
|
||||
if(8)
|
||||
C.ptype = 9
|
||||
C.subtype = 0
|
||||
if(9)
|
||||
C.ptype = 9
|
||||
C.subtype = 1
|
||||
if(10)
|
||||
C.ptype = 9
|
||||
C.subtype = 2
|
||||
if(11)
|
||||
C.ptype = 13
|
||||
if(12)
|
||||
C.ptype = 14
|
||||
///// Z-Level stuff
|
||||
if(21)
|
||||
C.ptype = 11
|
||||
|
||||
@@ -788,7 +788,7 @@
|
||||
icon_state = "med"
|
||||
icon_deny = "med-deny"
|
||||
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
products = list(/obj/item/weapon/reagent_containers/glass/bottle/antitoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline = 4,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/stoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,
|
||||
/obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/syringe = 12,
|
||||
|
||||
@@ -192,10 +192,12 @@ REAGENT SCANNER
|
||||
|
||||
for(var/name in H.organs_by_name)
|
||||
var/obj/item/organ/external/e = H.organs_by_name[name]
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if(e && e.status & ORGAN_BROKEN)
|
||||
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
for(var/obj/item/organ/external/e in H.organs)
|
||||
if(!e)
|
||||
continue
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/created_window = /obj/structure/window/basic
|
||||
var/is_reinforced = 0
|
||||
var/list/construction_options = list("One Direction", "Full Window")
|
||||
sheettype = "glass"
|
||||
|
||||
/obj/item/stack/sheet/glass/cyborg
|
||||
name = "glass synthesizer"
|
||||
@@ -174,6 +175,7 @@
|
||||
matter = list("glass" = 7500)
|
||||
origin_tech = "materials=3;phorontech=2"
|
||||
created_window = /obj/structure/window/phoronbasic
|
||||
sheettype = "phoronglass"
|
||||
|
||||
/obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
|
||||
@@ -134,6 +134,7 @@ obj/item/stack/sheet/mineral/iron/New()
|
||||
icon_state = "sheet-plastic"
|
||||
origin_tech = "materials=3"
|
||||
perunit = 2000
|
||||
sheettype = "plastic"
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastic/New()
|
||||
..()
|
||||
|
||||
@@ -31,8 +31,8 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
|
||||
), 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/weapon/table_parts/rack), \
|
||||
new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
@@ -147,7 +147,6 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
|
||||
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
|
||||
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
@@ -163,6 +162,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
singular_name = "wood plank"
|
||||
icon_state = "sheet-wood"
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
sheettype = "wood"
|
||||
|
||||
/obj/item/stack/sheet/wood/cyborg
|
||||
name = "wood synthesizer"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/shard
|
||||
name = "glass shard"
|
||||
name = "shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "large"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
desc = "Could probably be used as ... a throwing weapon?"
|
||||
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
|
||||
w_class = 2.0
|
||||
force = 5.0
|
||||
throwforce = 8.0
|
||||
item_state = "shard-glass"
|
||||
matter = list("glass" = 3750)
|
||||
//matter = list("glass" = 3750) // Weld it into sheets before you use it!
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
|
||||
gender = "neuter"
|
||||
var/material/material = null
|
||||
|
||||
/obj/item/weapon/shard/suicide_act(mob/user)
|
||||
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
|
||||
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
|
||||
@@ -34,36 +37,54 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/New()
|
||||
/obj/item/weapon/shard/New(loc, material/material)
|
||||
..(loc)
|
||||
|
||||
src.icon_state = pick("large", "medium", "small")
|
||||
switch(src.icon_state)
|
||||
if("small")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("medium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("large")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
if(!material || !istype(material)) // We either don't have a material or we've been passed an invalid material. Use glass instead.
|
||||
material = get_material_by_name("glass")
|
||||
|
||||
set_material(material)
|
||||
|
||||
/obj/item/weapon/shard/proc/set_material(material/material)
|
||||
if(istype(material))
|
||||
src.material = material
|
||||
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
|
||||
pixel_x = rand(-8, 8)
|
||||
pixel_y = rand(-8, 8)
|
||||
update_material()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/shard/proc/update_material()
|
||||
if(material)
|
||||
if(material.shard_type)
|
||||
name = "[material.display_name] [material.shard_type]"
|
||||
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
|
||||
switch(material.shard_type)
|
||||
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
|
||||
gender = "plural"
|
||||
else
|
||||
gender = "neuter"
|
||||
else
|
||||
return
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/item/weapon/shard/update_icon()
|
||||
if(material)
|
||||
color = material.icon_colour
|
||||
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
|
||||
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
|
||||
else
|
||||
color = "#ffffff"
|
||||
alpha = 255
|
||||
|
||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
material.place_sheet(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
@@ -90,26 +111,10 @@
|
||||
H.Weaken(3)
|
||||
..()
|
||||
|
||||
// Shrapnel
|
||||
// Preset types - left here for the code that uses them
|
||||
|
||||
/obj/item/weapon/shard/shrapnel
|
||||
name = "shrapnel"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
icon_state = "shrapnellarge"
|
||||
desc = "A bunch of tiny bits of shattered metal."
|
||||
/obj/item/weapon/shard/shrapnel/New(loc)
|
||||
..(loc, get_material_by_name("steel"))
|
||||
|
||||
/obj/item/weapon/shard/shrapnel/New()
|
||||
|
||||
src.icon_state = pick("shrapnellarge", "shrapnelmedium", "shrapnelsmall")
|
||||
switch(src.icon_state)
|
||||
if("shrapnelsmall")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("shrapnelmedium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("shrapnellarge")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
/obj/item/weapon/shard/phoron/New(loc)
|
||||
..(loc, get_material_by_name("phoron glass"))
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
// Table parts and rack parts
|
||||
|
||||
/obj/item/weapon/table_parts
|
||||
name = "table parts"
|
||||
desc = "Parts of a table. Poor table."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "table_parts"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
flags = CONDUCT
|
||||
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
|
||||
var/build_type = /obj/structure/table
|
||||
var/alter_type = /obj/item/weapon/table_parts/reinforced
|
||||
var/alter_with = /obj/item/stack/rods
|
||||
var/alter_cost = 4
|
||||
var/list/stack_types = list(/obj/item/stack/sheet/metal)
|
||||
|
||||
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
for(var/material_type in stack_types)
|
||||
new material_type(get_turf(user))
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(alter_type && alter_with && istype(W,alter_with))
|
||||
var/obj/item/stack/R = W
|
||||
if (R.use(alter_cost))
|
||||
var/obj/item/new_parts = new alter_type (get_turf(loc))
|
||||
user << "<span class='notice'>You modify \the [name] into \a [new_parts].</span>"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need at least [alter_cost] sheets to reinforce the [name].</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/table_parts/attack_self(mob/user as mob)
|
||||
if(locate(/obj/structure/table) in user.loc)
|
||||
user << "<span class='warning'>There is already a table here.</span>"
|
||||
return
|
||||
|
||||
new build_type( user.loc )
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/table_parts/reinforced
|
||||
name = "reinforced table parts"
|
||||
desc = "Hard table parts. Well... harder."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "reinf_tableparts"
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 7500)
|
||||
flags = CONDUCT
|
||||
|
||||
stack_types = list(/obj/item/stack/sheet/metal, /obj/item/stack/rods)
|
||||
build_type = /obj/structure/table/reinforced
|
||||
alter_type = null
|
||||
alter_with = null
|
||||
alter_cost = null
|
||||
|
||||
/obj/item/weapon/table_parts/wood
|
||||
name = "wooden table parts"
|
||||
desc = "Keep away from fire."
|
||||
icon_state = "wood_tableparts"
|
||||
flags = null
|
||||
|
||||
stack_types = list(/obj/item/stack/sheet/wood)
|
||||
build_type = /obj/structure/table/woodentable
|
||||
alter_type = /obj/item/weapon/table_parts/gambling
|
||||
alter_with = /obj/item/stack/tile/carpet
|
||||
alter_cost = 1
|
||||
|
||||
/obj/item/weapon/table_parts/gambling
|
||||
name = "gambling table parts"
|
||||
desc = "Keep away from security."
|
||||
icon_state = "gamble_tableparts"
|
||||
flags = null
|
||||
|
||||
stack_types = list(/obj/item/stack/tile/carpet,/obj/item/stack/sheet/wood)
|
||||
build_type = /obj/structure/table/gamblingtable
|
||||
alter_type = null
|
||||
alter_with = null
|
||||
alter_cost = null
|
||||
|
||||
/obj/item/weapon/table_parts/gambling/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/tile/carpet( get_turf(loc) )
|
||||
new /obj/item/weapon/table_parts/wood( get_turf(loc) )
|
||||
user << "<span class='notice'>You pry the carpet out of the table.</span>"
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/table_parts/rack
|
||||
name = "rack parts"
|
||||
desc = "Parts of a rack."
|
||||
icon_state = "rack_parts"
|
||||
stack_types = list(/obj/item/stack/sheet/metal)
|
||||
build_type = /obj/structure/table/rack
|
||||
alter_type = null
|
||||
alter_with = null
|
||||
alter_cost = null
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
|
||||
|
||||
New()
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "medical doctor's locker"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
@@ -187,7 +187,7 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(access_medical)
|
||||
req_access = list(access_medical_equip)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "security officer's locker"
|
||||
req_access = list(access_security)
|
||||
req_access = list(access_brig)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
if(isobserver(usr)) //to stop ghosts from deflating
|
||||
return
|
||||
|
||||
verbs -= /obj/structure/inflatable/verb/hand_deflate
|
||||
deflate()
|
||||
|
||||
/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
|
||||
@@ -1,558 +0,0 @@
|
||||
// Tables and racks.
|
||||
|
||||
/obj/structure/table
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 2.8
|
||||
throwpass = 1
|
||||
climbable = 1
|
||||
breakable = 1
|
||||
parts = /obj/item/weapon/table_parts
|
||||
|
||||
var/flipped = 0
|
||||
var/health = 100
|
||||
|
||||
/obj/structure/table/woodentable
|
||||
name = "wooden table"
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon_state = "wood_table"
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
health = 50
|
||||
|
||||
/obj/structure/table/gamblingtable
|
||||
name = "gambling table"
|
||||
desc = "A curved wooden table with a thin carpet of green fabric."
|
||||
icon_state = "gamble_table"
|
||||
parts = /obj/item/weapon/table_parts/gambling
|
||||
health = 50
|
||||
|
||||
/obj/structure/table/reinforced
|
||||
icon_state = "reinf_table"
|
||||
health = 200
|
||||
parts = /obj/item/weapon/table_parts/reinforced
|
||||
|
||||
/obj/structure/table/rack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
health = 100
|
||||
parts = /obj/item/weapon/table_parts/rack
|
||||
flipped = -1 //Cannot flip.
|
||||
|
||||
/obj/structure/table/examine()
|
||||
..()
|
||||
if(health > 100)
|
||||
usr << "This one looks like it has been reinforced."
|
||||
|
||||
/obj/structure/table/proc/update_adjacent()
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
if(locate(/obj/structure/table,get_step(src,direction)))
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in src.loc)
|
||||
if(T != src)
|
||||
qdel(T)
|
||||
update_icon()
|
||||
update_adjacent()
|
||||
|
||||
/obj/structure/table/Destroy()
|
||||
update_adjacent()
|
||||
..()
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
|
||||
if(health > 100)
|
||||
name = "reinforced [initial(name)]"
|
||||
|
||||
spawn(2) //So it properly updates when deleting
|
||||
|
||||
if(flipped == 1)
|
||||
var/type = 0
|
||||
var/tabledirs = 0
|
||||
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
if (T && T.flipped == 1 && T.dir == src.dir)
|
||||
type++
|
||||
tabledirs |= direction
|
||||
var/base = "table"
|
||||
if (istype(src, /obj/structure/table/woodentable))
|
||||
base = "wood"
|
||||
if (istype(src, /obj/structure/table/reinforced))
|
||||
base = "rtable"
|
||||
|
||||
icon_state = "[base]flip[type]"
|
||||
if (type==1)
|
||||
if (tabledirs & turn(dir,90))
|
||||
icon_state = icon_state+"-"
|
||||
if (tabledirs & turn(dir,-90))
|
||||
icon_state = icon_state+"+"
|
||||
return 1
|
||||
|
||||
var/dir_sum = 0
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
var/skip_sum = 0
|
||||
for(var/obj/structure/window/W in src.loc)
|
||||
if(W.dir == direction) //So smooth tables don't go smooth through windows
|
||||
skip_sum = 1
|
||||
continue
|
||||
var/inv_direction //inverse direction
|
||||
switch(direction)
|
||||
if(1)
|
||||
inv_direction = 2
|
||||
if(2)
|
||||
inv_direction = 1
|
||||
if(4)
|
||||
inv_direction = 8
|
||||
if(8)
|
||||
inv_direction = 4
|
||||
if(5)
|
||||
inv_direction = 10
|
||||
if(6)
|
||||
inv_direction = 9
|
||||
if(9)
|
||||
inv_direction = 6
|
||||
if(10)
|
||||
inv_direction = 5
|
||||
for(var/obj/structure/window/W in get_step(src,direction))
|
||||
if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
|
||||
skip_sum = 1
|
||||
continue
|
||||
if(!skip_sum) //means there is a window between the two tiles in this direction
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
if(T && T.flipped == 0) // This should let us ignore racks for table icons/flipping. Should.
|
||||
if(direction <5)
|
||||
dir_sum += direction
|
||||
else
|
||||
if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
|
||||
dir_sum += 16
|
||||
if(direction == 6)
|
||||
dir_sum += 32
|
||||
if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
|
||||
dir_sum += 8
|
||||
if(direction == 10)
|
||||
dir_sum += 64
|
||||
if(direction == 9)
|
||||
dir_sum += 128
|
||||
|
||||
var/table_type = 0 //stand_alone table
|
||||
if(dir_sum%16 in cardinal)
|
||||
table_type = 1 //endtable
|
||||
dir_sum %= 16
|
||||
if(dir_sum%16 in list(3,12))
|
||||
table_type = 2 //1 tile thick, streight table
|
||||
if(dir_sum%16 == 3) //3 doesn't exist as a dir
|
||||
dir_sum = 2
|
||||
if(dir_sum%16 == 12) //12 doesn't exist as a dir.
|
||||
dir_sum = 4
|
||||
if(dir_sum%16 in list(5,6,9,10))
|
||||
if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16)))
|
||||
table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
|
||||
else
|
||||
table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
|
||||
dir_sum %= 16
|
||||
if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
|
||||
table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
|
||||
switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
|
||||
if(7)
|
||||
if(dir_sum == 23)
|
||||
table_type = 6
|
||||
dir_sum = 8
|
||||
else if(dir_sum == 39)
|
||||
dir_sum = 4
|
||||
table_type = 6
|
||||
else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
|
||||
dir_sum = 4
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 4
|
||||
if(11)
|
||||
if(dir_sum == 75)
|
||||
dir_sum = 5
|
||||
table_type = 6
|
||||
else if(dir_sum == 139)
|
||||
dir_sum = 9
|
||||
table_type = 6
|
||||
else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
|
||||
dir_sum = 8
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 8
|
||||
if(13)
|
||||
if(dir_sum == 29)
|
||||
dir_sum = 10
|
||||
table_type = 6
|
||||
else if(dir_sum == 141)
|
||||
dir_sum = 6
|
||||
table_type = 6
|
||||
else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
|
||||
dir_sum = 1
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 1
|
||||
if(14)
|
||||
if(dir_sum == 46)
|
||||
dir_sum = 1
|
||||
table_type = 6
|
||||
else if(dir_sum == 78)
|
||||
dir_sum = 2
|
||||
table_type = 6
|
||||
else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
|
||||
dir_sum = 2
|
||||
table_type = 3
|
||||
else
|
||||
dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
|
||||
if(dir_sum%16 == 15)
|
||||
table_type = 4 //4-way intersection, the 'middle' table sprites will be used.
|
||||
|
||||
if(istype(src,/obj/structure/table/reinforced))
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "reinf_table"
|
||||
if(1)
|
||||
icon_state = "reinf_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "reinf_1tilethick"
|
||||
if(3)
|
||||
icon_state = "reinf_tabledir"
|
||||
if(4)
|
||||
icon_state = "reinf_middle"
|
||||
if(5)
|
||||
icon_state = "reinf_tabledir2"
|
||||
if(6)
|
||||
icon_state = "reinf_tabledir3"
|
||||
else if(istype(src,/obj/structure/table/woodentable))
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "wood_table"
|
||||
if(1)
|
||||
icon_state = "wood_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "wood_1tilethick"
|
||||
if(3)
|
||||
icon_state = "wood_tabledir"
|
||||
if(4)
|
||||
icon_state = "wood_middle"
|
||||
if(5)
|
||||
icon_state = "wood_tabledir2"
|
||||
if(6)
|
||||
icon_state = "wood_tabledir3"
|
||||
else if(istype(src,/obj/structure/table/gamblingtable))
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "gamble_table"
|
||||
if(1)
|
||||
icon_state = "gamble_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "gamble_1tilethick"
|
||||
if(3)
|
||||
icon_state = "gamble_tabledir"
|
||||
if(4)
|
||||
icon_state = "gamble_middle"
|
||||
if(5)
|
||||
icon_state = "gamble_tabledir2"
|
||||
if(6)
|
||||
icon_state = "gamble_tabledir3"
|
||||
else
|
||||
switch(table_type)
|
||||
if(0)
|
||||
icon_state = "table"
|
||||
if(1)
|
||||
icon_state = "table_1tileendtable"
|
||||
if(2)
|
||||
icon_state = "table_1tilethick"
|
||||
if(3)
|
||||
icon_state = "tabledir"
|
||||
if(4)
|
||||
icon_state = "table_middle"
|
||||
if(5)
|
||||
icon_state = "tabledir2"
|
||||
if(6)
|
||||
icon_state = "tabledir3"
|
||||
if (dir_sum in list(1,2,4,8,5,6,9,10))
|
||||
set_dir(dir_sum)
|
||||
else
|
||||
set_dir(2)
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
if (flipped == 1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
var/turf/cover
|
||||
if(flipped==1)
|
||||
cover = get_turf(src)
|
||||
else if(flipped==0)
|
||||
cover = get_step(loc, get_dir(from, loc))
|
||||
if(!cover)
|
||||
return 1
|
||||
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
|
||||
return 1
|
||||
if (get_turf(P.original) == cover)
|
||||
var/chance = 20
|
||||
if (ismob(P.original))
|
||||
var/mob/M = P.original
|
||||
if (M.lying)
|
||||
chance += 20 //Lying down lets you catch less bullets
|
||||
if(flipped==1)
|
||||
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
|
||||
chance += 20
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if (health > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if (flipped==1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (!W) return
|
||||
|
||||
// Handle harm intent grabbing/tabling.
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
else
|
||||
user << "<span class='danger'>You need a better grip to do that!</span>"
|
||||
return
|
||||
else
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("<span class='danger'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
// Handle dissembly.
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(health > 100)
|
||||
user << "<span class='danger'>\The [src] is too well constructed to be collapsed. Weaken it first.</span>"
|
||||
return
|
||||
user << "<span class='notice'>You locate the bolts and begin disassembling \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Handle weakening.
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
if(initial(health)>100)
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(src.health>100)
|
||||
user << "<span class='notice'>You start weakening \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(!do_after(user, 50) || !src || health<100 || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You have weakened \the [src].</span>"
|
||||
health -= 100
|
||||
else if(src.health <= 100)
|
||||
user << "<span class='notice'>You start strengthening \the [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(!do_after(user, 50) || !src || health > 100 || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You have strengthened \the [src].</span>"
|
||||
health += 100
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>\The [src] is too flimsy to be reinforced or weakened.</span>"
|
||||
return
|
||||
|
||||
|
||||
// Handle dismantling or placing things on the table from here on.
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
user.visible_message("<span class='danger'>The [src] was sliced apart by [user]!</span>")
|
||||
qdel(src)
|
||||
|
||||
user.drop_item(src.loc)
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
if(T && T.flipped == 0)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
if (!T || T.flipped == 1)
|
||||
return 1
|
||||
if (istype(T,/obj/structure/table/reinforced/))
|
||||
var/obj/structure/table/reinforced/R = T
|
||||
if (R.health > 100)
|
||||
return 0
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
/obj/structure/table/verb/do_flip()
|
||||
set name = "Flip table"
|
||||
set desc = "Flips a non-reinforced table"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr) || ismouse(usr))
|
||||
return
|
||||
|
||||
if(flipped < 0 || !flip(get_cardinal_dir(usr,src)))
|
||||
usr << "<span class='notice'>It won't budge.</span>"
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/unflipping_check(var/direction)
|
||||
|
||||
for(var/mob/M in oview(src,0))
|
||||
return 0
|
||||
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
usr << "There's \a [occupied] in the way."
|
||||
return 0
|
||||
|
||||
var/list/L = list()
|
||||
if(direction)
|
||||
L.Add(direction)
|
||||
else
|
||||
L.Add(turn(src.dir,-90))
|
||||
L.Add(turn(src.dir,90))
|
||||
for(var/new_dir in L)
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,new_dir)
|
||||
if(T)
|
||||
if(T.flipped == 1 && T.dir == src.dir && !T.unflipping_check(new_dir))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/do_put()
|
||||
set name = "Put table back"
|
||||
set desc = "Puts flipped table back"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr))
|
||||
return
|
||||
|
||||
if (!unflipping_check())
|
||||
usr << "<span class='notice'>It won't budge.</span>"
|
||||
return
|
||||
unflip()
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
|
||||
return 0
|
||||
|
||||
verbs -=/obj/structure/table/verb/do_flip
|
||||
verbs +=/obj/structure/table/proc/do_put
|
||||
|
||||
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
|
||||
for (var/atom/movable/A in get_turf(src))
|
||||
if (!A.anchored)
|
||||
spawn(0)
|
||||
A.throw_at(pick(targets),1,1)
|
||||
|
||||
set_dir(direction)
|
||||
if(dir != NORTH)
|
||||
layer = 5
|
||||
climbable = 0 //flipping tables allows them to be used as makeshift barriers
|
||||
flipped = 1
|
||||
flags |= ON_BORDER
|
||||
for(var/D in list(turn(direction, 90), turn(direction, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src,D)
|
||||
if(T && T.flipped == 0)
|
||||
T.flip(direction)
|
||||
update_icon()
|
||||
update_adjacent()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/unflip()
|
||||
verbs -=/obj/structure/table/proc/do_put
|
||||
verbs +=/obj/structure/table/verb/do_flip
|
||||
|
||||
layer = initial(layer)
|
||||
flipped = 0
|
||||
climbable = initial(climbable)
|
||||
flags &= ~ON_BORDER
|
||||
for(var/D in list(turn(dir, 90), turn(dir, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,D)
|
||||
if(T && T.flipped == 1 && T.dir == src.dir)
|
||||
T.unflip()
|
||||
update_icon()
|
||||
update_adjacent()
|
||||
|
||||
return 1
|
||||
|
||||
// No need to handle any of this, racks are not contiguous..
|
||||
/obj/structure/table/rack/update_icon()
|
||||
return
|
||||
/obj/structure/table/rack/update_adjacent()
|
||||
return
|
||||
@@ -25,6 +25,7 @@ var/list/mechtoys = list(
|
||||
|
||||
/obj/item/weapon/paper/manifest
|
||||
name = "supply manifest"
|
||||
var/is_copy = 1
|
||||
|
||||
/area/supply/station
|
||||
name = "Supply Shuttle"
|
||||
@@ -197,8 +198,8 @@ var/list/mechtoys = list(
|
||||
// Sell manifests
|
||||
var/atom/A = atom
|
||||
if(find_slip && istype(A,/obj/item/weapon/paper/manifest))
|
||||
var/obj/item/weapon/paper/slip = A
|
||||
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
|
||||
var/obj/item/weapon/paper/manifest/slip = A
|
||||
if(!slip.is_copy && slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
|
||||
points += points_per_slip
|
||||
find_slip = 0
|
||||
continue
|
||||
@@ -231,7 +232,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)
|
||||
@@ -249,6 +257,7 @@ var/list/mechtoys = list(
|
||||
//supply manifest generation begin
|
||||
|
||||
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest(A)
|
||||
slip.is_copy = 0
|
||||
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
|
||||
slip.info +="Order #[SO.ordernum]<br>"
|
||||
slip.info +="Destination: [station_name]<br>"
|
||||
|
||||
@@ -25,11 +25,9 @@ var/list/global/wall_cache = list()
|
||||
/turf/simulated/wall/New(var/newloc, var/materialtype, var/rmaterialtype)
|
||||
..(newloc)
|
||||
icon_state = "blank"
|
||||
if(!name_to_material)
|
||||
populate_material_list()
|
||||
if(!materialtype)
|
||||
materialtype = DEFAULT_WALL_MATERIAL
|
||||
material = name_to_material[materialtype]
|
||||
material = get_material_by_name(materialtype)
|
||||
if(!isnull(rmaterialtype))
|
||||
reinf_material = name_to_material[rmaterialtype]
|
||||
update_material()
|
||||
@@ -196,7 +194,7 @@ var/list/global/wall_cache = list()
|
||||
new/obj/effect/overlay/wallrot(src)
|
||||
|
||||
/turf/simulated/wall/proc/can_melt()
|
||||
if(material.unmeltable)
|
||||
if(material.flags & MATERIAL_UNMELTABLE)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -9,11 +9,30 @@
|
||||
var/slot = "decor"
|
||||
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
||||
var/image/inv_overlay = null //overlay used when attached to clothing.
|
||||
var/image/inv_overlay_mob = null
|
||||
var/overlay_state = null
|
||||
|
||||
/obj/item/clothing/accessory/New()
|
||||
..()
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[overlay_state? "[overlay_state]" : "[icon_state]"]")
|
||||
/obj/item/clothing/accessory/proc/get_inv_overlay()
|
||||
if(!inv_overlay)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_tie" in icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_tie"
|
||||
inv_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]")
|
||||
return inv_overlay
|
||||
|
||||
/obj/item/clothing/accessory/proc/get_inv_mob_overlay()
|
||||
if(!inv_overlay_mob)
|
||||
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
|
||||
if(icon_override)
|
||||
if("[tmp_icon_state]_mob" in icon_states(icon_override))
|
||||
tmp_icon_state = "[tmp_icon_state]_mob"
|
||||
inv_overlay_mob = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]")
|
||||
else
|
||||
inv_overlay_mob = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]")
|
||||
return inv_overlay_mob
|
||||
|
||||
//when user attached an accessory to S
|
||||
/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||
@@ -21,7 +40,7 @@
|
||||
return
|
||||
has_suit = S
|
||||
loc = has_suit
|
||||
has_suit.overlays += inv_overlay
|
||||
has_suit.overlays += get_inv_overlay()
|
||||
|
||||
user << "<span class='notice'>You attach [src] to [has_suit].</span>"
|
||||
src.add_fingerprint(user)
|
||||
@@ -29,7 +48,7 @@
|
||||
/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
|
||||
if(!has_suit)
|
||||
return
|
||||
has_suit.overlays -= inv_overlay
|
||||
has_suit.overlays -= get_inv_overlay()
|
||||
has_suit = null
|
||||
usr.put_in_hands(src)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -106,8 +106,7 @@
|
||||
if("item_name")
|
||||
current_data.name = field_data
|
||||
if("item_icon")
|
||||
if(field_data in icon_states(CUSTOM_ITEM_OBJ))
|
||||
current_data.item_icon = field_data
|
||||
current_data.item_icon = field_data
|
||||
if("item_desc")
|
||||
current_data.item_desc = field_data
|
||||
if("req_access")
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// Holographic Items!
|
||||
|
||||
// Holographic tables are in code/modules/tables/presets.dm
|
||||
// Holographic racks are in code/modules/tables/rack.dm
|
||||
|
||||
/turf/simulated/floor/holofloor/
|
||||
thermal_conductivity = 0
|
||||
|
||||
@@ -40,36 +43,6 @@
|
||||
return
|
||||
// HOLOFLOOR DOES NOT GIVE A FUCK
|
||||
|
||||
/obj/structure/table/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
|
||||
/obj/structure/table/holotable/attack_hand(mob/user as mob)
|
||||
return // HOLOTABLE DOES NOT GIVE A FUCK
|
||||
|
||||
|
||||
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holotable! There are no bolts!"
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/holotable
|
||||
name = "table"
|
||||
desc = "A square piece of wood standing on four wooden legs. It can not move."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "wood_table"
|
||||
|
||||
/obj/structure/holostool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
@@ -371,22 +344,6 @@
|
||||
for(var/mob/M in currentarea)
|
||||
M << "FIGHT!"
|
||||
|
||||
//Holorack
|
||||
|
||||
/obj/structure/table/rack/holorack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
|
||||
/obj/structure/table/rack/holorack/attack_hand(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holorack! You can't unwrench it!"
|
||||
return
|
||||
|
||||
//Holocarp
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
switch(grown_seed.get_trait(TRAIT_CARNIVOROUS))
|
||||
if(1)
|
||||
dat += "<br>It is carniovorous and will eat tray pests for sustenance."
|
||||
dat += "<br>It is carnivorous and will eat tray pests for sustenance."
|
||||
if(2)
|
||||
dat += "<br>It is carnivorous and poses a significant threat to living things around it."
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var/list/name_to_material
|
||||
|
||||
/proc/populate_material_list()
|
||||
/proc/populate_material_list(force_remake=0)
|
||||
if(name_to_material && !force_remake) return // Already set up!
|
||||
name_to_material = list()
|
||||
for(var/type in typesof(/material) - /material)
|
||||
var/material/new_mineral = new type
|
||||
@@ -9,6 +10,12 @@ var/list/name_to_material
|
||||
name_to_material[lowertext(new_mineral.name)] = new_mineral
|
||||
return 1
|
||||
|
||||
/proc/get_material_by_name(name)
|
||||
if(!name_to_material)
|
||||
populate_material_list()
|
||||
|
||||
return name_to_material[name]
|
||||
|
||||
/*
|
||||
Valid sprite masks:
|
||||
stone
|
||||
@@ -20,11 +27,11 @@ var/list/name_to_material
|
||||
/material
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name
|
||||
var/flags = 0
|
||||
var/icon_base = "metal"
|
||||
var/icon_colour
|
||||
var/icon_reinf = "reinf_metal"
|
||||
var/stack_type
|
||||
var/unmeltable
|
||||
var/cut_delay = 0
|
||||
var/radioactivity
|
||||
var/ignition_point
|
||||
@@ -34,11 +41,17 @@ var/list/name_to_material
|
||||
var/rotting_touch_message = "crumbles under your touch"
|
||||
var/opacity = 1
|
||||
var/explosion_resistance = 5
|
||||
var/shard_type = SHARD_SHRAPNEL
|
||||
var/shard_icon
|
||||
var/shard_can_repair = 1
|
||||
var/tableslam_noise = 'sound/weapons/tablehit1.ogg'
|
||||
|
||||
/material/New()
|
||||
..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
if(!shard_icon)
|
||||
shard_icon = shard_type
|
||||
|
||||
/material/placeholder
|
||||
name = "placeholder"
|
||||
@@ -55,7 +68,14 @@ var/list/name_to_material
|
||||
|
||||
/material/proc/place_sheet(var/turf/target)
|
||||
if(stack_type)
|
||||
new stack_type(target)
|
||||
return new stack_type(target)
|
||||
|
||||
/material/proc/place_shard(var/turf/target)
|
||||
if(shard_type)
|
||||
return new /obj/item/weapon/shard(target, src)
|
||||
|
||||
/material/proc/is_brittle()
|
||||
return !!(flags & MATERIAL_BRITTLE)
|
||||
|
||||
/material/uranium
|
||||
name = "uranium"
|
||||
@@ -68,10 +88,12 @@ var/list/name_to_material
|
||||
/material/diamond
|
||||
name = "diamond"
|
||||
stack_type = /obj/item/stack/sheet/mineral/diamond
|
||||
unmeltable = 1
|
||||
flags = MATERIAL_UNMELTABLE
|
||||
cut_delay = 60
|
||||
icon_colour = "#00FFE1"
|
||||
opacity = 0.4
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
|
||||
/material/gold
|
||||
name = "gold"
|
||||
@@ -89,6 +111,7 @@ var/list/name_to_material
|
||||
ignition_point = 300
|
||||
icon_base = "stone"
|
||||
icon_colour = "#FC2BC5"
|
||||
shard_type = SHARD_SHARD
|
||||
|
||||
/material/sandstone
|
||||
name = "sandstone"
|
||||
@@ -96,6 +119,7 @@ var/list/name_to_material
|
||||
icon_base = "stone"
|
||||
icon_reinf = "reinf_stone"
|
||||
icon_colour = "#D9C179"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
|
||||
/material/steel
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
@@ -104,6 +128,12 @@ var/list/name_to_material
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#666666"
|
||||
|
||||
/material/steel/holographic
|
||||
name = "holographic " + DEFAULT_WALL_MATERIAL
|
||||
display_name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/plasteel
|
||||
name = "plasteel"
|
||||
stack_type = /obj/item/stack/sheet/plasteel
|
||||
@@ -117,12 +147,25 @@ var/list/name_to_material
|
||||
/material/glass
|
||||
name = "glass"
|
||||
stack_type = /obj/item/stack/sheet/glass
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_colour = "#00E1FF"
|
||||
opacity = 0.3
|
||||
integrity = 100
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
|
||||
/material/glass/phoron
|
||||
name = "phoron glass"
|
||||
stack_type = /obj/item/stack/sheet/glass/phoronglass
|
||||
flags = MATERIAL_BRITTLE
|
||||
ignition_point = 300
|
||||
integrity = 200 // idk why but phoron windows are strong, so.
|
||||
icon_colour = "#FC2BC5"
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
stack_type = /obj/item/stack/sheet/mineral/plastic
|
||||
flags = MATERIAL_BRITTLE
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#CCCCCC"
|
||||
@@ -152,12 +195,29 @@ var/list/name_to_material
|
||||
stack_type = /obj/item/stack/sheet/mineral/iron
|
||||
icon_colour = "#5C5454"
|
||||
|
||||
/material/wood
|
||||
name = "wood"
|
||||
stack_type = /obj/item/stack/sheet/wood
|
||||
icon_colour = "#824B28"
|
||||
integrity = 25
|
||||
icon_base = "solid"
|
||||
explosion_resistance = 2
|
||||
shard_type = SHARD_SPLINTER
|
||||
shard_can_repair = 0 // you can't weld splinters back into planks
|
||||
|
||||
/material/wood/holographic
|
||||
name = "holographic wood"
|
||||
display_name = "wood"
|
||||
stack_type = null
|
||||
shard_type = SHARD_NONE
|
||||
|
||||
/material/cult
|
||||
name = "cult"
|
||||
display_name = "disturbing stone"
|
||||
icon_base = "cult"
|
||||
icon_colour = "#402821"
|
||||
icon_reinf = "reinf_cult"
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
|
||||
/material/cult/place_dismantled_girder(var/turf/target)
|
||||
new /obj/structure/girder/cult(target)
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(istype(M))
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
if(istype(M) && M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona" && do_merge(M))
|
||||
return
|
||||
|
||||
get_scooped(M)
|
||||
return
|
||||
..()
|
||||
@@ -24,18 +24,21 @@
|
||||
|
||||
var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
|
||||
|
||||
if(!M || !src || !(src.Adjacent(M))) return
|
||||
if(!M)
|
||||
src << "There is nothing nearby to merge with."
|
||||
else if(!do_merge(M))
|
||||
src << "You fail to merge with \the [M]..."
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
M.status_flags |= PASSEMOTES
|
||||
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.loc = M
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
else
|
||||
return
|
||||
/mob/living/carbon/alien/diona/proc/do_merge(var/mob/living/carbon/human/H)
|
||||
if(!istype(H) || !src || !(src.Adjacent(H)))
|
||||
return 0
|
||||
H << "You feel your being twine with that of \the [src] as it merges with your biomass."
|
||||
H.status_flags |= PASSEMOTES
|
||||
src << "You feel your being twine with that of \the [H] as you merge with its biomass."
|
||||
loc = H
|
||||
verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/diona/proc/split()
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
var/locked = 0
|
||||
var/mob/living/carbon/brain/brainmob = null//The current occupant.
|
||||
var/obj/item/organ/brain/brainobj = null //The current brain organ.
|
||||
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
@@ -60,7 +61,8 @@
|
||||
living_mob_list += brainmob
|
||||
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
brainobj = O
|
||||
brainobj.loc = src
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
@@ -91,7 +93,13 @@
|
||||
user << "\red You upend the MMI, but the brain is clamped into place."
|
||||
else
|
||||
user << "\blue You upend the MMI, spilling the brain onto the floor."
|
||||
var/obj/item/organ/brain/brain = new(user.loc)
|
||||
var/obj/item/organ/brain/brain
|
||||
if (brainobj) //Pull brain organ out of MMI.
|
||||
brainobj.loc = user.loc
|
||||
brain = brainobj
|
||||
brainobj = null
|
||||
else //Or make a new one if empty.
|
||||
brain = new(user.loc)
|
||||
brainmob.container = null//Reset brainmob mmi var.
|
||||
brainmob.loc = brain//Throw mob into brain.
|
||||
living_mob_list -= brainmob//Get outta here
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
handle_hud_list()
|
||||
|
||||
//Handle species-specific deaths.
|
||||
if(species) species.handle_death(src)
|
||||
species.handle_death(src)
|
||||
animate_tail_stop()
|
||||
|
||||
//Handle brain slugs.
|
||||
var/obj/item/organ/external/head = get_organ("head")
|
||||
|
||||
@@ -541,8 +541,24 @@
|
||||
message = "makes a very loud noise."
|
||||
m_type = 2
|
||||
|
||||
if("swish")
|
||||
src.animate_tail_once()
|
||||
|
||||
if("wag", "sway")
|
||||
src.animate_tail_start()
|
||||
|
||||
if("qwag", "fastsway")
|
||||
src.animate_tail_fast()
|
||||
|
||||
if("swag", "stopsway")
|
||||
src.animate_tail_stop()
|
||||
|
||||
if ("help")
|
||||
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
|
||||
src << {"blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,
|
||||
cry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,
|
||||
grin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,
|
||||
sigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,
|
||||
wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag"}
|
||||
|
||||
else
|
||||
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
||||
|
||||
@@ -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)
|
||||
@@ -992,6 +992,7 @@
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
animate_tail_reset()
|
||||
if(halloss > 0)
|
||||
adjustHalLoss(-3)
|
||||
else if(sleeping)
|
||||
@@ -1006,6 +1007,7 @@
|
||||
sleeping = max(sleeping-1, 0)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
animate_tail_reset()
|
||||
if( prob(2) && health && !hal_crit )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
var/blood_color = "#A10808" // Red.
|
||||
var/flesh_color = "#FFC896" // Pink.
|
||||
var/base_color // Used by changelings. Should also be used for icon previes..
|
||||
var/tail // Name of tail image in species effects icon file.
|
||||
var/tail // Name of tail state in species effects icon file.
|
||||
var/tail_animation // If set, the icon to obtain tail animation states from.
|
||||
var/race_key = 0 // Used for mob icon cache string.
|
||||
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
|
||||
var/is_small
|
||||
@@ -265,10 +266,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)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_lizard.dmi'
|
||||
language = "Sinta'unathi"
|
||||
tail = "sogtail"
|
||||
tail_animation = 'icons/mob/species/unathi/tail.dmi'
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
|
||||
primitive_form = "Stok"
|
||||
darksight = 3
|
||||
@@ -70,6 +71,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
|
||||
language = "Siik'tajr"
|
||||
tail = "tajtail"
|
||||
tail_animation = 'icons/mob/species/tajaran/tail.dmi'
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
|
||||
darksight = 8
|
||||
slowdown = -1
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
else
|
||||
if(istype(O, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = O
|
||||
if(W.material.unmeltable)
|
||||
if(W.material.flags & MATERIAL_UNMELTABLE)
|
||||
cannot_melt = 1
|
||||
else if(istype(O, /turf/simulated/floor/engine))
|
||||
cannot_melt = 1
|
||||
|
||||
@@ -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>")
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_key is [species.race_key][g][husk][fat][hulk][skeleton][s_tone]
|
||||
*/
|
||||
var/global/list/human_icon_cache = list()
|
||||
var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_skin][b_skin]
|
||||
var/global/list/light_overlay_cache = list()
|
||||
|
||||
///////////////////////
|
||||
@@ -330,7 +331,7 @@ var/global/list/damage_icon_parts = list()
|
||||
overlays_standing[HAIR_LAYER] = null
|
||||
|
||||
var/obj/item/organ/external/head/head_organ = get_organ("head")
|
||||
if( !head_organ || (head_organ.status & ORGAN_DESTROYED) )
|
||||
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
@@ -491,8 +492,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/obj/item/clothing/under/under = w_uniform
|
||||
if(under.accessories.len)
|
||||
for(var/obj/item/clothing/accessory/A in under.accessories)
|
||||
var/accessory_state = A.overlay_state? A.overlay_state : A.icon_state
|
||||
standing.overlays += image(icon = INV_ACCESSORIES_DEF_ICON, icon_state = accessory_state)
|
||||
standing.overlays |= A.get_inv_mob_overlay()
|
||||
|
||||
overlays_standing[UNIFORM_LAYER] = standing
|
||||
else
|
||||
@@ -884,13 +884,81 @@ var/global/list/damage_icon_parts = list()
|
||||
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
if(species.tail)
|
||||
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(species.tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL))
|
||||
var/icon/tail_s = get_tail_icon()
|
||||
overlays_standing[TAIL_LAYER] = image(tail_s, icon_state = "[species.tail]_s")
|
||||
animate_tail_reset(0)
|
||||
|
||||
overlays_standing[TAIL_LAYER] = image(tail_s)
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/get_tail_icon()
|
||||
var/icon_key = "[species.race_key][r_skin][g_skin][b_skin]"
|
||||
|
||||
var/icon/tail_icon = tail_icon_cache[icon_key]
|
||||
if(!tail_icon)
|
||||
|
||||
//generate a new one
|
||||
tail_icon = new/icon(icon = (species.tail_animation? species.tail_animation : 'icons/effects/species.dmi'))
|
||||
tail_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
|
||||
tail_icon_cache[icon_key] = tail_icon
|
||||
|
||||
return tail_icon
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/set_tail_state(var/t_state)
|
||||
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
|
||||
|
||||
if(tail_overlay && species.tail_animation)
|
||||
tail_overlay.icon_state = t_state
|
||||
return tail_overlay
|
||||
return null
|
||||
|
||||
//Not really once, since BYOND can't do that.
|
||||
//Update this if the ability to flick() images or make looping animation start at the first frame is ever added.
|
||||
/mob/living/carbon/human/proc/animate_tail_once(var/update_icons=1)
|
||||
var/t_state = "[species.tail]_once"
|
||||
|
||||
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
|
||||
if(tail_overlay && tail_overlay.icon_state == t_state)
|
||||
return //let the existing animation finish
|
||||
|
||||
tail_overlay = set_tail_state(t_state)
|
||||
if(tail_overlay)
|
||||
spawn(15)
|
||||
//check that the animation hasn't changed in the meantime
|
||||
if(overlays_standing[TAIL_LAYER] == tail_overlay && tail_overlay.icon_state == t_state)
|
||||
animate_tail_stop()
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_start(var/update_icons=1)
|
||||
set_tail_state("[species.tail]_slow[rand(0,9)]")
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_fast(var/update_icons=1)
|
||||
set_tail_state("[species.tail]_loop[rand(0,9)]")
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_reset(var/update_icons=1)
|
||||
if(stat != DEAD)
|
||||
set_tail_state("[species.tail]_idle[rand(0,9)]")
|
||||
else
|
||||
set_tail_state("[species.tail]_static")
|
||||
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/animate_tail_stop(var/update_icons=1)
|
||||
set_tail_state("[species.tail]_static")
|
||||
|
||||
if(update_icons)
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
/obj/item/weapon/module/power_control,
|
||||
/obj/item/weapon/stock_parts,
|
||||
/obj/item/frame,
|
||||
/obj/item/weapon/table_parts,
|
||||
/obj/item/weapon/table_parts/rack,
|
||||
/obj/item/weapon/camera_assembly,
|
||||
/obj/item/weapon/tank,
|
||||
/obj/item/weapon/circuitboard,
|
||||
|
||||
@@ -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*/
|
||||
@@ -91,3 +91,82 @@
|
||||
..()
|
||||
visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...")
|
||||
playsound(src, 'sound/voice/hiss6.ogg', 100, 1)
|
||||
|
||||
// Xenoarch aliens.
|
||||
/mob/living/simple_animal/hostile/samak
|
||||
name = "samak"
|
||||
desc = "A fast, armoured predator accustomed to hiding and ambushing in cold terrain."
|
||||
faction = "samak"
|
||||
icon_state = "samak"
|
||||
icon_living = "samak"
|
||||
icon_dead = "samak_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 2
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
speed = 2
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "mauled"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Hruuugh!","Hrunnph")
|
||||
emote_see = list("paws the ground","shakes its mane","stomps")
|
||||
emote_hear = list("snuffles")
|
||||
|
||||
/mob/living/simple_animal/hostile/diyaab
|
||||
name = "diyaab"
|
||||
desc = "A small pack animal. Although omnivorous, it will hunt meat on occasion."
|
||||
faction = "diyaab"
|
||||
icon_state = "diyaab"
|
||||
icon_living = "diyaab"
|
||||
icon_dead = "diyaab_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 1
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
speed = 1
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 8
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Awrr?","Aowrl!","Worrl")
|
||||
emote_see = list("sniffs the air cautiously","looks around")
|
||||
emote_hear = list("snuffles")
|
||||
|
||||
/mob/living/simple_animal/hostile/shantak
|
||||
name = "shantak"
|
||||
desc = "A piglike creature with a bright iridiscent mane that sparkles as though lit by an inner light. Don't be fooled by its beauty though."
|
||||
faction = "shantak"
|
||||
icon_state = "shantak"
|
||||
icon_living = "shantak"
|
||||
icon_dead = "shantak_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 1
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speed = 1
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 12
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Shuhn","Shrunnph?","Shunpf")
|
||||
emote_see = list("scratches the ground","shakes out it's mane","tinkles gently")
|
||||
|
||||
/mob/living/simple_animal/yithian
|
||||
name = "yithian"
|
||||
desc = "A friendly creature vaguely resembling an oversized snail without a shell."
|
||||
icon_state = "yithian"
|
||||
icon_living = "yithian"
|
||||
icon_dead = "yithian_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
|
||||
/mob/living/simple_animal/tindalos
|
||||
name = "tindalos"
|
||||
desc = "It looks like a large, flightless grasshopper."
|
||||
icon_state = "tindalos"
|
||||
icon_living = "tindalos"
|
||||
icon_dead = "tindalos_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
D.Open()
|
||||
else if(istype(A,/obj/structure/cult/pylon))
|
||||
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
|
||||
else if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/table/rack))
|
||||
else if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille))
|
||||
A.attack_generic(src, rand(melee_damage_lower, melee_damage_upper))
|
||||
Move(T)
|
||||
FindTarget()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
if(health < 1)
|
||||
if(health <= 0)
|
||||
death()
|
||||
return
|
||||
|
||||
|
||||
@@ -62,11 +62,10 @@
|
||||
O.show_message( message, 1, blind_message, 2)
|
||||
else if(ismob(I))
|
||||
var/mob/M = I
|
||||
if(self_message && M==src)
|
||||
M.show_message( self_message, 1, blind_message, 2)
|
||||
if(M.see_invisible >= invisibility) // Cannot view the invisible
|
||||
var/msg = message
|
||||
if(self_message && M==src)
|
||||
msg = self_message
|
||||
M.show_message( msg, 1, blind_message, 2)
|
||||
M.show_message( messge, 1, blind_message, 2)
|
||||
|
||||
// Returns an amount of power drawn from the object (-1 if it's not viable).
|
||||
// If drain_check is set it will not actually drain power, just return a value.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
var/obj/item/W = used_weapon
|
||||
if(W.w_class >= 3)
|
||||
edge_eligible = 1
|
||||
|
||||
|
||||
if(brute >= threshold || (edge_eligible && brute >= threshold/3))
|
||||
if((sharp || edge))
|
||||
droplimb(0,DROPLIMB_EDGE)
|
||||
@@ -917,14 +917,15 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/disfigure(var/type = "brute")
|
||||
if (disfigured)
|
||||
return
|
||||
if(type == "brute")
|
||||
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s [name].", \
|
||||
"\red <b>Your [name] becomes a mangled mess!</b>", \
|
||||
"\red You hear a sickening crack.")
|
||||
else
|
||||
owner.visible_message("\red \The [owner]'s [name] melts away, turning into mangled mess!", \
|
||||
"\red <b>Your [name] melts away!</b>", \
|
||||
"\red You hear a sickening sizzle.")
|
||||
if(owner)
|
||||
if(type == "brute")
|
||||
owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s [name].", \
|
||||
"\red <b>Your [name] becomes a mangled mess!</b>", \
|
||||
"\red You hear a sickening crack.")
|
||||
else
|
||||
owner.visible_message("\red \The [owner]'s [name] melts away, turning into mangled mess!", \
|
||||
"\red <b>Your [name] melts away!</b>", \
|
||||
"\red You hear a sickening sizzle.")
|
||||
disfigured = 1
|
||||
|
||||
/****************************************************
|
||||
@@ -1077,6 +1078,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
owner.u_equip(owner.l_ear)
|
||||
owner.u_equip(owner.r_ear)
|
||||
owner.u_equip(owner.wear_mask)
|
||||
spawn(1)
|
||||
owner.update_hair()
|
||||
..()
|
||||
|
||||
/obj/item/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
|
||||
|
||||
@@ -34,6 +34,7 @@ var/global/list/limb_icon_cache = list()
|
||||
/obj/item/organ/external/head/get_icon()
|
||||
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(owner.species.has_organ["eyes"])
|
||||
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
||||
if(owner.species.eyes)
|
||||
@@ -43,9 +44,12 @@ var/global/list/limb_icon_cache = list()
|
||||
else
|
||||
eyes_icon.Blend(rgb(128,0,0), ICON_ADD)
|
||||
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
|
||||
overlays |= eyes_icon
|
||||
|
||||
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
|
||||
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
|
||||
var/icon/lip_icon = new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s")
|
||||
overlays |= lip_icon
|
||||
mob_icon.Blend(lip_icon, ICON_OVERLAY)
|
||||
|
||||
if(owner.f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
/obj/item/ammo_magazine/examine(mob/user)
|
||||
..()
|
||||
user << "There [(stored_ammo.len > 1)? "are" : "is"] [stored_ammo.len] round\s left!"
|
||||
user << "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!"
|
||||
|
||||
//magazine icon state caching
|
||||
/var/global/list/magazine_icondata_keys = list()
|
||||
|
||||
@@ -68,14 +68,14 @@
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/consume_next_projectile(mob/user=null)
|
||||
if(tension <= 0)
|
||||
user << "\red \The [src] is not drawn back!"
|
||||
user << "<span class='warning'>\The [src] is not drawn back!</span>"
|
||||
return null
|
||||
return bolt
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/handle_post_fire(mob/user, atom/target)
|
||||
bolt = null
|
||||
icon_state = "crossbow"
|
||||
tension = 0
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/attack_self(mob/living/user as mob)
|
||||
@@ -89,7 +89,7 @@
|
||||
else
|
||||
user.visible_message("[user] relaxes the tension on [src]'s string.","You relax the tension on [src]'s string.")
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
update_icon()
|
||||
else
|
||||
draw(user)
|
||||
|
||||
@@ -106,15 +106,19 @@
|
||||
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
|
||||
tension = 1
|
||||
|
||||
while(bolt && tension && current_user == user)
|
||||
while(bolt && tension && loc == current_user)
|
||||
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
|
||||
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//double check that the user hasn't removed the bolt in the meantime
|
||||
if(!(bolt && tension && loc == current_user))
|
||||
return
|
||||
|
||||
tension++
|
||||
icon_state = "crossbow-drawn"
|
||||
update_icon()
|
||||
|
||||
if(tension >= max_tension)
|
||||
tension = max_tension
|
||||
@@ -132,11 +136,10 @@
|
||||
/obj/item/weapon/gun/launcher/crossbow/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!bolt)
|
||||
if (istype(W,/obj/item/weapon/arrow))
|
||||
user.drop_item()
|
||||
user.drop_from_inventory(W, src)
|
||||
bolt = W
|
||||
bolt.loc = src
|
||||
user.visible_message("[user] slides [bolt] into [src].","You slide [bolt] into [src].")
|
||||
icon_state = "crossbow-nocked"
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = W
|
||||
@@ -144,7 +147,7 @@
|
||||
bolt = new /obj/item/weapon/arrow/rod(src)
|
||||
bolt.fingerprintslast = src.fingerprintslast
|
||||
bolt.loc = src
|
||||
icon_state = "crossbow-nocked"
|
||||
update_icon()
|
||||
user.visible_message("[user] jams [bolt] into [src].","You jam [bolt] into [src].")
|
||||
superheat_rod(user)
|
||||
return
|
||||
@@ -182,6 +185,14 @@
|
||||
bolt.icon_state = "metal-rod-superheated"
|
||||
cell.use(500)
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/update_icon()
|
||||
if(tension > 1)
|
||||
icon_state = "crossbow-drawn"
|
||||
else if(bolt)
|
||||
icon_state = "crossbow-nocked"
|
||||
else
|
||||
icon_state = "crossbow"
|
||||
|
||||
|
||||
// Crossbow construction.
|
||||
/obj/item/weapon/crossbowframe
|
||||
@@ -209,11 +220,11 @@
|
||||
if(buildstate == 0)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(R.use(3))
|
||||
user << "\blue You assemble a backbone of rods around the wooden stock."
|
||||
user << "<span class='notice'>You assemble a backbone of rods around the wooden stock.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
else
|
||||
user << "\blue You need at least three rods to complete this task."
|
||||
user << "<span class='notice'>You need at least three rods to complete this task.</span>"
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/weldingtool))
|
||||
if(buildstate == 1)
|
||||
@@ -221,7 +232,7 @@
|
||||
if(T.remove_fuel(0,user))
|
||||
if(!src || !T.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "\blue You weld the rods into place."
|
||||
user << "<span class='notice'>You weld the rods into place.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
return
|
||||
@@ -229,33 +240,33 @@
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(buildstate == 2)
|
||||
if(C.use(5))
|
||||
user << "\blue You wire a crude cell mount into the top of the crossbow."
|
||||
user << "<span class='notice'>You wire a crude cell mount into the top of the crossbow.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
else
|
||||
user << "\blue You need at least five segments of cable coil to complete this task."
|
||||
user << "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>"
|
||||
return
|
||||
else if(buildstate == 4)
|
||||
if(C.use(5))
|
||||
user << "\blue You string a steel cable across the crossbow's lath."
|
||||
user << "<span class='notice'>You string a steel cable across the crossbow's lath.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
else
|
||||
user << "\blue You need at least five segments of cable coil to complete this task."
|
||||
user << "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>"
|
||||
return
|
||||
else if(istype(W,/obj/item/stack/sheet/mineral/plastic))
|
||||
if(buildstate == 3)
|
||||
var/obj/item/stack/sheet/mineral/plastic/P = W
|
||||
if(P.use(3))
|
||||
user << "\blue You assemble and install a heavy plastic lath onto the crossbow."
|
||||
user << "<span class='notice'>You assemble and install a heavy plastic lath onto the crossbow.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
else
|
||||
user << "\blue You need at least three plastic sheets to complete this task."
|
||||
user << "<span class='notice'>You need at least three plastic sheets to complete this task.</span>"
|
||||
return
|
||||
else if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(buildstate == 5)
|
||||
user << "\blue You secure the crossbow's various parts."
|
||||
user << "<span class='notice'>You secure the crossbow's various parts.</span>"
|
||||
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -14,17 +14,20 @@
|
||||
var/max_w_class = 3 // Hopper intake size.
|
||||
var/max_storage_space = 20 // Total internal storage size.
|
||||
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
|
||||
var/obj/item/weapon/storage/tank_container // Something to hold the tank item so we don't accidentally fire it.
|
||||
|
||||
var/obj/item/weapon/storage/item_storage
|
||||
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
|
||||
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
|
||||
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
|
||||
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
|
||||
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
|
||||
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
|
||||
/obj/item/weapon/gun/launcher/pneumatic/New()
|
||||
..()
|
||||
tank_container = new(src)
|
||||
tank_container.tag = "gas_tank_holder"
|
||||
item_storage = new(src)
|
||||
item_storage.name = "hopper"
|
||||
item_storage.max_w_class = max_w_class
|
||||
item_storage.max_storage_space = max_storage_space
|
||||
item_storage.use_sound = null
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
|
||||
set name = "Set Valve Pressure"
|
||||
@@ -35,69 +38,65 @@
|
||||
pressure_setting = N
|
||||
usr << "You dial the pressure valve to [pressure_setting]%."
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/verb/eject_tank() //Remove the tank.
|
||||
set name = "Eject Tank"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
|
||||
if(tank)
|
||||
usr << "You twist the valve and pop the tank out of [src]."
|
||||
tank.loc = usr.loc
|
||||
tank = null
|
||||
icon_state = "pneumatic"
|
||||
item_state = "pneumatic"
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_icons()
|
||||
else
|
||||
usr << "There's no tank in [src]."
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!tank && istype(W,/obj/item/weapon/tank))
|
||||
user.drop_item()
|
||||
tank = W
|
||||
tank.loc = src.tank_container
|
||||
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
|
||||
icon_state = "pneumatic-tank"
|
||||
item_state = "pneumatic-tank"
|
||||
user.update_icons()
|
||||
else if(istype(W) && W.w_class <= max_w_class)
|
||||
var/total_stored = 0
|
||||
for(var/obj/item/O in src.contents)
|
||||
total_stored += O.get_storage_cost()
|
||||
if(total_stored + W.get_storage_cost() <= max_storage_space)
|
||||
user.remove_from_mob(W)
|
||||
W.loc = src
|
||||
user << "You shove [W] into the hopper."
|
||||
else
|
||||
user << "That won't fit into the hopper - it's too full."
|
||||
/obj/item/weapon/gun/launcher/pneumatic/proc/eject_tank(mob/user) //Remove the tank.
|
||||
if(!tank)
|
||||
user << "There's no tank in [src]."
|
||||
return
|
||||
else
|
||||
user << "That won't fit into the hopper."
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
|
||||
if(contents.len > 0)
|
||||
var/obj/item/removing = contents[contents.len]
|
||||
removing.loc = get_turf(src)
|
||||
user << "You twist the valve and pop the tank out of [src]."
|
||||
user.put_in_hands(tank)
|
||||
tank = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/proc/unload_hopper(mob/user)
|
||||
if(item_storage.contents.len > 0)
|
||||
var/obj/item/removing = item_storage.contents[item_storage.contents.len]
|
||||
item_storage.remove_from_storage(removing, src.loc)
|
||||
user.put_in_hands(removing)
|
||||
user << "You remove [removing] from the hopper."
|
||||
else
|
||||
user << "There is nothing to remove in \the [src]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attack_hand(mob/user as mob)
|
||||
if(user.get_inactive_hand() == src)
|
||||
unload_hopper(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!tank && istype(W,/obj/item/weapon/tank))
|
||||
user.drop_from_inventory(W, src)
|
||||
tank = W
|
||||
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
|
||||
update_icon()
|
||||
else if(istype(W) && item_storage.can_be_inserted(W))
|
||||
item_storage.handle_item_insertion(W)
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
|
||||
eject_tank(user)
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/consume_next_projectile(mob/user=null)
|
||||
if(!contents.len)
|
||||
if(!item_storage.contents.len)
|
||||
return null
|
||||
if (!tank)
|
||||
user << "There is no gas tank in [src]!"
|
||||
return null
|
||||
|
||||
var/fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
|
||||
if(fire_pressure < minimum_tank_pressure)
|
||||
var/environment_pressure = 10
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment)
|
||||
environment_pressure = environment.return_pressure()
|
||||
|
||||
fire_pressure = (tank.air_contents.return_pressure() - environment_pressure)*pressure_setting/100
|
||||
if(fire_pressure < 10)
|
||||
user << "There isn't enough gas in the tank to fire [src]."
|
||||
return null
|
||||
|
||||
return contents[1]
|
||||
var/obj/item/launched = item_storage.contents[1]
|
||||
item_storage.remove_from_storage(launched, src)
|
||||
return launched
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
@@ -119,11 +118,24 @@
|
||||
if(tank)
|
||||
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
|
||||
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
|
||||
|
||||
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T) T.assume_air(removed)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/launcher/pneumatic/update_icon()
|
||||
if(tank)
|
||||
icon_state = "pneumatic-tank"
|
||||
item_state = "pneumatic-tank"
|
||||
else
|
||||
icon_state = "pneumatic"
|
||||
item_state = "pneumatic"
|
||||
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.update_inv_r_hand()
|
||||
M.update_inv_l_hand()
|
||||
|
||||
//Constructable pneumatic cannon.
|
||||
|
||||
/obj/item/weapon/cannonframe
|
||||
@@ -149,9 +161,9 @@
|
||||
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/pipe))
|
||||
if(buildstate == 0)
|
||||
user.drop_item()
|
||||
user.drop_from_inventory(W)
|
||||
qdel(W)
|
||||
user << "\blue You secure the piping inside the frame."
|
||||
user << "<span class='notice'>You secure the piping inside the frame.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
return
|
||||
@@ -159,17 +171,17 @@
|
||||
if(buildstate == 2)
|
||||
var/obj/item/stack/sheet/metal/M = W
|
||||
if(M.use(5))
|
||||
user << "\blue You assemble a chassis around the cannon frame."
|
||||
user << "<span class='notice'>You assemble a chassis around the cannon frame.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
else
|
||||
user << "\blue You need at least five metal sheets to complete this task."
|
||||
user << "<span class='notice'>You need at least five metal sheets to complete this task.</span>"
|
||||
return
|
||||
else if(istype(W,/obj/item/device/transfer_valve))
|
||||
if(buildstate == 4)
|
||||
user.drop_item()
|
||||
user.drop_from_inventory(W)
|
||||
qdel(W)
|
||||
user << "\blue You install the transfer valve and connect it to the piping."
|
||||
user << "<span class='notice'>You install the transfer valve and connect it to the piping.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
return
|
||||
@@ -179,7 +191,7 @@
|
||||
if(T.remove_fuel(0,user))
|
||||
if(!src || !T.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "\blue You weld the pipe into place."
|
||||
user << "<span class='notice'>You weld the pipe into place.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
if(buildstate == 3)
|
||||
@@ -187,7 +199,7 @@
|
||||
if(T.remove_fuel(0,user))
|
||||
if(!src || !T.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "\blue You weld the metal chassis together."
|
||||
user << "<span class='notice'>You weld the metal chassis together.</span>"
|
||||
buildstate++
|
||||
update_icon()
|
||||
if(buildstate == 5)
|
||||
@@ -195,7 +207,7 @@
|
||||
if(T.remove_fuel(0,user))
|
||||
if(!src || !T.isOn()) return
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "\blue You weld the valve into place."
|
||||
user << "<span class='notice'>You weld the valve into place.</span>"
|
||||
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -182,15 +182,15 @@
|
||||
//admin logs
|
||||
if(!no_attack_log)
|
||||
if(istype(firer, /mob))
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src.type]</b>"
|
||||
msg_admin_attack("[firer] ([firer.ckey]) shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
else if(firer)
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
|
||||
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
|
||||
var/attacker_message = "shot with \a [src.type]"
|
||||
var/victim_message = "shot with \a [src.type]"
|
||||
var/admin_message = "shot (\a [src.type])"
|
||||
|
||||
admin_attack_log(firer, target_mob, attacker_message, victim_message, admin_message)
|
||||
else
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with a <b>[src]</b>"
|
||||
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
target_mob.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[target_mob]/[target_mob.ckey]</b> with <b>\a [src]</b>"
|
||||
msg_admin_attack("UNKNOWN shot [target_mob] ([target_mob.ckey]) with \a [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target_mob.x];Y=[target_mob.y];Z=[target_mob.z]'>JMP</a>)")
|
||||
|
||||
//sometimes bullet_act() will want the projectile to continue flying
|
||||
if (target_mob.bullet_act(src, def_zone) == -1)
|
||||
|
||||
@@ -157,17 +157,18 @@
|
||||
/* Holder-to-chemical */
|
||||
|
||||
/datum/reagents/proc/add_reagent(var/id, var/amount, var/data = null, var/safety = 0)
|
||||
if(!isnum(amount))
|
||||
if(!isnum(amount) || amount <= 0)
|
||||
return 0
|
||||
|
||||
update_total()
|
||||
amount = min(amount, get_free_space())
|
||||
|
||||
for(var/datum/reagent/current in reagent_list)
|
||||
if(current.id == id)
|
||||
current.volume += amount
|
||||
update_total()
|
||||
if(!isnull(data)) // For all we know, it could be zero or empty string and meaningful
|
||||
current.mix_data(data, amount)
|
||||
update_total()
|
||||
if(!safety)
|
||||
handle_reactions()
|
||||
if(my_atom)
|
||||
@@ -179,8 +180,8 @@
|
||||
reagent_list += R
|
||||
R.holder = src
|
||||
R.volume = amount
|
||||
update_total()
|
||||
R.initialize_data(data)
|
||||
update_total()
|
||||
if(!safety)
|
||||
handle_reactions()
|
||||
if(my_atom)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 1850)
|
||||
level = 2
|
||||
var/sortType = ""
|
||||
var/ptype = 0
|
||||
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet
|
||||
|
||||
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet 9=pipe-j1s 10=pipe-j2s
|
||||
var/subtype = 0
|
||||
var/dpdir = 0 // directions as disposalpipe
|
||||
var/base_state = "pipe-s"
|
||||
|
||||
@@ -154,9 +155,21 @@
|
||||
if(8)
|
||||
return /obj/machinery/disposal/deliveryChute
|
||||
if(9)
|
||||
return /obj/structure/disposalpipe/sortjunction
|
||||
switch(subtype)
|
||||
if(0)
|
||||
return /obj/structure/disposalpipe/sortjunction
|
||||
if(1)
|
||||
return /obj/structure/disposalpipe/sortjunction/wildcard
|
||||
if(2)
|
||||
return /obj/structure/disposalpipe/sortjunction/untagged
|
||||
if(10)
|
||||
return /obj/structure/disposalpipe/sortjunction/flipped
|
||||
switch(subtype)
|
||||
if(0)
|
||||
return /obj/structure/disposalpipe/sortjunction/flipped
|
||||
if(1)
|
||||
return /obj/structure/disposalpipe/sortjunction/wildcard/flipped
|
||||
if(2)
|
||||
return /obj/structure/disposalpipe/sortjunction/untagged/flipped
|
||||
///// Z-Level stuff
|
||||
if(11)
|
||||
return /obj/structure/disposalpipe/up
|
||||
@@ -187,7 +200,13 @@
|
||||
if(8)
|
||||
nicetype = "delivery chute"
|
||||
if(9, 10)
|
||||
nicetype = "sorting pipe"
|
||||
switch(subtype)
|
||||
if(0)
|
||||
nicetype = "sorting pipe"
|
||||
if(1)
|
||||
nicetype = "wildcard sorting pipe"
|
||||
if(2)
|
||||
nicetype = "untagged sorting pipe"
|
||||
ispipe = 1
|
||||
if(13)
|
||||
nicetype = "tagging pipe"
|
||||
@@ -267,7 +286,9 @@
|
||||
//Needs some special treatment ;)
|
||||
if(ptype==9 || ptype==10)
|
||||
var/obj/structure/disposalpipe/sortjunction/SortP = P
|
||||
SortP.sortType = sortType
|
||||
SortP.updatedir()
|
||||
SortP.updatedesc()
|
||||
|
||||
else if(ptype==6) // Disposal bin
|
||||
var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc)
|
||||
|
||||
@@ -663,7 +663,8 @@
|
||||
var/health = 10 // health points 0-10
|
||||
layer = 2.3 // slightly lower than wires and other pipes
|
||||
var/base_icon_state // initial icon state on map
|
||||
|
||||
var/sortType = ""
|
||||
var/subtype = 0
|
||||
// new pipe, set the icon_state as on map
|
||||
New()
|
||||
..()
|
||||
@@ -910,8 +911,10 @@
|
||||
C.ptype = 5
|
||||
if("pipe-j1s")
|
||||
C.ptype = 9
|
||||
C.sortType = sortType
|
||||
if("pipe-j2s")
|
||||
C.ptype = 10
|
||||
C.sortType = sortType
|
||||
///// Z-Level stuff
|
||||
if("pipe-u")
|
||||
C.ptype = 11
|
||||
@@ -922,6 +925,7 @@
|
||||
C.ptype = 13
|
||||
if("pipe-tagger-partial")
|
||||
C.ptype = 14
|
||||
C.subtype = src.subtype
|
||||
src.transfer_fingerprints_to(C)
|
||||
C.set_dir(dir)
|
||||
C.density = 0
|
||||
@@ -1187,7 +1191,6 @@
|
||||
icon_state = "pipe-j1s"
|
||||
desc = "An underfloor disposal pipe with a package sorting mechanism."
|
||||
|
||||
var/sortType = ""
|
||||
var/posdir = 0
|
||||
var/negdir = 0
|
||||
var/sortdir = 0
|
||||
@@ -1278,7 +1281,7 @@
|
||||
/obj/structure/disposalpipe/sortjunction/wildcard
|
||||
name = "wildcard sorting junction"
|
||||
desc = "An underfloor disposal pipe which filters all wrapped and tagged items."
|
||||
|
||||
subtype = 1
|
||||
divert_check(var/checkTag)
|
||||
return checkTag != ""
|
||||
|
||||
@@ -1286,7 +1289,7 @@
|
||||
/obj/structure/disposalpipe/sortjunction/untagged
|
||||
name = "untagged sorting junction"
|
||||
desc = "An underfloor disposal pipe which filters all untagged items."
|
||||
|
||||
subtype = 2
|
||||
divert_check(var/checkTag)
|
||||
return checkTag == ""
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
/obj/item/weapon/light/tube,\
|
||||
/obj/item/weapon/pickaxe,\
|
||||
/obj/item/weapon/shovel,\
|
||||
/obj/item/weapon/table_parts,\
|
||||
/obj/item/weapon/weldingtool,\
|
||||
/obj/item/weapon/wirecutters,\
|
||||
/obj/item/weapon/wrench,\
|
||||
|
||||
@@ -1,46 +1,5 @@
|
||||
|
||||
/obj/item/weapon/shard/phoron
|
||||
name = "phoron shard"
|
||||
desc = "A shard of phoron glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
|
||||
force = 8.0
|
||||
throwforce = 15.0
|
||||
icon_state = "phoronlarge"
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
/obj/item/weapon/shard/phoron/New()
|
||||
|
||||
src.icon_state = pick("phoronlarge", "phoronmedium", "phoronsmall")
|
||||
switch(src.icon_state)
|
||||
if("phoronsmall")
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
if("phoronmedium")
|
||||
src.pixel_x = rand(-8, 8)
|
||||
src.pixel_y = rand(-8, 8)
|
||||
if("phoronlarge")
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/shard/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/phoronglass/NG = new (user.loc)
|
||||
for (var/obj/item/stack/sheet/glass/phoronglass/G in user.loc)
|
||||
if(G==NG)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
usr << "You add the newly-formed phoron glass to the stack. It now contains [NG.amount] sheets."
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
// Phoron shards have been moved to code/game/objects/items/weapons/shards.dm
|
||||
|
||||
//legacy crystal
|
||||
/obj/machinery/crystal
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/mob/living/simple_animal/hostile/samak
|
||||
name = "samak"
|
||||
desc = "A fast, armoured predator accustomed to hiding and ambushing in cold terrain."
|
||||
faction = "samak"
|
||||
icon_state = "samak"
|
||||
icon_living = "samak"
|
||||
icon_dead = "samak_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 2
|
||||
maxHealth = 125
|
||||
health = 125
|
||||
speed = 2
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
attacktext = "mauled"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Hruuugh!","Hrunnph")
|
||||
emote_see = list("paws the ground","shakes its mane","stomps")
|
||||
emote_hear = list("snuffles")
|
||||
|
||||
/mob/living/simple_animal/hostile/diyaab
|
||||
name = "diyaab"
|
||||
desc = "A small pack animal. Although omnivorous, it will hunt meat on occasion."
|
||||
faction = "diyaab"
|
||||
icon_state = "diyaab"
|
||||
icon_living = "diyaab"
|
||||
icon_dead = "diyaab_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 1
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
speed = 1
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 8
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Awrr?","Aowrl!","Worrl")
|
||||
emote_see = list("sniffs the air cautiously","looks around")
|
||||
emote_hear = list("snuffles")
|
||||
|
||||
/mob/living/simple_animal/hostile/shantak
|
||||
name = "shantak"
|
||||
desc = "A piglike creature with a bright iridiscent mane that sparkles as though lit by an inner light. Don't be fooled by its beauty though."
|
||||
faction = "shantak"
|
||||
icon_state = "shantak"
|
||||
icon_living = "shantak"
|
||||
icon_dead = "shantak_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
move_to_delay = 1
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speed = 1
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 12
|
||||
attacktext = "gouged"
|
||||
cold_damage_per_tick = 0
|
||||
speak_chance = 5
|
||||
speak = list("Shuhn","Shrunnph?","Shunpf")
|
||||
emote_see = list("scratches the ground","shakes out it's mane","tinkles gently")
|
||||
|
||||
/mob/living/simple_animal/yithian
|
||||
name = "yithian"
|
||||
desc = "A friendly creature vaguely resembling an oversized snail without a shell."
|
||||
icon_state = "yithian"
|
||||
icon_living = "yithian"
|
||||
icon_dead = "yithian_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
|
||||
/mob/living/simple_animal/tindalos
|
||||
name = "tindalos"
|
||||
desc = "It looks like a large, flightless grasshopper."
|
||||
icon_state = "tindalos"
|
||||
icon_living = "tindalos"
|
||||
icon_dead = "tindalos_dead"
|
||||
icon = 'icons/jungle.dmi'
|
||||
@@ -1,319 +0,0 @@
|
||||
//gene sequence datum
|
||||
datum/genesequence
|
||||
var/spawned_type
|
||||
var/spawned_type_text
|
||||
var/list/full_genome_sequence = list()
|
||||
|
||||
|
||||
|
||||
#define SCANFOSSIL_RETVAL_WRONGTYPE 1
|
||||
#define SCANFOSSIL_RETVAL_NOMOREGENESEQ 2
|
||||
#define SCANFOSSIL_RETVAL_SUCCESS 4
|
||||
|
||||
/obj/machinery/computer/reconstitutor
|
||||
name = "Flora reconstitution console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "dna"
|
||||
circuit = "/obj/item/weapon/circuitboard/reconstitutor"
|
||||
req_access = list(access_heads) //Only used for record deletion right now.
|
||||
var/obj/machinery/clonepod/pod1 = 1 //Linked cloning pod.
|
||||
var/temp = ""
|
||||
var/menu = 1 //Which menu screen to display
|
||||
var/list/records = list()
|
||||
var/datum/dna2/record/active_record = null
|
||||
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
||||
var/loading = 0 // Nice loading text
|
||||
var/list/undiscovered_genesequences = null
|
||||
var/list/discovered_genesequences = list()
|
||||
var/list/completed_genesequences = list()
|
||||
var/list/undiscovered_genomes = list()
|
||||
var/list/manually_placed_genomes = list()
|
||||
var/list/discovered_genomes = list("! Clear !")
|
||||
var/list/accepted_fossil_types = list(/obj/item/weapon/fossil/plant)
|
||||
|
||||
|
||||
/obj/machinery/computer/reconstitutor/initialize()
|
||||
spawn(50)
|
||||
if(!undiscovered_genesequences)
|
||||
undiscovered_genesequences = master_controller.all_plant_genesequences.Copy()
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/reconstitutor/animal
|
||||
name = "Fauna reconstitution console"
|
||||
accepted_fossil_types = list(/obj/item/weapon/fossil/bone,/obj/item/weapon/fossil/shell,/obj/item/weapon/fossil/skull)
|
||||
pod1 = null
|
||||
circuit = "/obj/item/weapon/circuitboard/reconstitutor/animal"
|
||||
|
||||
/obj/machinery/computer/reconstitutor/animal/initialize()
|
||||
spawn(50)
|
||||
undiscovered_genesequences = master_controller.all_animal_genesequences.Copy()
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/reconstitutor/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/weapon/fossil))
|
||||
user.drop_item()
|
||||
W.loc = src.loc
|
||||
switch(scan_fossil(W))
|
||||
if(1)
|
||||
src.visible_message("\red \icon[src] [src] scans the fossil and rejects it.")
|
||||
if(2)
|
||||
visible_message("\red \icon[src] [src] can not extract any more genetic data from new fossils.")
|
||||
if(4)
|
||||
src.visible_message("\blue \icon[src] [user] inserts [W] into [src], the fossil is consumed as [src] extracts genetic data from it.")
|
||||
qdel(W)
|
||||
updateDialog()
|
||||
else if (istype(W, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = W
|
||||
S.hide_from(usr)
|
||||
var/numaccepted = 0
|
||||
var/numrejected = 0
|
||||
var/full = 0
|
||||
for(var/obj/item/weapon/fossil/F in S.contents)
|
||||
switch(scan_fossil(F))
|
||||
if(SCANFOSSIL_RETVAL_WRONGTYPE)
|
||||
numrejected += 1
|
||||
if(SCANFOSSIL_RETVAL_NOMOREGENESEQ)
|
||||
full = 1
|
||||
if(SCANFOSSIL_RETVAL_SUCCESS)
|
||||
numaccepted += 1
|
||||
S.remove_from_storage(F, src) //This will move the item to this item's contents
|
||||
qdel(F)
|
||||
updateDialog()
|
||||
|
||||
user.visible_message("[user] empties all the fossils from [S] into [src].", "\blue You empty all the fossils from [S] into [src].", "You hear the sound of rocks being poured into a container")
|
||||
|
||||
var/outmsg = ""
|
||||
if(numaccepted)
|
||||
outmsg += " \blue[numaccepted] fossils were accepted and consumed as [src] extracts genetic data from them."
|
||||
if(numrejected)
|
||||
outmsg += " \red[numrejected] fossils were rejected."
|
||||
if(full)
|
||||
outmsg += " \red[src] can not extract any more genetic data from new fossils."
|
||||
user << outmsg
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/reconstitutor/attack_hand(var/mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/reconstitutor/interact(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN) || get_dist(src, user) > 1)
|
||||
user.unset_machine(src)
|
||||
return
|
||||
|
||||
var/dat = "<B>Garland Corp genetic reconstitutor</B><BR>"
|
||||
dat += "<HR>"
|
||||
if(!pod1)
|
||||
pod1 = locate() in orange(1, src)
|
||||
|
||||
if(!pod1)
|
||||
dat += "<b><font color=red>Unable to locate cloning pod.</font></b><br>"
|
||||
else if(istype(pod1))
|
||||
dat += "<b><font color=green>Cloning pod connected.</font></b><br>"
|
||||
|
||||
dat += "<table border=1>"
|
||||
dat += "<tr>"
|
||||
dat += "<td><b>GENE1</b></td>"
|
||||
dat += "<td><b>GENE2</b></td>"
|
||||
dat += "<td><b>GENE3</b></td>"
|
||||
dat += "<td><b>GENE4</b></td>"
|
||||
dat += "<td><b>GENE5</b></td>"
|
||||
dat += "<td><b>GENE6</b></td>"
|
||||
dat += "<td><b>GENE7</b></td>"
|
||||
dat += "<td></td>"
|
||||
dat += "<td></td>"
|
||||
dat += "</tr>"
|
||||
|
||||
//WIP gene sequences
|
||||
for(var/sequence_num = 1, sequence_num <= discovered_genesequences.len, sequence_num += 1)
|
||||
var/datum/genesequence/cur_genesequence = discovered_genesequences[sequence_num]
|
||||
dat += "<tr>"
|
||||
var/num_correct = 0
|
||||
for(var/curindex = 1, curindex <= 7, curindex++)
|
||||
var/bgcolour = "#ffffff"//white ffffff, red ff0000
|
||||
|
||||
//background colour hints at correct positioning
|
||||
if(manually_placed_genomes[sequence_num][curindex])
|
||||
//green background if slot is correctly filled
|
||||
if(manually_placed_genomes[sequence_num][curindex] == cur_genesequence.full_genome_sequence[curindex])
|
||||
bgcolour = "#008000"
|
||||
num_correct += 1
|
||||
if(num_correct == 7)
|
||||
discovered_genesequences -= cur_genesequence
|
||||
completed_genesequences += cur_genesequence
|
||||
manually_placed_genomes[sequence_num] = new/list(7)
|
||||
interact(user)
|
||||
return
|
||||
//yellow background if adjacent to correct slot
|
||||
if(curindex > 1 && manually_placed_genomes[sequence_num][curindex] == cur_genesequence.full_genome_sequence[curindex - 1])
|
||||
bgcolour = "#ffff00"
|
||||
else if(curindex < 7 && manually_placed_genomes[sequence_num][curindex] == cur_genesequence.full_genome_sequence[curindex + 1])
|
||||
bgcolour = "#ffff00"
|
||||
|
||||
var/this_genome_slot = manually_placed_genomes[sequence_num][curindex]
|
||||
if(!this_genome_slot)
|
||||
this_genome_slot = "- - - - -"
|
||||
dat += "<td><a href='?src=\ref[src];sequence_num=[sequence_num];insertpos=[curindex]' style='background-color:[bgcolour]'>[this_genome_slot]</a></td>"
|
||||
dat += "<td><a href='?src=\ref[src];reset=1;sequence_num=[sequence_num]'>Reset</a></td>"
|
||||
//dat += "<td><a href='?src=\ref[src];clone=1;sequence_num=[sequence_num]'>Clone</a></td>"
|
||||
dat += "</tr>"
|
||||
|
||||
//completed gene sequences
|
||||
for(var/sequence_num = 1, sequence_num <= completed_genesequences.len, sequence_num += 1)
|
||||
var/datum/genesequence/cur_genesequence = completed_genesequences[sequence_num]
|
||||
dat += "<tr>"
|
||||
for(var/curindex = 1, curindex <= 7, curindex++)
|
||||
var/this_genome_slot = cur_genesequence.full_genome_sequence[curindex]
|
||||
dat += "<td style='background-color:#008000'>[this_genome_slot]</td>"
|
||||
dat += "<td><a href='?src=\ref[src];wipe=1;sequence_num=[sequence_num]'>Wipe</a></td>"
|
||||
dat += "<td><a href='?src=\ref[src];clone=1;sequence_num=[sequence_num]'>Clone</a></td>"
|
||||
dat += "</tr>"
|
||||
|
||||
dat += "</table>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "<hr>"
|
||||
dat += "<a href='?src=\ref[src];close=1'>Close</a>"
|
||||
user << browse(dat, "window=reconstitutor;size=600x500")
|
||||
user.set_machine(src)
|
||||
onclose(user, "reconstitutor")
|
||||
|
||||
/obj/machinery/computer/reconstitutor/animal/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
if(href_list["clone"])
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
var/datum/genesequence/cloned_genesequence = completed_genesequences[sequence_num]
|
||||
if(pod1)
|
||||
if(pod1.occupant)
|
||||
visible_message("\red \icon[src] The cloning pod is currently occupied.")
|
||||
else if(pod1.biomass < CLONE_BIOMASS)
|
||||
visible_message("\red \icon[src] Not enough biomass in the cloning pod.")
|
||||
else if(pod1.mess)
|
||||
visible_message("\red \icon[src] Error: clonepod malfunction.")
|
||||
else
|
||||
visible_message("\blue \icon[src] [src] clones something from a reconstituted gene sequence!")
|
||||
playsound(src.loc, 'sound/effects/screech.ogg', 50, 1, -3)
|
||||
pod1.occupant = new cloned_genesequence.spawned_type(pod1)
|
||||
pod1.locked = 1
|
||||
pod1.icon_state = "pod_1"
|
||||
//pod1.occupant.name = "[pod1.occupant.name] ([rand(0,999)])"
|
||||
pod1.biomass -= CLONE_BIOMASS
|
||||
else
|
||||
usr << "\red \icon[src] Unable to locate cloning pod!"
|
||||
|
||||
/obj/machinery/computer/reconstitutor/Topic(href, href_list)
|
||||
if(..()) return 1
|
||||
if(href_list["insertpos"])
|
||||
//world << "inserting gene for genesequence [href_list["insertgenome"]] at pos [text2num(href_list["insertpos"])]"
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
var/insertpos = text2num(href_list["insertpos"])
|
||||
|
||||
var/old_genome = manually_placed_genomes[sequence_num][insertpos]
|
||||
discovered_genomes = sortList(discovered_genomes)
|
||||
var/new_genome = input(usr, "Which genome do you want to insert here?") as null|anything in discovered_genomes
|
||||
if(new_genome == "! Clear !")
|
||||
manually_placed_genomes[sequence_num][insertpos] = null
|
||||
else if(new_genome)
|
||||
manually_placed_genomes[sequence_num][insertpos] = new_genome
|
||||
discovered_genomes.Remove(new_genome)
|
||||
if(old_genome)
|
||||
discovered_genomes.Add(old_genome)
|
||||
updateDialog()
|
||||
|
||||
else if(href_list["reset"])
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
for(var/curindex = 1, curindex <= 7, curindex++)
|
||||
var/old_genome = manually_placed_genomes[sequence_num][curindex]
|
||||
manually_placed_genomes[sequence_num][curindex] = null
|
||||
if(old_genome)
|
||||
discovered_genomes.Add(old_genome)
|
||||
updateDialog()
|
||||
|
||||
else if(href_list["wipe"])
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
var/datum/genesequence/wiped_genesequence = completed_genesequences[sequence_num]
|
||||
completed_genesequences.Remove(wiped_genesequence)
|
||||
discovered_genesequences.Add(wiped_genesequence)
|
||||
|
||||
discovered_genomes.Add(wiped_genesequence.full_genome_sequence)
|
||||
discovered_genomes = sortList(discovered_genomes)
|
||||
updateDialog()
|
||||
|
||||
else if(href_list["clone"])
|
||||
var/sequence_num = text2num(href_list["sequence_num"])
|
||||
var/datum/genesequence/cloned_genesequence = completed_genesequences[sequence_num]
|
||||
visible_message("\blue \icon[src] [src] clones a packet of seeds from a reconstituted gene sequence!")
|
||||
playsound(src.loc, 'sound/effects/screech.ogg', 50, 1, -3)
|
||||
new cloned_genesequence.spawned_type(src.loc)
|
||||
|
||||
else if(href_list["close"])
|
||||
usr.unset_machine(src)
|
||||
usr << browse(null, "window=reconstitutor")
|
||||
|
||||
/obj/machinery/computer/reconstitutor/proc/scan_fossil(var/obj/item/weapon/fossil/scan_fossil)
|
||||
//see whether we accept these kind of fossils
|
||||
if(accepted_fossil_types.len && !accepted_fossil_types.Find(scan_fossil.type))
|
||||
return SCANFOSSIL_RETVAL_WRONGTYPE
|
||||
|
||||
//see whether we are going to discover a new sequence, new genome for existing sequence or nothing
|
||||
var/new_genome_prob = discovered_genesequences.len * 50
|
||||
|
||||
if( (new_genome_prob >= 100 || prob(new_genome_prob)) && undiscovered_genomes.len)
|
||||
//create a new genome for an existing gene sequence
|
||||
var/newly_discovered_genome = pick(undiscovered_genomes)
|
||||
undiscovered_genomes -= newly_discovered_genome
|
||||
discovered_genomes.Add(newly_discovered_genome)
|
||||
|
||||
//chance to discover a second genome
|
||||
if(prob(75))
|
||||
newly_discovered_genome = pick(undiscovered_genomes)
|
||||
undiscovered_genomes -= newly_discovered_genome
|
||||
discovered_genomes.Add(newly_discovered_genome)
|
||||
//chance to discover a third genome
|
||||
if(prob(50))
|
||||
newly_discovered_genome = pick(undiscovered_genomes)
|
||||
undiscovered_genomes -= newly_discovered_genome
|
||||
discovered_genomes.Add(newly_discovered_genome)
|
||||
|
||||
else if(undiscovered_genesequences.len)
|
||||
//discover new gene sequence
|
||||
var/datum/genesequence/newly_discovered_genesequence = pick(undiscovered_genesequences)
|
||||
undiscovered_genesequences -= newly_discovered_genesequence
|
||||
discovered_genesequences += newly_discovered_genesequence
|
||||
//add genomes for new gene sequence to pool of discoverable genomes
|
||||
undiscovered_genomes.Add(newly_discovered_genesequence.full_genome_sequence)
|
||||
manually_placed_genomes.Add(null)
|
||||
manually_placed_genomes[manually_placed_genomes.len] = new/list(7)
|
||||
|
||||
else
|
||||
//there's no point scanning any more fossils, we've already discovered everything
|
||||
return SCANFOSSIL_RETVAL_NOMOREGENESEQ
|
||||
|
||||
return SCANFOSSIL_RETVAL_SUCCESS
|
||||
|
||||
#undef SCANFOSSIL_RETVAL_WRONGTYPE
|
||||
#undef SCANFOSSIL_RETVAL_NOMOREGENESEQ
|
||||
#undef SCANFOSSIL_RETVAL_SUCCESS
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/reconstitutor
|
||||
name = "Circuit board (Flora Reconstitution Console)"
|
||||
build_path = "/obj/machinery/computer/reconstitutor"
|
||||
origin_tech = "programming=2;biotech=4;materials=6"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module/adv" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator/nano" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor/adv" = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/reconstitutor/animal
|
||||
name = "Circuit board (Fauna Reconstitution Console)"
|
||||
build_path = "/obj/machinery/computer/reconstitutor/animal"
|
||||
origin_tech = "programming=2;biotech=4;materials=6"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module/adv" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator/nano" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor/adv" = 1)
|
||||
@@ -1,37 +1,8 @@
|
||||
|
||||
/datum/controller/game_controller
|
||||
var/list/all_animal_genesequences = list()
|
||||
var/list/all_plant_genesequences = list()
|
||||
var/list/genome_prefixes = null
|
||||
var/list/artifact_spawning_turfs = list()
|
||||
var/list/digsite_spawning_turfs = list()
|
||||
|
||||
var/list/spawn_types_animal = list("/mob/living/carbon/slime",\
|
||||
"/mob/living/simple_animal/hostile/alien",\
|
||||
"/mob/living/simple_animal/hostile/alien/drone",\
|
||||
"/mob/living/simple_animal/hostile/alien/sentinel",\
|
||||
"/mob/living/simple_animal/hostile/giant_spider",\
|
||||
"/mob/living/simple_animal/hostile/giant_spider/hunter",\
|
||||
"/mob/living/simple_animal/hostile/giant_spider/nurse",\
|
||||
"/mob/living/simple_animal/hostile/creature",\
|
||||
"/mob/living/simple_animal/hostile/samak",\
|
||||
"/mob/living/simple_animal/hostile/diyaab",\
|
||||
"/mob/living/simple_animal/hostile/shantak",\
|
||||
"/mob/living/simple_animal/tindalos",\
|
||||
"/mob/living/simple_animal/yithian")
|
||||
|
||||
var/list/spawn_types_plant = list("/obj/item/seeds/walkingmushroommycelium",\
|
||||
"/obj/item/seeds/killertomatoseed",\
|
||||
"/obj/item/seeds/shandseed",
|
||||
"/obj/item/seeds/mtearseed",
|
||||
"/obj/item/seeds/thaadra",\
|
||||
"/obj/item/seeds/telriis",\
|
||||
"/obj/item/seeds/jurlmah",\
|
||||
"/obj/item/seeds/amauri",\
|
||||
"/obj/item/seeds/gelthi",\
|
||||
"/obj/item/seeds/vale",\
|
||||
"/obj/item/seeds/surik")
|
||||
|
||||
#define XENOARCH_SPAWN_CHANCE 0.5
|
||||
#define DIGSITESIZE_LOWER 4
|
||||
#define DIGSITESIZE_UPPER 12
|
||||
@@ -104,40 +75,6 @@ datum/controller/game_controller/proc/SetupXenoarch()
|
||||
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
|
||||
artifact_turf.artifact_find = new()
|
||||
|
||||
//make sure we have some prefixes for the gene sequences
|
||||
if(!genome_prefixes)
|
||||
genome_prefixes = alphabet_uppercase.Copy()
|
||||
if(!genome_prefixes.len)
|
||||
qdel(genome_prefixes)
|
||||
genome_prefixes = alphabet_uppercase.Copy()
|
||||
|
||||
//create animal gene sequences
|
||||
while(spawn_types_animal.len && genome_prefixes.len)
|
||||
var/datum/genesequence/new_sequence = new/datum/genesequence()
|
||||
new_sequence.spawned_type_text = pick(spawn_types_animal)
|
||||
new_sequence.spawned_type = text2path(new_sequence.spawned_type_text)
|
||||
spawn_types_animal -= new_sequence.spawned_type_text
|
||||
|
||||
var/prefixletter = pick(genome_prefixes)
|
||||
genome_prefixes -= prefixletter
|
||||
while(new_sequence.full_genome_sequence.len < 7)
|
||||
new_sequence.full_genome_sequence.Add("[prefixletter][pick(alphabet_uppercase)][pick(alphabet_uppercase)][pick(1,2,3,4,5,6,7,8,9,0)][pick(1,2,3,4,5,6,7,8,9,0)]")
|
||||
|
||||
all_animal_genesequences.Add(new_sequence)
|
||||
|
||||
//create plant gene sequences
|
||||
while(spawn_types_plant.len && genome_prefixes.len)
|
||||
var/datum/genesequence/new_sequence = new/datum/genesequence()
|
||||
new_sequence.spawned_type = pick(spawn_types_plant)
|
||||
spawn_types_plant -= new_sequence.spawned_type_text
|
||||
|
||||
var/prefixletter = pick(genome_prefixes)
|
||||
genome_prefixes -= prefixletter
|
||||
while(new_sequence.full_genome_sequence.len < 7)
|
||||
new_sequence.full_genome_sequence.Add("[prefixletter][pick(1,2,3,4,5,6,7,8,9,0)][pick(1,2,3,4,5,6,7,8,9,0)][pick(alphabet_uppercase)][pick(alphabet_uppercase)]")
|
||||
|
||||
all_plant_genesequences.Add(new_sequence)
|
||||
|
||||
#undef XENOARCH_SPAWN_CHANCE
|
||||
#undef DIGSITESIZE_LOWER
|
||||
#undef DIGSITESIZE_UPPER
|
||||
|
||||
117
code/modules/tables/flipping.dm
Normal file
117
code/modules/tables/flipping.dm
Normal file
@@ -0,0 +1,117 @@
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
if(health > 100)
|
||||
return 0
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
if(T && T.flipped == 0 && T.material.name == material.name)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
if (!T || T.flipped == 1 || T.material != material)
|
||||
return 1
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
/obj/structure/table/verb/do_flip()
|
||||
set name = "Flip table"
|
||||
set desc = "Flips a non-reinforced table"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr) || ismouse(usr))
|
||||
return
|
||||
|
||||
if(flipped < 0 || !flip(get_cardinal_dir(usr,src)))
|
||||
usr << "<span class='notice'>It won't budge.</span>"
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/unflipping_check(var/direction)
|
||||
|
||||
for(var/mob/M in oview(src,0))
|
||||
return 0
|
||||
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
usr << "There's \a [occupied] in the way."
|
||||
return 0
|
||||
|
||||
var/list/L = list()
|
||||
if(direction)
|
||||
L.Add(direction)
|
||||
else
|
||||
L.Add(turn(src.dir,-90))
|
||||
L.Add(turn(src.dir,90))
|
||||
for(var/new_dir in L)
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,new_dir)
|
||||
if(T && T.material.name == material.name)
|
||||
if(T.flipped == 1 && T.dir == src.dir && !T.unflipping_check(new_dir))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/do_put()
|
||||
set name = "Put table back"
|
||||
set desc = "Puts flipped table back"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr))
|
||||
return
|
||||
|
||||
if (!unflipping_check())
|
||||
usr << "<span class='notice'>It won't budge.</span>"
|
||||
return
|
||||
unflip()
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
|
||||
return 0
|
||||
|
||||
verbs -=/obj/structure/table/verb/do_flip
|
||||
verbs +=/obj/structure/table/proc/do_put
|
||||
|
||||
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
|
||||
for (var/atom/movable/A in get_turf(src))
|
||||
if (!A.anchored)
|
||||
spawn(0)
|
||||
A.throw_at(pick(targets),1,1)
|
||||
|
||||
set_dir(direction)
|
||||
if(dir != NORTH)
|
||||
layer = 5
|
||||
climbable = 0 //flipping tables allows them to be used as makeshift barriers
|
||||
flipped = 1
|
||||
flags |= ON_BORDER
|
||||
for(var/D in list(turn(direction, 90), turn(direction, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src,D)
|
||||
if(T && T.flipped == 0 && material && T.material && T.material.name == material.name)
|
||||
T.flip(direction)
|
||||
take_damage(rand(5, 10))
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/unflip()
|
||||
verbs -=/obj/structure/table/proc/do_put
|
||||
verbs +=/obj/structure/table/verb/do_flip
|
||||
|
||||
layer = initial(layer)
|
||||
flipped = 0
|
||||
climbable = initial(climbable)
|
||||
flags &= ~ON_BORDER
|
||||
for(var/D in list(turn(dir, 90), turn(dir, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,D)
|
||||
if(T && T.flipped == 1 && T.dir == src.dir && material && T.material&& T.material.name == material.name)
|
||||
T.unflip()
|
||||
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
134
code/modules/tables/interactions.dm
Normal file
134
code/modules/tables/interactions.dm
Normal file
@@ -0,0 +1,134 @@
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
if (flipped == 1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
var/turf/cover
|
||||
if(flipped==1)
|
||||
cover = get_turf(src)
|
||||
else if(flipped==0)
|
||||
cover = get_step(loc, get_dir(from, loc))
|
||||
if(!cover)
|
||||
return 1
|
||||
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
|
||||
return 1
|
||||
if (get_turf(P.original) == cover)
|
||||
var/chance = 20
|
||||
if (ismob(P.original))
|
||||
var/mob/M = P.original
|
||||
if (M.lying)
|
||||
chance += 20 //Lying down lets you catch less bullets
|
||||
if(flipped==1)
|
||||
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
|
||||
chance += 20
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if (health > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
break_to_parts()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if (flipped==1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (!W) return
|
||||
|
||||
// Handle harm intent grabbing/tabling.
|
||||
if(istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
if(material)
|
||||
playsound(loc, material.tableslam_noise, 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
var/list/L = take_damage(rand(1,5))
|
||||
// Shards. Extra damage, plus potentially the fact YOU LITERALLY HAVE A PIECE OF GLASS/METAL/WHATEVER IN YOUR FACE
|
||||
for(var/obj/item/weapon/shard/S in L)
|
||||
if(prob(50))
|
||||
M.visible_message("<span class='danger'>\The [S] slices [M]'s face messily!</span>",
|
||||
"<span class='danger'>\The [S] slices your face messily!</span>")
|
||||
M.apply_damage(10, def_zone = "head")
|
||||
if(prob(2))
|
||||
M.embed(S, def_zone = "head")
|
||||
else
|
||||
user << "<span class='danger'>You need a better grip to do that!</span>"
|
||||
return
|
||||
else
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("<span class='danger'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
// Handle dismantling or placing things on the table from here on.
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
user.visible_message("<span class='danger'>\The [src] was sliced apart by [user]!</span>")
|
||||
break_to_parts()
|
||||
return
|
||||
|
||||
if(!material)
|
||||
user << "<span class='warning'>There's nothing to put \the [W] on! Try adding plating to \the [src] first.</span>"
|
||||
return
|
||||
|
||||
user.drop_item(src.loc)
|
||||
return
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
51
code/modules/tables/presets.dm
Normal file
51
code/modules/tables/presets.dm
Normal file
@@ -0,0 +1,51 @@
|
||||
/obj/structure/table
|
||||
|
||||
standard
|
||||
icon_state = "plain_preview"
|
||||
color = "#666666"
|
||||
New()
|
||||
material = get_material_by_name(DEFAULT_WALL_MATERIAL)
|
||||
..()
|
||||
|
||||
reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#666666"
|
||||
New()
|
||||
material = get_material_by_name(DEFAULT_WALL_MATERIAL)
|
||||
reinforced = get_material_by_name(DEFAULT_WALL_MATERIAL)
|
||||
..()
|
||||
|
||||
woodentable
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
New()
|
||||
material = get_material_by_name("wood")
|
||||
..()
|
||||
|
||||
gamblingtable
|
||||
icon_state = "gamble_preview"
|
||||
New()
|
||||
material = get_material_by_name("wood")
|
||||
carpeted = 1
|
||||
..()
|
||||
|
||||
glass
|
||||
icon_state = "plain_preview"
|
||||
color = "#00E1FF"
|
||||
alpha = 77 // 0.3 * 255
|
||||
New()
|
||||
material = get_material_by_name("glass")
|
||||
..()
|
||||
|
||||
holotable
|
||||
icon_state = "holo_preview"
|
||||
color = "#666666"
|
||||
New()
|
||||
material = get_material_by_name("holographic [DEFAULT_WALL_MATERIAL]")
|
||||
..()
|
||||
|
||||
woodentable/holotable
|
||||
icon_state = "holo_preview"
|
||||
New()
|
||||
material = get_material_by_name("holographic wood")
|
||||
..()
|
||||
26
code/modules/tables/rack.dm
Normal file
26
code/modules/tables/rack.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/obj/structure/table/rack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
can_plate = 0
|
||||
can_reinforce = 0
|
||||
flipped = -1
|
||||
|
||||
/obj/structure/table/rack/New()
|
||||
..()
|
||||
verbs -= /obj/structure/table/verb/do_flip
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
|
||||
/obj/structure/table/rack/update_connections()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/update_desc()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/dismantle(obj/item/weapon/wrench/W, mob/user)
|
||||
user << "<span class='warning'>You cannot dismantle \the [src].</span>"
|
||||
return
|
||||
451
code/modules/tables/tables.dm
Normal file
451
code/modules/tables/tables.dm
Normal file
@@ -0,0 +1,451 @@
|
||||
|
||||
|
||||
/obj/structure/table
|
||||
name = "table frame"
|
||||
icon = 'icons/obj/tables.dmi'
|
||||
icon_state = "frame"
|
||||
desc = "It's a table, for putting things on. Or standing on, if you really want to."
|
||||
density = 1
|
||||
anchored = 1
|
||||
climbable = 1
|
||||
layer = 2.8
|
||||
throwpass = 1
|
||||
var/flipped = 0
|
||||
var/maxhealth = 10
|
||||
var/health = 10
|
||||
|
||||
// For racks.
|
||||
var/can_reinforce = 1
|
||||
var/can_plate = 1
|
||||
|
||||
var/manipulating = 0
|
||||
var/material/material = null
|
||||
var/material/reinforced = null
|
||||
|
||||
// Gambling tables. I'd prefer reinforced with carpet/felt/cloth/whatever, but AFAIK it's either harder or impossible to get /obj/item/stack/sheet of those.
|
||||
// Convert if/when you can easily get stacks of these.
|
||||
var/carpeted = 0
|
||||
|
||||
var/list/connections = list("nw0", "ne0", "sw0", "se0")
|
||||
|
||||
/obj/structure/table/proc/update_material()
|
||||
var/old_maxhealth = maxhealth
|
||||
if(!material)
|
||||
maxhealth = 10
|
||||
else
|
||||
maxhealth = material.integrity / 2
|
||||
|
||||
if(reinforced)
|
||||
maxhealth += reinforced.integrity / 2
|
||||
|
||||
health += maxhealth - old_maxhealth
|
||||
|
||||
/obj/structure/table/proc/take_damage(amount)
|
||||
// If the table is made of a brittle material, and is *not* reinforced with a non-brittle material, damage is multiplied by TABLE_BRITTLE_MATERIAL_MULTIPLIER
|
||||
if(material && material.is_brittle())
|
||||
if(reinforced)
|
||||
if(reinforced.is_brittle())
|
||||
amount *= TABLE_BRITTLE_MATERIAL_MULTIPLIER
|
||||
else
|
||||
amount *= TABLE_BRITTLE_MATERIAL_MULTIPLIER
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
visible_message("<span class='warning'>\The [src] breaks down!</span>")
|
||||
return break_to_parts() // if we break and form shards, return them to the caller to do !FUN! things with
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
// One table per turf.
|
||||
for(var/obj/structure/table/T in loc)
|
||||
if(T != src)
|
||||
// There's another table here that's not us, break to metal.
|
||||
// break_to_parts calls qdel(src)
|
||||
break_to_parts(full_return = 1)
|
||||
return
|
||||
|
||||
/obj/structure/table/initialize()
|
||||
..()
|
||||
// reset color/alpha, since they're set for nice map previews
|
||||
color = "#ffffff"
|
||||
alpha = 255
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
update_desc()
|
||||
update_material()
|
||||
|
||||
/obj/structure/table/Destroy()
|
||||
material = null
|
||||
reinforced = null
|
||||
update_connections(1) // Update tables around us to ignore us (material=null forces no connections)
|
||||
for(var/obj/structure/table/T in oview(src, 1))
|
||||
T.update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/table/examine(mob/user)
|
||||
. = ..()
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
user << "<span class='warning'>It looks severely damaged!</span>"
|
||||
if(0.25 to 0.5)
|
||||
user << "<span class='warning'>It looks damaged!</span>"
|
||||
if(0.5 to 1.0)
|
||||
user << "<span class='notice'>It has a few scrapes and dents.</span>"
|
||||
|
||||
/obj/structure/table/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
if(reinforced && istype(W, /obj/item/weapon/screwdriver))
|
||||
remove_reinforced(W, user)
|
||||
if(!reinforced)
|
||||
update_desc()
|
||||
update_icon()
|
||||
update_material()
|
||||
return 1
|
||||
|
||||
if(carpeted && istype(W, /obj/item/weapon/crowbar))
|
||||
user.visible_message("<span class='notice'>\The [user] removes the carpet from \the [src].</span>",
|
||||
"<span class='notice'>You remove the carpet from \the [src].</span>")
|
||||
new /obj/item/stack/tile/carpet(loc)
|
||||
carpeted = 0
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
if(!carpeted && material && istype(W, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = W
|
||||
if(C.use(1))
|
||||
user.visible_message("<span class='notice'>\The [user] adds \the [C] to \the [src].</span>",
|
||||
"<span class='notice'>You add \the [C] to \the [src].</span>")
|
||||
carpeted = 1
|
||||
update_icon()
|
||||
return 1
|
||||
else
|
||||
user << "<span class='warning'>You don't have enough carpet!</span>"
|
||||
|
||||
if(!reinforced && !carpeted && material && istype(W, /obj/item/weapon/wrench))
|
||||
remove_material(W, user)
|
||||
if(!material)
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
for(var/obj/structure/table/T in oview(src, 1))
|
||||
T.update_icon()
|
||||
update_desc()
|
||||
update_material()
|
||||
return 1
|
||||
|
||||
if(!carpeted && !reinforced && !material && istype(W, /obj/item/weapon/wrench))
|
||||
dismantle(W, user)
|
||||
return 1
|
||||
|
||||
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/F = W
|
||||
if(F.welding)
|
||||
user << "<span class='notice'>You begin reparing damage to \the [src].</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(!do_after(user, 20) || !F.remove_fuel(1, user))
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>",
|
||||
"<span class='notice'>You repair some damage to \the [src].</span>")
|
||||
health = max(health+(maxhealth/5), maxhealth) // 20% repair per application
|
||||
return 1
|
||||
|
||||
if(!material && can_plate && istype(W, /obj/item/stack/sheet))
|
||||
material = common_material_add(W, user, "plat")
|
||||
if(material)
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
update_desc()
|
||||
update_material()
|
||||
return 1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/item/stack/sheet/what)
|
||||
if(can_reinforce && isliving(usr) && (!usr.stat) && istype(what) && usr.get_active_hand() == what && Adjacent(usr))
|
||||
reinforce_table(what, usr)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/proc/reinforce_table(obj/item/stack/sheet/S, mob/user)
|
||||
if(reinforced)
|
||||
user << "<span class='warning'>\The [src] is already reinforced!</span>"
|
||||
return
|
||||
|
||||
if(!can_reinforce)
|
||||
user << "<span class='warning'>\The [src] cannot be reinforced!</span>"
|
||||
return
|
||||
|
||||
if(!material)
|
||||
user << "<span class='warning'>Plate \the [src] before reinforcing it!</span>"
|
||||
return
|
||||
|
||||
reinforced = common_material_add(S, user, "reinforc")
|
||||
if(reinforced)
|
||||
update_desc()
|
||||
update_icon()
|
||||
update_material()
|
||||
|
||||
/obj/structure/table/proc/update_desc()
|
||||
if(material)
|
||||
name = "[material.display_name] table"
|
||||
else
|
||||
name = "table frame"
|
||||
|
||||
if(reinforced)
|
||||
name = "reinforced [name]"
|
||||
desc = "[initial(desc)] This one seems to be reinforced with [reinforced.display_name]."
|
||||
else
|
||||
desc = initial(desc)
|
||||
|
||||
// Returns the material to set the table to.
|
||||
/obj/structure/table/proc/common_material_add(obj/item/stack/sheet/S, mob/user, verb) // Verb is actually verb without 'e' or 'ing', which is added. Works for 'plate'/'plating' and 'reinforce'/'reinforcing'.
|
||||
var/material/M = name_to_material[S.sheettype]
|
||||
if(!istype(M))
|
||||
user << "<span class='warning'>You cannot [verb]e \the [src] with \the [S].</span>"
|
||||
return null
|
||||
|
||||
if(manipulating) return M
|
||||
manipulating = 1
|
||||
user << "<span class='notice'>You begin [verb]ing \the [src] with [M.display_name].</span>"
|
||||
if(!do_after(user, 20) || !S.use(1))
|
||||
manipulating = 0
|
||||
return null
|
||||
user.visible_message("<span class='notice'>\The [user] [verb]es \the [src] with [M.display_name].</span>", "<span class='notice'>You finish [verb]ing \the [src].</span>")
|
||||
manipulating = 0
|
||||
return M
|
||||
|
||||
// Returns the material to set the table to.
|
||||
/obj/structure/table/proc/common_material_remove(mob/user, material/M, delay, what, type_holding, sound)
|
||||
if(!M.stack_type)
|
||||
user << "<span class='warning'>You are unable to remove the [what] from this table!</span>"
|
||||
return M
|
||||
|
||||
if(manipulating) return M
|
||||
manipulating = 1
|
||||
user.visible_message("<span class='notice'>\The [user] begins removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>",
|
||||
"<span class='notice'>You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>")
|
||||
if(sound)
|
||||
playsound(src.loc, sound, 50, 1)
|
||||
if(!do_after(user, 40))
|
||||
manipulating = 0
|
||||
return M
|
||||
user.visible_message("<span class='notice'>\The [user] removes the [M.display_name] [what] from \the [src].</span>",
|
||||
"<span class='notice'>You remove the [M.display_name] [what] from \the [src].</span>")
|
||||
new M.stack_type(src.loc)
|
||||
manipulating = 0
|
||||
return null
|
||||
|
||||
/obj/structure/table/proc/remove_reinforced(obj/item/weapon/screwdriver/S, mob/user)
|
||||
reinforced = common_material_remove(user, reinforced, 40, "reinforcements", "screws", 'sound/items/Screwdriver.ogg')
|
||||
|
||||
/obj/structure/table/proc/remove_material(obj/item/weapon/wrench/W, mob/user)
|
||||
material = common_material_remove(user, material, 20, "plating", "bolts", 'sound/items/Ratchet.ogg')
|
||||
|
||||
/obj/structure/table/proc/dismantle(obj/item/weapon/wrench/W, mob/user)
|
||||
if(manipulating) return
|
||||
manipulating = 1
|
||||
user.visible_message("<span class='notice'>\The [user] begins dismantling \the [src].</span>",
|
||||
"<span class='notice'>You begin dismantling \the [src].</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(!do_after(user, 20))
|
||||
manipulating = 0
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>",
|
||||
"<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Returns a list of /obj/item/weapon/shard objects that were created as a result of this table's breakage.
|
||||
// Used for !fun! things such as embedding shards in the faces of tableslammed people.
|
||||
|
||||
// The repeated
|
||||
// S = [x].place_shard(loc)
|
||||
// if(S) shards += S
|
||||
// is to avoid filling the list with nulls, as place_shard won't place shards of certain materials (holo-wood, holo-steel)
|
||||
|
||||
/obj/structure/table/proc/break_to_parts(full_return = 0)
|
||||
var/list/shards = list()
|
||||
var/obj/item/weapon/shard/S = null
|
||||
if(reinforced)
|
||||
if(reinforced.stack_type && (full_return || prob(20)))
|
||||
reinforced.place_sheet(loc)
|
||||
else
|
||||
S = reinforced.place_shard(loc)
|
||||
if(S) shards += S
|
||||
if(material)
|
||||
if(material.stack_type && (full_return || prob(20)))
|
||||
material.place_sheet(loc)
|
||||
else
|
||||
S = material.place_shard(loc)
|
||||
if(S) shards += S
|
||||
if(carpeted && (full_return || prob(50))) // Higher chance to get the carpet back intact, since there's no non-intact option
|
||||
new /obj/item/stack/tile/carpet(src.loc)
|
||||
if(full_return || prob(20))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
else
|
||||
var/material/M = get_material_by_name(DEFAULT_WALL_MATERIAL)
|
||||
S = M.place_shard(loc)
|
||||
if(S) shards += S
|
||||
qdel(src)
|
||||
return shards
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
if(flipped != 1)
|
||||
icon_state = "blank"
|
||||
overlays.Cut()
|
||||
|
||||
// Base frame shape. Mostly done for glass/diamond tables, where this is visible.
|
||||
for(var/n in connections)
|
||||
overlays += n
|
||||
|
||||
// Standard table image
|
||||
if(material)
|
||||
for(var/n in connections)
|
||||
var/image/I = image(icon, "[material.icon_base]_[n]")
|
||||
I.color = material.icon_colour
|
||||
I.alpha = 255 * material.opacity
|
||||
overlays += I
|
||||
|
||||
// Reinforcements
|
||||
if(reinforced)
|
||||
for(var/n in connections)
|
||||
var/image/I = image(icon, "[reinforced.icon_reinf]_[n]")
|
||||
I.color = reinforced.icon_colour
|
||||
I.alpha = 255 * reinforced.opacity
|
||||
overlays += I
|
||||
|
||||
if(carpeted)
|
||||
for(var/n in connections)
|
||||
overlays += "carpet_[n]"
|
||||
else
|
||||
overlays.Cut()
|
||||
var/type = 0
|
||||
var/tabledirs = 0
|
||||
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
||||
var/obj/structure/table/T = locate(/obj/structure/table ,get_step(src,direction))
|
||||
if (T && T.flipped == 1 && T.dir == src.dir && material && T.material && T.material.name == material.name)
|
||||
type++
|
||||
tabledirs |= direction
|
||||
|
||||
type = "[type]"
|
||||
if (type=="1")
|
||||
if (tabledirs & turn(dir,90))
|
||||
type += "-"
|
||||
if (tabledirs & turn(dir,-90))
|
||||
type += "+"
|
||||
|
||||
icon_state = "flip[type]"
|
||||
if(material)
|
||||
var/image/I = image(icon, "[material.icon_base]_flip[type]")
|
||||
I.color = material.icon_colour
|
||||
I.alpha = 255 * material.opacity
|
||||
overlays += I
|
||||
name = "[material.display_name] table"
|
||||
else
|
||||
name = "table frame"
|
||||
|
||||
if(reinforced)
|
||||
var/image/I = image(icon, "[reinforced.icon_reinf]_flip[type]")
|
||||
I.color = reinforced.icon_colour
|
||||
I.alpha = 255 * reinforced.opacity
|
||||
overlays += I
|
||||
|
||||
if(carpeted)
|
||||
for(var/n in connections)
|
||||
overlays += "carpet_flip[type]"
|
||||
|
||||
// set propagate if you're updating a table that should update tables around it too, for example if it's a new table or something important has changed (like material).
|
||||
/obj/structure/table/proc/update_connections(propagate=0)
|
||||
if(!material)
|
||||
connections = list("nw0", "ne0", "sw0", "se0")
|
||||
|
||||
if(propagate)
|
||||
for(var/obj/structure/table/T in oview(src, 1))
|
||||
T.update_connections()
|
||||
return
|
||||
|
||||
var/list/blocked_dirs = list()
|
||||
for(var/obj/structure/window/W in get_turf(src))
|
||||
if(W.is_fulltile())
|
||||
connections = list("nw0", "ne0", "sw0", "se0")
|
||||
return
|
||||
blocked_dirs |= W.dir
|
||||
|
||||
for(var/D in list(NORTH, SOUTH, EAST, WEST) - blocked_dirs)
|
||||
var/turf/T = get_step(src, D)
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.is_fulltile() || W.dir == reverse_dir[D])
|
||||
blocked_dirs |= D
|
||||
break
|
||||
else
|
||||
if(W.dir != D) // it's off to the side
|
||||
blocked_dirs |= W.dir|D // blocks the diagonal
|
||||
|
||||
for(var/D in list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) - blocked_dirs)
|
||||
var/turf/T = get_step(src, D)
|
||||
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.is_fulltile() || W.dir & reverse_dir[D])
|
||||
blocked_dirs |= D
|
||||
break
|
||||
|
||||
// Blocked cardinals block the adjacent diagonals too. Prevents weirdness with tables.
|
||||
for(var/x in list(NORTH, SOUTH))
|
||||
for(var/y in list(EAST, WEST))
|
||||
if((x in blocked_dirs) || (y in blocked_dirs))
|
||||
blocked_dirs |= x|y
|
||||
|
||||
var/list/connection_dirs = list()
|
||||
|
||||
for(var/obj/structure/table/T in oview(src, 1))
|
||||
var/T_dir = get_dir(src, T)
|
||||
if(T_dir in blocked_dirs) continue
|
||||
if(material && T.material && material.name == T.material.name && flipped == T.flipped)
|
||||
connection_dirs |= T_dir
|
||||
if(propagate)
|
||||
spawn(0)
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
|
||||
connections = dirs_to_corner_states(connection_dirs)
|
||||
|
||||
#define CORNER_NONE 0
|
||||
#define CORNER_EASTWEST 1
|
||||
#define CORNER_DIAGONAL 2
|
||||
#define CORNER_NORTHSOUTH 4
|
||||
|
||||
/proc/dirs_to_corner_states(list/dirs)
|
||||
if(!istype(dirs)) return
|
||||
|
||||
var/NE = CORNER_NONE
|
||||
var/NW = CORNER_NONE
|
||||
var/SE = CORNER_NONE
|
||||
var/SW = CORNER_NONE
|
||||
|
||||
if(NORTH in dirs)
|
||||
NE |= CORNER_NORTHSOUTH
|
||||
NW |= CORNER_NORTHSOUTH
|
||||
if(SOUTH in dirs)
|
||||
SW |= CORNER_NORTHSOUTH
|
||||
SE |= CORNER_NORTHSOUTH
|
||||
if(EAST in dirs)
|
||||
SE |= CORNER_EASTWEST
|
||||
NE |= CORNER_EASTWEST
|
||||
if(WEST in dirs)
|
||||
NW |= CORNER_EASTWEST
|
||||
SW |= CORNER_EASTWEST
|
||||
if(NORTHWEST in dirs)
|
||||
NW |= CORNER_DIAGONAL
|
||||
if(NORTHEAST in dirs)
|
||||
NE |= CORNER_DIAGONAL
|
||||
if(SOUTHEAST in dirs)
|
||||
SE |= CORNER_DIAGONAL
|
||||
if(SOUTHWEST in dirs)
|
||||
SW |= CORNER_DIAGONAL
|
||||
|
||||
return list("ne[NE]", "se[SE]", "sw[SW]", "nw[NW]")
|
||||
|
||||
#undef CORNER_NONE
|
||||
#undef CORNER_EASTWEST
|
||||
#undef CORNER_DIAGONAL
|
||||
#undef CORNER_NORTHSOUTH
|
||||
22
code/modules/tables/update_triggers.dm
Normal file
22
code/modules/tables/update_triggers.dm
Normal file
@@ -0,0 +1,22 @@
|
||||
/obj/structure/window/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in view(src, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
var/oldloc = loc
|
||||
loc=null
|
||||
for(var/obj/structure/table/T in view(oldloc, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
loc=oldloc
|
||||
..()
|
||||
|
||||
/obj/structure/window/Move()
|
||||
var/oldloc = loc
|
||||
. = ..()
|
||||
if(loc != oldloc)
|
||||
for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
@@ -972,3 +972,15 @@ var/list/be_special_flags = list(
|
||||
#ifndef CUSTOM_ITEM_MOB
|
||||
#define CUSTOM_ITEM_MOB 'icons/mob/custom_items_mob.dmi'
|
||||
#endif
|
||||
|
||||
#define SHARD_SHARD "shard"
|
||||
#define SHARD_SHRAPNEL "shrapnel"
|
||||
#define SHARD_STONE_PIECE "piece"
|
||||
#define SHARD_SPLINTER "splinters"
|
||||
#define SHARD_NONE ""
|
||||
|
||||
#define MATERIAL_UNMELTABLE 1
|
||||
#define MATERIAL_BRITTLE 2
|
||||
|
||||
#define TABLE_BRITTLE_MATERIAL_MULTIPLIER 4 // Amount table damage is multiplied by if it is made of a brittle material (e.g. glass)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user