code folder. 221 files changed wew

This commit is contained in:
deathride58
2018-02-12 21:03:40 -05:00
parent e3ad2643b2
commit 72ff7be9bd
221 changed files with 2797 additions and 2172 deletions
@@ -73,19 +73,18 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/proc/is_banned(mob/M)
if(!M)
return FALSE
. = (jobban_isbanned(M,"Syndicate") || (job_rank && jobban_isbanned(M,job_rank)))
. = (jobban_isbanned(M, ROLE_SYNDICATE) || (job_rank && jobban_isbanned(M,job_rank)))
/datum/antagonist/proc/replace_banned_player()
set waitfor = FALSE
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", null, job_rank, 50, owner.current)
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)
if(LAZYLEN(candidates))
var/client/C = pick(candidates)
to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
owner.current.ghostize(0)
owner.current.key = theghost.key
owner.current.key = C.key
/datum/antagonist/proc/on_removal()
remove_innate_effects()
@@ -2,7 +2,7 @@
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_TINY
var/used = 0
var/used = FALSE
/obj/item/antag_spawner/proc/spawn_antag(client/C, turf/T, kind = "", datum/mind/user)
return
@@ -57,13 +57,13 @@
to_chat(H, "You already used this contract!")
return
var/list/candidates = pollCandidatesForMob("Do you want to play as a wizard's [href_list["school"]] apprentice?", ROLE_WIZARD, null, ROLE_WIZARD, 150, src)
if(candidates.len)
if(LAZYLEN(candidates))
if(used)
to_chat(H, "You already used this contract!")
return
used = 1
var/mob/dead/observer/theghost = pick(candidates)
spawn_antag(theghost.client, get_turf(src), href_list["school"],H.mind)
used = TRUE
var/client/C = pick(candidates)
spawn_antag(C, get_turf(src), href_list["school"],H.mind)
else
to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.")
@@ -120,12 +120,12 @@
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
var/list/nuke_candidates = pollGhostCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE)
if(nuke_candidates.len)
if(LAZYLEN(nuke_candidates))
if(!(check_usability(user)))
return
used = TRUE
var/mob/dead/observer/theghost = pick(nuke_candidates)
spawn_antag(theghost.client, get_turf(src), "syndieborg", user.mind)
var/client/C = pick(nuke_candidates)
spawn_antag(C, get_turf(src), "syndieborg", user.mind)
do_sparks(4, TRUE, src)
qdel(src)
else
@@ -213,13 +213,13 @@
return
if(used)
return
var/list/demon_candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", null, null, ROLE_ALIEN, 50, src)
if(demon_candidates.len)
var/list/candidates = pollCandidatesForMob("Do you want to play as a [initial(demon_type.name)]?", ROLE_ALIEN, null, ROLE_ALIEN, 50, src)
if(LAZYLEN(candidates))
if(used)
return
used = 1
var/mob/dead/observer/theghost = pick(demon_candidates)
spawn_antag(theghost.client, get_turf(src), initial(demon_type.name),user.mind)
used = TRUE
var/client/C = pick(candidates)
spawn_antag(C, get_turf(src), initial(demon_type.name),user.mind)
to_chat(user, shatter_msg)
to_chat(user, veil_msg)
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1)
@@ -682,8 +682,8 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/structure/table_frame/abductor/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench))
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
I.play_tool_sound(src)
if(I.use_tool(src, user, 30))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
for(var/i = 1, i <= framestackamount, i++)
new framestack(get_turf(src))
@@ -262,10 +262,9 @@
mind_control_duration = 1800
/obj/item/organ/heart/gland/egg/activate()
to_chat(owner, "<span class='boldannounce'>You lay an egg!</span>")
var/obj/item/reagent_containers/food/snacks/egg/egg = new(owner.drop_location())
egg.reagents.add_reagent(get_random_reagent_id(), 15)
egg.desc += " It looks weird..."
owner.visible_message("<span class='alertalien'>[owner] [pick(EGG_LAYING_MESSAGES)]</span>")
var/turf/T = owner.drop_location()
new /obj/item/reagent_containers/food/snacks/egg/gland(T)
/obj/item/organ/heart/gland/electric
cooldown_low = 800
+1 -1
View File
@@ -2,7 +2,7 @@
name = "Brother"
antagpanel_category = "Brother"
job_rank = ROLE_BROTHER
var/special_role = "blood brother"
var/special_role = ROLE_BROTHER
var/datum/team/brother_team/team
/datum/antagonist/brother/create_team(datum/team/brother_team/new_team)
@@ -76,6 +76,13 @@
. = ..()
/datum/antagonist/changeling/on_removal()
//We'll be using this from now on
var/mob/living/carbon/C = owner.current
if(istype(C))
var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN)
if(B && (B.decoy_override != initial(B.decoy_override)))
B.vital = TRUE
B.decoy_override = FALSE
remove_changeling_powers()
owner.objectives -= objectives
. = ..()
@@ -389,7 +396,7 @@
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = owner
if(team_mode) //No backstabbing while in a team
kill_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
kill_objective.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
else
kill_objective.find_target()
objectives += kill_objective
@@ -397,7 +404,7 @@
var/datum/objective/maroon/maroon_objective = new
maroon_objective.owner = owner
if(team_mode)
maroon_objective.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
maroon_objective.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
else
maroon_objective.find_target()
objectives += maroon_objective
@@ -419,7 +426,7 @@
var/datum/objective/escape/escape_with_identity/identity_theft = new
identity_theft.owner = owner
if(team_mode)
identity_theft.find_target_by_role(role = "Changeling", role_type = 1, invert = 1)
identity_theft.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
else
identity_theft.find_target()
objectives += identity_theft
@@ -34,4 +34,4 @@
else
adjust_clockwork_power(1) //Continue generating power when the cell has run dry; 5 W/second
#undef COG_MAX_SIPHON_THRESHOLD
#undef COG_MAX_SIPHON_THRESHOLD
@@ -27,11 +27,11 @@
var/distance = get_dist(src, O)
to_chat(user, "[O] ([distance == 0 ? "same tile" : "[distance] tiles [dir2text(get_dir(src, O))]"])")
/obj/structure/destructible/clockwork/trap/wrench_act(mob/living/user, obj/item/wrench)
/obj/structure/destructible/clockwork/trap/wrench_act(mob/living/user, obj/item/I)
if(!is_servant_of_ratvar(user))
return ..()
to_chat(user, "<span class='notice'>You break down the delicate components of [src] into brass.</span>")
playsound(src, wrench.usesound, 50, TRUE)
I.play_tool_sound(src)
new/obj/item/stack/tile/brass(get_turf(src))
qdel(src)
return TRUE
@@ -56,14 +56,14 @@
return
..()
/obj/structure/destructible/clockwork/trap/wirecutter_act(mob/living/user, obj/item/wirecutters)
/obj/structure/destructible/clockwork/trap/wirecutter_act(mob/living/user, obj/item/I)
if(!is_servant_of_ratvar(user))
return
if(!wired_to.len)
to_chat(user, "<span class='warning'>[src] has no connections!</span>")
return
to_chat(user, "<span class='notice'>You sever all connections to [src].</span>")
playsound(src, wirecutters.usesound, 50, TRUE)
I.play_tool_sound(src)
for(var/V in wired_to)
var/obj/structure/destructible/clockwork/trap/T = V
T.wired_to -= src
@@ -31,9 +31,8 @@
if(anchored)
to_chat(user, "<span class='warning'>[src] needs to be unsecured to disassemble it!</span>")
else
playsound(src, I.usesound, 100, 1)
user.visible_message("<span class='warning'>[user] starts to disassemble [src].</span>", "<span class='notice'>You start to disassemble [src]...</span>")
if(do_after(user, 30*I.toolspeed, target = src) && !anchored)
if(I.use_tool(src, user, 30, volume=100) && !anchored)
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
deconstruct(TRUE)
return 1
@@ -51,7 +51,7 @@
var/mob/living/current = owner.current
SSticker.mode.servants_of_ratvar += owner
SSticker.mode.update_servant_icons_added(owner)
owner.special_role = "Servant of Ratvar"
owner.special_role = ROLE_SERVANT_OF_RATVAR
owner.current.log_message("<font color=#BE8700>Has been converted to the cult of Ratvar!</font>", INDIVIDUAL_ATTACK_LOG)
if(issilicon(current))
if(iscyborg(current) && !silent)
@@ -0,0 +1,775 @@
/datum/action/innate/cult/blood_magic //Blood magic handles the creation of blood spells (formerly talismans)
name = "Prepare Blood Magic"
button_icon_state = "carve"
desc = "Prepare blood magic by carving runes into your flesh. This rite is most effective with an <b>empowering rune</b>"
var/list/spells = list()
var/channeling = FALSE
/datum/action/innate/cult/blood_magic/Grant()
..()
button.screen_loc = "6:-29,4:-2"
button.moved = "6:-29,4:-2"
/datum/action/innate/cult/blood_magic/Remove()
for(var/X in spells)
qdel(X)
..()
/datum/action/innate/cult/blood_magic/IsAvailable()
if(!iscultist(owner))
return FALSE
return ..()
/datum/action/innate/cult/blood_magic/proc/Positioning()
var/list/screen_loc_split = splittext(button.screen_loc,",")
var/list/screen_loc_X = splittext(screen_loc_split[1],":")
var/list/screen_loc_Y = splittext(screen_loc_split[2],":")
var/pix_X = text2num(screen_loc_X[2])
for(var/datum/action/innate/cult/blood_spell/B in spells)
if(B.button.locked)
var/order = pix_X+spells.Find(B)*31
B.button.screen_loc = "[screen_loc_X[1]]:[order],[screen_loc_Y[1]]:[screen_loc_Y[2]]"
B.button.moved = B.button.screen_loc
/datum/action/innate/cult/blood_magic/Activate()
var/rune = FALSE
var/limit = RUNELESS_MAX_BLOODCHARGE
for(var/obj/effect/rune/empower/R in range(1, owner))
rune = TRUE
break
if(rune)
limit = MAX_BLOODCHARGE
if(spells.len >= limit)
if(rune)
to_chat(owner, "<span class='cultitalic'>Your body has reached its limit, you cannot store more than [MAX_BLOODCHARGE] spells at once. <b>Pick a spell to nullify.</b></span>")
else
to_chat(owner, "<span class='cultitalic'>Your body has reached its limit, <b><u>you cannot have more than [RUNELESS_MAX_BLOODCHARGE] spells at once without an empowering rune! Pick a spell to nullify.</b></u></span>")
var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells
if(nullify_spell)
qdel(nullify_spell)
return
var/entered_spell_name
var/datum/action/innate/cult/blood_spell/BS
var/list/possible_spells = list()
for(var/I in subtypesof(/datum/action/innate/cult/blood_spell))
var/datum/action/innate/cult/blood_spell/J = I
var/cult_name = initial(J.name)
possible_spells[cult_name] = J
possible_spells += "(REMOVE SPELL)"
entered_spell_name = input(owner, "Pick a blood spell to prepare...", "Spell Choices") as null|anything in possible_spells
if(entered_spell_name == "(REMOVE SPELL)")
var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells
if(nullify_spell)
qdel(nullify_spell)
return
BS = possible_spells[entered_spell_name]
if(QDELETED(src) || owner.incapacitated() || !BS)
return
to_chat(owner,"<span class='warning'>You begin to carve unnatural symbols into your flesh!</span>")
SEND_SOUND(owner, sound('sound/weapons/slice.ogg',0,1,10))
if(!channeling)
channeling = TRUE
else
to_chat(owner, "<span class='cultitalic'>You are already invoking blood magic!")
return
if(do_after(owner, 100 - rune*65, target = owner))
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.bleed(30 - rune*25)
var/datum/action/innate/cult/blood_spell/new_spell = new BS(owner)
new_spell.Grant(owner, src)
spells += new_spell
Positioning()
to_chat(owner, "<span class='warning'>Your wounds glows with power, you have prepared a [new_spell.name] invocation!</span>")
channeling = FALSE
/datum/action/innate/cult/blood_spell //The next generation of talismans
name = "Blood Magic"
button_icon_state = "telerune"
desc = "Fear the Old Blood."
var/charges = 1
var/magic_path = null
var/obj/item/melee/blood_magic/hand_magic
var/datum/action/innate/cult/blood_magic/all_magic
var/base_desc //To allow for updating tooltips
var/invocation
var/health_cost = 0
/datum/action/innate/cult/blood_spell/Grant(mob/living/owner, datum/action/innate/cult/blood_magic/BM)
if(health_cost)
desc += "<br>Deals <u>[health_cost] damage</u> to your arm per use."
base_desc = desc
desc += "<br><b><u>Has [charges] use\s remaining</u></b>."
all_magic = BM
..()
button.locked = TRUE
/datum/action/innate/cult/blood_spell/Remove()
if(all_magic)
all_magic.spells -= src
if(hand_magic)
qdel(hand_magic)
hand_magic = null
..()
/datum/action/innate/cult/blood_spell/IsAvailable()
if(!iscultist(owner) || owner.incapacitated() || !charges)
return FALSE
return ..()
/datum/action/innate/cult/blood_spell/Activate()
if(magic_path) //If this spell flows from the hand
if(!hand_magic)
hand_magic = new magic_path(owner, src)
if(!owner.put_in_hands(hand_magic))
qdel(hand_magic)
hand_magic = null
to_chat(owner, "<span class='warning'>You have no empty hand for invoking blood magic!</span>")
return
to_chat(owner, "<span class='notice'>Your old wounds glow again as you invoke the [name].</span>")
return
if(hand_magic)
qdel(hand_magic)
hand_magic = null
to_chat(owner, "<span class='warning'>You snuff out the spell with your hand, saving its power for another time.</span>")
//Cult Blood Spells
/datum/action/innate/cult/blood_spell/stun
name = "Stun"
desc = "A potent spell that will stun and mute victims upon contact."
button_icon_state = "hand"
magic_path = "/obj/item/melee/blood_magic/stun"
health_cost = 10
/datum/action/innate/cult/blood_spell/teleport
name = "Teleport"
desc = "A useful spell that teleport cultists to a chosen destination on contact."
button_icon_state = "tele"
magic_path = "/obj/item/melee/blood_magic/teleport"
health_cost = 7
/datum/action/innate/cult/blood_spell/emp
name = "Electromagnetic Pulse"
desc = "A large spell that immediately disables all electronics in the area."
button_icon_state = "emp"
health_cost = 10
invocation = "Ta'gh fara'qha fel d'amar det!"
/datum/action/innate/cult/blood_spell/emp/Activate()
owner.visible_message("<span class='warning'>[owner]'s hand flashes a bright blue!</span>", \
"<span class='cultitalic'>You speak the cursed words, emitting an EMP blast from your hand.</span>")
empulse(owner, 3, 6)
owner.whisper(invocation, language = /datum/language/common)
charges--
if(charges<=0)
qdel(src)
/datum/action/innate/cult/blood_spell/shackles
name = "Shadow Shackles"
desc = "A stealthy spell that will handcuff and temporarily silence your victim."
button_icon_state = "cuff"
charges = 4
magic_path = "/obj/item/melee/blood_magic/shackles"
/datum/action/innate/cult/blood_spell/construction
name = "Twisted Construction"
desc = "<u>A sinister spell used to convert:</u><br>Plasteel into runed metal<br>25 metal into a construct shell<br>Cyborgs directly into constructs<br>Cyborg shells into construct shells<br>Airlocks into runed airlocks (harm intent)"
button_icon_state = "transmute"
magic_path = "/obj/item/melee/blood_magic/construction"
/datum/action/innate/cult/blood_spell/equipment
name = "Summon Equipment"
desc = "A crucial spell that enables you to summon either a ritual dagger or combat gear including armored robes, the nar'sien bola, and an eldritch longsword."
button_icon_state = "equip"
magic_path = "/obj/item/melee/blood_magic/armor"
/datum/action/innate/cult/blood_spell/equipment/Activate()
var/choice = alert(owner,"Choose your equipment type",,"Combat Equipment","Ritual Dagger","Cancel")
if(choice == "Ritual Dagger")
var/turf/T = get_turf(owner)
owner.visible_message("<span class='warning'>[owner]'s hand glows red for a moment.</span>", \
"<span class='cultitalic'>Red light begins to shimmer and take form within your hand!</span>")
var/obj/O = new /obj/item/melee/cultblade/dagger(T)
if(owner.put_in_hands(O))
to_chat(owner, "<span class='warning'>A ritual dagger appears in your hand!</span>")
else
owner.visible_message("<span class='warning'>A ritual dagger appears at [owner]'s feet!</span>", \
"<span class='cultitalic'>A ritual dagger materializes at your feet.</span>")
SEND_SOUND(owner, sound('sound/effects/magic.ogg',0,1,25))
charges--
desc = base_desc
desc += "<br><b><u>Has [charges] use\s remaining</u></b>."
if(charges<=0)
qdel(src)
else if(choice == "Combat Equipment")
..()
/datum/action/innate/cult/blood_spell/horror
name = "Hallucinations"
desc = "A <u>ranged yet stealthy</u> spell that will break the mind of the victim with nightmarish hallucinations."
button_icon_state = "horror"
var/obj/effect/proc_holder/horror/PH
charges = 4
/datum/action/innate/cult/blood_spell/horror/New()
PH = new()
PH.attached_action = src
..()
/datum/action/innate/cult/blood_spell/horror/Destroy()
var/obj/effect/proc_holder/horror/destroy = PH
. = ..()
if(destroy && !QDELETED(destroy))
QDEL_NULL(destroy)
/datum/action/innate/cult/blood_spell/horror/Activate()
PH.toggle(owner) //the important bit
return TRUE
/obj/effect/proc_holder/horror
active = FALSE
ranged_mousepointer = 'icons/effects/cult_target.dmi'
var/datum/action/innate/cult/blood_spell/attached_action
/obj/effect/proc_holder/horror/Destroy()
var/datum/action/innate/cult/blood_spell/AA = attached_action
. = ..()
if(AA && !QDELETED(AA))
QDEL_NULL(AA)
/obj/effect/proc_holder/horror/proc/toggle(mob/user)
if(active)
remove_ranged_ability("<span class='cult'>You dispel the magic...</span>")
else
add_ranged_ability(user, "<span class='cult'>You prepare to horrify a target...</span>")
/obj/effect/proc_holder/horror/InterceptClickOn(mob/living/caller, params, atom/target)
if(..())
return
if(ranged_ability_user.incapacitated() || !iscultist(caller))
remove_ranged_ability()
return
var/turf/T = get_turf(ranged_ability_user)
if(!isturf(T))
return FALSE
if(target in view(7, get_turf(ranged_ability_user)))
if(!ishuman(target) || iscultist(target))
return
var/mob/living/carbon/human/H = target
H.hallucination = max(H.hallucination, 240)
SEND_SOUND(ranged_ability_user, sound('sound/effects/ghost.ogg',0,1,50))
var/image/C = image('icons/effects/cult_effects.dmi',H,"bloodsparkles", ABOVE_MOB_LAYER)
add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/cult, "cult_apoc", C, FALSE)
addtimer(CALLBACK(H,/atom/.proc/remove_alt_appearance,"cult_apoc",TRUE), 2400, TIMER_OVERRIDE|TIMER_UNIQUE)
to_chat(ranged_ability_user,"<span class='cult'><b>[H] has been cursed with living nightmares!</b></span>")
attached_action.charges--
attached_action.desc = attached_action.base_desc
attached_action.desc += "<br><b><u>Has [attached_action.charges] use\s remaining</u></b>."
attached_action.UpdateButtonIcon()
if(attached_action.charges <= 0)
remove_mousepointer(ranged_ability_user.client)
remove_ranged_ability("<span class='cult'>You have exhausted the spell's power!</span>")
qdel(src)
/datum/action/innate/cult/blood_spell/veiling
name = "Conceal Presence"
desc = "A multi-function spell that alternates between hiding and revealing nearby cult runes, structures, turf, and airlocks."
invocation = "Kla'atu barada nikt'o!"
button_icon_state = "gone"
charges = 10
var/revealing = FALSE //if it reveals or not
/datum/action/innate/cult/blood_spell/veiling/Activate()
if(!revealing)
owner.visible_message("<span class='warning'>Thin grey dust falls from [owner]'s hand!</span>", \
"<span class='cultitalic'>You invoke the veiling spell, hiding nearby runes.</span>")
charges--
SEND_SOUND(owner, sound('sound/magic/smoke.ogg',0,1,25))
owner.whisper(invocation, language = /datum/language/common)
for(var/obj/effect/rune/R in range(5,owner))
R.conceal()
for(var/obj/structure/destructible/cult/S in range(5,owner))
S.conceal()
for(var/turf/open/floor/engine/cult/T in range(5,owner))
T.realappearance.alpha = 0
for(var/obj/machinery/door/airlock/cult/AL in range(5, owner))
AL.conceal()
revealing = TRUE
name = "Reveal Runes"
button_icon_state = "back"
else
owner.visible_message("<span class='warning'>A flash of light shines from [owner]'s hand!</span>", \
"<span class='cultitalic'>You invoke the counterspell, revealing nearby runes.</span>")
charges--
owner.whisper(invocation, language = /datum/language/common)
SEND_SOUND(owner, sound('sound/magic/enter_blood.ogg',0,1,25))
for(var/obj/effect/rune/R in range(7,owner)) //More range in case you weren't standing in exactly the same spot
R.reveal()
for(var/obj/structure/destructible/cult/S in range(6,owner))
S.reveal()
for(var/turf/open/floor/engine/cult/T in range(6,owner))
T.realappearance.alpha = initial(T.realappearance.alpha)
for(var/obj/machinery/door/airlock/cult/AL in range(6, owner))
AL.reveal()
revealing = FALSE
name = "Conceal Runes"
button_icon_state = "gone"
if(charges<= 0)
qdel(src)
desc = base_desc
desc += "<br><b><u>Has [charges] use\s remaining</u></b>."
UpdateButtonIcon()
/datum/action/innate/cult/blood_spell/manipulation
name = "Blood Rites"
desc = "A complex spell that allows you to gather blood and use it for healing or other powerful spells."
invocation = "Fel'th Dol Ab'orod!"
button_icon_state = "manip"
charges = 5
magic_path = "/obj/item/melee/blood_magic/manipulator"
// The "magic hand" items
/obj/item/melee/blood_magic
name = "\improper magical aura"
desc = "Sinister looking aura that distorts the flow of reality around it."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "disintegrate"
item_state = null
flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1
w_class = WEIGHT_CLASS_HUGE
throwforce = 0
throw_range = 0
throw_speed = 0
var/invocation
var/uses = 1
var/health_cost = 0 //The amount of health taken from the user when invoking the spell
var/datum/action/innate/cult/blood_spell/source
/obj/item/melee/blood_magic/New(loc, spell)
source = spell
uses = source.charges
health_cost = source.health_cost
..()
/obj/item/melee/blood_magic/Destroy()
if(!QDELETED(source))
if(uses <= 0)
source.hand_magic = null
qdel(source)
source = null
else
source.hand_magic = null
source.charges = uses
source.desc = source.base_desc
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
source.UpdateButtonIcon()
..()
/obj/item/melee/blood_magic/attack_self(mob/living/user)
afterattack(user, user, TRUE)
/obj/item/melee/blood_magic/attack(mob/living/M, mob/living/carbon/user)
if(!iscarbon(user) || !iscultist(user))
uses = 0
qdel(src)
return
add_logs(user, M, "used a cult spell on", source.name, "")
M.lastattacker = user.real_name
M.lastattackerckey = user.ckey
/obj/item/melee/blood_magic/afterattack(atom/target, mob/living/carbon/user, proximity)
if(invocation)
user.whisper(invocation, language = /datum/language/common)
if(health_cost)
if(user.active_hand_index == 1)
user.apply_damage(health_cost, BRUTE, "l_arm")
else
user.apply_damage(health_cost, BRUTE, "r_arm")
if(uses <= 0)
qdel(src)
else if(source)
source.desc = source.base_desc
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
source.UpdateButtonIcon()
//Stun
/obj/item/melee/blood_magic/stun
name = "Stunning Aura "
color = "#ff0000" // red
invocation = "Fuu ma'jin!"
/obj/item/melee/blood_magic/stun/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!isliving(target) || !proximity)
return
var/mob/living/L = target
if(iscultist(target))
return
if(iscultist(user))
user.visible_message("<span class='warning'>[user] holds up their hand, which explodes in a flash of red light!</span>", \
"<span class='cultitalic'>You stun [L] with the spell!</span>")
var/obj/item/nullrod/N = locate() in L
if(N)
target.visible_message("<span class='warning'>[L]'s holy weapon absorbs the light!</span>", \
"<span class='userdanger'>Your holy weapon absorbs the blinding light!</span>")
else
L.Knockdown(180)
L.flash_act(1,1)
if(issilicon(target))
var/mob/living/silicon/S = L
S.emp_act(EMP_HEAVY)
else if(iscarbon(target))
var/mob/living/carbon/C = L
C.silent += 6
C.stuttering += 15
C.cultslurring += 15
C.Jitter(15)
if(is_servant_of_ratvar(L))
L.adjustBruteLoss(15)
uses--
..()
//Teleportation
/obj/item/melee/blood_magic/teleport
name = "Shifting Aura"
color = RUNE_COLOR_TELEPORT
desc = "A potent spell that teleport cultists on contact."
invocation = "Sas'so c'arta forbici!"
/obj/item/melee/blood_magic/teleport/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!iscultist(target) || !proximity)
to_chat(user, "<span class='warning'>You can only teleport adjacent cultists with this spell!</span>")
return
if(iscultist(user))
var/list/potential_runes = list()
var/list/teleportnames = list()
for(var/R in GLOB.teleport_runes)
var/obj/effect/rune/teleport/T = R
potential_runes[avoid_assoc_duplicate_keys(T.listkey, teleportnames)] = T
if(!potential_runes.len)
to_chat(user, "<span class='warning'>There are no valid runes to teleport to!</span>")
log_game("Teleport talisman failed - no other teleport runes")
return
var/turf/T = get_turf(src)
if(is_away_level(T.z))
to_chat(user, "<span class='cultitalic'>You are not in the right dimension!</span>")
log_game("Teleport spell failed - user in away mission")
return
var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune || !proximity)
return
var/turf/dest = get_turf(actual_selected_rune)
if(is_blocked_turf(dest, TRUE))
to_chat(user, "<span class='warning'>The target rune is blocked. Attempting to teleport to it would be massively unwise.</span>")
return
uses--
user.visible_message("<span class='warning'>Dust flows from [user]'s hand, and [user.p_they()] disappear[user.p_s()] with a sharp crack!</span>", \
"<span class='cultitalic'>You speak the words of the talisman and find yourself somewhere else!</span>", "<i>You hear a sharp crack.</i>")
var/mob/living/L = target
L.forceMove(dest)
dest.visible_message("<span class='warning'>There is a boom of outrushing air as something appears above the rune!</span>", null, "<i>You hear a boom.</i>")
..()
//Shackles
/obj/item/melee/blood_magic/shackles
name = "Binding Aura"
desc = "Allows you to bind a victim and temporarily silence them."
invocation = "In'totum Lig'abis!"
color = "#000000" // black
/obj/item/melee/blood_magic/shackles/afterattack(atom/target, mob/living/carbon/user, proximity)
if(iscultist(user) && iscarbon(target) && proximity)
var/mob/living/carbon/C = target
if(C.get_num_arms() >= 2 || C.get_arm_ignore())
CuffAttack(C, user)
else
user.visible_message("<span class='cultitalic'>This victim doesn't have enough arms to complete the restraint!</span>")
return
..()
/obj/item/melee/blood_magic/shackles/proc/CuffAttack(mob/living/carbon/C, mob/living/user)
if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
C.visible_message("<span class='danger'>[user] begins restraining [C] with dark magic!</span>", \
"<span class='userdanger'>[user] begins shaping a dark magic around your wrists!</span>")
if(do_mob(user, C, 30))
if(!C.handcuffed)
C.handcuffed = new /obj/item/restraints/handcuffs/energy/cult/used(C)
C.update_handcuffed()
C.silent += 5
to_chat(user, "<span class='notice'>You shackle [C].</span>")
add_logs(user, C, "shackled")
uses--
else
to_chat(user, "<span class='warning'>[C] is already bound.</span>")
else
to_chat(user, "<span class='warning'>You fail to shackle [C].</span>")
else
to_chat(user, "<span class='warning'>[C] is already bound.</span>")
/obj/item/restraints/handcuffs/energy/cult //For the shackling spell
name = "shadow shackles"
desc = "Shackles that bind the wrists with sinister magic."
trashtype = /obj/item/restraints/handcuffs/energy/used
flags_1 = DROPDEL_1
/obj/item/restraints/handcuffs/energy/cult/used/dropped(mob/user)
user.visible_message("<span class='danger'>[user]'s shackles shatter in a discharge of dark magic!</span>", \
"<span class='userdanger'>Your [src] shatters in a discharge of dark magic!</span>")
. = ..()
//Construction: Creates a construct shell out of 25 metal sheets, or converts plasteel into runed metal
/obj/item/melee/blood_magic/construction
name = "Corrupting Aura"
desc = "Corrupts metal and plasteel into more sinister forms."
invocation = "Ethra p'ni dedol!"
color = "#000000" // black
/obj/item/melee/blood_magic/construction/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
if(proximity_flag && iscultist(user))
var/turf/T = get_turf(target)
if(istype(target, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/candidate = target
if(candidate.use(50))
uses--
to_chat(user, "<span class='warning'>A dark cloud eminates from your hand and swirls around the metal, twisting it into a construct shell!</span>")
new /obj/structure/constructshell(T)
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
else
to_chat(user, "<span class='warning'>You need 50 metal to produce a construct shell!</span>")
else if(istype(target, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/plasteel/candidate = target
var/quantity = min(candidate.amount, uses)
uses -= quantity
new /obj/item/stack/sheet/runed_metal(T,quantity)
candidate.use(quantity)
to_chat(user, "<span class='warning'>A dark cloud eminates from you hand and swirls around the plasteel, transforming it into runed metal!</span>")
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
else if(istype(target,/mob/living/silicon/robot))
var/mob/living/silicon/robot/candidate = target
if(candidate.mmi)
user.visible_message("<span class='danger'>A dark cloud eminates from [user]'s hand and swirls around [candidate]!</span>")
playsound(T, 'sound/machines/airlock_alien_prying.ogg', 80, 1)
var/prev_color = candidate.color
candidate.color = "black"
if(do_after(user, 90, target = candidate))
candidate.emp_act(EMP_HEAVY)
var/construct_class = alert(user, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
user.visible_message("<span class='danger'>The dark cloud receedes from what was formerly [candidate], revealing a\n [construct_class]!</span>")
switch(construct_class)
if("Juggernaut")
makeNewConstruct(/mob/living/simple_animal/hostile/construct/armored, candidate, user, 0, T)
if("Wraith")
makeNewConstruct(/mob/living/simple_animal/hostile/construct/wraith, candidate, user, 0, T)
if("Artificer")
makeNewConstruct(/mob/living/simple_animal/hostile/construct/builder, candidate, user, 0, T)
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
uses--
candidate.mmi = null
qdel(candidate)
else
candidate.color = prev_color
else
uses--
to_chat(user, "<span class='warning'>A dark cloud eminates from you hand and swirls around [candidate] - twisting it into a construct shell!</span>")
new /obj/structure/constructshell(T)
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
else if(istype(target,/obj/machinery/door/airlock))
target.narsie_act()
uses--
user.visible_message("<span class='warning'>Black ribbons suddenly eminate from [user]'s hand and cling to the airlock - twisting and corrupting it!</span>")
SEND_SOUND(user, sound('sound/effects/magic.ogg',0,1,25))
else
to_chat(user, "<span class='warning'>The spell will not work on [target]!</span>")
..()
//Armor: Gives the target a basic cultist combat loadout
/obj/item/melee/blood_magic/armor
name = "Bladed Aura"
desc = "A spell that will equip the target with cultist equipment if there is a slot to equip it to."
color = "#33cc33" // green
/obj/item/melee/blood_magic/armor/afterattack(atom/target, mob/living/carbon/user, proximity)
if(iscarbon(target) && proximity)
uses--
var/mob/living/carbon/C = target
C.visible_message("<span class='warning'>Otherworldly armor suddenly appears on [C]!</span>")
C.equip_to_slot_or_del(new /obj/item/clothing/under/color/black,slot_w_uniform)
C.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(user), slot_head)
C.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit)
C.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult/alt(user), slot_shoes)
C.equip_to_slot_or_del(new /obj/item/storage/backpack/cultpack(user), slot_back)
if(C == user)
qdel(src) //Clears the hands
C.put_in_hands(new /obj/item/melee/cultblade(user))
C.put_in_hands(new /obj/item/restraints/legcuffs/bola/cult(user))
..()
/obj/item/melee/blood_magic/manipulator
name = "Ritual Aura"
desc = "A spell that will absorb blood from anything you touch.<br>Touching cultists and constructs can heal them.<br><b>Clicking the hand will potentially let you focus the spell into something stronger.</b>"
color = "#7D1717"
/obj/item/melee/blood_magic/manipulator/afterattack(atom/target, mob/living/carbon/human/user, proximity)
if(proximity)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(NOBLOOD in H.dna.species.species_traits)
to_chat(user,"<span class='warning'>Blood rites do not work on species with no blood!</span>")
return
if(iscultist(H))
if(H.stat == DEAD)
to_chat(user,"<span class='warning'>Only a revive rune can bring back the dead!</span>")
return
if(H.blood_volume < BLOOD_VOLUME_SAFE)
var/restore_blood = BLOOD_VOLUME_SAFE - H.blood_volume
if(uses*2 < restore_blood)
H.blood_volume += uses*2
to_chat(user,"<span class='danger'>You use the last of your blood rites to restore what blood you could!</span>")
uses = 0
return ..()
else
H.blood_volume = BLOOD_VOLUME_SAFE
uses -= round(restore_blood/2)
to_chat(user,"<span class='warning'>Your blood rites have restored [H == user ? "your" : "their"] blood to safe levels!</span>")
var/overall_damage = H.getBruteLoss() + H.getFireLoss() + H.getToxLoss() + H.getOxyLoss()
if(overall_damage == 0)
to_chat(user,"<span class='cult'>That cultist doesn't require healing!</span>")
else
var/ratio = uses/overall_damage
if(H == user)
to_chat(user,"<span class='cult'><b>Your blood healing is far less efficient when used on yourself!</b></span>")
ratio *= 0.35 // Healing is half as effective if you can't perform a full heal
uses -= round(overall_damage) // Healing is 65% more "expensive" even if you can still perform the full heal
if(ratio>1)
ratio = 1
uses -= round(overall_damage)
H.visible_message("<span class='warning'>[H] is fully healed by [H==user ? "their":"[H]'s"]'s blood magic!</span>")
else
H.visible_message("<span class='warning'>[H] is partially healed by [H==user ? "their":"[H]'s"] blood magic.</span>")
uses = 0
ratio *= -1
H.adjustOxyLoss((overall_damage*ratio) * (H.getOxyLoss() / overall_damage), 0)
H.adjustToxLoss((overall_damage*ratio) * (H.getToxLoss() / overall_damage), 0)
H.adjustFireLoss((overall_damage*ratio) * (H.getFireLoss() / overall_damage), 0)
H.adjustBruteLoss((overall_damage*ratio) * (H.getBruteLoss() / overall_damage), 0)
H.updatehealth()
playsound(get_turf(H), 'sound/magic/staff_healing.ogg', 25)
new /obj/effect/temp_visual/cult/sparks(get_turf(H))
user.Beam(H,icon_state="sendbeam",time=15)
else
if(H.stat == DEAD)
to_chat(user,"<span class='warning'>Their blood has stopped flowing, you'll have to find another way to extract it.</span>")
return
if(H.cultslurring)
to_chat(user,"<span class='danger'>Their blood has been tainted by an even stronger form of blood magic, it's no use to us like this!</span>")
return
if(H.blood_volume > BLOOD_VOLUME_SAFE)
H.blood_volume -= 100
uses += 50
user.Beam(H,icon_state="drainbeam",time=10)
playsound(get_turf(H), 'sound/magic/enter_blood.ogg', 50)
H.visible_message("<span class='danger'>[user] has drained some of [H]'s blood!</span>")
to_chat(user,"<span class='cultitalic'>Your blood rite gains 50 charges from draining [H]'s blood.</span>")
new /obj/effect/temp_visual/cult/sparks(get_turf(H))
else
to_chat(user,"<span class='danger'>They're missing too much blood - you cannot drain them further!</span>")
return
if(isconstruct(target))
var/mob/living/simple_animal/M = target
var/missing = M.maxHealth - M.health
if(missing)
if(uses > missing)
M.adjustHealth(-missing)
M.visible_message("<span class='warning'>[M] is fully healed by [user]'s blood magic!</span>")
uses -= missing
else
M.adjustHealth(-uses)
M.visible_message("<span class='warning'>[M] is partially healed by [user]'s blood magic!</span>")
uses = 0
playsound(get_turf(M), 'sound/magic/staff_healing.ogg', 25)
user.Beam(M,icon_state="sendbeam",time=10)
if(istype(target, /obj/effect/decal/cleanable/blood))
blood_draw(target, user)
..()
/obj/item/melee/blood_magic/manipulator/proc/blood_draw(atom/target, mob/living/carbon/human/user)
var/temp = 0
var/turf/T = get_turf(target)
if(T)
for(var/obj/effect/decal/cleanable/blood/B in view(T, 2))
if(B.blood_state == "blood")
if(B.bloodiness == 100) //Bonus for "pristine" bloodpools, also to prevent cheese with footprint spam
temp += 30
else
temp += max((B.bloodiness**2)/800,1)
new /obj/effect/temp_visual/cult/turf/floor(get_turf(B))
qdel(B)
for(var/obj/effect/decal/cleanable/trail_holder/TH in view(T, 2))
qdel(TH)
var/obj/item/clothing/shoes/shoecheck = user.shoes
if(shoecheck && shoecheck.bloody_shoes["blood"])
temp += shoecheck.bloody_shoes["blood"]/20
shoecheck.bloody_shoes["blood"] = 0
if(temp)
user.Beam(T,icon_state="drainbeam",time=15)
new /obj/effect/temp_visual/cult/sparks(get_turf(user))
playsound(T, 'sound/magic/enter_blood.ogg', 50)
to_chat(user, "<span class='cultitalic'>Your blood rite has gained [round(temp)] charge\s from blood sources around you!</span>")
uses += max(1, round(temp))
/obj/item/melee/blood_magic/manipulator/attack_self(mob/living/user)
if(iscultist(user))
var/list/options = list("Blood Spear (200)", "Blood Bolt Barrage (400)", "Blood Beam (600)")
var/choice = input(user, "Choose a greater blood rite...", "Greater Blood Rites") as null|anything in options
if(!choice)
to_chat(user, "<span class='cultitalic'>You decide against conducting a greater blood rite.</span>")
return
switch(choice)
if("Blood Spear (200)")
if(uses < 200)
to_chat(user, "<span class='cultitalic'>You need 200 charges to perform this rite.</span>")
else
uses -= 200
var/turf/T = get_turf(user)
qdel(src)
var/datum/action/innate/cult/spear/S = new(user)
var/obj/item/twohanded/cult_spear/rite = new(T)
S.Grant(user, rite)
rite.spear_act = S
if(user.put_in_hands(rite))
to_chat(user, "<span class='cultitalic'>A [rite.name] appears in your hand!</span>")
else
user.visible_message("<span class='warning'>A [rite.name] appears at [user]'s feet!</span>", \
"<span class='cultitalic'>A [rite.name] materializes at your feet.</span>")
if("Blood Bolt Barrage (400)")
if(uses < 400)
to_chat(user, "<span class='cultitalic'>You need 400 charges to perform this rite.</span>")
else
var/obj/rite = new /obj/item/gun/ballistic/shotgun/boltaction/enchanted/arcane_barrage/blood()
uses -= 400
qdel(src)
if(user.put_in_hands(rite))
to_chat(user, "<span class='cult'><b>Your hands glow with power!</b></span>")
else
to_chat(user, "<span class='cultitalic'>You need a free hand for this rite!</span>")
qdel(rite)
if("Blood Beam (600)")
if(uses < 600)
to_chat(user, "<span class='cultitalic'>You need 600 charges to perform this rite.</span>")
else
var/obj/rite = new /obj/item/blood_beam()
uses -= 600
qdel(src)
if(user.put_in_hands(rite))
to_chat(user, "<span class='cultlarge'><b>Your hands glow with POWER OVERWHELMING!!!</b></span>")
else
to_chat(user, "<span class='cultitalic'>You need a free hand for this rite!</span>")
qdel(rite)
@@ -123,9 +123,11 @@
if(cooldowntime > world.time)
to_chat(user, "<span class='cult italic'>The magic in [src] is weak, it will be ready to use again in [DisplayTimeText(cooldowntime - world.time)].</span>")
return
var/choice = alert(user,"You study the schematics etched into the forge...",,"Shielded Robe","Flagellant's Robe","Mirror Shield")
var/choice
if(user.mind.has_antag_datum(/datum/antagonist/cult/master))
choice = alert(user,"You study the schematics etched into the forge...",,"Shielded Robe","Flagellant's Robe","Bastard Sword")
else
choice = alert(user,"You study the schematics etched into the forge...",,"Shielded Robe","Flagellant's Robe","Mirror Shield")
var/list/pickedtype = list()
switch(choice)
if("Shielded Robe")
+4 -5
View File
@@ -125,16 +125,15 @@ structure_check() searches for nearby cultist structures required for the invoca
if(L.stat)
continue
invokers += L
if(invokers.len >= req_cultists)
invokers -= user
if(allow_excess_invokers)
chanters += invokers
else
shuffle_inplace(invokers)
for(var/i in 1 to req_cultists)
var/L = pick_n_take(invokers)
if(L)
chanters += L
var/C = pick_n_take(invokers)
if(!C)
break
chanters += C
return chanters
/obj/effect/rune/proc/invoke(var/list/invokers)
+2 -2
View File
@@ -135,8 +135,8 @@
adj = "objectiveless"
else
return
new_owner.assigned_role = "Space Ninja"
new_owner.special_role = "Space Ninja"
new_owner.assigned_role = ROLE_NINJA
new_owner.special_role = ROLE_NINJA
new_owner.add_antag_datum(src)
message_admins("[key_name_admin(admin)] has [adj] ninja'ed [new_owner.current].")
log_admin("[key_name(admin)] has [adj] ninja'ed [new_owner.current].")
@@ -115,9 +115,8 @@
switch(deconstruction_state)
if(NUKESTATE_INTACT)
if(istype(I, /obj/item/screwdriver/nuke))
playsound(loc, I.usesound, 100, 1)
to_chat(user, "<span class='notice'>You start removing [src]'s front panel's screws...</span>")
if(do_after(user, 60*I.toolspeed,target=src))
if(I.use_tool(src, user, 60, volume=100))
deconstruction_state = NUKESTATE_UNSCREWED
to_chat(user, "<span class='notice'>You remove the screws from [src]'s front panel.</span>")
update_icon()
@@ -125,14 +124,13 @@
if(NUKESTATE_PANEL_REMOVED)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/welder = I
playsound(loc, I.usesound, 100, 1)
if(!I.tool_start_check(user, amount=1))
return
to_chat(user, "<span class='notice'>You start cutting [src]'s inner plate...</span>")
if(welder.remove_fuel(1,user))
if(do_after(user,80*I.toolspeed,target=src))
to_chat(user, "<span class='notice'>You cut [src]'s inner plate.</span>")
deconstruction_state = NUKESTATE_WELDED
update_icon()
if(I.use_tool(src, user, 80, volume=100, amount=1))
to_chat(user, "<span class='notice'>You cut [src]'s inner plate.</span>")
deconstruction_state = NUKESTATE_WELDED
update_icon()
return
if(NUKESTATE_CORE_EXPOSED)
if(istype(I, /obj/item/nuke_core_container))
@@ -148,19 +146,15 @@
to_chat(user, "<span class='warning'>You fail to load the plutonium core into [core_box]. [core_box] has already been used!</span>")
return
if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.amount >= 20)
to_chat(user, "<span class='notice'>You begin repairing [src]'s inner metal plate...</span>")
if(do_after(user, 100, target=src))
if(M.use(20))
to_chat(user, "<span class='notice'>You repair [src]'s inner metal plate. The radiation is contained.</span>")
deconstruction_state = NUKESTATE_PANEL_REMOVED
STOP_PROCESSING(SSobj, core)
update_icon()
else
to_chat(user, "<span class='warning'>You need more metal to do that!</span>")
else
to_chat(user, "<span class='warning'>You need more metal to do that!</span>")
if(!I.tool_start_check(user, amount=20))
return
to_chat(user, "<span class='notice'>You begin repairing [src]'s inner metal plate...</span>")
if(I.use_tool(src, user, 100, amount=20))
to_chat(user, "<span class='notice'>You repair [src]'s inner metal plate. The radiation is contained.</span>")
deconstruction_state = NUKESTATE_PANEL_REMOVED
STOP_PROCESSING(SSobj, core)
update_icon()
return
. = ..()
@@ -169,16 +163,14 @@
switch(deconstruction_state)
if(NUKESTATE_UNSCREWED)
to_chat(user, "<span class='notice'>You start removing [src]'s front panel...</span>")
playsound(loc, tool.usesound, 100, 1)
if(do_after(user, 30 * tool.toolspeed, target = src))
if(tool.use_tool(src, user, 30, volume=100))
to_chat(user, "<span class='notice'>You remove [src]'s front panel.</span>")
deconstruction_state = NUKESTATE_PANEL_REMOVED
update_icon()
return TRUE
if(NUKESTATE_WELDED)
to_chat(user, "<span class='notice'>You start prying off [src]'s inner plate...</span>")
playsound(loc, tool.usesound, 100, 1)
if(do_after(user, 50 * tool.toolspeed, target = src))
if(tool.use_tool(src, user, 30, volume=100))
to_chat(user, "<span class='notice'>You pry off [src]'s inner plate. You can see the core's green glow!</span>")
deconstruction_state = NUKESTATE_CORE_EXPOSED
update_icon()
+1 -1
View File
@@ -112,7 +112,7 @@
nuke_team = new_team
/datum/antagonist/nukeop/admin_add(datum/mind/new_owner,mob/admin)
new_owner.assigned_role = "Syndicate"
new_owner.assigned_role = ROLE_SYNDICATE
new_owner.add_antag_datum(src)
message_admins("[key_name_admin(admin)] has nuke op'ed [new_owner.current].")
log_admin("[key_name(admin)] has nuke op'ed [new_owner.current].")
@@ -224,7 +224,6 @@
invisibility = INVISIBILITY_ABSTRACT
revealed = FALSE
ghostize(0)//Don't re-enter invisible corpse
SSshuttle.shuttle_purchase_requirements_met |= "revenant"
//reveal, stun, icon updates, cast checks, and essence changing
@@ -184,7 +184,7 @@
carbon_mob.flash_act(1, 1)
rev_mind.current.Stun(100)
rev_mind.add_antag_datum(/datum/antagonist/rev,rev_team)
rev_mind.special_role = "Revolutionary"
rev_mind.special_role = ROLE_REV
return TRUE
/datum/antagonist/rev/head/proc/demote()
@@ -6,7 +6,7 @@
var/should_specialise = TRUE //do we split into AI and human, set to true on inital assignment only
var/ai_datum = /datum/antagonist/traitor/AI
var/human_datum = /datum/antagonist/traitor/human
var/special_role = "traitor"
var/special_role = ROLE_TRAITOR
var/employer = "The Syndicate"
var/give_objectives = TRUE
var/should_give_codewords = TRUE
@@ -85,7 +85,9 @@
return
/datum/antagonist/traitor/human/forge_traitor_objectives()
var/is_hijacker = prob(10)
var/is_hijacker = FALSE
if (GLOB.joined_player_list.len >= 30) // Less murderboning on lowpop thanks
is_hijacker = prob(10)
var/martyr_chance = prob(20)
var/objective_count = is_hijacker //Hijacking counts towards number of objectives
if(!SSticker.mode.exchange_blue && SSticker.mode.traitors.len >= 8) //Set up an exchange if there are enough traitors
@@ -1,3 +1,4 @@
//Apprenticeship contract - moved to antag_spawner.dm
///////////////////////////Veil Render//////////////////////
+2 -2
View File
@@ -156,12 +156,12 @@
/datum/antagonist/wizard/apply_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
update_wiz_icons_added(M, wiz_team ? TRUE : FALSE) //Don't bother showing the icon if you're solo wizard
M.faction |= "wizard"
M.faction |= ROLE_WIZARD
/datum/antagonist/wizard/remove_innate_effects(mob/living/mob_override)
var/mob/living/M = mob_override || owner.current
update_wiz_icons_removed(M)
M.faction -= "wizard"
M.faction -= ROLE_WIZARD
/datum/antagonist/wizard/get_admin_commands()
@@ -653,14 +653,14 @@
switch(buildstage)
if(2)
if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut())
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You cut the final wires.</span>")
new /obj/item/stack/cable_coil(loc, 5)
buildstage = 1
update_icon()
return
else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up.
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
panel_open = !panel_open
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
update_icon()
@@ -674,8 +674,8 @@
if(istype(W, /obj/item/crowbar))
user.visible_message("[user.name] removes the electronics from [src.name].",\
"<span class='notice'>You start prying out the circuit...</span>")
playsound(src.loc, W.usesound, 50, 1)
if (do_after(user, 20*W.toolspeed, target = src))
W.play_tool_sound(src)
if (W.use_tool(src, user, 20))
if (buildstage == 1)
to_chat(user, "<span class='notice'>You remove the air alarm electronics.</span>")
new /obj/item/electronics/airalarm( src.loc )
@@ -725,7 +725,7 @@
if(istype(W, /obj/item/wrench))
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
new /obj/item/wallframe/airalarm( user.loc )
qdel(src)
return
@@ -183,39 +183,44 @@ Pipelines + Other Objects -> Pipe network
if(user.dropItemToGround(pipe))
pipe.setPipingLayer(piping_layer) //align it with us
return TRUE
if(istype(W, /obj/item/wrench))
if(can_unwrench(user))
var/turf/T = get_turf(src)
if (level==1 && isturf(T) && T.intact)
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
return TRUE
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
add_fingerprint(user)
var/unsafe_wrenching = FALSE
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (internal_pressure > 2*ONE_ATMOSPHERE)
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
unsafe_wrenching = TRUE //Oh dear oh dear
if (do_after(user, 20*W.toolspeed, target = src) && !QDELETED(src))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You unfasten \the [src].</span>", \
"<span class='italics'>You hear ratchet.</span>")
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", INVESTIGATE_ATMOS)
//You unwrenched a pipe full of pressure? Let's splat you into the wall, silly.
if(unsafe_wrenching)
unsafe_pressure_release(user, internal_pressure)
deconstruct(TRUE)
else
return ..()
/obj/machinery/atmospherics/wrench_act(mob/living/user, obj/item/I)
if(!can_unwrench(user))
return TRUE
var/turf/T = get_turf(src)
if (level==1 && isturf(T) && T.intact)
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
return TRUE
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
add_fingerprint(user)
var/unsafe_wrenching = FALSE
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (internal_pressure > 2*ONE_ATMOSPHERE)
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
unsafe_wrenching = TRUE //Oh dear oh dear
if(I.use_tool(src, user, 20, volume=50))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You unfasten \the [src].</span>", \
"<span class='italics'>You hear ratchet.</span>")
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", INVESTIGATE_ATMOS)
//You unwrenched a pipe full of pressure? Let's splat you into the wall, silly.
if(unsafe_wrenching)
unsafe_pressure_release(user, internal_pressure)
deconstruct(TRUE)
return TRUE
/obj/machinery/atmospherics/proc/can_unwrench(mob/user)
return can_unwrench
@@ -345,8 +350,6 @@ Pipelines + Other Objects -> Pipe network
return list()
/obj/machinery/atmospherics/update_remote_sight(mob/user)
// if(isborer(user))
// user.sight |= (SEE_PIXELS)
user.sight |= (SEE_TURFS|BLIND)
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
@@ -269,28 +269,21 @@
broadcast_status()
update_icon()
/obj/machinery/atmospherics/components/unary/vent_pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if (WT.remove_fuel(0, user))
playsound(loc, WT.usesound, 40, 1)
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
if(do_after(user, W.toolspeed * 20, target = src))
if(!src || !WT.isOn())
return
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "<span class='notice'>You weld the vent shut.</span>", "<span class='italics'>You hear welding.</span>")
welded = TRUE
else
user.visible_message("[user] unwelds the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
welded = FALSE
update_icon()
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
pipe_vision_img.plane = ABOVE_HUD_PLANE
return 0
else
return ..()
/obj/machinery/atmospherics/components/unary/vent_pump/welder_act(mob/living/user, obj/item/I)
if(!I.tool_start_check(user, amount=0))
return TRUE
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
if(I.use_tool(src, user, 20, volume=50))
if(!welded)
user.visible_message("[user] welds the vent shut.", "<span class='notice'>You weld the vent shut.</span>", "<span class='italics'>You hear welding.</span>")
welded = TRUE
else
user.visible_message("[user] unwelds the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
welded = FALSE
update_icon()
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
pipe_vision_img.plane = ABOVE_HUD_PLANE
return TRUE
/obj/machinery/atmospherics/components/unary/vent_pump/can_unwrench(mob/user)
. = ..()
@@ -263,28 +263,21 @@
..()
update_icon_nopipes()
/obj/machinery/atmospherics/components/unary/vent_scrubber/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 40, 1)
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
if(do_after(user, 20*W.toolspeed, target = src))
if(!src || !WT.isOn())
return
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the scrubber shut.","You weld the scrubber shut.", "You hear welding.")
welded = TRUE
else
user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
welded = FALSE
update_icon()
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
pipe_vision_img.plane = ABOVE_HUD_PLANE
return 0
else
return ..()
/obj/machinery/atmospherics/components/unary/vent_scrubber/welder_act(mob/living/user, obj/item/I)
if(!I.tool_start_check(user, amount=0))
return TRUE
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
if(I.use_tool(src, user, 20, volume=50))
if(!welded)
user.visible_message("[user] welds the scrubber shut.","You weld the scrubber shut.", "You hear welding.")
welded = TRUE
else
user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
welded = FALSE
update_icon()
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
pipe_vision_img.plane = ABOVE_HUD_PLANE
return TRUE
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user)
. = ..()
@@ -100,19 +100,20 @@
to_chat(user, status())
/obj/machinery/meter/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/wrench))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (do_after(user, 40*W.toolspeed, target = src))
user.visible_message( \
"[user] unfastens \the [src].", \
"<span class='notice'>You unfasten \the [src].</span>", \
"<span class='italics'>You hear ratchet.</span>")
new /obj/item/pipe_meter(loc)
qdel(src)
else
return ..()
/obj/machinery/meter/wrench_act(mob/user, obj/item/I)
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
if (I.use_tool(src, user, 40, volume=50))
user.visible_message(
"[user] unfastens \the [src].",
"<span class='notice'>You unfasten \the [src].</span>",
"<span class='italics'>You hear ratchet.</span>")
deconstruct()
return TRUE
/obj/machinery/meter/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/pipe_meter(loc)
qdel(src)
/obj/machinery/meter/attack_ai(mob/user)
return attack_hand(user)
@@ -131,8 +132,7 @@
/obj/machinery/meter/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_FIVE)
new /obj/item/pipe_meter(loc)
qdel(src)
deconstruct()
// TURF METER - REPORTS A TILE'S AIR CONTENTS
// why are you yelling?
@@ -278,21 +278,20 @@
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
/obj/machinery/portable_atmospherics/canister/attackby(obj/item/W, mob/user, params)
if(user.a_intent != INTENT_HARM && istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(stat & BROKEN)
if(!WT.remove_fuel(0, user))
return
playsound(loc, WT.usesound, 40, 1)
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
if(do_after(user, 30, target = src))
deconstruct(TRUE)
else
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
return 1
/obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/item/I)
if(user.a_intent == INTENT_HARM)
return FALSE
if(stat & BROKEN)
if(!I.tool_start_check(user, amount=0))
return TRUE
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
if(I.use_tool(src, user, 30, volume=50))
deconstruct(TRUE)
else
return ..()
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
return TRUE
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
@@ -92,7 +92,7 @@
if(!(stat & BROKEN))
if(connected_port)
disconnect()
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
user.visible_message( \
"[user] disconnects [src].", \
"<span class='notice'>You unfasten [src] from the port.</span>", \
@@ -107,7 +107,7 @@
if(!connect(possible_port))
to_chat(user, "<span class='notice'>[name] failed to connect to the port.</span>")
return
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
user.visible_message( \
"[user] connects [src].", \
"<span class='notice'>You fasten [src] to the port.</span>", \
+4 -4
View File
@@ -49,12 +49,12 @@
/obj/item/clothing/gloves/color/black/ce
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
/obj/item/clothing/gloves/color/black/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/wirecutters))
/obj/item/clothing/gloves/color/black/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wirecutters))
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
playsound(user.loc, W.usesound, rand(10,50), 1)
new /obj/item/clothing/gloves/fingerless(user.loc)
I.play_tool_sound(src)
new /obj/item/clothing/gloves/fingerless(drop_location())
qdel(src)
..()
+18 -8
View File
@@ -105,22 +105,33 @@
/datum/personal_crafting/proc/check_tools(mob/user, datum/crafting_recipe/R, list/contents)
if(!R.tools.len)
return 1
return TRUE
var/list/possible_tools = list()
var/list/present_qualities = list()
for(var/obj/item/I in user.contents)
if(istype(I, /obj/item/storage))
for(var/obj/item/SI in I.contents)
possible_tools += SI.type
if(SI.tool_behaviour)
present_qualities.Add(SI.tool_behaviour)
possible_tools += I.type
if(I.tool_behaviour)
present_qualities.Add(I.tool_behaviour)
possible_tools += contents
main_loop:
for(var/A in R.tools)
for(var/I in possible_tools)
if(ispath(I,A))
continue main_loop
return 0
return 1
if(A in present_qualities)
continue
else
for(var/I in possible_tools)
if(ispath(I, A))
continue main_loop
return FALSE
return TRUE
/datum/personal_crafting/proc/construct_item(mob/user, datum/crafting_recipe/R)
var/list/contents = get_surroundings(user)
@@ -401,8 +412,7 @@
data["catalyst_text"] = catalyst_text
for(var/a in R.tools)
var/atom/A = a //cheat-typecast
tool_text += " [R.tools[A]] [initial(A.name)],"
tool_text += " [a],"
tool_text = replacetext(tool_text,",","",-1)
data["tool_text"] = tool_text
+15 -16
View File
@@ -16,7 +16,7 @@
result = /obj/item/gun
reqs = list(/obj/item/gun = 1)
parts = list(/obj/item/gun = 1)
tools = list(/obj/item/weldingtool, /obj/item/screwdriver, /obj/item/wirecutters)
tools = list(TOOL_WELDER, TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
time = 50
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -134,7 +134,7 @@
/obj/item/gun/energy/e_gun/advtaser = 1,
/obj/item/stock_parts/cell = 1,
/obj/item/device/assembly/prox_sensor = 1)
tools = list(/obj/item/weldingtool, /obj/item/screwdriver)
tools = list(TOOL_WELDER, TOOL_SCREWDRIVER)
time = 60
category = CAT_ROBOT
@@ -146,7 +146,7 @@
/obj/item/melee/baton = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/bodypart/r_arm/robot = 1)
tools = list(/obj/item/weldingtool)
tools = list(TOOL_WELDER)
time = 60
category = CAT_ROBOT
@@ -192,8 +192,7 @@
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/pneumatic_cannon/ghetto
tools = list(/obj/item/weldingtool,
/obj/item/wrench)
tools = list(TOOL_WELDER, TOOL_WRENCH)
reqs = list(/obj/item/stack/sheet/metal = 4,
/obj/item/stack/packageWrap = 8,
/obj/item/pipe = 2)
@@ -209,7 +208,7 @@
/obj/item/stack/rods = 1)
parts = list(/obj/item/device/assembly/igniter = 1,
/obj/item/weldingtool = 1)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 10
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -220,7 +219,7 @@
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
/obj/item/rcd_ammo = 1,
/obj/item/stock_parts/manipulator = 2)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -231,7 +230,7 @@
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
/obj/item/stock_parts/capacitor/adv = 2,
/obj/item/stock_parts/micro_laser/ultra = 1)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -240,7 +239,7 @@
name = "Dragonsbreath Shell"
result = /obj/item/ammo_casing/shotgun/dragonsbreath
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1, /datum/reagent/phosphorus = 5)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -252,7 +251,7 @@
/datum/reagent/glycerol = 5,
/datum/reagent/toxin/acid = 5,
/datum/reagent/toxin/acid/fluacid = 5)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -263,7 +262,7 @@
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
/obj/item/stock_parts/micro_laser/ultra = 1,
/obj/item/stock_parts/subspace/crystal = 1)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -275,7 +274,7 @@
/obj/item/stack/sheet/metal = 1,
/obj/item/stack/cable_coil = 1,
/datum/reagent/fuel = 10)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -286,7 +285,7 @@
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
/obj/item/stock_parts/capacitor/adv = 1,
/obj/item/stock_parts/micro_laser/high = 1)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -298,7 +297,7 @@
/obj/item/pipe = 1,
/obj/item/weaponcrafting/stock = 1,
/obj/item/stack/packageWrap = 5)
tools = list(/obj/item/screwdriver)
tools = list(TOOL_SCREWDRIVER)
time = 100
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -309,7 +308,7 @@
reqs = list(/obj/item/circular_saw = 1,
/obj/item/stack/cable_coil = 3,
/obj/item/stack/sheet/plasteel = 5)
tools = list(/obj/item/weldingtool)
tools = list(TOOL_WELDER)
time = 50
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -590,7 +589,7 @@
name = "Makeshift Rapid Cable Layer"
result = /obj/item/twohanded/rcl/ghetto
time = 40
tools = list(/obj/item/weldingtool, /obj/item/screwdriver, /obj/item/wrench)
tools = list(TOOL_WELDER, TOOL_SCREWDRIVER, TOOL_WRENCH)
reqs = list(/obj/item/stack/sheet/metal = 15)
category = CAT_MISC
+14 -13
View File
@@ -15,12 +15,21 @@
name = "egg"
desc = "An egg!"
icon_state = "egg"
list_reagents = list("nutriment" = 1)
list_reagents = list("eggyolk" = 5)
cooked_type = /obj/item/reagent_containers/food/snacks/boiledegg
filling_color = "#F0E68C"
tastes = list("egg" = 1)
foodtype = MEAT
grind_results = list("eggyolk" = 5)
grind_results = list()
/obj/item/reagent_containers/food/snacks/egg/gland
desc = "An egg! It looks weird..."
/obj/item/reagent_containers/food/snacks/egg/gland/Initialize()
. = ..()
reagents.add_reagent(get_random_reagent_id(), 15)
var/color = mix_color_from_reagents(reagents.reagent_list)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
/obj/item/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
if(!..()) //was it caught by a mob?
@@ -30,7 +39,7 @@
qdel(src)
/obj/item/reagent_containers/food/snacks/egg/attackby(obj/item/W, mob/user, params)
if(istype( W, /obj/item/toy/crayon ))
if(istype(W, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = W
var/clr = C.item_color
@@ -38,7 +47,7 @@
to_chat(usr, "<span class='notice'>[src] refuses to take on this colour!</span>")
return
to_chat(usr, "<span class='notice'>You colour [src] [clr].</span>")
to_chat(usr, "<span class='notice'>You colour [src] with [W].</span>")
icon_state = "egg-[clr]"
item_color = clr
else
@@ -47,42 +56,34 @@
/obj/item/reagent_containers/food/snacks/egg/blue
icon_state = "egg-blue"
item_color = "blue"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/green
icon_state = "egg-green"
item_color = "green"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/mime
icon_state = "egg-mime"
item_color = "mime"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/orange
icon_state = "egg-orange"
item_color = "orange"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/purple
icon_state = "egg-purple"
item_color = "purple"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/rainbow
icon_state = "egg-rainbow"
item_color = "rainbow"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/red
icon_state = "egg-red"
item_color = "red"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/egg/yellow
icon_state = "egg-yellow"
item_color = "yellow"
tastes = list("egg" = 4, "the back of class" = 1)
/obj/item/reagent_containers/food/snacks/friedegg
name = "fried egg"
@@ -62,7 +62,7 @@
"[user] starts to fix part of the microwave.", \
"<span class='notice'>You start to fix part of the microwave...</span>" \
)
if (do_after(user,20*O.toolspeed, target = src))
if (O.use_tool(src, user, 20))
user.visible_message( \
"[user] fixes part of the microwave.", \
"<span class='notice'>You fix part of the microwave.</span>" \
@@ -73,7 +73,7 @@
"[user] starts to fix part of the microwave.", \
"<span class='notice'>You start to fix part of the microwave...</span>" \
)
if (do_after(user,20*O.toolspeed, target = src))
if (O.use_tool(src, user, 20))
user.visible_message( \
"[user] fixes the microwave.", \
"<span class='notice'>You fix the microwave.</span>" \
+5 -7
View File
@@ -801,8 +801,7 @@
if(!anchored && !isinspace())
user.visible_message("[user] begins to wrench [src] into place.", \
"<span class='notice'>You begin to wrench [src] in place...</span>")
playsound(loc, O.usesound, 50, 1)
if (do_after(user, 20*O.toolspeed, target = src))
if (O.use_tool(src, user, 20, volume=50))
if(anchored)
return
anchored = TRUE
@@ -811,8 +810,7 @@
else if(anchored)
user.visible_message("[user] begins to unwrench [src].", \
"<span class='notice'>You begin to unwrench [src]...</span>")
playsound(loc, O.usesound, 50, 1)
if (do_after(user, 20*O.toolspeed, target = src))
if (O.use_tool(src, user, 20, volume=50))
if(!anchored)
return
anchored = FALSE
@@ -821,7 +819,7 @@
else if(istype(O, /obj/item/wirecutters) && unwrenchable)
using_irrigation = !using_irrigation
playsound(src, O.usesound, 50, 1)
O.play_tool_sound(src)
user.visible_message("<span class='notice'>[user] [using_irrigation ? "" : "dis"]connects [src]'s irrigation hoses.</span>", \
"<span class='notice'>You [using_irrigation ? "" : "dis"]connect [src]'s irrigation hoses.</span>")
for(var/obj/machinery/hydroponics/h in range(1,src))
@@ -832,11 +830,11 @@
to_chat(user, "<span class='warning'>[src] doesn't have any plants or weeds!</span>")
return
user.visible_message("<span class='notice'>[user] starts digging out [src]'s plants...</span>", "<span class='notice'>You start digging out [src]'s plants...</span>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
O.play_tool_sound(src)
if(!do_after(user, 50, target = src) || (!myseed && !weedlevel))
return
user.visible_message("<span class='notice'>[user] digs out the plants in [src]!</span>", "<span class='notice'>You dig out all of [src]'s plants!</span>")
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
O.play_tool_sound(src)
if(myseed) //Could be that they're just using it as a de-weeder
age = 0
plant_health = 0
@@ -279,8 +279,8 @@
visible_message("<span class='notice'> [user] waves [src] around [target].</span>")
/obj/item/device/electronic_assembly/screwdriver_act(mob/living/user, obj/item/S)
playsound(src, S.usesound, 50, 1)
/obj/item/device/electronic_assembly/screwdriver_act(mob/living/user, obj/item/I)
I.play_tool_sound(src)
opened = !opened
to_chat(user, "<span class='notice'>You [opened ? "open" : "close"] the maintenance hatch of [src].</span>")
update_icon()
+12 -18
View File
@@ -194,20 +194,10 @@ GLOBAL_PROTECT(exp_to_update)
return -1
if(!SSdbcore.Connect())
return -1
var/datum/DBQuery/exp_read = SSdbcore.NewQuery("SELECT job, minutes FROM [format_table_name("role_time")] WHERE ckey = '[sanitizeSQL(ckey)]'")
if(!exp_read.Execute())
if (!isnum(minutes))
return -1
var/list/play_records = list()
while(exp_read.NextRow())
play_records[exp_read.item[1]] = text2num(exp_read.item[2])
for(var/rtype in SSjob.name_occupations)
if(!play_records[rtype])
play_records[rtype] = 0
for(var/rtype in GLOB.exp_specialmap)
if(!play_records[rtype])
play_records[rtype] = 0
var/list/old_records = play_records.Copy()
if(isliving(mob))
if(mob.stat != DEAD)
var/rolefound = FALSE
@@ -245,15 +235,19 @@ GLOBAL_PROTECT(exp_to_update)
to_chat(src,"<span class='notice'>You got: [minutes] Ghost EXP!</span>")
else if(minutes) //Let "refresh" checks go through
return
prefs.exp = play_records
for(var/jtype in play_records)
if(play_records[jtype] != old_records[jtype])
LAZYINITLIST(GLOB.exp_to_update)
GLOB.exp_to_update.Add(list(list(
"job" = "'[sanitizeSQL(jtype)]'",
"ckey" = "'[sanitizeSQL(ckey)]'",
"minutes" = play_records[jtype])))
var/jvalue = play_records[jtype]
if (!jvalue)
continue
if (!isnum(jvalue))
CRASH("invalid job value [jtype]:[jvalue]")
LAZYINITLIST(GLOB.exp_to_update)
GLOB.exp_to_update.Add(list(list(
"job" = "'[sanitizeSQL(jtype)]'",
"ckey" = "'[sanitizeSQL(ckey)]'",
"minutes" = jvalue)))
prefs.exp[jtype] += jvalue
addtimer(CALLBACK(SSblackbox,/datum/controller/subsystem/blackbox/proc/update_exp_db),20,TIMER_OVERRIDE|TIMER_UNIQUE)
@@ -90,6 +90,5 @@ Chaplain
belt = /obj/item/device/pda/chaplain
uniform = /obj/item/clothing/under/rank/chaplain
backpack_contents = list(/obj/item/device/camera/spooky = 1)
accessory = /obj/item/clothing/accessory/pocketprotector/cosmetology
backpack = /obj/item/storage/backpack/cultpack
satchel = /obj/item/storage/backpack/cultpack
@@ -41,7 +41,6 @@ Chief Engineer
shoes = /obj/item/clothing/shoes/sneakers/brown
head = /obj/item/clothing/head/hardhat/white
gloves = /obj/item/clothing/gloves/color/black/ce
accessory = /obj/item/clothing/accessory/pocketprotector/full
backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/device/modular_computer/tablet/preset/advanced=1)
backpack = /obj/item/storage/backpack/industrial
@@ -96,7 +95,6 @@ Station Engineer
shoes = /obj/item/clothing/shoes/workboots
head = /obj/item/clothing/head/hardhat
r_pocket = /obj/item/device/t_scanner
accessory = /obj/item/clothing/accessory/pocketprotector/full
backpack = /obj/item/storage/backpack/industrial
satchel = /obj/item/storage/backpack/satchel/eng
@@ -150,7 +148,6 @@ Atmospheric Technician
ears = /obj/item/device/radio/headset/headset_eng
uniform = /obj/item/clothing/under/rank/atmospheric_technician
r_pocket = /obj/item/device/analyzer
accessory = /obj/item/clothing/accessory/pocketprotector/full
backpack = /obj/item/storage/backpack/industrial
satchel = /obj/item/storage/backpack/satchel/eng
-1
View File
@@ -112,7 +112,6 @@ Chemist
uniform = /obj/item/clothing/under/rank/chemist
shoes = /obj/item/clothing/shoes/sneakers/white
suit = /obj/item/clothing/suit/toggle/labcoat/chemist
accessory = /obj/item/clothing/accessory/pocketprotector/full
backpack = /obj/item/storage/backpack/chemistry
satchel = /obj/item/storage/backpack/satchel/chem
duffelbag = /obj/item/storage/backpack/duffelbag/med
-2
View File
@@ -43,7 +43,6 @@ Research Director
suit = /obj/item/clothing/suit/toggle/labcoat
l_hand = /obj/item/clipboard
l_pocket = /obj/item/device/laser_pointer
accessory = /obj/item/clothing/accessory/pocketprotector/full
backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/device/modular_computer/tablet/preset/advanced=1)
backpack = /obj/item/storage/backpack/science
@@ -91,7 +90,6 @@ Scientist
backpack = /obj/item/storage/backpack/science
satchel = /obj/item/storage/backpack/satchel/tox
accessory = /obj/item/clothing/accessory/pocketprotector/full
/*
Roboticist
+2 -1
View File
@@ -12,6 +12,7 @@
/datum/proc/key_up(key, client/user) // Called when a key is released
return
/datum/proc/keyLoop(client/user) // Called once every frame
set waitfor = FALSE
return
// removes all the existing macros
@@ -46,4 +47,4 @@
if(prefs.hotkeys)
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED] mainwindow.macro=default")
else
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED] mainwindow.macro=old_default")
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED] mainwindow.macro=old_default")
+6 -8
View File
@@ -57,14 +57,12 @@
switch(state)
if(0)
if(istype(I, /obj/item/wrench))
playsound(loc, I.usesound, 100, 1)
if(do_after(user, 20*I.toolspeed, target = src))
if(I.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = TRUE
state = 1
if(istype(I, /obj/item/crowbar))
playsound(loc, I.usesound, 100, 1)
if(do_after(user, 20*I.toolspeed, target = src))
if(I.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You pry the frame apart.</span>")
deconstruct(TRUE)
@@ -77,7 +75,7 @@
state = 2
icon_state = "book-0"
if(istype(I, /obj/item/wrench))
playsound(loc, I.usesound, 100, 1)
I.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You unwrench the frame.</span>")
anchored = FALSE
state = 0
@@ -99,14 +97,14 @@
if(!newname)
return
else
name = ("bookcase ([sanitize(newname)])")
name = "bookcase ([sanitize(newname)])"
else if(istype(I, /obj/item/crowbar))
if(contents.len)
to_chat(user, "<span class='warning'>You need to remove the books first!</span>")
else
playsound(loc, I.usesound, 100, 1)
I.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You pry the shelf out.</span>")
new /obj/item/stack/sheet/mineral/wood(loc, 2)
new /obj/item/stack/sheet/mineral/wood(drop_location(), 2)
state = 1
icon_state = "bookempty"
else
+5 -4
View File
@@ -186,10 +186,7 @@
/obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user)
if(locked)
if(istype(W, /obj/item/card/emag))
boom(user)
return
else if(istype(W, /obj/item/device/multitool))
if(istype(W, /obj/item/device/multitool))
to_chat(user, "<span class='notice'>DECA-CODE LOCK REPORT:</span>")
if(attempts == 1)
to_chat(user, "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>")
@@ -215,6 +212,10 @@
return
return ..()
/obj/structure/closet/crate/secure/loot/emag_act(mob/user)
if(locked)
boom(user)
/obj/structure/closet/crate/secure/loot/togglelock(mob/user)
if(locked)
boom(user)
@@ -38,18 +38,18 @@
var/obj/item/crusher_trophy/T = t
to_chat(user, "<span class='notice'>It has \a [T] attached, which causes [T.effect_desc()].</span>")
/obj/item/twohanded/required/kinetic_crusher/attackby(obj/item/A, mob/living/user)
if(istype(A, /obj/item/crowbar))
/obj/item/twohanded/required/kinetic_crusher/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/crowbar))
if(LAZYLEN(trophies))
to_chat(user, "<span class='notice'>You remove [src]'s trophies.</span>")
playsound(loc, A.usesound, 100, 1)
I.play_tool_sound(src)
for(var/t in trophies)
var/obj/item/crusher_trophy/T = t
T.remove_from(src, user)
else
to_chat(user, "<span class='warning'>There are no trophies on [src].</span>")
else if(istype(A, /obj/item/crusher_trophy))
var/obj/item/crusher_trophy/T = A
else if(istype(I, /obj/item/crusher_trophy))
var/obj/item/crusher_trophy/T = I
T.add_to(src, user)
else
return ..()
@@ -13,13 +13,13 @@
w_class = WEIGHT_CLASS_BULKY
materials = list(MAT_METAL=2000) //one sheet, but where can you make them?
var/digspeed = 40
var/list/digsound = list('sound/effects/picaxe1.ogg','sound/effects/picaxe2.ogg','sound/effects/picaxe3.ogg')
usesound = list('sound/effects/picaxe1.ogg', 'sound/effects/picaxe2.ogg', 'sound/effects/picaxe3.ogg')
attack_verb = list("hit", "pierced", "sliced", "attacked")
/obj/item/pickaxe/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins digging into their chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(do_after(user,30, target = user))
playDigSound()
play_tool_sound(user)
return BRUTELOSS
user.visible_message("<span class='suicide'>[user] couldn't do it!</span>")
return SHAME
@@ -34,9 +34,6 @@
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL=1000)
/obj/item/pickaxe/proc/playDigSound()
playsound(src, pick(digsound),50,1)
/obj/item/pickaxe/silver
name = "silver-plated pickaxe"
icon_state = "spickaxe"
@@ -59,7 +56,7 @@
item_state = "jackhammer"
slot_flags = SLOT_BELT
digspeed = 25 //available from roundstart, faster than a pickaxe.
digsound = list('sound/weapons/drill.ogg')
usesound = 'sound/weapons/drill.ogg'
hitsound = 'sound/weapons/drill.ogg'
desc = "An electric mining drill for the especially scrawny."
@@ -84,7 +81,7 @@
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 5 //the epitome of powertools. extremely fast mining, laughs at puny walls
digsound = list('sound/weapons/sonic_jackhammer.ogg')
usesound = 'sound/weapons/sonic_jackhammer.ogg'
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls."
@@ -99,6 +96,7 @@
slot_flags = SLOT_BELT
force = 8
var/digspeed = 20
usesound = 'sound/effects/shovel_dig.ogg'
throwforce = 4
item_state = "shovel"
w_class = WEIGHT_CLASS_NORMAL
@@ -109,7 +107,7 @@
/obj/item/shovel/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins digging their own grave! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(do_after(user,30, target = user))
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
play_tool_sound(user)
return BRUTELOSS
user.visible_message("<span class='suicide'>[user] couldn't do it!</span>")
return SHAME
+19 -18
View File
@@ -138,16 +138,16 @@
density = TRUE
pixel_y = -32
/obj/item/device/gps/computer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
playsound(src.loc, W.usesound, 50, 1)
user.visible_message("<span class='warning'>[user] disassembles the gps.</span>", \
"<span class='notice'>You start to disassemble the gps...</span>", "You hear clanking and banging noises.")
if(do_after(user, 20*W.toolspeed, target = src))
new /obj/item/device/gps(loc)
qdel(src)
return
return ..()
/obj/item/device/gps/computer/wrench_act(mob/living/user, obj/item/I)
if(flags_1 & NODECONSTRUCT_1)
return TRUE
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
if(I.use_tool(src, user, 20, volume=50))
new /obj/item/device/gps(loc)
qdel(src)
return TRUE
/obj/item/device/gps/computer/attack_hand(mob/user)
attack_self(user)
@@ -214,14 +214,15 @@
new buildstacktype(loc,buildstackamount)
qdel(src)
/obj/structure/fans/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
playsound(src.loc, W.usesound, 50, 1)
user.visible_message("<span class='warning'>[user] disassembles the fan.</span>", \
"<span class='notice'>You start to disassemble the fan...</span>", "You hear clanking and banging noises.")
if(do_after(user, 20*W.toolspeed, target = src))
deconstruct()
return ..()
/obj/structure/fans/wrench_act(mob/living/user, obj/item/I)
if(flags_1 & NODECONSTRUCT_1)
return TRUE
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
if(I.use_tool(src, user, 20, volume=50))
deconstruct()
return TRUE
/obj/structure/fans/tiny
name = "tiny fan"
+3 -3
View File
@@ -46,9 +46,9 @@
new /datum/data/mining_equipment("Jump Boots", /obj/item/clothing/shoes/bhop, 2500),
new /datum/data/mining_equipment("Luxury Shelter Capsule", /obj/item/survivalcapsule/luxury, 3000),
new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 800),
new /datum/data/mining_equipment("Drone Melee Upgrade", /obj/item/device/mine_bot_ugprade, 400),
new /datum/data/mining_equipment("Drone Health Upgrade", /obj/item/device/mine_bot_ugprade/health, 400),
new /datum/data/mining_equipment("Drone Ranged Upgrade", /obj/item/device/mine_bot_ugprade/cooldown, 600),
new /datum/data/mining_equipment("Drone Melee Upgrade", /obj/item/device/mine_bot_upgrade, 400),
new /datum/data/mining_equipment("Drone Health Upgrade", /obj/item/device/mine_bot_upgrade/health, 400),
new /datum/data/mining_equipment("Drone Ranged Upgrade", /obj/item/device/mine_bot_upgrade/cooldown, 600),
new /datum/data/mining_equipment("Drone AI Upgrade", /obj/item/slimepotion/slime/sentience/mining, 1000),
new /datum/data/mining_equipment("KA White Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer, 100),
new /datum/data/mining_equipment("KA Adjustable Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer/adjustable, 150),
+21 -18
View File
@@ -64,18 +64,21 @@
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/W = I
if(W.welding && !stat)
if(AIStatus != AI_OFF && AIStatus != AI_IDLE)
to_chat(user, "<span class='info'>[src] is moving around too much to repair!</span>")
return
if(maxHealth == health)
to_chat(user, "<span class='info'>[src] is at full integrity.</span>")
else
if(W.remove_fuel(0, user))
adjustBruteLoss(-10)
to_chat(user, "<span class='info'>You repair some of the armor on [src].</span>")
if(stat)
return
if(AIStatus != AI_OFF && AIStatus != AI_IDLE)
to_chat(user, "<span class='info'>[src] is moving around too much to repair!</span>")
return
if(maxHealth == health)
to_chat(user, "<span class='info'>[src] is at full integrity.</span>")
return
if(I.use_tool(src, user, 0, volume=40))
adjustBruteLoss(-10)
to_chat(user, "<span class='info'>You repair some of the armor on [src].</span>")
return
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner))
to_chat(user, "<span class='info'>You instruct [src] to drop any collected ore.</span>")
DropOre()
@@ -202,18 +205,18 @@
//Melee
/obj/item/device/mine_bot_ugprade
/obj/item/device/mine_bot_upgrade
name = "minebot melee upgrade"
desc = "A minebot upgrade."
icon_state = "door_electronics"
icon = 'icons/obj/module.dmi'
/obj/item/device/mine_bot_ugprade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
/obj/item/device/mine_bot_upgrade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
if(!istype(M) || !proximity)
return
upgrade_bot(M, user)
/obj/item/device/mine_bot_ugprade/proc/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
/obj/item/device/mine_bot_upgrade/proc/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
if(M.melee_damage_upper != initial(M.melee_damage_upper))
to_chat(user, "[src] already has a combat upgrade installed!")
return
@@ -223,10 +226,10 @@
//Health
/obj/item/device/mine_bot_ugprade/health
/obj/item/device/mine_bot_upgrade/health
name = "minebot chassis upgrade"
/obj/item/device/mine_bot_ugprade/health/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
/obj/item/device/mine_bot_upgrade/health/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
if(M.maxHealth != initial(M.maxHealth))
to_chat(user, "[src] already has a reinforced chassis!")
return
@@ -236,10 +239,10 @@
//Cooldown
/obj/item/device/mine_bot_ugprade/cooldown
/obj/item/device/mine_bot_upgrade/cooldown
name = "minebot cooldown upgrade"
/obj/item/device/mine_bot_ugprade/cooldown/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
/obj/item/device/mine_bot_upgrade/cooldown/upgrade_bot(mob/living/simple_animal/hostile/mining_drone/M, mob/user)
name = "minebot cooldown upgrade"
if(M.ranged_cooldown_time != initial(M.ranged_cooldown_time))
to_chat(user, "[src] already has a decreased weapon cooldown!")
+22 -28
View File
@@ -39,15 +39,15 @@
. = ..()
add_overlay(stack_overlays)
/obj/item/stack/ore/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/W = I
if(W.remove_fuel(15) && refined_type)
new refined_type(get_turf(src.loc))
qdel(src)
else if(W.isOn())
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
..()
/obj/item/stack/ore/welder_act(mob/living/user, obj/item/I)
if(!refined_type)
return TRUE
if(I.use_tool(src, user, 0, volume=50, amount=15))
new refined_type(drop_location())
use(1)
return TRUE
/obj/item/stack/ore/uranium
name = "uranium ore"
@@ -114,13 +114,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/plasma
/obj/item/stack/ore/plasma/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/W = I
if(W.welding)
to_chat(user, "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>")
else
..()
/obj/item/stack/ore/plasma/welder_act(mob/living/user, obj/item/I)
to_chat(user, "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>")
return TRUE
/obj/item/stack/ore/silver
@@ -423,21 +419,19 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
else
to_chat(user, "<span class='warning'>You need one length of cable to attach a string to the coin!</span>")
return
else if(istype(W, /obj/item/wirecutters))
if(!string_attached)
..()
return
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 1
CC.update_icon()
overlays = list()
string_attached = null
to_chat(user, "<span class='notice'>You detach the string from the coin.</span>")
else
..()
/obj/item/coin/wirecutter_act(mob/living/user, obj/item/I)
if(!string_attached)
return TRUE
new /obj/item/stack/cable_coil(drop_location(), 1)
overlays = list()
string_attached = null
to_chat(user, "<span class='notice'>You detach the string from the coin.</span>")
return TRUE
/obj/item/coin/attack_self(mob/user)
if(cooldown < world.time)
if(string_attached) //does the coin have a wire attached
+13 -11
View File
@@ -9,23 +9,25 @@
density = TRUE
pressure_resistance = 5*ONE_ATMOSPHERE
/obj/structure/ore_box/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/stack/ore))
user.transferItemToLoc(W, src)
else if (istype(W, /obj/item/storage))
var/obj/item/storage/S = W
/obj/structure/ore_box/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/ore))
user.transferItemToLoc(I, src)
else if(istype(I, /obj/item/storage))
var/obj/item/storage/S = I
for(var/obj/item/stack/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
to_chat(user, "<span class='notice'>You empty the ore in [S] into \the [src].</span>")
else if(istype(W, /obj/item/crowbar))
playsound(src, W.usesound, 50, 1)
var/obj/item/crowbar/C = W
if(do_after(user, 50*C.toolspeed, target = src))
user.visible_message("[user] pries \the [src] apart.", "<span class='notice'>You pry apart \the [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
deconstruct(TRUE, user)
else
return ..()
/obj/structure/ore_box/crowbar_act(mob/living/user, obj/item/I)
if(I.use_tool(src, user, 50, volume=50))
user.visible_message("[user] pries \the [src] apart.",
"<span class='notice'>You pry apart \the [src].</span>",
"<span class='italics'>You hear splitting wood.</span>")
deconstruct(TRUE, user)
return TRUE
/obj/structure/ore_box/examine(mob/living/user)
if(Adjacent(user) && istype(user))
show_contents(user)
+14 -1
View File
@@ -121,6 +121,19 @@
return I
return FALSE
//Checks if we're holding a tool that has given quality
//Returns the tool that has the best version of this quality
/mob/proc/is_holding_tool_quality(quality)
var/obj/item/best_item
var/best_quality = INFINITY
for(var/obj/item/I in held_items)
if(I.tool_behaviour == quality && I.toolspeed < best_quality)
best_item = I
best_quality = I.toolspeed
return best_item
//To appropriately fluff things like "they are holding [I] in their [get_held_index_name(get_held_index_of_item(I))]"
//Can be overriden to pass off the fluff to something else (eg: science allowing people to add extra robotic limbs, and having this proc react to that
@@ -286,7 +299,7 @@
return doUnEquip(I, force, null, TRUE, idrop)
//DO NOT CALL THIS PROC
//use one of the above 2 helper procs
//use one of the above 3 helper procs
//you may override it, but do not modify the args
/mob/proc/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE) //Force overrides NODROP_1 for things like wizarditis and admin undress.
//Use no_move if the item is just gonna be immediately moved afterward
+12 -16
View File
@@ -355,24 +355,21 @@
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weldingtool) && (user.a_intent != INTENT_HARM || user == src))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weldingtool/WT = W
if (!getBruteLoss())
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
if (WT.remove_fuel(0, user)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
if(src == user)
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
if(!do_after(user, 50, target = src))
return
if (!W.tool_start_check(user, amount=0)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
return
if(src == user)
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
if(!W.use_tool(src, user, 50))
return
adjustBruteLoss(-30)
updatehealth()
add_fingerprint(user)
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
return
else
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
return
adjustBruteLoss(-30)
updatehealth()
add_fingerprint(user)
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
return
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
user.changeNext_move(CLICK_CD_MELEE)
@@ -444,9 +441,8 @@
spark_system.start()
return
else
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start to unfasten [src]'s securing bolts...</span>")
if(do_after(user, 50*W.toolspeed, target = src) && !cell)
if(W.use_tool(src, user, 50, volume=50) && !cell)
user.visible_message("[user] deconstructs [src]!", "<span class='notice'>You unfasten the securing bolts, and [src] falls to pieces!</span>")
deconstruct()
@@ -303,12 +303,10 @@
if(!open)
to_chat(user, "<span class='warning'>Unable to repair with the maintenance panel closed!</span>")
return
var/obj/item/weldingtool/WT = W
if(WT.remove_fuel(0, user))
if(W.use_tool(src, user, 0, volume=40))
adjustHealth(-10)
user.visible_message("[user] repairs [src]!","<span class='notice'>You repair [src].</span>")
else
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
else
if(W.force) //if force is non-zero
do_sparks(5, TRUE, src)
@@ -101,8 +101,7 @@
if(ASSEMBLY_FOURTH_STEP)
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(WT.remove_fuel(0,user))
if(W.use_tool(src, user, 0, volume=40))
name = "shielded frame assembly"
to_chat(user, "<span class='notice'>You weld the vest to [src].</span>")
build_step++
@@ -183,9 +182,8 @@
if(8)
if(istype(W, /obj/item/screwdriver))
playsound(loc, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You start attaching the gun to the frame...</span>")
if(do_after(user, 40*W.toolspeed, 0, src, 1))
if(W.use_tool(src, user, 40, volume=100))
name = "armed [name]"
to_chat(user, "<span class='notice'>Taser gun attached.</span>")
build_step++
@@ -391,8 +389,7 @@
switch(build_step)
if(ASSEMBLY_FIRST_STEP)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(0, user))
if(I.use_tool(src, user, 0, volume=40))
add_overlay("hs_hole")
to_chat(user, "<span class='notice'>You weld a hole in [src]!</span>")
build_step++
@@ -414,8 +411,7 @@
build_step++
else if(istype(I, /obj/item/weldingtool)) //deconstruct
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(0, user))
if(I.use_tool(src, user, 0, volume=40))
cut_overlay("hs_hole")
to_chat(user, "<span class='notice'>You weld the hole in [src] shut!</span>")
build_step--
@@ -27,7 +27,7 @@
maxHealth = 30
unsuitable_atmos_damage = 0
wander = 0
speed = -1
speed = 0
ventcrawler = VENTCRAWLER_ALWAYS
healable = 0
density = FALSE
@@ -80,7 +80,7 @@
if(istype(I, /obj/item/screwdriver) && stat != DEAD)
if(health < maxHealth)
to_chat(user, "<span class='notice'>You start to tighten loose screws on [src]...</span>")
if(do_after(user,80*I.toolspeed,target=user))
if(I.use_tool(src, user, 80))
adjustBruteLoss(-getBruteLoss())
visible_message("<span class='notice'>[user] tightens [src == user ? "[user.p_their()]" : "[src]'s"] loose screws!</span>", "<span class='notice'>You tighten [src == user ? "your" : "[src]'s"] loose screws.</span>")
else
@@ -91,12 +91,10 @@
else if(istype(I, /obj/item/wrench) && user != src) //They aren't required to be hacked, because laws can change in other ways (i.e. admins)
user.visible_message("<span class='notice'>[user] starts resetting [src]...</span>", \
"<span class='notice'>You press down on [src]'s factory reset control...</span>")
playsound(src, I.usesound, 50, 1)
if(!do_after(user, 50*I.toolspeed, target = src))
return
user.visible_message("<span class='notice'>[user] resets [src]!</span>", \
"<span class='notice'>You reset [src]'s directives to factory defaults!</span>")
update_drone_hack(FALSE)
if(I.use_tool(src, user, 50, volume=50))
user.visible_message("<span class='notice'>[user] resets [src]!</span>", \
"<span class='notice'>You reset [src]'s directives to factory defaults!</span>")
update_drone_hack(FALSE)
return
else
..()
@@ -253,7 +253,7 @@
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_SMALL
var/list/feedMessages = list("It clucks happily.","It clucks happily.")
var/list/layMessage = list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
var/list/layMessage = EGG_LAYING_MESSAGES
var/list/validColors = list("brown","black","white")
gold_core_spawnable = FRIENDLY_SPAWN
var/static/chicken_count = 0
@@ -290,7 +290,7 @@
if(!.)
return
if((!stat && prob(3) && eggsleft > 0) && egg_type)
visible_message("[src] [pick(layMessage)]")
visible_message("<span class='alertalien'>[src] [pick(layMessage)]</span>")
eggsleft--
var/obj/item/E = new egg_type(get_turf(src))
E.pixel_x = rand(-6,6)
@@ -393,18 +393,15 @@
return
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(!WT.isOn())
to_chat(user, "<span class='warning'>\The [W] is off.</span>")
return
if(obj_integrity == max_integrity)
to_chat(user, "<span class='warning'>\The [src] does not require repairs.</span>")
return
if(!W.tool_start_check(user, amount=1))
return
to_chat(user, "<span class='notice'>You begin repairing damage to \the [src]...</span>")
var/dmg = round(max_integrity - obj_integrity)
if(WT.remove_fuel(round(dmg/75)) && do_after(usr, dmg/10))
if(W.use_tool(src, user, 20, volume=50, amount=1))
obj_integrity = max_integrity
to_chat(user, "<span class='notice'>You repair \the [src].</span>")
return
+1 -2
View File
@@ -56,8 +56,7 @@
updateUsrDialog()
else if(istype(P, /obj/item/wrench))
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20, target = src))
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(user.a_intent != INTENT_HARM)
+1 -1
View File
@@ -60,7 +60,7 @@
update_icon()
return
if(istype(P, /obj/item/screwdriver) && storedcutter)
playsound(src, P.usesound, 50, 1)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>[storedcutter] has been [cuttersecured ? "unsecured" : "secured"].</span>")
cuttersecured = !cuttersecured
return
+4 -5
View File
@@ -42,9 +42,9 @@
/obj/item/photo/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] is taking one last look at \the [src]! It looks like [user.p_theyre()] giving in to death!</span>")//when you wanna look at photo of waifu one last time before you die...
if (user.gender == MALE)
if (user.gender == MALE)
playsound(user, 'sound/voice/human/manlaugh1.ogg', 50, 1)//EVERY TIME I DO IT MAKES ME LAUGH
else if (user.gender == FEMALE)
else if (user.gender == FEMALE)
playsound(user, 'sound/voice/human/womanlaugh.ogg', 50, 1)
return OXYLOSS
@@ -609,11 +609,10 @@
/obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver) || istype(I, /obj/item/wrench))
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 30*I.toolspeed, target = src))
if(I.use_tool(src, user, 30, volume=50))
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
deconstruct()
deconstruct()
return
else if(istype(I, /obj/item/photo))
+2 -2
View File
@@ -159,14 +159,14 @@
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
if(!anchored)
playsound(src.loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"<span class='notice'>You secure the anchor bolts to the floor.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
src.anchored = TRUE
connect_to_network()
else if(!linked_shielding.len > 0)
playsound(src.loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
user.visible_message("[user.name] unsecures the [src.name].", \
"<span class='notice'>You remove the anchor bolts.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
+14 -18
View File
@@ -383,9 +383,9 @@
if (terminal)
to_chat(user, "<span class='warning'>Disconnect the wires first!</span>")
return
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You are trying to remove the power control board...</span>" )
if(do_after(user, 50*W.toolspeed, target = src))
if(W.use_tool(src, user, 50))
if (has_electronics==1)
has_electronics = 0
if (stat & BROKEN)
@@ -417,13 +417,12 @@
else if(integration_cog)
user.visible_message("<span class='notice'>[user] starts prying [integration_cog] from [src]...</span>", \
"<span class='notice'>You painstakingly start tearing [integration_cog] out of [src]'s guts...</span>")
playsound(src, W.usesound, 50, TRUE)
if(!do_after(user, 100 * W.toolspeed, target = src))
return
user.visible_message("<span class='notice'>[user] destroys [integration_cog] in [src]!</span>", \
"<span class='notice'>[integration_cog] comes free with a clank and snaps in two as the machinery returns to normal!</span>")
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
QDEL_NULL(integration_cog)
W.play_tool_sound(src)
if(W.use_tool(src, user, 100))
user.visible_message("<span class='notice'>[user] destroys [integration_cog] in [src]!</span>", \
"<span class='notice'>[integration_cog] comes free with a clank and snaps in two as the machinery returns to normal!</span>")
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
QDEL_NULL(integration_cog)
return
else if (opened!=2) //cover isn't removed
opened = 0
@@ -468,12 +467,12 @@
if (has_electronics==1)
has_electronics = 2
stat &= ~MAINT
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit electronics into place.</span>")
else if (has_electronics==2)
has_electronics = 1
stat |= MAINT
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the electronics.</span>")
else /* has_electronics==0 */
to_chat(user, "<span class='warning'>There is nothing to secure!</span>")
@@ -578,17 +577,12 @@
return
else if (istype(W, /obj/item/weldingtool) && opened && has_electronics==0 && !terminal)
var/obj/item/weldingtool/WT = W
if (WT.get_fuel() < 3)
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task!</span>")
if(!W.tool_start_check(user, amount=3))
return
user.visible_message("[user.name] welds [src].", \
"<span class='notice'>You start welding the APC frame...</span>", \
"<span class='italics'>You hear welding.</span>")
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 50*W.toolspeed, target = src))
if(!src || !WT.remove_fuel(3, user))
return
if(W.use_tool(src, user, 50, volume=50, amount=3))
if ((stat & BROKEN) || opened==2)
new /obj/item/stack/sheet/metal(loc)
user.visible_message(\
@@ -911,6 +905,8 @@
return 1
/obj/machinery/power/apc/proc/toggle_breaker()
if(!is_operational() || failure_timer)
return
operating = !operating
update()
update_icon()
+1
View File
@@ -471,6 +471,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
singular_name = "cable piece"
full_w_class = WEIGHT_CLASS_SMALL
grind_results = list("copper" = 2) //2 copper per cable in the coil
usesound = 'sound/items/deconstruct.ogg'
/obj/item/stack/cable_coil/cyborg
is_cyborg = 1
+1 -1
View File
@@ -70,7 +70,7 @@
return 100*charge/maxcharge
// use power from a cell
/obj/item/stock_parts/cell/proc/use(amount)
/obj/item/stock_parts/cell/use(amount)
if(rigged && amount > 0)
explode()
return 0
+3 -7
View File
@@ -188,20 +188,16 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
if(GRAV_NEEDS_SCREWDRIVER)
if(istype(I, /obj/item/screwdriver))
to_chat(user, "<span class='notice'>You secure the screws of the framework.</span>")
playsound(src.loc, I.usesound, 50, 1)
I.play_tool_sound(src)
broken_state++
update_icon()
return
if(GRAV_NEEDS_WELDING)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = I
if(WT.remove_fuel(1, user))
if(I.use_tool(src, user, 0, volume=50, amount=1))
to_chat(user, "<span class='notice'>You mend the damaged framework.</span>")
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
broken_state++
update_icon()
else if(WT.isOn())
to_chat(user, "<span class='warning'>You don't have enough fuel to mend the damaged framework!</span>")
return
if(GRAV_NEEDS_PLASTEEL)
if(istype(I, /obj/item/stack/sheet/plasteel))
@@ -218,7 +214,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
if(GRAV_NEEDS_WRENCH)
if(istype(I, /obj/item/wrench))
to_chat(user, "<span class='notice'>You secure the plating to the framework.</span>")
playsound(src.loc, I.usesound, 75, 1)
I.play_tool_sound(src)
set_fix()
return
return ..()
+13 -23
View File
@@ -109,25 +109,19 @@
switch(stage)
if(1)
if(istype(W, /obj/item/wrench))
playsound(src.loc, W.usesound, 75, 1)
to_chat(usr, "<span class='notice'>You begin deconstructing [src]...</span>")
if (!do_after(usr, 30*W.toolspeed, target = src))
return
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
user.visible_message("[user.name] deconstructs [src].", \
"<span class='notice'>You deconstruct [src].</span>", "<span class='italics'>You hear a ratchet.</span>")
playsound(src.loc, 'sound/items/deconstruct.ogg', 75, 1)
qdel(src)
if (W.use_tool(src, user, 30, volume=50))
new /obj/item/stack/sheet/metal(drop_location(), sheets_refunded)
user.visible_message("[user.name] deconstructs [src].", \
"<span class='notice'>You deconstruct [src].</span>", "<span class='italics'>You hear a ratchet.</span>")
playsound(src.loc, 'sound/items/deconstruct.ogg', 75, 1)
qdel(src)
return
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
if(coil.use(1))
switch(fixture_type)
if ("tube")
icon_state = "tube-construct-stage2"
if("bulb")
icon_state = "bulb-construct-stage2"
icon_state = "[fixture_type]-construct-stage2"
stage = 2
user.visible_message("[user.name] adds wires to [src].", \
"<span class='notice'>You add wires to [src].</span>")
@@ -141,25 +135,21 @@
if(istype(W, /obj/item/wirecutters))
stage = 1
switch(fixture_type)
if ("tube")
icon_state = "tube-construct-stage1"
if("bulb")
icon_state = "bulb-construct-stage1"
new /obj/item/stack/cable_coil(get_turf(loc), 1, "red")
icon_state = "[fixture_type]-construct-stage1"
new /obj/item/stack/cable_coil(drop_location(), 1, "red")
user.visible_message("[user.name] removes the wiring from [src].", \
"<span class='notice'>You remove the wiring from [src].</span>", "<span class='italics'>You hear clicking.</span>")
playsound(loc, W.usesound, 100, 1)
W.play_tool_sound(src, 100)
return
if(istype(W, /obj/item/screwdriver))
user.visible_message("[user.name] closes [src]'s casing.", \
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
playsound(loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
switch(fixture_type)
if("tube")
newlight = new /obj/machinery/light/built(loc)
if ("bulb")
if("bulb")
newlight = new /obj/machinery/light/small/built(loc)
newlight.setDir(dir)
transfer_fingerprints_to(newlight)
@@ -429,7 +419,7 @@
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
if(istype(W, /obj/item/screwdriver)) //If it's a screwdriver open it.
playsound(src.loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
user.visible_message("[user.name] opens [src]'s casing.", \
"<span class='notice'>You open [src]'s casing.</span>", "<span class='italics'>You hear a noise.</span>")
deconstruct()
+1 -1
View File
@@ -195,7 +195,7 @@
return
else if(istype(O, /obj/item/screwdriver))
panel_open = !panel_open
playsound(src.loc, O.usesound, 50, 1)
O.play_tool_sound(src)
if(panel_open)
to_chat(user, "<span class='notice'>You open the access panel.</span>")
else
+53 -49
View File
@@ -207,10 +207,16 @@
return P
/obj/machinery/power/emitter/can_be_unfasten_wrench(mob/user, silent)
if(state == EM_WELDED)
if(active)
if(!silent)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
return FAILED_UNFASTEN
else if(state == EM_WELDED)
if(!silent)
to_chat(user, "<span class='warning'>[src] is welded to the floor!</span>")
return FAILED_UNFASTEN
return ..()
/obj/machinery/power/emitter/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
@@ -221,45 +227,52 @@
else
state = EM_UNSECURED
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
if(active)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
return
default_unfasten_wrench(user, W, 0)
return
/obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/I)
default_unfasten_wrench(user, I, 0)
return TRUE
if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
if(active)
to_chat(user, "Turn \the [src] off first.")
return
switch(state)
if(EM_UNSECURED)
to_chat(user, "<span class='warning'>The [src.name] needs to be wrenched to the floor!</span>")
if(EM_SECURED)
if(WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to weld the [name] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(do_after(user,20*W.toolspeed, target = src) && WT.isOn())
state = EM_WELDED
to_chat(user, "<span class='notice'>You weld \the [src] to the floor.</span>")
connect_to_network()
if(EM_WELDED)
if(WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to cut the [name] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(do_after(user,20*W.toolspeed, target = src) && WT.isOn())
state = EM_SECURED
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
disconnect_from_network()
return
/obj/machinery/power/emitter/welder_act(mob/living/user, obj/item/I)
if(active)
to_chat(user, "Turn \the [src] off first.")
return TRUE
if(W.GetID())
switch(state)
if(EM_UNSECURED)
to_chat(user, "<span class='warning'>The [src.name] needs to be wrenched to the floor!</span>")
if(EM_SECURED)
if(!I.tool_start_check(user, amount=0))
return TRUE
user.visible_message("[user.name] starts to weld the [name] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(I.use_tool(src, user, 20, volume=50))
state = EM_WELDED
to_chat(user, "<span class='notice'>You weld \the [src] to the floor.</span>")
connect_to_network()
if(EM_WELDED)
if(!I.tool_start_check(user, amount=0))
return TRUE
user.visible_message("[user.name] starts to cut the [name] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(I.use_tool(src, user, 20, volume=50))
state = EM_SECURED
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
disconnect_from_network()
return TRUE
/obj/machinery/power/emitter/crowbar_act(mob/living/user, obj/item/I)
default_deconstruction_crowbar(I)
return TRUE
/obj/machinery/power/emitter/screwdriver_act(mob/living/user, obj/item/I)
default_deconstruction_screwdriver(user, "emitter_open", "emitter", I)
return TRUE
/obj/machinery/power/emitter/attackby(obj/item/I, mob/user, params)
if(I.GetID())
if(obj_flags & EMAGGED)
to_chat(user, "<span class='warning'>The lock seems to be broken!</span>")
return
@@ -273,20 +286,11 @@
to_chat(user, "<span class='danger'>Access denied.</span>")
return
if(is_wire_tool(W) && panel_open)
else if(is_wire_tool(I) && panel_open)
wires.interact(user)
return
if(default_deconstruction_screwdriver(user, "emitter_open", "emitter", W))
return
if(exchange_parts(user, W))
return
if(default_pry_open(W))
return
if(default_deconstruction_crowbar(W))
else if(exchange_parts(user, I))
return
return ..()
@@ -77,10 +77,16 @@ field_generator power level display
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first!</span>")
/obj/machinery/field/generator/can_be_unfasten_wrench(mob/user, silent)
if(state == FG_WELDED)
if(active)
if(!silent)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
return FAILED_UNFASTEN
else if(state == FG_WELDED)
if(!silent)
to_chat(user, "<span class='warning'>[src] is welded to the floor!</span>")
return FAILED_UNFASTEN
return ..()
/obj/machinery/field/generator/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
@@ -91,41 +97,41 @@ field_generator power level display
else
state = FG_UNSECURED
/obj/machinery/field/generator/attackby(obj/item/W, mob/user, params)
/obj/machinery/field/generator/wrench_act(mob/living/user, obj/item/I)
default_unfasten_wrench(user, I, 0)
return TRUE
/obj/machinery/field/generator/welder_act(mob/living/user, obj/item/I)
if(active)
to_chat(user, "<span class='warning'>[src] needs to be off!</span>")
return
else if(istype(W, /obj/item/wrench))
default_unfasten_wrench(user, W, 0)
return TRUE
else if(istype(W, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = W
switch(state)
if(FG_UNSECURED)
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor!</span>")
switch(state)
if(FG_UNSECURED)
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor!</span>")
if(FG_SECURED)
if (WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user] starts to weld [src] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(do_after(user,20*W.toolspeed, target = src) && state == FG_SECURED && WT.isOn())
state = FG_WELDED
to_chat(user, "<span class='notice'>You weld the field generator to the floor.</span>")
if(FG_SECURED)
if(!I.tool_start_check(user, amount=0))
return TRUE
user.visible_message("[user] starts to weld [src] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(I.use_tool(src, user, 20, volume=50) && state == FG_SECURED)
state = FG_WELDED
to_chat(user, "<span class='notice'>You weld the field generator to the floor.</span>")
if(FG_WELDED)
if (WT.remove_fuel(0,user))
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user] starts to cut [src] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(do_after(user,20*W.toolspeed, target = src) && state == FG_WELDED && WT.isOn())
state = FG_SECURED
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
if(FG_WELDED)
if(!I.tool_start_check(user, amount=0))
return TRUE
user.visible_message("[user] starts to cut [src] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if(I.use_tool(src, user, 20, volume=50) && state == FG_WELDED)
state = FG_SECURED
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
return TRUE
else
return ..()
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M)
if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED)
@@ -65,7 +65,7 @@
switch(construction_state)
if(PA_CONSTRUCTION_UNSECURED)
if(istype(W, /obj/item/wrench) && !isinspace())
playsound(loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
anchored = TRUE
user.visible_message("[user.name] secures the [name] to the floor.", \
"You secure the external bolts.")
@@ -73,7 +73,7 @@
did_something = TRUE
if(PA_CONSTRUCTION_UNWIRED)
if(istype(W, /obj/item/wrench))
playsound(loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
anchored = FALSE
user.visible_message("[user.name] detaches the [name] from the floor.", \
"You remove the external bolts.")
@@ -270,7 +270,7 @@
switch(construction_state)
if(PA_CONSTRUCTION_UNSECURED)
if(istype(W, /obj/item/wrench) && !isinspace())
playsound(loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
anchored = TRUE
user.visible_message("[user.name] secures the [name] to the floor.", \
"You secure the external bolts.")
@@ -278,7 +278,7 @@
did_something = TRUE
if(PA_CONSTRUCTION_UNWIRED)
if(istype(W, /obj/item/wrench))
playsound(loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
anchored = FALSE
user.visible_message("[user.name] detaches the [name] from the floor.", \
"You remove the external bolts.")
+11 -14
View File
@@ -56,16 +56,14 @@
obj_integrity = max_integrity
update_icon()
/obj/machinery/power/solar/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/crowbar))
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar panel.", "<span class='notice'>You begin to take the glass off the solar panel...</span>")
if(do_after(user, 50*W.toolspeed, target = src))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
user.visible_message("[user] takes the glass off the solar panel.", "<span class='notice'>You take the glass off the solar panel.</span>")
deconstruct(TRUE)
else
return ..()
/obj/machinery/power/solar/crowbar_act(mob/user, obj/item/I)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off [src].", "<span class='notice'>You begin to take the glass off [src]...</span>")
if(I.use_tool(src, user, 50))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
user.visible_message("[user] takes the glass off [src].", "<span class='notice'>You take the glass off [src].</span>")
deconstruct(TRUE)
return TRUE
/obj/machinery/power/solar/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
@@ -214,10 +212,10 @@
anchored = !anchored
if(anchored)
user.visible_message("[user] wrenches the solar assembly into place.", "<span class='notice'>You wrench the solar assembly into place.</span>")
playsound(src.loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
else
user.visible_message("[user] unwrenches the solar assembly from its place.", "<span class='notice'>You unwrench the solar assembly from its place.</span>")
playsound(src.loc, W.usesound, 75, 1)
W.play_tool_sound(src, 75)
return 1
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
@@ -407,8 +405,7 @@
/obj/machinery/power/solar_control/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 20*I.toolspeed, target = src))
if(I.use_tool(src, user, 20, volume=50))
if (src.stat & BROKEN)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
+5 -13
View File
@@ -531,19 +531,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user))
return
if(istype(W, /obj/item/scalpel/supermatter))
var/obj/item/scalpel/supermatter/scalpel = W
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You carefully begin to scrape [src] with [W]...</span>")
if(do_after(user, 60 * W.toolspeed, TRUE, src))
if (scalpel.usesLeft)
to_chat(user, "<span class='notice'>You extract a sliver from [src]. [src] begins to react violently!</span>")
new /obj/item/nuke_core/supermatter_sliver(drop_location())
matter_power += 200
scalpel.usesLeft--
if (!scalpel.usesLeft)
to_chat(user, "<span class='notice'>A tiny piece of [W] falls off, rendering it useless!</span>")
else
to_chat(user, "<span class='notice'>You fail to extract a sliver from [src]. [W] isn't sharp enough anymore!</span>")
to_chat(user, "<span class='notice'>You carefully begin to scrape \the [src] with \the [W]...</span>")
if(W.use_tool(src, user, 60, volume=100))
to_chat(user, "<span class='notice'>You extract a sliver from \the [src]. \The [src] begins to react violently!</span>")
new /obj/item/nuke_core/supermatter_sliver(drop_location())
matter_power += 200
else if(user.dropItemToGround(W))
user.visible_message("<span class='danger'>As [user] touches \the [src] with \a [W], silence fills the room...</span>",\
"<span class='userdanger'>You touch \the [src] with \the [W], and everything suddenly goes silent.</span>\n<span class='notice'>\The [W] flashes into dust as you flinch away from \the [src].</span>",\
+18 -13
View File
@@ -48,26 +48,31 @@
. = 1
/obj/machinery/power/terminal/proc/dismantle(mob/living/user, obj/item/W)
/obj/machinery/power/terminal/proc/dismantle(mob/living/user, obj/item/I)
if(isturf(loc))
var/turf/T = loc
if(T.intact)
to_chat(user, "<span class='warning'>You must first expose the power terminal!</span>")
return
if(!master || master.can_terminal_dismantle())
user.visible_message("[user.name] dismantles the power terminal from [master].", \
"<span class='notice'>You begin to cut the cables...</span>")
if(master && !master.can_terminal_dismantle())
return
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
if(do_after(user, 50*W.toolspeed, target = src))
if(!master || master.can_terminal_dismantle())
if(prob(50) && electrocute_mob(user, powernet, src, 1, TRUE))
do_sparks(5, TRUE, master)
return
new /obj/item/stack/cable_coil(loc, 10)
to_chat(user, "<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
qdel(src)
user.visible_message("[user.name] dismantles the power terminal from [master].",
"<span class='notice'>You begin to cut the cables...</span>")
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
if(I.use_tool(src, user, 50))
if(master && !master.can_terminal_dismantle())
return
if(prob(50) && electrocute_mob(user, powernet, src, 1, TRUE))
do_sparks(5, TRUE, master)
return
new /obj/item/stack/cable_coil(drop_location(), 10)
to_chat(user, "<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
qdel(src)
/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user, params)
+8 -11
View File
@@ -60,17 +60,14 @@
if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet
control.currentdir = angle
/obj/machinery/power/tracker/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/crowbar))
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar tracker.", "<span class='notice'>You begin to take the glass off the solar tracker...</span>")
if(do_after(user, 50*W.toolspeed, target = src))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
user.visible_message("[user] takes the glass off the tracker.", "<span class='notice'>You take the glass off the tracker.</span>")
deconstruct(TRUE)
else
return ..()
/obj/machinery/power/tracker/crowbar_act(mob/user, obj/item/I)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off [src].", "<span class='notice'>You begin to take the glass off [src]...</span>")
if(I.use_tool(src, user, 50))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
user.visible_message("[user] takes the glass off [src].", "<span class='notice'>You take the glass off [src].</span>")
deconstruct(TRUE)
return TRUE
/obj/machinery/power/tracker/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
@@ -107,35 +107,34 @@
return 0
..()
/obj/item/gun/ballistic/revolver/detective/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/screwdriver))
if(magazine.caliber == "38")
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
/obj/item/gun/ballistic/revolver/detective/screwdriver_act(mob/living/user, obj/item/I)
if(magazine.caliber == "38")
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
if(magazine.ammo_count())
afterattack(user, user) //you know the drill
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return TRUE
if(I.use_tool(src, user, 30))
if(magazine.ammo_count())
afterattack(user, user) //you know the drill
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30*A.toolspeed, target = src))
if(magazine.ammo_count())
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
magazine.caliber = "357"
desc = "The barrel and chamber assembly seems to have been modified."
to_chat(user, "<span class='notice'>You reinforce the barrel of [src]. Now it will fire .357 rounds.</span>")
else
to_chat(user, "<span class='notice'>You begin to revert the modifications to [src]...</span>")
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return TRUE
magazine.caliber = "357"
desc = "The barrel and chamber assembly seems to have been modified."
to_chat(user, "<span class='notice'>You reinforce the barrel of [src]. Now it will fire .357 rounds.</span>")
else
to_chat(user, "<span class='notice'>You begin to revert the modifications to [src]...</span>")
if(magazine.ammo_count())
afterattack(user, user) //and again
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return TRUE
if(I.use_tool(src, user, 30))
if(magazine.ammo_count())
afterattack(user, user) //and again
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
if(do_after(user, 30*A.toolspeed, target = src))
if(magazine.ammo_count())
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
magazine.caliber = "38"
desc = initial(desc)
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
magazine.caliber = "38"
desc = initial(desc)
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
return TRUE
/obj/item/gun/ballistic/revolver/mateba
@@ -33,17 +33,17 @@
var/obj/item/borg/upgrade/modkit/M = A
to_chat(user, "<span class='notice'>There is \a [M] installed, using <b>[M.cost]%</b> capacity.</span>")
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
if(istype(A, /obj/item/crowbar))
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/crowbar))
if(modkits.len)
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
playsound(loc, A.usesound, 100, 1)
I.play_tool_sound(src, 100)
for(var/obj/item/borg/upgrade/modkit/M in modkits)
M.uninstall(src)
else
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")
else if(istype(A, /obj/item/borg/upgrade/modkit))
var/obj/item/borg/upgrade/modkit/MK = A
else if(istype(I, /obj/item/borg/upgrade/modkit))
var/obj/item/borg/upgrade/modkit/MK = I
MK.install(src, user)
else
..()
+19 -10
View File
@@ -127,7 +127,7 @@
can_charge = 0
heat = 3800
usesound = 'sound/items/welder.ogg'
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
tool_behaviour = TOOL_WELDER
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
@@ -136,20 +136,29 @@
if(cell)
to_chat(user, "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>")
/obj/item/gun/energy/plasmacutter/attackby(obj/item/A, mob/user)
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
var/obj/item/stack/sheet/S = A
S.use(1)
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
I.use(1)
cell.give(1000)
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
else if(istype(A, /obj/item/stack/ore/plasma))
var/obj/item/stack/ore/S = A
S.use(1)
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
else if(istype(I, /obj/item/stack/ore/plasma))
I.use(1)
cell.give(500)
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
else
..()
// Tool procs, in case plasma cutter is used as welder
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
if(cell.charge >= amount * 100)
return TRUE
to_chat(user, "<span class='warning'>You need more charge to complete this task!</span>")
return FALSE
/obj/item/gun/energy/plasmacutter/use(amount)
return cell.use(amount * 100)
/obj/item/gun/energy/plasmacutter/update_icon()
return
@@ -530,6 +530,7 @@
name = "Egg Yolk"
id = "eggyolk"
description = "It's full of protein."
nutriment_factor = 3 * REAGENTS_METABOLISM
color = "#FFB500"
taste_description = "egg"
@@ -1193,4 +1193,17 @@
name = "Corazone"
id = "corazone"
description = "A medication used to treat pain, fever, and inflammation, along with heart attacks."
color = "#F5F5F5"
color = "#F5F5F5"
/datum/reagent/medicine/muscle_stimulant
name = "Muscle Stimulant"
id = "muscle_stimulant"
description = "A potent chemical that allows someone under its influence to be at full physical ability even when under massive amounts of pain."
/datum/reagent/medicine/muscle_stimulant/on_mob_add(mob/living/M)
. = ..()
M.add_trait(TRAIT_IGNORESLOWDOWN, id)
/datum/reagent/medicine/muscle_stimulant/on_mob_delete(mob/living/M)
. = ..()
M.remove_trait(TRAIT_IGNORESLOWDOWN, id)
@@ -100,7 +100,7 @@
to_chat(user, "<span class='notice'>[src] is full.</span>")
else
to_chat(user, "<span class='notice'>You break [E] in [src].</span>")
reagents.add_reagent("eggyolk", 5)
E.reagents.trans_to(src, E.reagents.total_volume)
qdel(E)
return
..()
@@ -397,4 +397,4 @@
/obj/item/reagent_containers/glass/beaker/large/bromine
name = "bromine beaker"
list_reagents = list("bromine" = 50)
list_reagents = list("bromine" = 50)
+2 -4
View File
@@ -118,9 +118,7 @@
if(istype(I, /obj/item/crowbar))
user.visible_message("<span class='notice'>[user] struggles to pry up \the [src] with \the [I].</span>", \
"<span class='notice'>You struggle to pry up \the [src] with \the [I].</span>")
if(do_after(user, 40*I.toolspeed, target = src))
if(QDELETED(src))
return //prevent multiple decontructs
if(I.use_tool(src, user, 40, volume=40))
if(!(stat & BROKEN))
var/obj/item/conveyor_construct/C = new/obj/item/conveyor_construct(src.loc)
C.id = id
@@ -130,7 +128,7 @@
else if(istype(I, /obj/item/wrench))
if(!(stat & BROKEN))
playsound(loc, I.usesound, 50, 1)
I.play_tool_sound(src)
setDir(turn(dir,-45))
update_move_direction()
to_chat(user, "<span class='notice'>You rotate [src].</span>")
+8 -10
View File
@@ -82,19 +82,17 @@
if(!pressure_charging && !full_pressure && !flush)
if(istype(I, /obj/item/screwdriver))
panel_open = !panel_open
playsound(get_turf(src), I.usesound, 50, 1)
I.play_tool_sound(src)
to_chat(user, "<span class='notice'>You [panel_open ? "remove":"attach"] the screws around the power connection.</span>")
return
else if(istype(I, /obj/item/weldingtool) && panel_open)
var/obj/item/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/welder2.ogg', 100, 1)
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
if(do_after(user,20*I.toolspeed, target = src) && panel_open)
if(!W.isOn())
return
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
deconstruct()
if(!I.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
if(I.use_tool(src, user, 20, volume=100) && panel_open)
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
deconstruct()
return
if(user.a_intent != INTENT_HARM)
@@ -155,24 +155,21 @@
anchored = TRUE
density = initial(pipe_type.density)
to_chat(user, "<span class='notice'>You attach the [pipename] to the underfloor.</span>")
playsound(src, I.usesound, 100, 1)
I.play_tool_sound(src, 100)
update_icon()
else if(istype(I, /obj/item/weldingtool))
if(anchored)
var/obj/item/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start welding the [pipename] in place...</span>")
if(do_after(user, 8*I.toolspeed, target = src))
if(!loc || !W.isOn())
return
to_chat(user, "<span class='notice'>The [pipename] has been welded in place.</span>")
if(!I.tool_start_check(user, amount=0))
return
var/obj/O = new pipe_type(loc, src)
transfer_fingerprints_to(O)
to_chat(user, "<span class='notice'>You start welding the [pipename] in place...</span>")
if(I.use_tool(src, user, 8, volume=50))
to_chat(user, "<span class='notice'>The [pipename] has been welded in place.</span>")
var/obj/O = new pipe_type(loc, src)
transfer_fingerprints_to(O)
return
return
else
to_chat(user, "<span class='warning'>You need to attach it to the plating first!</span>")
return
+12 -17
View File
@@ -69,21 +69,16 @@
H.vent_gas(T)
qdel(H)
/obj/structure/disposaloutlet/welder_act(mob/living/user, obj/item/I)
if(!I.tool_start_check(user, amount=0))
return TRUE
/obj/structure/disposaloutlet/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src, 'sound/items/welder2.ogg', 100, 1)
to_chat(user, "<span class='notice'>You start slicing the floorweld off [src]...</span>")
if(do_after(user, 20*I.toolspeed, target = src))
if(!W.isOn())
return
to_chat(user, "<span class='notice'>You slice the floorweld off [src].</span>")
stored.forceMove(loc)
transfer_fingerprints_to(stored)
stored = null
qdel(src)
else
return ..()
playsound(src, 'sound/items/welder2.ogg', 100, 1)
to_chat(user, "<span class='notice'>You start slicing the floorweld off [src]...</span>")
if(I.use_tool(src, user, 20))
to_chat(user, "<span class='notice'>You slice the floorweld off [src].</span>")
stored.forceMove(loc)
transfer_fingerprints_to(stored)
stored = null
qdel(src)
return TRUE
+12 -19
View File
@@ -141,26 +141,19 @@
return ..()
//attack by item
//weldingtool: unfasten and convert to obj/disposalconstruct
/obj/structure/disposalpipe/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/weldingtool))
if(!can_be_deconstructed(user))
return
//welding tool: unfasten and convert to obj/disposalconstruct
/obj/structure/disposalpipe/welder_act(mob/living/user, obj/item/I)
if(!can_be_deconstructed(user))
return TRUE
var/obj/item/weldingtool/W = I
if(W.remove_fuel(0, user))
playsound(src, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start slicing [src]...</span>")
// check if anything changed over 2 seconds
if(do_after(user, 30*I.toolspeed, target = src))
if(!W.isOn())
return
deconstruct()
to_chat(user, "<span class='notice'>You slice [src].</span>")
else
return ..()
if(!I.tool_start_check(user, amount=0))
return TRUE
to_chat(user, "<span class='notice'>You start slicing [src]...</span>")
if(I.use_tool(src, user, 30, volume=50))
deconstruct()
to_chat(user, "<span class='notice'>You slice [src].</span>")
return TRUE
//checks if something is blocking the deconstruction (e.g. trunk with a bin still linked to it)
/obj/structure/disposalpipe/proc/can_be_deconstructed()
+1 -1
View File
@@ -135,7 +135,7 @@
/datum/outfit/lavaland_syndicate/comms
name = "Lavaland Syndicate Comms Agent"
r_hand = /obj/item/melee/transforming/energy/sword/saber
mask = /obj/item/clothing/mask/chameleon
mask = /obj/item/clothing/mask/chameleon/gps
suit = /obj/item/clothing/suit/armor/vest
/obj/item/clothing/mask/chameleon/gps/Initialize()
@@ -126,7 +126,7 @@
to_chat(user, "<span class='notice'>You insert the flash into the eye socket.</span>")
else if(istype(W, /obj/item/crowbar))
if(flash1 || flash2)
playsound(src.loc, W.usesound, 50, 1)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You remove the flash from [src].</span>")
if(flash1)
flash1.forceMove(user.loc)
+1 -1
View File
@@ -14,7 +14,7 @@
/datum/surgery_step/fix_brain
name = "fix brain"
implements = list(/obj/item/hemostat = 85, /obj/item/screwdriver = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
implements = list(/obj/item/hemostat = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
time = 120 //long and complicated
/datum/surgery/brain_surgery/can_start(mob/user, mob/living/carbon/target)
+1 -1
View File
@@ -12,7 +12,7 @@
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
implements = list(/obj/item/hemostat = 100, /obj/item/crowbar = 100)
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 100)
time = 16
/datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+1 -1
View File
@@ -8,7 +8,7 @@
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25)
implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
+1 -1
View File
@@ -8,7 +8,7 @@
//extract implant
/datum/surgery_step/extract_implant
name = "extract implant"
implements = list(/obj/item/hemostat = 100, /obj/item/crowbar = 65)
implements = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 65)
time = 64
var/obj/item/implant/I = null
+1 -1
View File
@@ -6,7 +6,7 @@
/datum/surgery_step/replace
name = "sever muscles"
implements = list(/obj/item/scalpel = 100, /obj/item/wirecutters = 55)
implements = list(/obj/item/scalpel = 100, TOOL_WIRECUTTER = 55)
time = 32
+1 -1
View File
@@ -25,7 +25,7 @@
//remove fat
/datum/surgery_step/remove_fat
name = "remove loose fat"
implements = list(/obj/item/retractor = 100, /obj/item/screwdriver = 45, /obj/item/wirecutters = 35)
implements = list(/obj/item/retractor = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 32
/datum/surgery_step/remove_fat/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
+5 -5
View File
@@ -2,7 +2,7 @@
/datum/surgery_step/mechanic_open
name = "unscrew shell"
implements = list(
/obj/item/screwdriver = 100,
TOOL_SCREWDRIVER = 100,
/obj/item/scalpel = 75, // med borgs could try to unskrew shell with scalpel
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
@@ -22,7 +22,7 @@
/datum/surgery_step/mechanic_close
name = "screw shell"
implements = list(
/obj/item/screwdriver = 100,
TOOL_SCREWDRIVER = 100,
/obj/item/scalpel = 75,
/obj/item/kitchen/knife = 50,
/obj/item = 10) // 10% success with any sharp item.
@@ -42,7 +42,7 @@
/datum/surgery_step/prepare_electronics
name = "prepare electronics"
implements = list(
/obj/item/device/multitool = 100,
TOOL_MULTITOOL = 100,
/obj/item/hemostat = 10) // try to reboot internal controllers via short circuit with some conductor
time = 24
@@ -54,7 +54,7 @@
/datum/surgery_step/mechanic_unwrench
name = "unwrench bolts"
implements = list(
/obj/item/wrench = 100,
TOOL_WRENCH = 100,
/obj/item/retractor = 10)
time = 24
@@ -66,7 +66,7 @@
/datum/surgery_step/mechanic_wrench
name = "wrench bolts"
implements = list(
/obj/item/wrench = 100,
TOOL_WRENCH = 100,
/obj/item/retractor = 10)
time = 24
+1 -34
View File
@@ -67,7 +67,7 @@
name = "manipulate organs"
repeatable = 1
implements = list(/obj/item/organ = 100, /obj/item/reagent_containers/food/snacks/organ = 0, /obj/item/organ_storage = 100)
var/implements_extract = list(/obj/item/hemostat = 100, /obj/item/crowbar = 55)
var/implements_extract = list(/obj/item/hemostat = 100, TOOL_CROWBAR = 55)
var/current_type
var/obj/item/organ/I = null
@@ -75,25 +75,6 @@
..()
implements = implements + implements_extract
/datum/surgery_step/manipulate_organs/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = tool
if(!WT.isOn())
return 0
else if(istype(tool, /obj/item/lighter))
var/obj/item/lighter/L = tool
if(!L.lit)
return 0
else if(istype(tool, /obj/item/match))
var/obj/item/match/M = tool
if(!M.lit)
return 0
return 1
/datum/surgery_step/manipulate_organs/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
I = null
if(istype(tool, /obj/item/organ_storage))
@@ -118,13 +99,6 @@
else if(implement_type in implements_extract)
current_type = "extract"
var/list/organs = target.getorganszone(target_zone)
/* var/mob/living/simple_animal/borer/B = target.has_brain_worms()
if(target.has_brain_worms())
user.visible_message("[user] begins to extract [B] from [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to extract [B] from [target]'s [parse_zone(target_zone)]...</span>")
return TRUE*/
if(!organs.len)
to_chat(user, "<span class='notice'>There are no removable organs in [target]'s [parse_zone(target_zone)]!</span>")
return -1
@@ -164,13 +138,6 @@
"<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>")
else if(current_type == "extract")
/* var/mob/living/simple_animal/borer/B = target.has_brain_worms()
if(B && B.victim == target)
user.visible_message("[user] successfully extracts [B] from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You successfully extract [B] from [target]'s [parse_zone(target_zone)].</span>")
add_logs(user, target, "surgically removed [B] from", addition="INTENT: [uppertext(user.a_intent)]")
B.leave_victim()
return FALSE */
if(I && I.owner == target)
user.visible_message("[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
"<span class='notice'>You successfully extract [I] from [target]'s [parse_zone(target_zone)].</span>")
+8 -24
View File
@@ -19,7 +19,7 @@
//clamp bleeders
/datum/surgery_step/clamp_bleeders
name = "clamp bleeders"
implements = list(/obj/item/hemostat = 100, /obj/item/wirecutters = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
implements = list(/obj/item/hemostat = 100, TOOL_WIRECUTTER = 60, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
time = 24
/datum/surgery_step/clamp_bleeders/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -35,7 +35,7 @@
//retract skin
/datum/surgery_step/retract_skin
name = "retract skin"
implements = list(/obj/item/retractor = 100, /obj/item/screwdriver = 45, /obj/item/wirecutters = 35)
implements = list(/obj/item/retractor = 100, TOOL_SCREWDRIVER = 45, TOOL_WIRECUTTER = 35)
time = 24
/datum/surgery_step/retract_skin/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -47,35 +47,19 @@
//close incision
/datum/surgery_step/close
name = "mend incision"
implements = list(/obj/item/cautery = 100, /obj/item/gun/energy/laser = 90, /obj/item/weldingtool = 70,
/obj/item/lighter = 45, /obj/item/match = 20)
implements = list(/obj/item/cautery = 100, /obj/item/gun/energy/laser = 90, TOOL_WELDER = 70,
/obj/item = 30) // 30% success with any hot item.
time = 24
/datum/surgery_step/close/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to mend the incision in [target]'s [parse_zone(target_zone)].",
"<span class='notice'>You begin to mend the incision in [target]'s [parse_zone(target_zone)]...</span>")
/datum/surgery_step/close/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/cautery))
return 1
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
if(istype(tool, /obj/item/weldingtool))
var/obj/item/weldingtool/WT = tool
if(WT.isOn())
return 1
else if(istype(tool, /obj/item/lighter))
var/obj/item/lighter/L = tool
if(L.lit)
return 1
else if(istype(tool, /obj/item/match))
var/obj/item/match/M = tool
if(M.lit)
return 1
return 0
return TRUE
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)
@@ -105,7 +89,7 @@
//drill bone
/datum/surgery_step/drill
name = "drill bone"
implements = list(/obj/item/surgicaldrill = 100, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, /obj/item/screwdriver = 20)
implements = list(/obj/item/surgicaldrill = 100, /obj/item/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, TOOL_SCREWDRIVER = 20)
time = 30
/datum/surgery_step/drill/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -51,16 +51,11 @@
SetSlotFromZone()
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
update_icon()
else if(istype(W, /obj/item/card/emag))
emag_act()
/obj/item/organ/cyberimp/arm/Remove(mob/living/carbon/M, special = 0)
Retract()
..()
/obj/item/organ/cyberimp/arm/emag_act()
return 0
/obj/item/organ/cyberimp/arm/emp_act(severity)
if(prob(15/severity) && owner)
to_chat(owner, "<span class='warning'>[src] is hit by EMP!</span>")
@@ -126,10 +121,6 @@
to_chat(owner, "<span class='warning'>The implant doesn't respond. It seems to be broken...</span>")
return
// You can emag the arm-mounted implant by activating it while holding emag in it's hand.
if(istype(owner.get_active_held_item(), /obj/item/card/emag) && emag_act())
return
if(!holder || (holder in src))
holder = null
if(contents.len == 1)
@@ -176,7 +167,6 @@
/obj/item/organ/cyberimp/arm/gun/taser/l
zone = "l_arm"
/obj/item/organ/cyberimp/arm/toolset
name = "integrated toolset implant"
desc = "A stripped-down version of the engineering cyborg toolset, designed to be installed on subject's arm. Contains all necessary tools."
+1 -1
View File
@@ -60,7 +60,7 @@
var/turf/open/floorloc = get_turf(user)
floorloc.contents += contents
to_chat(user, "<span class='notice'>You remove the [storedorgan] from [src].</span>")
playsound(get_turf(user), I.usesound, 50, 1)
I.play_tool_sound(src)
storedorgan = null
if(uses != INFINITE)
uses--

Some files were not shown because too many files have changed in this diff Show More