mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into glasstables
Conflicts: _maps/map_files/MetaStation.v39K.dmm _maps/map_files/tgstation.2.1.3.dmm code/game/objects/structures/tables_racks.dm
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+355
-345
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
*/
|
||||
|
||||
/obj/machinery/atmospherics/New()
|
||||
..()
|
||||
if(can_unwrench)
|
||||
stored = new(src, make_from=src)
|
||||
|
||||
@@ -85,7 +86,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
|
||||
user << "<span class='danger'>You cannot unwrench this [src], it is too exerted due to internal pressure.</span>"
|
||||
user << "<span class='danger'>You cannot unwrench [src], it is too exerted due to internal pressure.</span>"
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -153,6 +153,6 @@ This should ideally have /unary/ as parent, why doesn't it? //Donkie
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (connected_device)
|
||||
user << "<span class='danger'>You cannot unwrench this [src], dettach [connected_device] first.</span>"
|
||||
user << "<span class='danger'>You cannot unwrench this [src], detach [connected_device] first.</span>"
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
@@ -118,7 +118,7 @@ datum/controller/air_system
|
||||
active_turfs |= T
|
||||
break
|
||||
else
|
||||
if(!T.air.check_turf(enemy_tile))
|
||||
if(!T.air.check_turf_total(enemy_tile))
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ turf/simulated/proc/share_temperature_mutual_solid(turf/simulated/sharer, conduc
|
||||
/******************* GROUP HANDLING FINISH *********************************************************************/
|
||||
|
||||
else
|
||||
if(!air.check_turf(enemy_tile))
|
||||
if(!air.check_turf(enemy_tile, atmos_adjacent_turfs_amount))
|
||||
var/difference = air.mimic(enemy_tile,,atmos_adjacent_turfs_amount)
|
||||
if(difference)
|
||||
if(difference > 0)
|
||||
|
||||
+17
-15
@@ -25,19 +25,6 @@
|
||||
* Text sanitization
|
||||
*/
|
||||
|
||||
//this proc strips html properly, but it's not lazy like the other procs.
|
||||
//this means that it doesn't just remove < and > and call it a day. seriously, who the fuck thought that would be useful.
|
||||
/proc/strip_html_properly(var/input)
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(!closetag || !opentag)
|
||||
break
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
return input
|
||||
|
||||
//Simply removes < and > and limits the length of the message
|
||||
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
var/list/strip_chars = list("<",">")
|
||||
@@ -86,10 +73,10 @@
|
||||
else non_whitespace = 1
|
||||
if(non_whitespace) return text //only accepts the text if it has some non-spaces
|
||||
|
||||
// Used to get a sanitized input.
|
||||
// Used to get a properly sanitized input, of max_length
|
||||
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default)
|
||||
return strip_html_simple(name, max_length)
|
||||
return strip_html_properly(name, max_length)
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
|
||||
@@ -155,6 +142,21 @@
|
||||
|
||||
return t_out
|
||||
|
||||
//this proc strips html properly, but it's not lazy like the other procs.
|
||||
//this means that it doesn't just remove < and > and call it a day. seriously, who the fuck thought that would be useful.
|
||||
//also limit the size of the input, if specified to
|
||||
/proc/strip_html_properly(var/input,var/max_length=MAX_MESSAGE_LEN)
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(!closetag || !opentag)
|
||||
break
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
if(max_length)
|
||||
input = copytext(input,1,max_length)
|
||||
return input
|
||||
|
||||
/*
|
||||
* Text searches
|
||||
|
||||
@@ -151,10 +151,9 @@
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_borg_pull
|
||||
|
||||
mymob.blind = new /obj/screen()
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
// No comment
|
||||
/atom/proc/attackby(obj/item/W, mob/user)
|
||||
return
|
||||
/atom/movable/attackby(obj/item/W, mob/user)
|
||||
/atom/movable/attackby(obj/item/W, mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
if(W && !(W.flags&NOBLUDGEON))
|
||||
visible_message("<span class='danger'>[src] has been hit by [user] with [W].</span>")
|
||||
|
||||
@@ -25,9 +26,9 @@
|
||||
var/showname = "."
|
||||
if(user)
|
||||
showname = " by [user]!"
|
||||
user.do_attack_animation(src)
|
||||
if(!(user in viewers(src, null)))
|
||||
showname = "."
|
||||
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
src.visible_message("<span class='danger'>[src] has been [pick(I.attack_verb)] with [I][showname]</span>",
|
||||
"<span class='userdanger'>[src] has been [pick(I.attack_verb)] with [I][showname]</span>")
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
"<span class='userdanger'>[name] bites [ML]!</span>")
|
||||
if(armor >= 2) return
|
||||
for(var/datum/disease/D in viruses)
|
||||
ML.contract_disease(D,1,0)
|
||||
ML.ForceContractDisease(D)
|
||||
else
|
||||
ML.visible_message("<span class='danger'>[src] has attempted to bite [ML]!</span>")
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ var/const/tk_maxrange = 15
|
||||
if(focus)
|
||||
focus.attack_self_tk(user)
|
||||
|
||||
/obj/item/tk_grab/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity)//TODO: go over this
|
||||
/obj/item/tk_grab/afterattack(atom/target, mob/living/user, proximity)//TODO: go over this
|
||||
if(!target || !user) return
|
||||
if(last_throw+3 > world.time) return
|
||||
if(!host || host != user)
|
||||
@@ -107,12 +107,7 @@ var/const/tk_maxrange = 15
|
||||
if(isobj(target) && !isturf(target.loc))
|
||||
return
|
||||
|
||||
var/d = get_dist(user, target)
|
||||
if(focus)
|
||||
d = max(d,get_dist(user,focus)) // whichever is further
|
||||
|
||||
if(d > tk_maxrange)
|
||||
user << "<span class ='warning'>Your mind won't reach that far.</span>"
|
||||
if(!tkMaxRangeCheck(user, target, focus))
|
||||
return
|
||||
|
||||
if(!focus)
|
||||
@@ -137,6 +132,15 @@ var/const/tk_maxrange = 15
|
||||
last_throw = world.time
|
||||
return
|
||||
|
||||
/proc/tkMaxRangeCheck(mob/user, atom/target, atom/focus)
|
||||
var/d = get_dist(user, target)
|
||||
if(focus)
|
||||
d = max(d,get_dist(user,focus)) // whichever is further
|
||||
if(d > tk_maxrange)
|
||||
user << "<span class ='warning'>Your mind won't reach that far.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/tk_grab/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
return
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
var/sandbox_autoclose = 0 // close the sandbox panel after spawning an item, potentially reducing griff
|
||||
|
||||
var/default_laws = 0 //Controls what laws the AI spawns with.
|
||||
var/silicon_max_law_amount = 0
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
@@ -402,6 +403,8 @@
|
||||
config.sandbox_autoclose = 1
|
||||
if("default_laws")
|
||||
config.default_laws = text2num(value)
|
||||
if("silicon_max_law_amount")
|
||||
config.silicon_max_law_amount = text2num(value)
|
||||
if("join_with_mutant_race")
|
||||
config.mutant_races = 1
|
||||
if("mutant_colors")
|
||||
|
||||
@@ -1,212 +0,0 @@
|
||||
#define SPECIAL -1
|
||||
#define NON_CONTAGIOUS 0
|
||||
#define BLOOD 1
|
||||
#define CONTACT_FEET 2
|
||||
#define CONTACT_HANDS 3
|
||||
#define CONTACT_GENERAL 4
|
||||
#define AIRBORNE 5
|
||||
|
||||
#define SCANNER 1
|
||||
#define PANDEMIC 2
|
||||
|
||||
/*
|
||||
|
||||
IMPORTANT NOTE: Please delete the diseases by using cure() proc or del() instruction.
|
||||
Diseases are referenced in a global list, so simply setting mob or obj vars
|
||||
to null does not delete the object itself. Thank you.
|
||||
|
||||
*/
|
||||
|
||||
var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
|
||||
|
||||
/datum/disease
|
||||
var/form = "Virus" //During medscans, what the disease is referred to as
|
||||
var/name = "No disease"
|
||||
var/stage = 1 //all diseases start at stage 1
|
||||
var/max_stages = 0.0
|
||||
var/cure = null
|
||||
var/cure_id = null// reagent.id or list containing them
|
||||
var/cure_list = null // allows for multiple possible cure combinations
|
||||
var/cure_chance = 8//chance for the cure to do its job
|
||||
var/spread = null //spread type description
|
||||
var/initial_spread = null
|
||||
var/spread_type = AIRBORNE
|
||||
var/contagious_period = 0//the disease stage when it can be spread
|
||||
var/list/affected_species = list()
|
||||
var/mob/living/carbon/affected_mob = null //the mob which is affected by disease.
|
||||
var/holder = null //the atom containing the disease (mob or obj)
|
||||
var/carrier = 0.0 //there will be a small chance that the person will be a carrier
|
||||
var/curable = 0 //can this disease be cured? (By itself...)
|
||||
var/list/strain_data = list() //This is passed on to infectees
|
||||
var/stage_prob = 4 // probability of advancing to next stage, default 4% per check
|
||||
var/agent = "some microbes"//name of the disease agent
|
||||
var/permeability_mod = 1//permeability modifier coefficient.
|
||||
var/desc = null//description. Leave it null and this disease won't show in med records.
|
||||
var/severity = null//severity descr
|
||||
var/longevity = 150//time in "ticks" the virus stays in inanimate object (blood stains, corpses, etc). In syringes, bottles and beakers it stays infinitely.
|
||||
var/list/hidden = list(0, 0)
|
||||
var/can_carry = 1 // If the disease allows "carriers".
|
||||
// if hidden[1] is true, then virus is hidden from medical scanners
|
||||
// if hidden[2] is true, then virus is hidden from PANDEMIC machine
|
||||
var/requires = 0
|
||||
var/list/required_limb = list()
|
||||
|
||||
var/const/non_threat = "Non-Threat"
|
||||
|
||||
|
||||
/datum/disease/proc/stage_act()
|
||||
var/cure_present = has_cure()
|
||||
//world << "[cure_present]"
|
||||
|
||||
if(carrier&&!cure_present)
|
||||
//world << "[affected_mob] is carrier"
|
||||
return
|
||||
|
||||
spread = (cure_present?"Remissive":initial_spread)
|
||||
|
||||
if(stage > max_stages)
|
||||
stage = max_stages
|
||||
|
||||
if(!cure_present && prob(stage_prob)) //now the disease shouldn't get back up to stage 4 in no time
|
||||
stage = min(stage + 1, max_stages)
|
||||
|
||||
else if(cure_present && prob(cure_chance))
|
||||
stage = max(stage - 1, 1)
|
||||
|
||||
if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
|
||||
cure()
|
||||
return
|
||||
return
|
||||
|
||||
/datum/disease/proc/has_cure()//check if affected_mob has required reagents.
|
||||
if(!cure_id) return 0
|
||||
var/result = 1
|
||||
if(cure_list == list(cure_id))
|
||||
if(istype(cure_id, /list))
|
||||
for(var/C_id in cure_id)
|
||||
if(!affected_mob.reagents.has_reagent(C_id))
|
||||
result = 0
|
||||
else if(!affected_mob.reagents.has_reagent(cure_id))
|
||||
result = 0
|
||||
else
|
||||
for(var/C_list in cure_list)
|
||||
if(istype(C_list, /list))
|
||||
for(var/C_id in cure_id)
|
||||
if(!affected_mob.reagents.has_reagent(C_id))
|
||||
result = 0
|
||||
else if(!affected_mob.reagents.has_reagent(C_list))
|
||||
result = 0
|
||||
|
||||
return result
|
||||
|
||||
/datum/disease/proc/spread_by_touch()
|
||||
switch(spread_type)
|
||||
if(CONTACT_FEET, CONTACT_HANDS, CONTACT_GENERAL)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source=null, var/airborne_range = 2, var/force_spread)
|
||||
//world << "Disease [src] proc spread was called from holder [source]"
|
||||
|
||||
// If we're overriding how we spread, say so here
|
||||
var/how_spread = spread_type
|
||||
if(force_spread)
|
||||
how_spread = force_spread
|
||||
|
||||
if(how_spread == SPECIAL || how_spread == NON_CONTAGIOUS || how_spread == BLOOD)//does not spread
|
||||
return
|
||||
|
||||
if(stage < contagious_period) //the disease is not contagious at this stage
|
||||
return
|
||||
|
||||
if(!source)//no holder specified
|
||||
if(affected_mob)//no mob affected holder
|
||||
source = affected_mob
|
||||
else //no source and no mob affected. Rogue disease. Break
|
||||
return
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
return // Don't spread if we have spaceacillin in our system.
|
||||
|
||||
var/check_range = airborne_range//defaults to airborne - range 2
|
||||
|
||||
if(how_spread != AIRBORNE && how_spread != SPECIAL)
|
||||
check_range = 1 // everything else, like infect-on-contact things, only infect things on top of it
|
||||
|
||||
if(isturf(source.loc))
|
||||
for(var/mob/living/carbon/M in oview(check_range, source))
|
||||
if(isturf(M.loc))
|
||||
if(AStar(source.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
|
||||
M.contract_disease(src, 0, 1, force_spread)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/proc/process()
|
||||
|
||||
if(!holder)
|
||||
active_diseases -= src
|
||||
return
|
||||
if(prob(65))
|
||||
spread(holder)
|
||||
|
||||
if(affected_mob)
|
||||
for(var/datum/disease/D in affected_mob.viruses)
|
||||
if(D != src)
|
||||
if(IsSame(D))
|
||||
//ERROR("Deleting [D.name] because it's the same as [src.name].")
|
||||
del(D) // if there are somehow two viruses of the same kind in the system, delete the other one
|
||||
|
||||
if(holder == affected_mob)
|
||||
if(affected_mob.stat != DEAD) //he's alive
|
||||
stage_act()
|
||||
else //he's dead.
|
||||
if(spread_type!=SPECIAL)
|
||||
spread_type = CONTACT_GENERAL
|
||||
affected_mob = null
|
||||
if(!affected_mob) //the virus is in inanimate obj
|
||||
// world << "[src] longevity = [longevity]"
|
||||
|
||||
if(prob(70))
|
||||
if(--longevity<=0)
|
||||
cure(0)
|
||||
return
|
||||
|
||||
/datum/disease/proc/cure(var/resistance=1)//if resistance = 0, the mob won't develop resistance to disease
|
||||
if(affected_mob)
|
||||
if(resistance && !(type in affected_mob.resistances))
|
||||
affected_mob.resistances += type
|
||||
affected_mob.viruses -= src //remove the datum from the list
|
||||
del(src) //delete the datum to stop it processing
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/New(var/process=1, var/datum/disease/D)//process = 1 - adding the object to global list. List is processed by master controller.
|
||||
if(requires == 1)
|
||||
if(ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
if(!H.getlimb(required_limb))
|
||||
cure(1)
|
||||
return
|
||||
|
||||
cure_list = list(cure_id) // to add more cures, add more vars to this list in the actual disease's New()
|
||||
if(process) // Viruses in list are considered active.
|
||||
active_diseases += src
|
||||
initial_spread = spread
|
||||
|
||||
/datum/disease/proc/IsSame(var/datum/disease/D)
|
||||
if(istype(src, D.type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/Copy(var/process = 0)
|
||||
return new type(process, src)
|
||||
|
||||
/datum/disease/proc/GetDiseaseID()
|
||||
return src.type
|
||||
|
||||
/datum/disease/Del()
|
||||
active_diseases.Remove(src)
|
||||
..()
|
||||
@@ -0,0 +1,125 @@
|
||||
|
||||
/mob/proc/HasDisease(var/datum/disease/D)
|
||||
for(var/datum/disease/DD in viruses)
|
||||
if(D.IsSame(D))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/proc/CanContractDisease(var/datum/disease/D)
|
||||
if(stat == DEAD)
|
||||
return 0
|
||||
|
||||
if(D.GetDiseaseID() in resistances)
|
||||
return 0
|
||||
|
||||
if(HasDisease(D))
|
||||
return 0
|
||||
|
||||
if(!(type in D.viable_mobtypes))
|
||||
return 0
|
||||
|
||||
if(count_by_type(viruses, /datum/disease/advance) >= 3)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/mob/proc/ContractDisease(var/datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
AddDisease(D)
|
||||
|
||||
|
||||
/mob/proc/AddDisease(var/datum/disease/D)
|
||||
var/datum/disease/DD = new D.type()
|
||||
viruses += DD
|
||||
DD.affected_mob = src
|
||||
DD.holder = src
|
||||
if(DD.disease_flags & CAN_CARRY && prob(5))
|
||||
DD.carrier++
|
||||
|
||||
|
||||
/mob/living/carbon/ContractDisease(var/datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
|
||||
var/head_ch = 100
|
||||
var/body_ch = 100
|
||||
var/hands_ch = 25
|
||||
var/feet_ch = 25
|
||||
|
||||
if(D.spread_flags & CONTACT_HANDS)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 100
|
||||
feet_ch = 0
|
||||
if(D.spread_flags & CONTACT_FEET)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 0
|
||||
feet_ch = 100
|
||||
|
||||
if(prob(15/D.permeability_mod))
|
||||
return
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)
|
||||
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(isobj(H.head) && !istype(H.head, /obj/item/weapon/paper))
|
||||
Cl = H.head
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(passed && isobj(H.wear_mask))
|
||||
Cl = H.wear_mask
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(2)
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(passed && isobj(slot_w_uniform))
|
||||
Cl = slot_w_uniform
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(3)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
Cl = H.wear_suit
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
|
||||
if(passed && isobj(H.gloves))
|
||||
Cl = H.gloves
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(4)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
||||
Cl = H.wear_suit
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
|
||||
if(passed && isobj(H.shoes))
|
||||
Cl = H.shoes
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
|
||||
if(!passed && (D.spread_flags & AIRBORNE) && !internals)
|
||||
passed = (prob((50*D.permeability_mod) - 1))
|
||||
|
||||
if(passed)
|
||||
AddDisease(D)
|
||||
|
||||
|
||||
//Same as ContractDisease, except never overidden clothes checks
|
||||
/mob/proc/ForceContractDisease(var/datum/disease/D)
|
||||
if(!CanContractDisease(D))
|
||||
return 0
|
||||
AddDisease(D)
|
||||
@@ -0,0 +1,195 @@
|
||||
|
||||
//Visibility Flags
|
||||
#define HIDDEN_SCANNER 1
|
||||
#define HIDDEN_PANDEMIC 2
|
||||
|
||||
//Disease Flags
|
||||
#define CURABLE 1
|
||||
#define CAN_CARRY 2
|
||||
#define CAN_RESIST 3
|
||||
|
||||
//Spread Flags
|
||||
#define SPECIAL -1
|
||||
#define NON_CONTAGIOUS 0
|
||||
#define BLOOD 1
|
||||
#define CONTACT_FEET 2
|
||||
#define CONTACT_HANDS 3
|
||||
#define CONTACT_GENERAL 4
|
||||
#define AIRBORNE 5
|
||||
|
||||
|
||||
//Severity Defines
|
||||
#define NONTHREAT "No threat"
|
||||
#define MINOR "Minor"
|
||||
#define MEDIUM "Medium"
|
||||
#define HARMFUL "Harmful"
|
||||
#define DANGEROUS "Dangerous!"
|
||||
#define BIOHAZARD "BIOHAZARD THREAT!"
|
||||
|
||||
|
||||
var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
|
||||
|
||||
/datum/disease
|
||||
//Flags
|
||||
var/visibility_flags = 0
|
||||
var/disease_flags = CURABLE|CAN_CARRY|CAN_RESIST
|
||||
var/spread_flags = AIRBORNE
|
||||
|
||||
//Fluff
|
||||
var/form = "Virus"
|
||||
var/name = "No disease"
|
||||
var/desc = ""
|
||||
var/agent = "some microbes"
|
||||
var/spread_text = ""
|
||||
var/cure_text = ""
|
||||
|
||||
//Stages
|
||||
var/stage = 1
|
||||
var/max_stages = 0
|
||||
var/stage_prob = 4
|
||||
|
||||
//Other
|
||||
var/longevity = 150 //Time in ticks disease stays in objects, Syringes and such are infinite.
|
||||
var/list/viable_mobtypes = list() //typepaths of viable mobs
|
||||
var/mob/living/carbon/affected_mob = null
|
||||
var/atom/movable/holder = null
|
||||
var/list/cures = list() //list of cures if the disease has the CURABLE flag, these are reagent ids
|
||||
var/infectivity = 65
|
||||
var/cure_chance = 0
|
||||
var/carrier = 0 //If our host is only a carrier
|
||||
var/permeability_mod = 1
|
||||
var/severity = NONTHREAT
|
||||
var/list/required_organs = list()
|
||||
|
||||
var/list/strain_data = list() //dna_spread special bullshit
|
||||
|
||||
|
||||
|
||||
/datum/disease/proc/stage_act()
|
||||
var/cure = has_cure()
|
||||
|
||||
if(carrier && !cure)
|
||||
return
|
||||
|
||||
stage = min(stage, max_stages)
|
||||
|
||||
if(!cure)
|
||||
if(prob(stage_prob))
|
||||
stage = min(stage++,max_stages)
|
||||
else
|
||||
if(prob(cure_chance))
|
||||
stage = max(stage--, 1)
|
||||
|
||||
if(disease_flags & CURABLE)
|
||||
if(cure && prob(cure_chance))
|
||||
cure()
|
||||
|
||||
|
||||
/datum/disease/proc/has_cure()
|
||||
if(!(disease_flags & CURABLE))
|
||||
return 0
|
||||
|
||||
. = 1
|
||||
|
||||
for(var/C_id in cures)
|
||||
if(!affected_mob.reagents.has_reagent(C_id in cures))
|
||||
.--
|
||||
break //One missing cure is enough to fail
|
||||
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source)
|
||||
if(spread_flags & SPECIAL || spread_flags & NON_CONTAGIOUS || spread_flags & BLOOD)
|
||||
return
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
return
|
||||
|
||||
var/spread_range = 1
|
||||
|
||||
if(spread_flags & AIRBORNE)
|
||||
spread_range++
|
||||
|
||||
if(!source)
|
||||
if(affected_mob)
|
||||
source = affected_mob
|
||||
else
|
||||
return
|
||||
|
||||
if(isturf(source.loc))
|
||||
for(var/mob/living/carbon/C in oview(spread_range, source))
|
||||
if(isturf(C.loc))
|
||||
if(AStar(source.loc, C.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, spread_range))
|
||||
C.ContractDisease(src)
|
||||
|
||||
|
||||
/datum/disease/proc/process()
|
||||
if(!holder)
|
||||
active_diseases -= src
|
||||
return
|
||||
|
||||
if(prob(infectivity))
|
||||
spread(holder)
|
||||
|
||||
if(affected_mob)
|
||||
for(var/datum/disease/D in affected_mob.viruses)
|
||||
if(D != src)
|
||||
if(IsSame(D))
|
||||
del(D)
|
||||
|
||||
if(holder == affected_mob)
|
||||
if(affected_mob.stat != DEAD)
|
||||
stage_act()
|
||||
|
||||
if(!affected_mob)
|
||||
if(prob(70))
|
||||
if(--longevity<=0)
|
||||
cure()
|
||||
|
||||
|
||||
/datum/disease/proc/cure()
|
||||
if(affected_mob)
|
||||
if(disease_flags & CAN_RESIST)
|
||||
if(!(type in affected_mob.resistances))
|
||||
affected_mob.resistances += type
|
||||
affected_mob.viruses -= src
|
||||
del(src)
|
||||
|
||||
|
||||
/datum/disease/New()
|
||||
if(required_organs && required_organs.len)
|
||||
if(ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
for(var/obj/item/organ/O in required_organs)
|
||||
if(!locate(O) in H.organs)
|
||||
if(!locate(O) in H.internal_organs)
|
||||
cure()
|
||||
return
|
||||
|
||||
active_diseases += src
|
||||
|
||||
|
||||
/datum/disease/proc/IsSame(var/datum/disease/D)
|
||||
if(istype(src, D.type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/datum/disease/proc/Copy()
|
||||
return new type()
|
||||
|
||||
|
||||
/datum/disease/proc/GetDiseaseID()
|
||||
return type
|
||||
|
||||
|
||||
/datum/disease/Del()
|
||||
active_diseases.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
/datum/disease/proc/IsSpreadByTouch()
|
||||
if(spread_flags & CONTACT_FEET || spread_flags & CONTACT_HANDS || spread_flags & CONTACT_GENERAL)
|
||||
return 1
|
||||
return 0
|
||||
@@ -30,8 +30,8 @@ var/list/advance_cures = list(
|
||||
form = "Advance Disease" // Will let med-scanners know that this disease was engineered.
|
||||
agent = "advance microbes"
|
||||
max_stages = 5
|
||||
spread = "Unknown"
|
||||
affected_species = list("Human","Monkey")
|
||||
spread_text = "Unknown"
|
||||
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
|
||||
// NEW VARS
|
||||
|
||||
@@ -198,8 +198,12 @@ var/list/advance_cures = list(
|
||||
/datum/disease/advance/proc/AssignProperties(var/list/properties = list())
|
||||
|
||||
if(properties && properties.len)
|
||||
switch(properties["stealth"])
|
||||
if(2 to 3)
|
||||
visibility_flags = HIDDEN_SCANNER
|
||||
if(3 to INFINITY)
|
||||
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
|
||||
|
||||
hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) )
|
||||
// The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
|
||||
SetSpread(Clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE))
|
||||
permeability_mod = max(Ceiling(0.4 * properties["transmittable"]), 1)
|
||||
@@ -214,37 +218,35 @@ var/list/advance_cures = list(
|
||||
// Assign the spread type and give it the correct description.
|
||||
/datum/disease/advance/proc/SetSpread(var/spread_id)
|
||||
switch(spread_id)
|
||||
|
||||
if(NON_CONTAGIOUS)
|
||||
spread = "None"
|
||||
spread_text = "None"
|
||||
if(SPECIAL)
|
||||
spread = "None"
|
||||
spread_text = "None"
|
||||
if(CONTACT_GENERAL, CONTACT_HANDS, CONTACT_FEET)
|
||||
spread = "On contact"
|
||||
spread_text = "On contact"
|
||||
if(AIRBORNE)
|
||||
spread = "Airborne"
|
||||
spread_text = "Airborne"
|
||||
if(BLOOD)
|
||||
spread = "Blood"
|
||||
spread_text = "Blood"
|
||||
|
||||
spread_type = spread_id
|
||||
//world << "Setting spread type to [spread_id]/[spread]"
|
||||
spread_flags = spread_id
|
||||
|
||||
/datum/disease/advance/proc/SetSeverity(var/level_sev)
|
||||
|
||||
switch(level_sev)
|
||||
|
||||
if(-INFINITY to 0)
|
||||
severity = non_threat
|
||||
severity = NONTHREAT
|
||||
if(1)
|
||||
severity = "Minor"
|
||||
severity = MINOR
|
||||
if(2)
|
||||
severity = "Medium"
|
||||
severity = MEDIUM
|
||||
if(3)
|
||||
severity = "Harmful"
|
||||
severity = HARMFUL
|
||||
if(4)
|
||||
severity = "Dangerous!"
|
||||
severity = DANGEROUS
|
||||
if(5 to INFINITY)
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
severity = BIOHAZARD
|
||||
else
|
||||
severity = "Unknown"
|
||||
|
||||
@@ -254,11 +256,11 @@ var/list/advance_cures = list(
|
||||
if(properties && properties.len)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
|
||||
//world << "Res = [res]"
|
||||
cure_id = advance_cures[res]
|
||||
cures = list(advance_cures[res])
|
||||
|
||||
// Get the cure name from the cure_id
|
||||
var/datum/reagent/D = chemical_reagents_list[cure_id]
|
||||
cure = D.name
|
||||
var/datum/reagent/D = chemical_reagents_list[cures[1]]
|
||||
cure_text = D.name
|
||||
|
||||
|
||||
return
|
||||
@@ -406,8 +408,8 @@ var/list/advance_cures = list(
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
if(H.z != 1)
|
||||
continue
|
||||
if(!H.has_disease(D))
|
||||
H.contract_disease(D, 1)
|
||||
if(!H.HasDisease(D))
|
||||
H.ForceContractDisease(D)
|
||||
break
|
||||
|
||||
var/list/name_symptoms = list()
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
form = "Condition"
|
||||
name = "Appendicitis"
|
||||
max_stages = 3
|
||||
spread = "Acute"
|
||||
cure = "Surgery"
|
||||
cure_text = "Surgery"
|
||||
agent = "Shitty Appendix"
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
permeability_mod = 1
|
||||
contagious_period = 9001 //slightly hacky, but hey! whatever works, right?
|
||||
desc = "If left untreated the subject will become very weak, and may vomit often."
|
||||
severity = "Dangerous!"
|
||||
longevity = 1000
|
||||
hidden = list(0, 1)
|
||||
requires = 1
|
||||
required_limb = list(/obj/item/organ/limb/chest)
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
visibility_flags = HIDDEN_PANDEMIC
|
||||
required_organs = list(/obj/item/organ/limb/chest)
|
||||
|
||||
|
||||
/datum/disease/appendicitis/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
/datum/disease/brainrot
|
||||
name = "Brainrot"
|
||||
max_stages = 4
|
||||
spread = "On contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Alkysine"
|
||||
cure_id = list("alkysine")
|
||||
spread_text = "On contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cures = list("alkysine")
|
||||
agent = "Cryptococcus Cosmosis"
|
||||
affected_species = list("Human")
|
||||
curable = 0
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
cure_chance = 15//higher chance to cure, since two reagents are required
|
||||
desc = "This disease destroys the braincells, causing brain fever, brain necrosis and general intoxication."
|
||||
severity = "Dangerous!"
|
||||
requires = 1
|
||||
required_limb = list(/obj/item/organ/limb/head)
|
||||
required_organs = list(/obj/item/organ/limb/head)
|
||||
severity = DANGEROUS
|
||||
|
||||
/datum/disease/brainrot/stage_act() //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist -ACTUALLY Removed rather than commented out, I don't see it returning - RR
|
||||
..()
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/datum/disease/cold
|
||||
name = "The Cold"
|
||||
max_stages = 3
|
||||
spread = "Airborne"
|
||||
cure = "Rest & Spaceacillin"
|
||||
cure_id = "spaceacillin"
|
||||
spread_flags = AIRBORNE
|
||||
cure_text = "Rest & Spaceacillin"
|
||||
cures = list("spaceacillin")
|
||||
agent = "XY-rhinovirus"
|
||||
affected_species = list("Human", "Monkey")
|
||||
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
permeability_mod = 0.5
|
||||
desc = "If left untreated the subject will contract the flu."
|
||||
severity = "Minor"
|
||||
severity = MINOR
|
||||
|
||||
/datum/disease/cold/stage_act()
|
||||
..()
|
||||
@@ -62,5 +62,5 @@
|
||||
if(prob(1) && prob(50))
|
||||
if(!affected_mob.resistances.Find(/datum/disease/flu))
|
||||
var/datum/disease/Flu = new /datum/disease/flu(0)
|
||||
affected_mob.contract_disease(Flu,1)
|
||||
affected_mob.ContractDisease(Flu)
|
||||
cure()
|
||||
@@ -1,14 +1,14 @@
|
||||
/datum/disease/cold9
|
||||
name = "The Cold"
|
||||
max_stages = 3
|
||||
spread = "On contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Common Cold Anti-bodies & Spaceacillin"
|
||||
cure_id = "spaceacillin"
|
||||
spread_text = "On contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cure_text = "Common Cold Anti-bodies & Spaceacillin"
|
||||
cures = list("spaceacillin")
|
||||
agent = "ICE9-rhinovirus"
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "If left untreated the subject will slow, as if partly frozen."
|
||||
severity = "Medium"
|
||||
severity = MEDIUM
|
||||
|
||||
/datum/disease/cold9/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/datum/disease/dnaspread
|
||||
name = "Space Retrovirus"
|
||||
max_stages = 4
|
||||
spread = "On contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Ryetalyn"
|
||||
cure_id = "ryetalyn"
|
||||
curable = 0
|
||||
spread_text = "On contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cure_text = "Ryetalyn"
|
||||
cures = list("ryetalyn")
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
agent = "S4E1 retrovirus"
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
var/list/original_dna = list()
|
||||
var/transformed = 0
|
||||
desc = "This disease transplants the genetic code of the intial vector into new hosts."
|
||||
severity = "Medium"
|
||||
severity = MEDIUM
|
||||
|
||||
|
||||
/datum/disease/dnaspread/stage_act()
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/datum/disease/fake_gbs
|
||||
name = "GBS"
|
||||
max_stages = 5
|
||||
spread = "On contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Synaptizine & Sulfur"
|
||||
cure_id = list("synaptizine","sulfur")
|
||||
spread_text = "On contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cure_text = "Synaptizine & Sulfur"
|
||||
cures = list("synaptizine","sulfur")
|
||||
agent = "Gravitokinetic Bipotential SADS-"
|
||||
affected_species = list("Human", "Monkey")
|
||||
viable_mobtypes = list(/mob/living/carbon/human,/mob/living/carbon/monkey)
|
||||
desc = "If left untreated death will occur."
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
severity = BIOHAZARD
|
||||
|
||||
/datum/disease/fake_gbs/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
/datum/disease/flu
|
||||
name = "The Flu"
|
||||
max_stages = 3
|
||||
spread = "Airborne"
|
||||
cure = "Spaceacillin"
|
||||
cure_id = "spaceacillin"
|
||||
spread_text = "Airborne"
|
||||
cures = list("spaceacillin")
|
||||
cure_chance = 10
|
||||
agent = "H13N1 flu virion"
|
||||
affected_species = list("Human", "Monkey")
|
||||
viable_mobtypes = list(/mob/living/carbon/human,/mob/living/carbon/monkey)
|
||||
permeability_mod = 0.75
|
||||
desc = "If left untreated the subject will feel quite unwell."
|
||||
severity = "Medium"
|
||||
severity = MEDIUM
|
||||
|
||||
/datum/disease/flu/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(2)
|
||||
/*
|
||||
if(affected_mob.sleeping && prob(20)) //removed until sleeping is fixed --Blaank
|
||||
affected_mob << "\blue You feel better."
|
||||
stage--
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(20)) //added until sleeping is fixed --Blaank
|
||||
if(affected_mob.lying && prob(20))
|
||||
affected_mob << "<span class='notice'>You feel better.</span>"
|
||||
stage--
|
||||
return
|
||||
@@ -40,13 +33,7 @@
|
||||
affected_mob.updatehealth()
|
||||
|
||||
if(3)
|
||||
/*
|
||||
if(affected_mob.sleeping && prob(15)) //removed until sleeping is fixed
|
||||
affected_mob << "\blue You feel better."
|
||||
stage--
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(15)) //added until sleeping is fixed
|
||||
if(affected_mob.lying && prob(15))
|
||||
affected_mob << "<span class='notice'>You feel better.</span>"
|
||||
stage--
|
||||
return
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/datum/disease/fluspanish
|
||||
name = "Spanish inquisition Flu"
|
||||
max_stages = 3
|
||||
spread = "Airborne"
|
||||
cure = "Spaceacillin & Anti-bodies to the common flu"
|
||||
cure_id = "spaceacillin"
|
||||
spread_text = "Airborne"
|
||||
cure_text = "Spaceacillin & Anti-bodies to the common flu"
|
||||
cures = list("spaceacillin")
|
||||
cure_chance = 10
|
||||
agent = "1nqu1s1t10n flu virion"
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
permeability_mod = 0.75
|
||||
desc = "If left untreated the subject will burn to death for being a heretic."
|
||||
severity = "Dangerous!"
|
||||
severity = DANGEROUS
|
||||
|
||||
/datum/disease/inquisition/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/datum/disease/gbs
|
||||
name = "GBS"
|
||||
max_stages = 5
|
||||
spread = "On contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Synaptizine & Sulfur"
|
||||
cure_id = list("synaptizine","sulfur")
|
||||
spread_text = "On contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cure_text = "Synaptizine & Sulfur"
|
||||
cures = list("synaptizine","sulfur")
|
||||
cure_chance = 15//higher chance to cure, since two reagents are required
|
||||
agent = "Gravitokinetic Bipotential SADS+"
|
||||
affected_species = list("Human")
|
||||
curable = 0
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
permeability_mod = 1
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
severity = BIOHAZARD
|
||||
|
||||
/datum/disease/gbs/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/datum/disease/magnitis
|
||||
name = "Magnitis"
|
||||
max_stages = 4
|
||||
spread = "Airborne"
|
||||
cure = "Iron"
|
||||
cure_id = "iron"
|
||||
spread_text = "Airborne"
|
||||
cure_text = "Iron"
|
||||
cures = list("iron")
|
||||
agent = "Fukkos Miracos"
|
||||
affected_species = list("Human")
|
||||
curable = 0
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
permeability_mod = 0.75
|
||||
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
|
||||
severity = "Medium"
|
||||
severity = MEDIUM
|
||||
|
||||
/datum/disease/magnitis/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/datum/disease/pierrot_throat
|
||||
name = "Pierrot's Throat"
|
||||
max_stages = 4
|
||||
spread = "Airborne"
|
||||
cure = "Banana products, especially banana bread."
|
||||
cure_id = "banana"
|
||||
spread_text = "Airborne"
|
||||
cure_text = "Banana products, especially banana bread."
|
||||
cures = list("banana")
|
||||
cure_chance = 75
|
||||
agent = "H0NI<42 Virus"
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
permeability_mod = 0.75
|
||||
desc = "If left untreated the subject will probably drive others to insanity."
|
||||
severity = "Medium"
|
||||
severity = MEDIUM
|
||||
longevity = 400
|
||||
|
||||
/datum/disease/pierrot_throat/stage_act()
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/datum/disease/plasmatoid
|
||||
name = "Plasmatoid"
|
||||
max_stages = 4
|
||||
cure = "None"
|
||||
affected_species = list("Monkey", "Human")
|
||||
severity = "Unknown"
|
||||
@@ -1,29 +1,28 @@
|
||||
/datum/disease/dna_retrovirus
|
||||
name = "Retrovirus"
|
||||
max_stages = 4
|
||||
spread = "Contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Rest or an injection of ryetalyn"
|
||||
spread_text = "Contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cure_text = "Rest or an injection of ryetalyn"
|
||||
cure_chance = 6
|
||||
agent = ""
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "A DNA-altering retrovirus that scrambles the structural and unique enzymes of a host constantly."
|
||||
severity = "Dangerous!"
|
||||
severity = DANGEROUS
|
||||
permeability_mod = 0.4
|
||||
stage_prob = 2
|
||||
var/SE
|
||||
var/UI
|
||||
var/restcure = 0
|
||||
New()
|
||||
..()
|
||||
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
|
||||
if(prob(40))
|
||||
cure_id = list("ryetalyn")
|
||||
cure_list = list("ryetalyn")
|
||||
else
|
||||
restcure = 1
|
||||
|
||||
|
||||
/datum/disease/dna_retrovirus/New()
|
||||
..()
|
||||
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
|
||||
if(prob(40))
|
||||
cures = list("ryetalyn")
|
||||
else
|
||||
restcure = 1
|
||||
|
||||
|
||||
/datum/disease/dna_retrovirus/stage_act()
|
||||
@@ -31,13 +30,7 @@
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(restcure)
|
||||
/*
|
||||
if(affected_mob.sleeping && prob(30)) //removed until sleeping is fixed
|
||||
affected_mob << "\blue You feel better."
|
||||
cure()
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(30)) //changed FROM prob(20) until sleeping is fixed
|
||||
if(affected_mob.lying && prob(30))
|
||||
affected_mob << "<span class='notice'>You feel better.</span>"
|
||||
cure()
|
||||
return
|
||||
@@ -49,13 +42,7 @@
|
||||
affected_mob << "<span class='danger'>You feel angry.</span>"
|
||||
if(2)
|
||||
if(restcure)
|
||||
/*
|
||||
if(affected_mob.sleeping && prob(20)) //removed until sleeping is fixed
|
||||
affected_mob << "\blue You feel better."
|
||||
cure()
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(20)) //changed FROM prob(10) until sleeping is fixed
|
||||
if(affected_mob.lying && prob(20))
|
||||
affected_mob << "<span class='notice'>You feel better.</span>"
|
||||
cure()
|
||||
return
|
||||
@@ -70,13 +57,7 @@
|
||||
affected_mob << "<span class='danger'>Your stomach churns.</span>"
|
||||
if(3)
|
||||
if(restcure)
|
||||
/*
|
||||
if(affected_mob.sleeping && prob(20)) //removed until sleeping is fixed
|
||||
affected_mob << "\blue You feel better."
|
||||
cure()
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(20)) //changed FROM prob(10) until sleeping is fixed
|
||||
if(affected_mob.lying && prob(20))
|
||||
affected_mob << "<span class='notice'>You feel better.</span>"
|
||||
cure()
|
||||
return
|
||||
@@ -89,13 +70,7 @@
|
||||
|
||||
if(4)
|
||||
if(restcure)
|
||||
/*
|
||||
if(affected_mob.sleeping && prob(10)) //removed until sleeping is fixed
|
||||
affected_mob << "\blue You feel better."
|
||||
cure()
|
||||
return
|
||||
*/
|
||||
if(affected_mob.lying && prob(5)) //changed FROM prob(5) until sleeping is fixed
|
||||
if(affected_mob.lying && prob(5))
|
||||
affected_mob << "<span class='notice'>You feel better.</span>"
|
||||
cure()
|
||||
return
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/datum/disease/rhumba_beat
|
||||
name = "The Rhumba Beat"
|
||||
max_stages = 5
|
||||
spread = "On contact"
|
||||
spread_type = CONTACT_GENERAL
|
||||
cure = "Chick Chicky Boom!"
|
||||
cure_id = list("plasma")
|
||||
spread_text = "On contact"
|
||||
spread_flags = CONTACT_GENERAL
|
||||
cure_text = "Chick Chicky Boom!"
|
||||
cures = list("plasma")
|
||||
agent = "Unknown"
|
||||
affected_species = list("Human")
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
permeability_mod = 1
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
severity = BIOHAZARD
|
||||
|
||||
/datum/disease/rhumba_beat/stage_act()
|
||||
..()
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
//Nanomachines!
|
||||
|
||||
/datum/disease/robotic_transformation
|
||||
name = "Robotic Transformation"
|
||||
max_stages = 5
|
||||
spread = "Syringe"
|
||||
spread_type = SPECIAL
|
||||
cure = "An injection of copper."
|
||||
cure_id = list("copper")
|
||||
cure_chance = 5
|
||||
agent = "R2D2 Nanomachines"
|
||||
affected_species = list("Human")
|
||||
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
||||
severity = "Major"
|
||||
var/gibbed = 0
|
||||
|
||||
/datum/disease/robotic_transformation/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(2)
|
||||
if (prob(8))
|
||||
affected_mob << "Your joints feel stiff."
|
||||
affected_mob.take_organ_damage(1)
|
||||
if (prob(9))
|
||||
affected_mob << "<span class='danger'>Beep...boop..</span>"
|
||||
if (prob(9))
|
||||
affected_mob << "<span class='danger'>Bop...beeep...</span>"
|
||||
if(3)
|
||||
if (prob(8))
|
||||
affected_mob << "<span class='danger'>Your joints feel very stiff.</span>"
|
||||
affected_mob.take_organ_damage(1)
|
||||
if (prob(8))
|
||||
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
|
||||
if (prob(10))
|
||||
affected_mob << "Your skin feels loose."
|
||||
affected_mob.take_organ_damage(5)
|
||||
if (prob(4))
|
||||
affected_mob << "<span class='danger'>You feel a stabbing pain in your head.</span>"
|
||||
affected_mob.Paralyse(2)
|
||||
if (prob(4))
|
||||
affected_mob << "<span class='danger'>You can feel something move...inside.</span>"
|
||||
if(4)
|
||||
if (prob(10))
|
||||
affected_mob << "<span class='danger'>Your skin feels very loose.</span>"
|
||||
affected_mob.take_organ_damage(8)
|
||||
if (prob(20))
|
||||
affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."))
|
||||
if (prob(8))
|
||||
affected_mob << "<span class='danger'>You can feel... something...inside you.</span>"
|
||||
if(5)
|
||||
affected_mob <<"<span class='danger'>Your skin feels as if it's about to burst off...</span>"
|
||||
affected_mob.adjustToxLoss(10)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(40)) //So everyone can feel like robot Seth Brundle
|
||||
if(src.gibbed != 0) return 0
|
||||
var/turf/T = find_loc(affected_mob)
|
||||
gibs(T)
|
||||
gibbed = 1
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
if(istype(H) && !jobban_isbanned(affected_mob, "Cyborg"))
|
||||
H.Robotize()
|
||||
else
|
||||
affected_mob.death(1)
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
/datum/disease/transformation
|
||||
|
||||
name = "Transformation"
|
||||
max_stages = 5
|
||||
spread = "Acute"
|
||||
spread_type = SPECIAL
|
||||
cure = "A coder's love (theoretical)."
|
||||
spread_text = "Acute"
|
||||
spread_flags = SPECIAL
|
||||
cure_text = "A coder's love (theoretical)."
|
||||
agent = "Shenanigans"
|
||||
affected_species = list("Human", "Monkey", "Alien")
|
||||
severity = "Harmful"
|
||||
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey, /mob/living/carbon/alien)
|
||||
severity = HARMFUL
|
||||
stage_prob = 10
|
||||
hidden = list(1, 1)
|
||||
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
|
||||
var/list/stage1 = list("You feel unremarkable.")
|
||||
var/list/stage2 = list("You feel boring.")
|
||||
var/list/stage3 = list("You feel utterly plain.")
|
||||
@@ -68,19 +67,19 @@
|
||||
|
||||
/datum/disease/transformation/jungle_fever
|
||||
name = "Jungle Fever"
|
||||
cure = "Bananas"
|
||||
cure_id = "banana"
|
||||
spread = "Monkey Bites"
|
||||
spread_type = SPECIAL
|
||||
affected_species = list("Monkey", "Human")
|
||||
cure_text = "Bananas"
|
||||
cures = list("banana")
|
||||
spread_text = "Monkey Bites"
|
||||
spread_flags = SPECIAL
|
||||
viable_mobtypes = list(/mob/living/carbon/monkey, /mob/living/carbon/human)
|
||||
permeability_mod = 1
|
||||
cure_chance = 1
|
||||
curable = 0
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
longevity = 30
|
||||
desc = "Monkeys with this disease will bite humans, causing humans to mutate into a monkey."
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
hidden = list(0, 0)//Not hidden, with the exception of the starting ape.
|
||||
severity = BIOHAZARD
|
||||
stage_prob = 4
|
||||
visibility_flags = 0
|
||||
agent = "Kongey Vibrion M-909"
|
||||
new_form = /mob/living/carbon/monkey
|
||||
|
||||
@@ -118,13 +117,13 @@
|
||||
/datum/disease/transformation/robot
|
||||
|
||||
name = "Robotic Transformation"
|
||||
cure = "An injection of copper."
|
||||
cure_id = list("copper")
|
||||
cure_text = "An injection of copper."
|
||||
cures = list("copper")
|
||||
cure_chance = 5
|
||||
agent = "R2D2 Nanomachines"
|
||||
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
||||
severity = "Dangerous!"
|
||||
hidden = list(0, 0)
|
||||
severity = DANGEROUS
|
||||
visibility_flags = 0
|
||||
stage1 = null
|
||||
stage2 = list("Your joints feel stiff.", "<span class='danger'>Beep...boop..</span>")
|
||||
stage3 = list("<span class='danger'>Your joints feel very stiff.</span>", "Your skin feels loose.", "<span class='danger'>You can feel something move...inside.</span>")
|
||||
@@ -150,13 +149,13 @@
|
||||
/datum/disease/transformation/xeno
|
||||
|
||||
name = "Xenomorph Transformation"
|
||||
cure = "Spaceacillin & Glycerol"
|
||||
cure_id = list("spaceacillin", "glycerol")
|
||||
cure_text = "Spaceacillin & Glycerol"
|
||||
cures = list("spaceacillin", "glycerol")
|
||||
cure_chance = 5
|
||||
agent = "Rip-LEY Alien Microbes"
|
||||
desc = "This disease changes the victim into a xenomorph."
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
hidden = list(0, 0)
|
||||
severity = BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = null
|
||||
stage2 = list("Your throat feels scratchy.", "<span class='danger'>Kill...</span>")
|
||||
stage3 = list("<span class='danger'>Your throat feels very scratchy.</span>", "Your skin feels tight.", "<span class='danger'>You can feel something move...inside.</span>")
|
||||
@@ -178,13 +177,13 @@
|
||||
|
||||
/datum/disease/transformation/slime
|
||||
name = "Advanced Mutation Transformation"
|
||||
cure = "frost oil"
|
||||
cure_id = list("frostoil")
|
||||
cure_text = "frost oil"
|
||||
cures = list("frostoil")
|
||||
cure_chance = 80
|
||||
agent = "Advanced Mutation Toxin"
|
||||
desc = "This highly concentrated extract converts anything into more of itself."
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
hidden = list(0, 0)
|
||||
severity = BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = list("You don't feel very well.")
|
||||
stage2 = list("You are turning a little green.")
|
||||
stage3 = list("<span class='danger'>Your limbs are getting oozy.</span>", "<span class='danger'>Your skin begins to peel away.</span>")
|
||||
@@ -207,10 +206,10 @@
|
||||
|
||||
/datum/disease/transformation/corgi
|
||||
name = "The Barkening"
|
||||
cure = "Death"
|
||||
cure_text = "Death"
|
||||
agent = "Fell Doge Majicks"
|
||||
desc = "This disease transforms the victim into a corgi."
|
||||
hidden = list(0, 0)
|
||||
visibility_flags = 0
|
||||
stage1 = list("BARK.")
|
||||
stage2 = list("You feel the need to wear silly hats.")
|
||||
stage3 = list("<span class='danger'>Must... eat... chocolate....</span>", "<span class='danger'>YAP</span>")
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
/datum/disease/wizarditis
|
||||
name = "Wizarditis"
|
||||
max_stages = 4
|
||||
spread = "Airborne"
|
||||
cure = "The Manly Dorf"
|
||||
cure_id = "manlydorf"
|
||||
spread_text = "Airborne"
|
||||
cure_text = "The Manly Dorf"
|
||||
cures = list("manlydorf")
|
||||
cure_chance = 100
|
||||
agent = "Rincewindus Vulgaris"
|
||||
affected_species = list("Human")
|
||||
curable = 1
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
permeability_mod = 0.75
|
||||
desc = "Some speculate, that this virus is the cause of Wizard Federation existance. Subjects affected show the signs of mental retardation, yelling obscure sentences or total gibberish. On late stages subjects sometime express the feelings of inner power, and, cite, 'the ability to control the forces of cosmos themselves!' A gulp of strong, manly spirits usually reverts them to normal, humanlike, condition."
|
||||
severity = "Harmful"
|
||||
requires = 1
|
||||
required_limb = list(/obj/item/organ/limb/head)
|
||||
severity = HARMFUL
|
||||
required_organs = list(/obj/item/organ/limb/head)
|
||||
|
||||
/*
|
||||
BIRUZ BENNAR
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
//Xenomicrobes
|
||||
|
||||
/datum/disease/xeno_transformation
|
||||
name = "Xenomorph Transformation"
|
||||
max_stages = 5
|
||||
spread = "Syringe"
|
||||
spread_type = SPECIAL
|
||||
cure = "Spaceacillin & Glycerol"
|
||||
cure_id = list("spaceacillin", "glycerol")
|
||||
cure_chance = 5
|
||||
agent = "Rip-LEY Alien Microbes"
|
||||
affected_species = list("Human")
|
||||
var/gibbed = 0
|
||||
|
||||
/datum/disease/xeno_transformation/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(2)
|
||||
if (prob(8))
|
||||
affected_mob << "Your throat feels scratchy."
|
||||
affected_mob.take_organ_damage(1)
|
||||
if (prob(9))
|
||||
affected_mob << "<span class='danger'>Kill...</span>"
|
||||
if (prob(9))
|
||||
affected_mob << "<span class='danger'>Kill...</span>"
|
||||
if(3)
|
||||
if (prob(8))
|
||||
affected_mob << "<span class='danger'>Your throat feels very scratchy.</span>"
|
||||
affected_mob.take_organ_damage(1)
|
||||
/*
|
||||
if (prob(8))
|
||||
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"))
|
||||
*/
|
||||
if (prob(10))
|
||||
affected_mob << "Your skin feels tight."
|
||||
affected_mob.take_organ_damage(5)
|
||||
if (prob(4))
|
||||
affected_mob << "<span class='danger'>You feel a stabbing pain in your head.</span>"
|
||||
affected_mob.Paralyse(2)
|
||||
if (prob(4))
|
||||
affected_mob << "<span class='danger'>You can feel something move...inside.</span>"
|
||||
if(4)
|
||||
if (prob(10))
|
||||
affected_mob << pick("<span class='danger'>Your skin feels very tight.</span>", "<span class='danger'>Your blood boils!</span>")
|
||||
affected_mob.take_organ_damage(8)
|
||||
if (prob(20))
|
||||
affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"))
|
||||
if (prob(8))
|
||||
affected_mob << "<span class='danger'>You can feel... something...inside you.</span>"
|
||||
if(5)
|
||||
affected_mob <<"<span class='danger'>Your skin feels impossibly calloused...</span>"
|
||||
affected_mob.adjustToxLoss(10)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(40))
|
||||
if(gibbed != 0) return 0
|
||||
var/turf/T = find_loc(affected_mob)
|
||||
gibs(T)
|
||||
gibbed = 1
|
||||
affected_mob:Alienize()
|
||||
|
||||
@@ -502,11 +502,11 @@ What are the archived variables for?
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/check_turf(turf/model)
|
||||
var/delta_oxygen = (oxygen_archived - model.oxygen)/5
|
||||
var/delta_carbon_dioxide = (carbon_dioxide_archived - model.carbon_dioxide)/5
|
||||
var/delta_nitrogen = (nitrogen_archived - model.nitrogen)/5
|
||||
var/delta_toxins = (toxins_archived - model.toxins)/5
|
||||
/datum/gas_mixture/check_turf(turf/model, atmos_adjacent_turfs = 4)
|
||||
var/delta_oxygen = (oxygen_archived - model.oxygen)/(atmos_adjacent_turfs+1)
|
||||
var/delta_carbon_dioxide = (carbon_dioxide_archived - model.carbon_dioxide)/(atmos_adjacent_turfs+1)
|
||||
var/delta_nitrogen = (nitrogen_archived - model.nitrogen)/(atmos_adjacent_turfs+1)
|
||||
var/delta_toxins = (toxins_archived - model.toxins)/(atmos_adjacent_turfs+1)
|
||||
|
||||
var/delta_temperature = (temperature_archived - model.temperature)
|
||||
|
||||
@@ -525,6 +525,29 @@ What are the archived variables for?
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/proc/check_turf_total(turf/model)
|
||||
var/delta_oxygen = (oxygen - model.oxygen)
|
||||
var/delta_carbon_dioxide = (carbon_dioxide - model.carbon_dioxide)
|
||||
var/delta_nitrogen = (nitrogen - model.nitrogen)
|
||||
var/delta_toxins = (toxins - model.toxins)
|
||||
|
||||
var/delta_temperature = (temperature - model.temperature)
|
||||
|
||||
if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|
||||
|| ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|
||||
|| ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|
||||
|| ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins*MINIMUM_AIR_RATIO_TO_SUSPEND)))
|
||||
return 0
|
||||
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
|
||||
return 0
|
||||
|
||||
if(trace_gases.len)
|
||||
for(var/datum/gas/trace_gas in trace_gases)
|
||||
if(trace_gas.moles > MINIMUM_AIR_TO_SUSPEND*4)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/share(datum/gas_mixture/sharer, var/atmos_adjacent_turfs = 4)
|
||||
if(!sharer) return 0
|
||||
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/(atmos_adjacent_turfs+1)
|
||||
|
||||
+2
-2
@@ -1003,9 +1003,9 @@
|
||||
src = null
|
||||
M = H.monkeyize()
|
||||
src = M.mind
|
||||
current.contract_disease(new /datum/disease/transformation/jungle_fever,1,0)
|
||||
current.ForceContractDisease(new /datum/disease/transformation/jungle_fever)
|
||||
else if (istype(M))
|
||||
current.contract_disease(new /datum/disease/transformation/jungle_fever,1,0)
|
||||
current.ForceContractDisease(new /datum/disease/transformation/jungle_fever)
|
||||
if("human")
|
||||
if (check_rights(R_ADMIN, 0))
|
||||
var/mob/living/carbon/human/H = current
|
||||
|
||||
@@ -1127,7 +1127,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
/datum/supply_packs/misc/randomised/contraband
|
||||
num_contained = 5
|
||||
contains = list(/obj/item/weapon/contraband/poster,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco)
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims)
|
||||
name = "Contraband crate"
|
||||
cost = 30
|
||||
containername = "crate" //let's keep it subtle, eh?
|
||||
|
||||
@@ -381,6 +381,12 @@ var/list/uplink_items = list()
|
||||
cost = 9
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/badass/syndiecigs
|
||||
name = "Syndicate Smokes"
|
||||
desc = "Strong flavor, dense smoke, infused with Doctor's Delight."
|
||||
item = /obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
|
||||
cost = 4
|
||||
|
||||
/datum/uplink_item/device_tools/space_suit
|
||||
name = "Syndicate Space Suit"
|
||||
desc = "The red and black syndicate space suit is less encumbering than Nanotrasen variants, fits inside bags, and has a weapon slot. Nanotrasen crewmembers are trained to report red space suit sightings."
|
||||
|
||||
@@ -237,13 +237,23 @@
|
||||
item_state = "RPED"
|
||||
w_class = 5
|
||||
can_hold = list(/obj/item/weapon/stock_parts)
|
||||
storage_slots = 14
|
||||
storage_slots = 50
|
||||
use_to_pickup = 1
|
||||
allow_quick_gather = 1
|
||||
allow_quick_empty = 1
|
||||
collection_mode = 1
|
||||
display_contents_with_number = 1
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 28
|
||||
max_combined_w_class = 100
|
||||
|
||||
/obj/item/weapon/storage/part_replacer/proc/play_rped_sound()
|
||||
//Plays the sound for RPED exhanging or installing parts.
|
||||
playsound(src, 'sound/items/rped.ogg', 40, 1)
|
||||
|
||||
//Sorts stock parts inside an RPED by their rating.
|
||||
//Only use /obj/item/weapon/stock_parts/ with this sort proc!
|
||||
/proc/cmp_rped_sort(var/obj/item/weapon/stock_parts/A, var/obj/item/weapon/stock_parts/B)
|
||||
return B.rating - A.rating
|
||||
|
||||
/obj/item/weapon/stock_parts
|
||||
name = "stock part"
|
||||
@@ -461,4 +471,4 @@
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "capacitor"
|
||||
desc = "A debug item for research."
|
||||
origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8"
|
||||
origin_tech = "materials=8;programming=8;magnets=8;powerstorage=8;bluespace=8;combat=8;biotech=8;syndicate=8;engineering=8;plasmatech=8"
|
||||
|
||||
@@ -371,4 +371,4 @@ var/list/pointers = list()
|
||||
for(var/d in data)
|
||||
var/val = data[d]
|
||||
if(istext(val))
|
||||
data[d] = strip_html_simple(val)
|
||||
data[d] = strip_html_properly(val)
|
||||
|
||||
@@ -99,8 +99,8 @@ proc/med_hud_suit_sensors(var/mob/living/carbon/human/patient)
|
||||
|
||||
proc/med_hud_find_virus(var/mob/living/carbon/human/patient)
|
||||
for(var/datum/disease/D in patient.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
if(D.severity != D.non_threat)
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
if(D.severity != NONTHREAT)
|
||||
return 1
|
||||
|
||||
proc/med_hud_get_health(var/mob/living/carbon/human/patient)
|
||||
|
||||
@@ -149,8 +149,9 @@
|
||||
L.blob_act()
|
||||
|
||||
|
||||
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
src.visible_message("<span class='danger'>The [src.name] has been attacked with \the [W][(user ? " by [user]" : "")]!</span>")
|
||||
var/damage = 0
|
||||
@@ -168,6 +169,7 @@
|
||||
|
||||
/obj/effect/blob/attack_animal(mob/living/simple_animal/M as mob)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
src.visible_message("<span class='danger'>The [src.name] has been attacked by \the [M]!</span>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
|
||||
@@ -91,16 +91,28 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
..()
|
||||
|
||||
/datum/game_mode/proc/forge_changeling_objectives(var/datum/mind/changeling)
|
||||
//OBJECTIVES - Always absorb at least 5 genomes, plus random traitor objectives.
|
||||
//If they have two objectives as well as absorb, they must survive rather than escape
|
||||
//OBJECTIVES - random traitor objectives. Unique objectives "steal brain" and "identity theft".
|
||||
//No escape alone because changelings aren't suited for it and it'd probably just lead to rampant robusting
|
||||
//If it seems like they'd be able to do it in play, add a 10% chance to have to escape alone
|
||||
|
||||
|
||||
var/datum/objective/absorb/absorb_objective = new
|
||||
absorb_objective.owner = changeling
|
||||
absorb_objective.gen_amount_goal(6, 8)
|
||||
changeling.objectives += absorb_objective
|
||||
|
||||
if(prob(60))
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = changeling
|
||||
steal_objective.find_target()
|
||||
changeling.objectives += steal_objective
|
||||
else
|
||||
var/datum/objective/debrain/debrain_objective = new
|
||||
debrain_objective.owner = changeling
|
||||
debrain_objective.find_target()
|
||||
changeling.objectives += debrain_objective
|
||||
|
||||
|
||||
var/list/active_ais = active_ais()
|
||||
if(active_ais.len && prob(100/joined_player_list.len))
|
||||
var/datum/objective/destroy/destroy_objective = new
|
||||
@@ -119,22 +131,23 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
maroon_objective.find_target()
|
||||
changeling.objectives += maroon_objective
|
||||
|
||||
if(prob(60))
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = changeling
|
||||
steal_objective.find_target()
|
||||
changeling.objectives += steal_objective
|
||||
else
|
||||
var/datum/objective/debrain/debrain_objective = new
|
||||
debrain_objective.owner = changeling
|
||||
debrain_objective.find_target()
|
||||
changeling.objectives += debrain_objective
|
||||
if (!(locate(/datum/objective/escape) in changeling.objectives))
|
||||
var/datum/objective/escape/escape_with_identity/identity_theft = new
|
||||
identity_theft.owner = changeling
|
||||
identity_theft.target = maroon_objective.target
|
||||
identity_theft.update_explanation_text()
|
||||
changeling.objectives += identity_theft
|
||||
|
||||
if (!(locate(/datum/objective/escape) in changeling.objectives))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = changeling
|
||||
changeling.objectives += escape_objective
|
||||
|
||||
if(prob(50))
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = changeling
|
||||
changeling.objectives += escape_objective
|
||||
else
|
||||
var/datum/objective/escape/escape_with_identity/identity_theft = new
|
||||
identity_theft.owner = changeling
|
||||
identity_theft.find_target()
|
||||
changeling.objectives += identity_theft
|
||||
return
|
||||
|
||||
/datum/game_mode/proc/greet_changeling(var/datum/mind/changeling, var/you_are=1)
|
||||
@@ -217,6 +230,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
|
||||
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
|
||||
var/list/absorbed_dna = list()
|
||||
var/list/protected_dna = list() //dna that is not lost when capacity is otherwise full
|
||||
var/dna_max = 4 //How many extra DNA strands the changeling can store for transformation.
|
||||
var/absorbedcount = 1 //We would require at least 1 sample of compatible DNA to have taken on the form of a human.
|
||||
var/chem_charges = 20
|
||||
@@ -255,10 +269,16 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
|
||||
|
||||
/datum/changeling/proc/get_dna(var/dna_owner)
|
||||
for(var/datum/dna/DNA in absorbed_dna)
|
||||
for(var/datum/dna/DNA in (absorbed_dna+protected_dna))
|
||||
if(dna_owner == DNA.real_name)
|
||||
return DNA
|
||||
|
||||
/datum/changeling/proc/has_dna(var/datum/dna/tDNA)
|
||||
for(var/datum/dna/D in (absorbed_dna+protected_dna))
|
||||
if(tDNA.is_same_as(D))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/changeling/proc/can_absorb_dna(var/mob/living/carbon/user, var/mob/living/carbon/target)
|
||||
if(absorbed_dna[1] == user.dna)//If our current DNA is the stalest, we gotta ditch it.
|
||||
user << "<span class='warning'>We have reached our capacity to store genetic information! We must transform before absorbing more.</span>"
|
||||
@@ -271,11 +291,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
if(!ishuman(target))//Absorbing monkeys is entirely possible, but it can cause issues with transforming. That's what lesser form is for anyway!
|
||||
user << "<span class='warning'>We could gain no benefit from absorbing a lesser creature.</span>"
|
||||
return
|
||||
var/datum/dna/tDna = target.dna
|
||||
for(var/datum/dna/D in absorbed_dna)
|
||||
if(tDna.is_same_as(D))
|
||||
user << "<span class='warning'>We already have that DNA in storage.</span>"
|
||||
return
|
||||
if(has_dna(target.dna))
|
||||
user << "<span class='warning'>We already have this DNA in storage!</span>"
|
||||
if(!check_dna_integrity(target))
|
||||
user << "<span class='warning'>[target] is not compatible with our biology.</span>"
|
||||
return
|
||||
|
||||
@@ -259,7 +259,7 @@ var/list/sting_paths
|
||||
<a id='link[i]'
|
||||
onmouseover='expand("item[i]","[P.name]","[P.desc]","[P.helptext]","[P]",[ownsthis])'
|
||||
>
|
||||
<b id='search[i]'>Evolve [P][ownsthis ? " - Purchased" : ((P.dna_cost > 1) ? " - Cost: [P.dna_cost]" : "")]</b>
|
||||
<b id='search[i]'>Evolve [P][ownsthis ? " - Purchased" : (P.req_dna>changeling.absorbedcount ? " - Requires [P.req_dna] absorptions" : " - Cost: [P.dna_cost]")]</b>
|
||||
</a>
|
||||
<br><span id='item[i]'></span>
|
||||
</td>
|
||||
@@ -312,6 +312,10 @@ var/list/sting_paths
|
||||
user << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
return
|
||||
|
||||
if(absorbedcount < thepower.req_dna)
|
||||
user << "We lack the energy to evolve this ability!"
|
||||
return
|
||||
|
||||
if(has_sting(thepower))
|
||||
user << "We have already evolved this ability!"
|
||||
return
|
||||
@@ -334,14 +338,17 @@ var/list/sting_paths
|
||||
|
||||
//Reselect powers
|
||||
/datum/changeling/proc/lingRespec(var/mob/user)
|
||||
if(!ishuman(user))
|
||||
user << "<span class='danger'>We can't remove our evolutions in this form!</span>"
|
||||
return
|
||||
if(canrespec)
|
||||
user << "We have removed our evolutions from this form, and are now ready to readapt."
|
||||
user << "<span class='notice'>We have removed our evolutions from this form, and are now ready to readapt.</span>"
|
||||
user.remove_changeling_powers(1)
|
||||
canrespec = 0
|
||||
user.make_changeling()
|
||||
return 1
|
||||
else
|
||||
user << "You lack the power to readapt your evolutions!"
|
||||
user << "<span class='danger'>You lack the power to readapt your evolutions!</span>"
|
||||
return 0
|
||||
|
||||
/mob/proc/make_changeling()
|
||||
@@ -361,7 +368,7 @@ var/list/sting_paths
|
||||
if(!S.dna_cost)
|
||||
if(!mind.changeling.has_sting(S))
|
||||
mind.changeling.purchasedpowers+=S
|
||||
S.on_purchase(src)
|
||||
S.on_purchase(src)
|
||||
|
||||
var/mob/living/carbon/C = src //only carbons have dna now, so we have to typecaste
|
||||
mind.changeling.absorbed_dna |= C.dna
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
user.visible_message("<span class='danger'>[user] sucks the fluids from [target]!</span>")
|
||||
target << "<span class='danger'>You have been absorbed by the changeling!</span>"
|
||||
|
||||
changeling.absorb_dna(target)
|
||||
if(!changeling.has_dna(target.dna))
|
||||
changeling.absorb_dna(target, user)
|
||||
|
||||
if(user.nutrition < 400) user.nutrition = min((user.nutrition + target.nutrition), 400)
|
||||
|
||||
@@ -65,12 +66,13 @@
|
||||
|
||||
if(target.mind.changeling)//If the target was a changeling, suck out their extra juice and objective points!
|
||||
changeling.chem_charges += min(target.mind.changeling.chem_charges, changeling.chem_storage)
|
||||
changeling.absorbedcount += target.mind.changeling.absorbedcount
|
||||
changeling.absorbedcount += (target.mind.changeling.absorbedcount)
|
||||
|
||||
target.mind.changeling.absorbed_dna.len = 1
|
||||
target.mind.changeling.absorbedcount = 0
|
||||
else
|
||||
changeling.chem_charges += 10
|
||||
|
||||
|
||||
changeling.chem_charges=min(changeling.chem_charges+10, changeling.chem_storage)
|
||||
|
||||
changeling.isabsorbing = 0
|
||||
changeling.canrespec = 1
|
||||
@@ -82,7 +84,7 @@
|
||||
|
||||
|
||||
//Absorbs the target DNA.
|
||||
/datum/changeling/proc/absorb_dna(mob/living/carbon/T)
|
||||
/datum/changeling/proc/absorb_dna(mob/living/carbon/T, var/mob/user)
|
||||
if(absorbed_dna.len)
|
||||
absorbed_dna.Cut(1,2)
|
||||
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
|
||||
@@ -93,5 +95,12 @@
|
||||
new_dna.species = T.dna.species
|
||||
new_dna.mutant_color = T.dna.mutant_color
|
||||
new_dna.blood_type = T.dna.blood_type
|
||||
absorbed_dna |= new_dna //And add the target DNA to our absorbed list.
|
||||
absorbedcount++ //all that done, let's increment the objective counter.
|
||||
absorbedcount++
|
||||
store_dna(new_dna, user)
|
||||
|
||||
/datum/changeling/proc/store_dna(var/datum/dna/new_dna, var/mob/user)
|
||||
for(var/datum/objective/escape/escape_with_identity/E in user.mind.objectives)
|
||||
if(E.target_real_name == new_dna.real_name)
|
||||
protected_dna |= new_dna
|
||||
return
|
||||
absorbed_dna |= new_dna
|
||||
|
||||
@@ -31,7 +31,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
/obj/effect/proc_holder/changeling/hivemind_upload/sting_action(var/mob/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/list/names = list()
|
||||
for(var/datum/dna/DNA in changeling.absorbed_dna)
|
||||
for(var/datum/dna/DNA in (changeling.absorbed_dna+changeling.protected_dna))
|
||||
if(!(DNA in hivemind_bank))
|
||||
names += DNA.real_name
|
||||
|
||||
@@ -86,7 +86,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
|
||||
if(changeling.absorbed_dna.len)
|
||||
changeling.absorbed_dna.Cut(1,2)
|
||||
changeling.absorbed_dna |= chosen_dna
|
||||
changeling.store_dna(chosen_dna, user)
|
||||
user << "<span class='notice'>We absorb the DNA of [S] from the air.</span>"
|
||||
feedback_add_details("changeling_powers","HD")
|
||||
return 1
|
||||
@@ -6,11 +6,12 @@
|
||||
req_dna = 1
|
||||
max_genetic_damage = 3
|
||||
|
||||
|
||||
//Transform into a human.
|
||||
/obj/effect/proc_holder/changeling/humanform/sting_action(var/mob/living/carbon/user)
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
var/list/names = list()
|
||||
for(var/datum/dna/DNA in changeling.absorbed_dna)
|
||||
for(var/datum/dna/DNA in (changeling.absorbed_dna+changeling.protected_dna))
|
||||
names += "[DNA.real_name]"
|
||||
|
||||
var/chosen_name = input("Select the target DNA: ", "Target DNA", null) as null|anything in names
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
/obj/effect/proc_holder/changeling/sting/transformation/Click()
|
||||
var/mob/user = usr
|
||||
var/datum/changeling/changeling = user.mind.changeling
|
||||
if(changeling.chosen_sting)
|
||||
unset_sting(user)
|
||||
return
|
||||
selected_dna = changeling.select_dna("Select the target DNA: ", "Target DNA")
|
||||
if(!selected_dna)
|
||||
return
|
||||
@@ -105,9 +108,10 @@ obj/effect/proc_holder/changeling/sting/extract_dna
|
||||
if(..())
|
||||
return user.mind.changeling.can_absorb_dna(user, target)
|
||||
|
||||
/obj/effect/proc_holder/changeling/sting/extract_dna/sting_action(var/mob/user, var/mob/target)
|
||||
/obj/effect/proc_holder/changeling/sting/extract_dna/sting_action(var/mob/user, var/mob/living/carbon/human/target)
|
||||
add_logs(user, target, "stung", object="extraction sting")
|
||||
user.mind.changeling.absorb_dna(target, user)
|
||||
if(!(user.mind.changeling.has_dna(target.dna)))
|
||||
user.mind.changeling.absorb_dna(target, user)
|
||||
feedback_add_details("changeling_powers","ED")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/datum/changeling/proc/select_dna(var/prompt, var/title)
|
||||
var/list/names = list()
|
||||
for(var/datum/dna/DNA in absorbed_dna)
|
||||
for(var/datum/dna/DNA in (absorbed_dna+protected_dna))
|
||||
names += "[DNA.real_name]"
|
||||
|
||||
var/chosen_name = input(prompt, title, null) as null|anything in names
|
||||
|
||||
+113
-119
@@ -538,131 +538,125 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
if (!istype(user.loc,/turf))
|
||||
user << "<span class='danger'>You do not have enough space to write a proper rune.</span>"
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
if (C>=26+runedec+ticker.mode.cult.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist
|
||||
alert("The cloth of reality can't take that much of a strain. Remove some runes first!")
|
||||
return
|
||||
else
|
||||
switch(alert("You open the tome",,"Commune","Scribe a rune", "Notes")) //Fuck the "Cancel" option. Rewrite the whole tome interface yourself if you want it to work better. And input() is just ugly. - K0000
|
||||
if("Cancel")
|
||||
switch(alert("You open the tome",,"Commune","Scribe a rune", "Notes")) //Fuck the "Cancel" option. Rewrite the whole tome interface yourself if you want it to work better. And input() is just ugly. - K0000
|
||||
if("Cancel")
|
||||
return
|
||||
if("Commune")
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
if("Commune")
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")
|
||||
if(!input)
|
||||
return
|
||||
usr.whisper("O bidai nabora se[pick("'","`")]sma!")
|
||||
usr.whisper("[input]")
|
||||
for(var/datum/mind/H in ticker.mode.cult)
|
||||
if (H.current)
|
||||
H.current << "<span class='userdanger'>[input]</span>"
|
||||
var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")
|
||||
if(!input)
|
||||
return
|
||||
if("Notes")
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
notedat = {"
|
||||
<a href='byond://?src=\ref[src];action=read'>Read the Arcane Tome.</A></BR>
|
||||
<br><b>Word translation notes</b> <br>
|
||||
[words[1]] is <a href='byond://?src=\ref[src];number=1;action=change'>[words[words[1]]]</A> <A href='byond://?src=\ref[src];number=1;action=clear'>Clear</A><BR>
|
||||
[words[2]] is <A href='byond://?src=\ref[src];number=2;action=change'>[words[words[2]]]</A> <A href='byond://?src=\ref[src];number=2;action=clear'>Clear</A><BR>
|
||||
[words[3]] is <a href='byond://?src=\ref[src];number=3;action=change'>[words[words[3]]]</A> <A href='byond://?src=\ref[src];number=3;action=clear'>Clear</A><BR>
|
||||
[words[4]] is <a href='byond://?src=\ref[src];number=4;action=change'>[words[words[4]]]</A> <A href='byond://?src=\ref[src];number=4;action=clear'>Clear</A><BR>
|
||||
[words[5]] is <a href='byond://?src=\ref[src];number=5;action=change'>[words[words[5]]]</A> <A href='byond://?src=\ref[src];number=5;action=clear'>Clear</A><BR>
|
||||
[words[6]] is <a href='byond://?src=\ref[src];number=6;action=change'>[words[words[6]]]</A> <A href='byond://?src=\ref[src];number=6;action=clear'>Clear</A><BR>
|
||||
[words[7]] is <a href='byond://?src=\ref[src];number=7;action=change'>[words[words[7]]]</A> <A href='byond://?src=\ref[src];number=7;action=clear'>Clear</A><BR>
|
||||
[words[8]] is <a href='byond://?src=\ref[src];number=8;action=change'>[words[words[8]]]</A> <A href='byond://?src=\ref[src];number=8;action=clear'>Clear</A><BR>
|
||||
[words[9]] is <a href='byond://?src=\ref[src];number=9;action=change'>[words[words[9]]]</A> <A href='byond://?src=\ref[src];number=9;action=clear'>Clear</A><BR>
|
||||
[words[10]] is <a href='byond://?src=\ref[src];number=10;action=change'>[words[words[10]]]</A> <A href='byond://?src=\ref[src];number=10;action=clear'>Clear</A><BR>
|
||||
"} // whoever screwed the tabbing on this originally is an asshole.
|
||||
usr.whisper("O bidai nabora se[pick("'","`")]sma!")
|
||||
usr.whisper("[input]")
|
||||
for(var/datum/mind/H in ticker.mode.cult)
|
||||
if (H.current)
|
||||
H.current << "<span class='userdanger'>[input]</span>"
|
||||
return
|
||||
if("Notes")
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
notedat = {"
|
||||
<a href='byond://?src=\ref[src];action=read'>Read the Arcane Tome.</A></BR>
|
||||
<br><b>Word translation notes</b> <br>
|
||||
[words[1]] is <a href='byond://?src=\ref[src];number=1;action=change'>[words[words[1]]]</A> <A href='byond://?src=\ref[src];number=1;action=clear'>Clear</A><BR>
|
||||
[words[2]] is <A href='byond://?src=\ref[src];number=2;action=change'>[words[words[2]]]</A> <A href='byond://?src=\ref[src];number=2;action=clear'>Clear</A><BR>
|
||||
[words[3]] is <a href='byond://?src=\ref[src];number=3;action=change'>[words[words[3]]]</A> <A href='byond://?src=\ref[src];number=3;action=clear'>Clear</A><BR>
|
||||
[words[4]] is <a href='byond://?src=\ref[src];number=4;action=change'>[words[words[4]]]</A> <A href='byond://?src=\ref[src];number=4;action=clear'>Clear</A><BR>
|
||||
[words[5]] is <a href='byond://?src=\ref[src];number=5;action=change'>[words[words[5]]]</A> <A href='byond://?src=\ref[src];number=5;action=clear'>Clear</A><BR>
|
||||
[words[6]] is <a href='byond://?src=\ref[src];number=6;action=change'>[words[words[6]]]</A> <A href='byond://?src=\ref[src];number=6;action=clear'>Clear</A><BR>
|
||||
[words[7]] is <a href='byond://?src=\ref[src];number=7;action=change'>[words[words[7]]]</A> <A href='byond://?src=\ref[src];number=7;action=clear'>Clear</A><BR>
|
||||
[words[8]] is <a href='byond://?src=\ref[src];number=8;action=change'>[words[words[8]]]</A> <A href='byond://?src=\ref[src];number=8;action=clear'>Clear</A><BR>
|
||||
[words[9]] is <a href='byond://?src=\ref[src];number=9;action=change'>[words[words[9]]]</A> <A href='byond://?src=\ref[src];number=9;action=clear'>Clear</A><BR>
|
||||
[words[10]] is <a href='byond://?src=\ref[src];number=10;action=change'>[words[words[10]]]</A> <A href='byond://?src=\ref[src];number=10;action=clear'>Clear</A><BR>
|
||||
"} // whoever screwed the tabbing on this originally is an asshole.
|
||||
// call(/obj/item/weapon/tome/proc/edit_notes)()
|
||||
user << browse("[notedat]", "window=notes")
|
||||
user << browse("[notedat]", "window=notes")
|
||||
return
|
||||
if("Scribe a rune") //fixed more assbackward tabbing
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
if("Scribe a rune") //fixed more assbackward tabbing
|
||||
if (C>=26+runedec+ticker.mode.cult.len) //including the useless rune at the secret room, shouldn't count against the limit of 25 runes - Urist
|
||||
alert("The cloth of reality can't take that much of a strain. Remove some runes first!")
|
||||
return
|
||||
var/list/dictionary = list(
|
||||
"convert" = list("join","blood","self"),
|
||||
"wall" = list("destroy","travel","self"),
|
||||
"blood boil" = list("destroy","see","blood"),
|
||||
"blood drain" = list("travel","blood","self"),
|
||||
"raise dead" = list("blood","join","hell"),
|
||||
"summon narsie" = list("hell","join","self"),
|
||||
"communicate" = list("self","other","technology"),
|
||||
"emp" = list("destroy","see","technology"),
|
||||
"manifest" = list("blood","see","travel"),
|
||||
"summon tome" = list("see","blood","hell"),
|
||||
"see invisible" = list("see","hell","join"),
|
||||
"hide" = list("hide","see","blood"),
|
||||
"reveal" = list("blood","see","hide"),
|
||||
"astral journey" = list("hell","travel","self"),
|
||||
"imbue" = list("hell","technology","join"),
|
||||
"sacrifice" = list("hell","blood","join"),
|
||||
"summon cultist" = list("join","other","self"),
|
||||
"free cultist" = list("travel","technology","other"),
|
||||
"deafen" = list("hide","other","see"),
|
||||
"blind" = list("destroy","see","other"),
|
||||
"stun" = list("join","hide","technology"),
|
||||
"armor" = list("hell","destroy","other"),
|
||||
"teleport" = list("travel","self"),
|
||||
"teleport other" = list("travel","other"),
|
||||
"summon shell" = list("travel","hell","technology")
|
||||
)
|
||||
|
||||
|
||||
var/list/scribewords = list("none")
|
||||
|
||||
var/list/english = list()
|
||||
|
||||
for (var/entry in words)
|
||||
if (words[entry] != entry)
|
||||
english+=list(words[entry] = entry)
|
||||
|
||||
for (var/entry in dictionary)
|
||||
var/list/required = dictionary[entry]
|
||||
if (length(english&required) == required.len)
|
||||
scribewords += entry
|
||||
|
||||
var/chosen_rune = null
|
||||
|
||||
|
||||
if(usr)
|
||||
chosen_rune = input ("Choose a rune to scribe.") in scribewords
|
||||
if (!chosen_rune)
|
||||
return
|
||||
if (chosen_rune == "none")
|
||||
user << "<span class='danger'>You decide against scribing a rune, perhaps you should take this time to study your notes.</span>"
|
||||
return
|
||||
if (chosen_rune == "teleport")
|
||||
dictionary[chosen_rune] += input ("Choose a destination word") in english
|
||||
if (chosen_rune == "teleport other")
|
||||
dictionary[chosen_rune] += input ("Choose a destination word") in english
|
||||
|
||||
if(user.get_active_hand() != src)
|
||||
return
|
||||
|
||||
for (var/mob/V in viewers(src))
|
||||
V.show_message("<span class='danger'>[user] slices open a finger and begins to chant and paint symbols on the floor.</span>", 3, "<span class='danger'>You hear chanting.</span>", 2)
|
||||
user << "<span class='danger'>You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>"
|
||||
user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage
|
||||
if(do_after(user, 50))
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
|
||||
var/list/dictionary = list(
|
||||
"convert" = list("join","blood","self"),
|
||||
"wall" = list("destroy","travel","self"),
|
||||
"blood boil" = list("destroy","see","blood"),
|
||||
"blood drain" = list("travel","blood","self"),
|
||||
"raise dead" = list("blood","join","hell"),
|
||||
"summon narsie" = list("hell","join","self"),
|
||||
"communicate" = list("self","other","technology"),
|
||||
"emp" = list("destroy","see","technology"),
|
||||
"manifest" = list("blood","see","travel"),
|
||||
"summon tome" = list("see","blood","hell"),
|
||||
"see invisible" = list("see","hell","join"),
|
||||
"hide" = list("hide","see","blood"),
|
||||
"reveal" = list("blood","see","hide"),
|
||||
"astral journey" = list("hell","travel","self"),
|
||||
"imbue" = list("hell","technology","join"),
|
||||
"sacrifice" = list("hell","blood","join"),
|
||||
"summon cultist" = list("join","other","self"),
|
||||
"free cultist" = list("travel","technology","other"),
|
||||
"deafen" = list("hide","other","see"),
|
||||
"blind" = list("destroy","see","other"),
|
||||
"stun" = list("join","hide","technology"),
|
||||
"armor" = list("hell","destroy","other"),
|
||||
"teleport" = list("travel","self"),
|
||||
"teleport other" = list("travel","other"),
|
||||
"summon shell" = list("travel","hell","technology")
|
||||
)
|
||||
|
||||
|
||||
var/list/scribewords = list("none")
|
||||
|
||||
var/list/english = list()
|
||||
|
||||
for (var/entry in words)
|
||||
if (words[entry] != entry)
|
||||
english+=list(words[entry] = entry)
|
||||
|
||||
for (var/entry in dictionary)
|
||||
var/list/required = dictionary[entry]
|
||||
if (length(english&required) == required.len)
|
||||
scribewords += entry
|
||||
|
||||
var/chosen_rune = null
|
||||
|
||||
|
||||
if(usr)
|
||||
chosen_rune = input ("Choose a rune to scribe.") in scribewords
|
||||
if (!chosen_rune)
|
||||
return
|
||||
if (chosen_rune == "none")
|
||||
user << "<span class='danger'>You decide against scribing a rune, perhaps you should take this time to study your notes.</span>"
|
||||
return
|
||||
if (chosen_rune == "teleport")
|
||||
dictionary[chosen_rune] += input ("Choose a destination word") in english
|
||||
if (chosen_rune == "teleport other")
|
||||
dictionary[chosen_rune] += input ("Choose a destination word") in english
|
||||
|
||||
if(user.get_active_hand() != src)
|
||||
return
|
||||
|
||||
for (var/mob/V in viewers(src))
|
||||
V.show_message("<span class='danger'>[user] slices open a finger and begins to chant and paint symbols on the floor.</span>", 3, "<span class='danger'>You hear chanting.</span>", 2)
|
||||
user << "<span class='danger'>You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>"
|
||||
user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage
|
||||
if(do_after(user, 50))
|
||||
if(usr.get_active_hand() != src)
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/effect/rune/R = new /obj/effect/rune(user.loc)
|
||||
user << "<span class='danger'>You finish drawing the arcane markings of the Geometer.</span>"
|
||||
var/list/required = dictionary[chosen_rune]
|
||||
R.word1 = english[required[1]]
|
||||
R.word2 = english[required[2]]
|
||||
R.word3 = english[required[3]]
|
||||
R.check_icon()
|
||||
R.blood_DNA = list()
|
||||
R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/effect/rune/R = new /obj/effect/rune(user.loc)
|
||||
user << "<span class='danger'>You finish drawing the arcane markings of the Geometer.</span>"
|
||||
var/list/required = dictionary[chosen_rune]
|
||||
R.word1 = english[required[1]]
|
||||
R.word2 = english[required[2]]
|
||||
R.word3 = english[required[3]]
|
||||
R.check_icon()
|
||||
R.blood_DNA = list()
|
||||
R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type
|
||||
return
|
||||
else
|
||||
user << "The book seems full of illegible scribbles. Is this a joke?"
|
||||
return
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
/var/const/meteor_wave_delay = 625 //minimum wait between waves in tenths of seconds
|
||||
//set to at least 100 unless you want evarr ruining every round
|
||||
|
||||
/var/list/meteorsA = list(/obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, \
|
||||
/obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3)
|
||||
//Meteors probability of spawning during a given wave
|
||||
/var/list/meteors_normal = list(/obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, \
|
||||
/obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3) //for normal meteor event
|
||||
|
||||
/var/list/meteorsB = list(/obj/effect/meteor/meaty=5, /obj/effect/meteor/meaty/xeno=1)
|
||||
/var/list/meteors_threatening = list(/obj/effect/meteor/medium=4, /obj/effect/meteor/big=8, \
|
||||
/obj/effect/meteor/flaming=3, /obj/effect/meteor/irradiated=3) //for threatening meteor event
|
||||
|
||||
/var/list/meteors_catastrophic = list(/obj/effect/meteor/medium=5, /obj/effect/meteor/big=75, \
|
||||
/obj/effect/meteor/flaming=10, /obj/effect/meteor/irradiated=10, /obj/effect/meteor/tunguska = 1) //for catastrophic meteor event
|
||||
|
||||
/var/list/meteorsB = list(/obj/effect/meteor/meaty=5, /obj/effect/meteor/meaty/xeno=1) //for meaty ore event
|
||||
|
||||
/var/list/meteorsC = list(/obj/effect/meteor/dust) //for space dust event
|
||||
|
||||
/var/list/meteorsSPOOKY = list(/obj/effect/meteor/pumpkin)
|
||||
|
||||
///////////////////////////////
|
||||
//Meteor spawning global procs
|
||||
///////////////////////////////
|
||||
|
||||
/proc/spawn_meteors(var/number = 10, var/list/meteortypes)
|
||||
for(var/i = 0; i < number; i++)
|
||||
@@ -18,7 +28,7 @@
|
||||
var/turf/pickedstart
|
||||
var/turf/pickedgoal
|
||||
var/max_i = 10//number of tries to spawn meteor.
|
||||
while (!istype(pickedstart, /turf/space) || pickedstart.loc.name != "Space" )
|
||||
while (!istype(pickedstart, /turf/space))
|
||||
var/startSide = pick(cardinal)
|
||||
pickedstart = spaceDebrisStartLoc(startSide, 1)
|
||||
pickedgoal = spaceDebrisFinishLoc(startSide, 1)
|
||||
@@ -71,6 +81,9 @@
|
||||
var/turf/T = locate(endx, endy, Z)
|
||||
return T
|
||||
|
||||
///////////////////////
|
||||
//The meteor effect
|
||||
//////////////////////
|
||||
|
||||
/obj/effect/meteor
|
||||
name = "the concept of meteor"
|
||||
@@ -94,12 +107,81 @@
|
||||
if(z != z_original || loc == dest)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
. = ..() //process movement...
|
||||
|
||||
if(.)//.. if did move, ram the turf we get in
|
||||
var/turf/T = get_turf(loc)
|
||||
ram_turf(T)
|
||||
|
||||
if(prob(10) && !istype(T, /turf/space))//randomly takes a 'hit' from ramming
|
||||
get_hit()
|
||||
|
||||
return .
|
||||
|
||||
/obj/effect/meteor/Destroy()
|
||||
walk(src,0) //this cancels the walk_towards() proc
|
||||
..()
|
||||
|
||||
/obj/effect/meteor/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/effect/meteor/Bump(atom/A)
|
||||
if(A)
|
||||
ram_turf(get_turf(A))
|
||||
playsound(src.loc, meteorsound, 40, 1)
|
||||
get_hit()
|
||||
|
||||
/obj/effect/meteor/proc/ram_turf(var/turf/T)
|
||||
//first bust whatever is in the turf
|
||||
for(var/atom/A in T)
|
||||
if(A != src)
|
||||
A.ex_act(hitpwr)
|
||||
|
||||
//then, ram the turf if it still exists
|
||||
if(T)
|
||||
T.ex_act(hitpwr)
|
||||
|
||||
|
||||
//process getting 'hit' by colliding with a dense object
|
||||
//or randomly when ramming turfs
|
||||
/obj/effect/meteor/proc/get_hit()
|
||||
hits--
|
||||
if(hits <= 0)
|
||||
make_debris()
|
||||
meteor_effect(heavy)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/meteor/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pickaxe))
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/meteor/proc/make_debris()
|
||||
for(var/throws = dropamt, throws > 0, throws--)
|
||||
var/obj/item/O = new meteordrop(get_turf(src))
|
||||
O.throw_at(dest, 5, 10)
|
||||
|
||||
/obj/effect/meteor/proc/meteor_effect(var/sound=1)
|
||||
if(sound)
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T || T.z != src.z)
|
||||
continue
|
||||
var/dist = get_dist(M.loc, src.loc)
|
||||
shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
|
||||
M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10)
|
||||
|
||||
///////////////////////
|
||||
//Meteor types
|
||||
///////////////////////
|
||||
|
||||
//Dust
|
||||
/obj/effect/meteor/dust
|
||||
name = "space dust"
|
||||
icon_state = "dust"
|
||||
@@ -109,34 +191,115 @@
|
||||
meteorsound = 'sound/weapons/throwtap.ogg'
|
||||
meteordrop = /obj/item/weapon/ore/glass
|
||||
|
||||
//Medium-sized
|
||||
/obj/effect/meteor/medium
|
||||
name = "meteor"
|
||||
dropamt = 3
|
||||
|
||||
/obj/effect/meteor/medium/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 0, 1, 2, 3, 0)
|
||||
|
||||
//Large-sized
|
||||
/obj/effect/meteor/big
|
||||
name = "big meteor"
|
||||
icon_state = "large"
|
||||
hits = 7
|
||||
hits = 6
|
||||
heavy = 1
|
||||
dropamt = 4
|
||||
|
||||
/obj/effect/meteor/big/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 1, 2, 3, 4, 0)
|
||||
|
||||
//Flaming meteor
|
||||
/obj/effect/meteor/flaming
|
||||
name = "flaming meteor"
|
||||
icon_state = "flaming"
|
||||
hits = 3
|
||||
hits = 5
|
||||
heavy = 1
|
||||
meteorsound = 'sound/effects/bamf.ogg'
|
||||
meteordrop = /obj/item/weapon/ore/plasma
|
||||
|
||||
/obj/effect/meteor/flaming/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 1, 2, 3, 4, 0, 0, 5)
|
||||
|
||||
//Radiation meteor
|
||||
/obj/effect/meteor/irradiated
|
||||
name = "glowing meteor"
|
||||
icon_state = "glowing"
|
||||
hits = 4
|
||||
heavy = 1
|
||||
meteordrop = /obj/item/weapon/ore/uranium
|
||||
|
||||
|
||||
/obj/effect/meteor/irradiated/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 0, 0, 4, 3, 0)
|
||||
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
|
||||
for(var/mob/living/L in view(5, src))
|
||||
L.apply_effect(40, IRRADIATE)
|
||||
|
||||
//Meaty Ore
|
||||
/obj/effect/meteor/meaty
|
||||
name = "meaty ore"
|
||||
icon_state = "meateor"
|
||||
desc = "Just... don't think too hard about where this thing came from."
|
||||
hits = 2
|
||||
heavy = 1
|
||||
meteorsound = 'sound/effects/blobattack.ogg'
|
||||
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
var/meteorgibs = /obj/effect/gibspawner/generic
|
||||
|
||||
/obj/effect/meteor/meaty/make_debris()
|
||||
..()
|
||||
new meteorgibs(get_turf(src))
|
||||
|
||||
|
||||
/obj/effect/meteor/meaty/ram_turf(var/turf/T)
|
||||
if(!istype(T, /turf/space))
|
||||
new /obj/effect/decal/cleanable/blood (T)
|
||||
|
||||
/obj/effect/meteor/meaty/Bump(atom/A)
|
||||
A.ex_act(hitpwr)
|
||||
get_hit()
|
||||
|
||||
//Meaty Ore Xeno edition
|
||||
/obj/effect/meteor/meaty/xeno
|
||||
color = "#5EFF00"
|
||||
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
|
||||
meteorgibs = /obj/effect/gibspawner/xeno
|
||||
|
||||
/obj/effect/meteor/meaty/xeno/ram_turf(var/turf/T)
|
||||
if(!istype(T, /turf/space))
|
||||
new /obj/effect/decal/cleanable/xenoblood (T)
|
||||
|
||||
//Station buster Tunguska
|
||||
/obj/effect/meteor/tunguska
|
||||
name = "tunguska meteor"
|
||||
icon_state = "flaming"
|
||||
desc = "Your life briefly passes before your eyes the moment you lay them on this monstruosity"
|
||||
hits = 30
|
||||
hitpwr = 1
|
||||
heavy = 1
|
||||
meteorsound = 'sound/effects/bamf.ogg'
|
||||
meteordrop = /obj/item/weapon/ore/plasma
|
||||
|
||||
/obj/effect/meteor/tunguska/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 5, 10, 15, 20, 0)
|
||||
|
||||
/obj/effect/meteor/tunguska/Bump()
|
||||
..()
|
||||
if(prob(20))
|
||||
explosion(src.loc,2,4,6,8)
|
||||
|
||||
//////////////////////////
|
||||
//Spookoween meteors
|
||||
/////////////////////////
|
||||
|
||||
/var/list/meteorsSPOOKY = list(/obj/effect/meteor/pumpkin)
|
||||
|
||||
/obj/effect/meteor/pumpkin
|
||||
name = "PUMPKING"
|
||||
desc = "THE PUMPKING'S COMING!"
|
||||
@@ -150,89 +313,4 @@
|
||||
..()
|
||||
meteordrop = pick(/obj/item/clothing/head/hardhat/pumpkinhead, /obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin)
|
||||
meteorsound = pick('sound/hallucinations/im_here1.ogg','sound/hallucinations/im_here2.ogg')
|
||||
//////////////////////////
|
||||
|
||||
/obj/effect/meteor/meaty
|
||||
name = "meaty ore"
|
||||
icon_state = "meateor"
|
||||
desc = "Just... don't think too hard about where this thing came from."
|
||||
hits = 2
|
||||
heavy = 1
|
||||
meteorsound = 'sound/effects/blobattack.ogg'
|
||||
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
var/meteorgibs = /obj/effect/gibspawner/generic
|
||||
|
||||
/obj/effect/meteor/meaty/xeno
|
||||
color = "#5EFF00"
|
||||
meteordrop = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
|
||||
meteorgibs = /obj/effect/gibspawner/xeno
|
||||
|
||||
|
||||
/obj/effect/meteor/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/effect/meteor/Bump(atom/A)
|
||||
if(A)
|
||||
A.ex_act(hitpwr)
|
||||
playsound(src.loc, meteorsound, 40, 1)
|
||||
if(--src.hits <= 0)
|
||||
make_debris()
|
||||
meteor_effect(heavy)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/meteor/ex_act()
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/meteor/proc/meteor_effect(var/sound=1)
|
||||
if(sound)
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T || T.z != src.z)
|
||||
continue
|
||||
var/dist = get_dist(M.loc, src.loc)
|
||||
shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
|
||||
M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10)
|
||||
|
||||
|
||||
/obj/effect/meteor/medium/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 1, 2, 3, 4, 0)
|
||||
|
||||
|
||||
/obj/effect/meteor/big/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 0, 1, 2, 3, 0)
|
||||
|
||||
|
||||
/obj/effect/meteor/flaming/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 0, 1, 2, 3, 0, 0, 5)
|
||||
|
||||
|
||||
/obj/effect/meteor/irradiated/meteor_effect()
|
||||
..(heavy)
|
||||
explosion(src.loc, 0, 0, 4, 3, 0)
|
||||
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
|
||||
for(var/mob/living/L in view(5, src))
|
||||
L.apply_effect(40, IRRADIATE)
|
||||
|
||||
|
||||
|
||||
/obj/effect/meteor/proc/make_debris()
|
||||
for(var/throws = dropamt, throws > 0, throws--)
|
||||
var/obj/item/O = new meteordrop(get_turf(src))
|
||||
O.throw_at(dest, 5, 10)
|
||||
|
||||
/obj/effect/meteor/meaty/make_debris()
|
||||
..()
|
||||
new meteorgibs(get_turf(src))
|
||||
|
||||
|
||||
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pickaxe))
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
//////////////////////////
|
||||
@@ -63,7 +63,7 @@
|
||||
ape_infectees += carriermind
|
||||
|
||||
var/datum/disease/D = new /datum/disease/transformation/jungle_fever
|
||||
D.hidden = list(1,1)
|
||||
D.visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
|
||||
D.holder = carriermind.current
|
||||
D.affected_mob = carriermind.current
|
||||
carriermind.current.viruses += D
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
/datum/game_mode/monkey/proc/check_monkey_victory()
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
if (M.has_disease(/datum/disease/transformation/jungle_fever))
|
||||
if (M.HasDisease(/datum/disease/transformation/jungle_fever))
|
||||
var/area/A = get_area(M)
|
||||
if(is_type_in_list(A, centcom_areas))
|
||||
escaped_monkeys++
|
||||
|
||||
@@ -63,7 +63,7 @@ datum/objective/assassinate/check_completion()
|
||||
datum/objective/assassinate/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Assassinate [target.current.real_name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
explanation_text = "Assassinate [target.name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -90,7 +90,7 @@ datum/objective/mutiny/check_completion()
|
||||
datum/objective/mutiny/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Assassinate or exile [target.current.real_name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
explanation_text = "Assassinate or exile [target.name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -126,7 +126,7 @@ datum/objective/maroon/check_completion()
|
||||
|
||||
datum/objective/maroon/update_explanation_text()
|
||||
if(target && target.current)
|
||||
explanation_text = "Prevent [target.current.real_name], the [!target_role_type ? target.assigned_role : target.special_role], from escaping alive."
|
||||
explanation_text = "Prevent [target.name], the [!target_role_type ? target.assigned_role : target.special_role], from escaping alive."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -158,7 +158,7 @@ datum/objective/debrain/check_completion()
|
||||
datum/objective/debrain/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Steal the brain of [target.current.real_name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
explanation_text = "Steal the brain of [target.name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -185,7 +185,7 @@ datum/objective/protect/check_completion()
|
||||
datum/objective/protect/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Protect [target.current.real_name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
explanation_text = "Protect [target.name], the [!target_role_type ? target.assigned_role : target.special_role]."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -274,6 +274,32 @@ datum/objective/escape/check_completion()
|
||||
else
|
||||
return 0
|
||||
|
||||
datum/objective/escape/escape_with_identity
|
||||
dangerrating = 10
|
||||
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
|
||||
|
||||
datum/objective/escape/escape_with_identity/find_target()
|
||||
target = ..()
|
||||
update_explanation_text()
|
||||
|
||||
datum/objective/escape/escape_with_identity/update_explanation_text()
|
||||
if(target && target.current)
|
||||
target_real_name = target.current.real_name
|
||||
explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role]."
|
||||
else
|
||||
explanation_text = "Free Objective."
|
||||
|
||||
datum/objective/escape/escape_with_identity/check_completion()
|
||||
if(!target_real_name)
|
||||
return 1
|
||||
if(!ishuman(owner.current))
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(..())
|
||||
if(H.dna.real_name == target_real_name)
|
||||
if(H.get_id_name()== target_real_name)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
datum/objective/survive
|
||||
@@ -394,7 +420,7 @@ datum/objective/steal/exchange/proc/set_faction(var/faction,var/otheragent)
|
||||
datum/objective/steal/exchange/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Acquire [targetinfo.name] held by [target.current.real_name], the [target.assigned_role] and syndicate agent"
|
||||
explanation_text = "Acquire [targetinfo.name] held by [target.name], the [target.assigned_role] and syndicate agent"
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -526,6 +552,6 @@ datum/objective/destroy/check_completion()
|
||||
datum/objective/destroy/update_explanation_text()
|
||||
..()
|
||||
if(target && target.current)
|
||||
explanation_text = "Destroy [target.current.real_name], the experimental AI."
|
||||
explanation_text = "Destroy [target.name], the experimental AI."
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
@@ -67,9 +67,11 @@
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
|
||||
if(!storedpda)//is the pda still there?
|
||||
return
|
||||
storedpda.icon_state = P.icon_state
|
||||
storedpda.desc = P.desc
|
||||
ejectpda()
|
||||
|
||||
else
|
||||
user << "<span class='notice'>The [src] is empty.</span>"
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
|
||||
/obj/machinery/sleeper/attack_animal(var/mob/living/simple_animal/M)//Stop putting hostile mobs in things guise
|
||||
if(M.environment_smash)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M.name] smashes [src] apart!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -144,8 +144,9 @@
|
||||
|
||||
/obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
health -= rand(15,30)*brute_dam_coeff
|
||||
visible_message("<span class='userdanger'>[user] has slashed [src]!</span>")
|
||||
visible_message("<span class='danger'>[user] has slashed [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
@@ -153,11 +154,12 @@
|
||||
|
||||
|
||||
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
return
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
health -= M.melee_damage_upper
|
||||
visible_message("<span class='userdanger'>[M] has [M.attacktext] [src]!</span>")
|
||||
visible_message("<span class='danger'>[M] has [M.attacktext] [src]!</span>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
|
||||
@@ -268,9 +268,9 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
|
||||
qdel(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", name, created_name),1,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
created_name = t
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
radio_frequency = SEC_FREQ
|
||||
bot_type = SEC_BOT
|
||||
bot_filter = RADIO_SECBOT
|
||||
/
|
||||
|
||||
//List of weapons that secbots will not arrest for
|
||||
var/safe_weapons = list(\
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,\
|
||||
@@ -560,7 +560,7 @@ Auto Patrol[]"},
|
||||
..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", name, created_name),1,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && loc != usr) return
|
||||
created_name = t
|
||||
|
||||
@@ -503,7 +503,7 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
|
||||
qdel(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", name, created_name),1,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && loc != usr)
|
||||
@@ -522,11 +522,10 @@ obj/machinery/bot/floorbot/process_scan(var/scan_target)
|
||||
user.unEquip(src, 1)
|
||||
qdel(src)
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name)
|
||||
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
|
||||
created_name = t
|
||||
created_name = t
|
||||
|
||||
@@ -383,11 +383,12 @@
|
||||
|
||||
if(treat_virus)
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
if((D.hidden[SCANNER]) || (D.hidden[PANDEMIC])) //the medibot can't detect viruses that are undetectable to Health Analyzers or Pandemic machines.
|
||||
//the medibot can't detect viruses that are undetectable to Health Analyzers or Pandemic machines.
|
||||
if(D.visibility_flags & HIDDEN_SCANNER || D.visibility_flags & HIDDEN_PANDEMIC)
|
||||
return 0
|
||||
if(D.severity == D.non_threat) // medibot doesn't try to heal truly harmless viruses
|
||||
if(D.severity == NONTHREAT) // medibot doesn't try to heal truly harmless viruses
|
||||
return 0
|
||||
if((D.stage > 1) || (D.spread_type == AIRBORNE)) // medibot can't detect a virus in its initial stage unless it spreads airborne.
|
||||
if((D.stage > 1) || (D.spread_flags & AIRBORNE)) // medibot can't detect a virus in its initial stage unless it spreads airborne.
|
||||
|
||||
if (!C.reagents.has_reagent(treatment_virus))
|
||||
return 1 //STOP DISEASE FOREVER
|
||||
@@ -423,9 +424,10 @@
|
||||
if(treat_virus)
|
||||
var/virus = 0
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
if((!D.hidden[SCANNER]) && (!D.hidden[PANDEMIC])) //detectable virus
|
||||
if(D.severity != D.non_threat) //virus is harmful
|
||||
if((D.stage > 1) || (D.spread_type == AIRBORNE))
|
||||
//detectable virus
|
||||
if((!(D.visibility_flags & HIDDEN_SCANNER)) || (!(D.visibility_flags & HIDDEN_PANDEMIC)))
|
||||
if(D.severity != NONTHREAT) //virus is harmful
|
||||
if((D.stage > 1) || (D.spread_flags & AIRBORNE))
|
||||
virus = 1
|
||||
|
||||
if (!reagent_id && (virus))
|
||||
@@ -557,7 +559,7 @@
|
||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", name, created_name),1,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && loc != usr)
|
||||
|
||||
@@ -449,7 +449,7 @@ Auto Patrol: []"},
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", name, created_name),1,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
|
||||
if(!istype(user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
status = 0
|
||||
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
|
||||
var/input = stripped_input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")
|
||||
if(!input)
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
C.network = tempnetwork
|
||||
var/area/A = get_area_master(src)
|
||||
C.c_tag = "[A.name] ([rand(1, 999)]"
|
||||
C.c_tag = "[A.name] ([rand(1, 999)])"
|
||||
|
||||
for(var/i = 5; i >= 0; i -= 1)
|
||||
var/direct = input(user, "Direction?", "Assembling Camera", null) in list("LEAVE IT", "NORTH", "EAST", "SOUTH", "WEST" )
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
/obj/item/toy/prize/mauler = 1,
|
||||
/obj/item/toy/prize/odysseus = 1,
|
||||
/obj/item/toy/prize/phazon = 1,
|
||||
/obj/item/toy/prize/reticence = 1,
|
||||
/obj/item/toy/cards/deck = 2,
|
||||
/obj/item/toy/nuke = 2
|
||||
/obj/item/toy/nuke = 2,
|
||||
/obj/item/toy/minimeteor = 2,
|
||||
/obj/item/toy/carpplushie = 2
|
||||
)
|
||||
|
||||
/obj/machinery/computer/arcade/New()
|
||||
|
||||
@@ -219,7 +219,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
if(centcom_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING COORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
@@ -585,7 +585,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
user << "The emergency shuttle is already on its way."
|
||||
return
|
||||
|
||||
call_reason = strip_html_simple(trim(call_reason))
|
||||
call_reason = strip_html_properly(trim(call_reason))
|
||||
|
||||
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH)
|
||||
user << "You must provide a reason."
|
||||
|
||||
@@ -110,7 +110,8 @@
|
||||
. = ..()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/attack_paw(mob/user)
|
||||
/obj/machinery/computer/attack_paw(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
if(circuit)
|
||||
if(prob(10))
|
||||
user.visible_message("<span class='danger'>[user.name] smashes the [src.name] with its paws.</span>",\
|
||||
@@ -122,7 +123,8 @@
|
||||
"<span class='danger'>You smash against the [src.name] with your paws.</span>",\
|
||||
"<span class='danger'>You hear a clicking sound.</span>")
|
||||
|
||||
/obj/machinery/computer/attack_alien(mob/user)
|
||||
/obj/machinery/computer/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
if(circuit)
|
||||
if(prob(80))
|
||||
user.visible_message("<span class='danger'>[user.name] smashes the [src.name] with its claws.</span>",\
|
||||
|
||||
@@ -252,13 +252,13 @@
|
||||
var/type = href_list["vir"]
|
||||
var/datum/disease/Dis = new type(0)
|
||||
var/AfS = ""
|
||||
for(var/Str in Dis.affected_species)
|
||||
AfS += " [Str];"
|
||||
for(var/mob/M in Dis.viable_mobtypes)
|
||||
AfS += " [initial(M.name)];"
|
||||
src.temp = {"<b>Name:</b> [Dis.name]
|
||||
<BR><b>Number of stages:</b> [Dis.max_stages]
|
||||
<BR><b>Spread:</b> [Dis.spread] Transmission
|
||||
<BR><b>Possible Cure:</b> [(Dis.cure||"none")]
|
||||
<BR><b>Affected Species:</b>[AfS]
|
||||
<BR><b>Spread:</b> [Dis.spread_text] Transmission
|
||||
<BR><b>Possible Cure:</b> [(Dis.cure_text||"none")]
|
||||
<BR><b>Affected Lifeforms:</b>[AfS]
|
||||
<BR>
|
||||
<BR><b>Notes:</b> [Dis.desc]
|
||||
<BR>
|
||||
|
||||
@@ -22,10 +22,16 @@
|
||||
|
||||
req_component_names = new()
|
||||
for(var/tname in req_components)
|
||||
var/path = text2path(tname)
|
||||
var/path = tname
|
||||
var/obj/O = new path()
|
||||
req_component_names[tname] = O.name
|
||||
|
||||
/obj/machinery/constructable_frame/proc/get_req_components_amt()
|
||||
var/amt = 0
|
||||
for(var/path in req_components)
|
||||
amt += req_components[path]
|
||||
return amt
|
||||
|
||||
// update description of required components remaining
|
||||
/obj/machinery/constructable_frame/proc/update_req_desc()
|
||||
if(!req_components || !req_component_names)
|
||||
@@ -102,6 +108,7 @@
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
state = 2
|
||||
circuit.loc = src.loc
|
||||
components.Remove(circuit)
|
||||
circuit = null
|
||||
if(components.len == 0)
|
||||
user << "<span class='notice'>You remove the circuit board.</span>"
|
||||
@@ -133,10 +140,38 @@
|
||||
new_machine.RefreshParts()
|
||||
qdel(src)
|
||||
|
||||
if(istype(P, /obj/item))
|
||||
if(istype(P, /obj/item/weapon/storage/part_replacer) && P.contents.len && get_req_components_amt())
|
||||
var/obj/item/weapon/storage/part_replacer/replacer = P
|
||||
var/list/added_components = list()
|
||||
var/list/part_list = list()
|
||||
|
||||
//Assemble a list of current parts, then sort them by their rating!
|
||||
for(var/obj/item/weapon/stock_parts/co in replacer)
|
||||
part_list += co
|
||||
//Sort the parts. This ensures that higher tier items are applied first.
|
||||
part_list = sortTim(part_list, /proc/cmp_rped_sort)
|
||||
|
||||
for(var/path in req_components)
|
||||
while(req_components[path] > 0 && (locate(path) in part_list))
|
||||
var/obj/item/part = (locate(path) in part_list)
|
||||
if(!part.crit_fail)
|
||||
added_components[part] = path
|
||||
replacer.remove_from_storage(part, src)
|
||||
req_components[path]--
|
||||
part_list -= part
|
||||
|
||||
for(var/obj/item/weapon/stock_parts/part in added_components)
|
||||
components += part
|
||||
user << "<span class='notice'>[part.name] applied.</span>"
|
||||
replacer.play_rped_sound()
|
||||
|
||||
update_req_desc()
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item) && get_req_components_amt())
|
||||
var/success
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
if(istype(P, I) && (req_components[I] > 0))
|
||||
success=1
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CP = P
|
||||
@@ -173,7 +208,7 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/vending_refill/boozeomat" = 3)
|
||||
/obj/item/weapon/vending_refill/boozeomat = 3)
|
||||
|
||||
var/list/names_paths = list(/obj/machinery/vending/boozeomat = "Booze-O-Mat",
|
||||
/obj/machinery/vending/coffee = "Hot Drinks",
|
||||
@@ -191,7 +226,7 @@ to destroy them and players will be able to make replacements.
|
||||
build_path = typepath
|
||||
name = "circuit board ([names_paths[build_path]] Vendor)"
|
||||
user << "<span class='notice'>You set the board to [names_paths[build_path]].</span>"
|
||||
req_components = list("/obj/item/weapon/vending_refill/[copytext("[build_path]", 24)]" = 3) //Never before has i used a method as horrible as this one, im so sorry
|
||||
req_components = list(text2path("/obj/item/weapon/vending_refill/[copytext("[build_path]", 24)]") = 3) //Never before has i used a method as horrible as this one, im so sorry
|
||||
|
||||
/obj/item/weapon/circuitboard/smes
|
||||
name = "circuit board (SMES)"
|
||||
@@ -199,9 +234,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;powerstorage=5;engineering=5"
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 5,
|
||||
"/obj/item/weapon/stock_parts/cell" = 5,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weapon/stock_parts/cell = 5,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/power_compressor
|
||||
name = "circuit board (Power Compressor)"
|
||||
@@ -209,8 +244,8 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;powerstorage=5;engineering=4"
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 5,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 6)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weapon/stock_parts/manipulator = 6)
|
||||
|
||||
/obj/item/weapon/circuitboard/power_turbine
|
||||
name = "circuit board (Power Turbine)"
|
||||
@@ -218,8 +253,8 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;powerstorage=4;engineering=5"
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 5,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 6)
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weapon/stock_parts/capacitor = 6)
|
||||
|
||||
/obj/item/weapon/circuitboard/mech_recharger
|
||||
name = "circuit board (Mechbay Recharger)"
|
||||
@@ -227,8 +262,8 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;powerstorage=4;engineering=4"
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 5)
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/capacitor = 5)
|
||||
|
||||
/obj/item/weapon/circuitboard/teleporter_hub
|
||||
name = "circuit board (Teleporter Hub)"
|
||||
@@ -236,8 +271,8 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;engineering=5;bluespace=5;materials=4"
|
||||
req_components = list(
|
||||
"/obj/item/bluespace_crystal" = 3,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1)
|
||||
/obj/item/bluespace_crystal = 3,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/teleporter_station
|
||||
name = "circuit board (Teleporter Station)"
|
||||
@@ -245,9 +280,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=4;bluespace=4"
|
||||
req_components = list(
|
||||
"/obj/item/bluespace_crystal" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/bluespace_crystal = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telesci_pad
|
||||
name = "circuit board (Telepad)"
|
||||
@@ -255,10 +290,10 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;engineering=3;materials=3;bluespace=4"
|
||||
req_components = list(
|
||||
"/obj/item/bluespace_crystal" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/bluespace_crystal = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/sleeper
|
||||
name = "circuit board (Sleeper)"
|
||||
@@ -266,10 +301,10 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/cryo_tube
|
||||
name = "circuit board (Cryotube)"
|
||||
@@ -277,9 +312,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;biotech=3;engineering=4"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 4)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 4)
|
||||
|
||||
/obj/item/weapon/circuitboard/thermomachine
|
||||
name = "circuit board (Freezer)"
|
||||
@@ -288,10 +323,10 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;plasmatech=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/thermomachine/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -310,10 +345,10 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=2;materials=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/hydroponics
|
||||
name = "circuit board (Hydroponics Tray)"
|
||||
@@ -321,8 +356,8 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1;biotech=1"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/microwave
|
||||
name = "circuit board (Microwave)"
|
||||
@@ -330,9 +365,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/chem_dispenser
|
||||
name = "circuit board (Portable Chem Dispenser)"
|
||||
@@ -340,11 +375,11 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "materials=4;engineering=4;programming=4;plasmatech=3;biotech=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/stock_parts/cell" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/cell = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/destructive_analyzer
|
||||
@@ -353,9 +388,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "magnets=2;engineering=2;programming=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/autolathe
|
||||
name = "circuit board (Autolathe)"
|
||||
@@ -363,9 +398,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 3,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/protolathe
|
||||
name = "circuit board (Protolathe)"
|
||||
@@ -373,9 +408,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 2)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/circuit_imprinter
|
||||
@@ -384,9 +419,9 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman
|
||||
name = "circuit board (PACMAN-type Generator)"
|
||||
@@ -394,10 +429,10 @@ to destroy them and players will be able to make replacements.
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;powerstorage=3;plasmatech=3;engineering=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman/super
|
||||
name = "circuit board (SUPERPACMAN-type Generator)"
|
||||
@@ -415,8 +450,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3"
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/mechfab
|
||||
name = "circuit board (Exosuit Fabricator)"
|
||||
@@ -424,10 +459,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;engineering=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/clonepod
|
||||
name = "circuit board (Clone Pod)"
|
||||
@@ -435,10 +470,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;biotech=3"
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/clonescanner
|
||||
name = "circuit board (Cloning Scanner)"
|
||||
@@ -446,11 +481,11 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 2,)
|
||||
|
||||
/obj/item/weapon/circuitboard/cyborgrecharger
|
||||
name = "circuit board (Cyborg Recharger)"
|
||||
@@ -458,9 +493,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "powerstorage=3;engineering=3"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 2,
|
||||
"/obj/item/weapon/stock_parts/cell" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,)
|
||||
/obj/item/weapon/stock_parts/capacitor = 2,
|
||||
/obj/item/weapon/stock_parts/cell = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,)
|
||||
|
||||
// Telecomms circuit boards:
|
||||
|
||||
@@ -470,10 +505,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2;bluespace=1"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/subspace/ansible" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
/obj/item/weapon/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/hub
|
||||
name = "circuit board (Hub Mainframe)"
|
||||
@@ -481,9 +516,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/relay
|
||||
name = "circuit board (Relay Mainframe)"
|
||||
@@ -491,9 +526,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2;bluespace=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/bus
|
||||
name = "circuit board (Bus Mainframe)"
|
||||
@@ -501,9 +536,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/processor
|
||||
name = "circuit board (Processor Unit)"
|
||||
@@ -511,12 +546,12 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 3,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/treatment" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 3,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/amplifier = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/server
|
||||
name = "circuit board (Telecommunication Server)"
|
||||
@@ -524,9 +559,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/broadcaster
|
||||
name = "circuit board (Subspace Broadcaster)"
|
||||
@@ -534,20 +569,20 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=2;engineering=2;bluespace=1"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser/high" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser/high = 2)
|
||||
/obj/item/weapon/circuitboard/ore_redemption
|
||||
name = "circuit board (Ore Redemption)"
|
||||
build_path = /obj/machinery/mineral/ore_redemption
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1;engineering=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/device/assembly/igniter" = 1)
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/device/assembly/igniter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/mining_equipment_vendor
|
||||
name = "circuit board (Mining Equipment Vendor)"
|
||||
@@ -555,5 +590,5 @@ obj/item/weapon/circuitboard/rdserver
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=1;engineering=2"
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 3)
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3)
|
||||
@@ -43,13 +43,13 @@
|
||||
if(src.check_access(bot.botcard))
|
||||
open_and_close()
|
||||
else
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
flick("[src.base_state]deny", src)
|
||||
else if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if(mecha.occupant && src.allowed(mecha.occupant))
|
||||
open_and_close()
|
||||
else
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
flick("[src.base_state]deny", src)
|
||||
return
|
||||
if (!( ticker ))
|
||||
return
|
||||
@@ -68,7 +68,7 @@
|
||||
if(allowed(user))
|
||||
open_and_close()
|
||||
else
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
flick("[src.base_state]deny", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
@@ -110,9 +110,9 @@
|
||||
return 0
|
||||
if(!src.operating) //in case of emag
|
||||
src.operating = 1
|
||||
flick(text("[]opening", src.base_state), src)
|
||||
flick("[src.base_state]opening", src)
|
||||
playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
|
||||
src.icon_state = text("[]open", src.base_state)
|
||||
src.icon_state ="[src.base_state]open"
|
||||
sleep(10)
|
||||
|
||||
explosion_resistance = 0
|
||||
@@ -135,7 +135,7 @@
|
||||
if(emagged)
|
||||
return 0
|
||||
src.operating = 1
|
||||
flick(text("[]closing", src.base_state), src)
|
||||
flick("[src.base_state]closing", src)
|
||||
playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
|
||||
src.icon_state = src.base_state
|
||||
|
||||
@@ -165,6 +165,19 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if(prob(25))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(120)
|
||||
if(3.0)
|
||||
take_damage(60)
|
||||
|
||||
|
||||
/obj/machinery/door/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.damage)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
@@ -199,21 +212,24 @@
|
||||
"<span class='userdanger'>[user] smashes against the [src.name].</span>")
|
||||
take_damage(damage)
|
||||
|
||||
/obj/machinery/door/window/attack_alien(mob/user as mob)
|
||||
/obj/machinery/door/window/attack_alien(mob/living/user as mob)
|
||||
user.do_attack_animation(src)
|
||||
if(islarva(user))
|
||||
return
|
||||
attack_generic(user, 25)
|
||||
|
||||
/obj/machinery/door/window/attack_animal(mob/user as mob)
|
||||
/obj/machinery/door/window/attack_animal(mob/living/user as mob)
|
||||
if(!isanimal(user))
|
||||
return
|
||||
var/mob/living/simple_animal/M = user
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
|
||||
/obj/machinery/door/window/attack_slime(mob/living/carbon/slime/user as mob)
|
||||
user.do_attack_animation(src)
|
||||
if(!user.is_adult)
|
||||
return
|
||||
attack_generic(user, 25)
|
||||
@@ -224,7 +240,7 @@
|
||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
if (src.operating)
|
||||
@@ -323,6 +339,7 @@
|
||||
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card) )
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if( (I.flags&NOBLUDGEON) || !I.force )
|
||||
return
|
||||
var/aforce = I.force
|
||||
@@ -343,7 +360,7 @@
|
||||
close()
|
||||
|
||||
else if (src.density)
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
flick("[src.base_state]deny", src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -84,13 +84,12 @@ var/const/HOLOPAD_MODE = RANGE_BASED
|
||||
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
/obj/machinery/hologram/holopad/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
|
||||
if(speaker && masters.len && !radio_freq)//Master is mostly a safety in case lag hits or something. Radio_freq so AIs dont hear holopad stuff through radios.
|
||||
for (var/mob/living/silicon/ai/master in masters)
|
||||
for(var/mob/living/silicon/ai/master in masters)
|
||||
if(masters[master] && speaker != master)
|
||||
raw_message = master.lang_treat(speaker, message_langs, raw_message)
|
||||
var/name_used = speaker.GetVoice()
|
||||
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> <span class='message'>[speaker.say_quote(raw_message)]</span></span></i>"
|
||||
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> <span class='message'>[raw_message]</span></span></i>"
|
||||
master.show_message(rendered, 2)
|
||||
return
|
||||
|
||||
/obj/machinery/hologram/holopad/proc/create_holo(mob/living/silicon/ai/A, turf/T = loc)
|
||||
var/obj/effect/overlay/h = new(T)//Spawn a blank effect at the location.
|
||||
|
||||
@@ -141,19 +141,21 @@ Class Procs:
|
||||
..()
|
||||
|
||||
/obj/machinery/proc/open_machine()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
state_open = 1
|
||||
density = 0
|
||||
T.contents += contents
|
||||
if(occupant)
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant = null
|
||||
state_open = 1
|
||||
density = 0
|
||||
dropContents()
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/proc/dropContents()
|
||||
var/turf/T = get_turf(src)
|
||||
T.contents += contents
|
||||
if(occupant)
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant = null
|
||||
|
||||
/obj/machinery/proc/close_machine(mob/living/target = null)
|
||||
state_open = 0
|
||||
density = 1
|
||||
@@ -231,10 +233,13 @@ Class Procs:
|
||||
src << "<span class='notice'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M)
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 0)
|
||||
if(restrained() || lying || stat || stunned || weakened)
|
||||
return
|
||||
if(!in_range(M, src))
|
||||
if((be_close == 0) && (TK in mutations))
|
||||
if(tkMaxRangeCheck(src, M))
|
||||
return 1
|
||||
return
|
||||
if(!isturf(M.loc) && M.loc != src)
|
||||
return
|
||||
@@ -349,14 +354,15 @@ Class Procs:
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/exchange_parts(mob/user, obj/item/weapon/storage/part_replacer/W)
|
||||
var/shouldplaysound = 0
|
||||
if(istype(W) && component_parts)
|
||||
if(panel_open)
|
||||
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
|
||||
var/P
|
||||
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
if(ispath(A.type, text2path(D)))
|
||||
P = text2path(D)
|
||||
if(ispath(A.type, D))
|
||||
P = D
|
||||
break
|
||||
for(var/obj/item/weapon/stock_parts/B in W.contents)
|
||||
if(istype(B, P) && istype(A, P))
|
||||
@@ -367,11 +373,14 @@ Class Procs:
|
||||
component_parts += B
|
||||
B.loc = null
|
||||
user << "<span class='notice'>[A.name] replaced with [B.name].</span>"
|
||||
shouldplaysound = 1 //Only play the sound when parts are actually replaced!
|
||||
break
|
||||
RefreshParts()
|
||||
else
|
||||
user << "<span class='notice'>Following parts detected in the machine:</span>"
|
||||
for(var/var/obj/item/C in component_parts)
|
||||
user << "<span class='notice'> [C.name]</span>"
|
||||
if(shouldplaysound)
|
||||
W.play_rped_sound()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -518,7 +518,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
if(href_list["set_channel_name"])
|
||||
src.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
src.channel_name = stripped_input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "", MAX_NAME_LEN)
|
||||
while (findtext(src.channel_name," ") == 1)
|
||||
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
|
||||
src.updateUsrDialog()
|
||||
@@ -563,9 +563,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_new_message"])
|
||||
src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
while (findtext(src.msg," ") == 1)
|
||||
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
|
||||
src.msg = trim(stripped_input(usr, "Write your Feed story", "Network Channel Handler"))
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_attachment"])
|
||||
@@ -620,15 +618,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_wanted_name"])
|
||||
src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
while (findtext(src.channel_name," ") == 1)
|
||||
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
|
||||
src.channel_name = trim(stripped_input(usr, "Provide the name of the Wanted person", "Network Security Handler"))
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_wanted_desc"])
|
||||
src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
while (findtext(src.msg," ") == 1)
|
||||
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
|
||||
src.msg = trim(stripped_input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler"))
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["submit_wanted"])
|
||||
@@ -786,7 +780,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/living/user as mob)
|
||||
|
||||
/* if (istype(I, /obj/item/weapon/card/id) || istype(I, /obj/item/device/pda) ) //Name verification for channels or messages
|
||||
if(src.screen == 4 || src.screen == 5)
|
||||
@@ -812,24 +806,25 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if (src.isbroken)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
|
||||
for (var/mob/O in hearers(5, src.loc))
|
||||
O.show_message("<EM>[user.name]</EM> further abuses the shattered [src.name].")
|
||||
O.show_message("<span class='danger'>[user.name] further abuses the shattered [src.name].</span>")
|
||||
else
|
||||
if(istype(I, /obj/item/weapon) )
|
||||
user.do_attack_animation(src)
|
||||
var/obj/item/weapon/W = I
|
||||
if(W.force <15)
|
||||
for (var/mob/O in hearers(5, src.loc))
|
||||
O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." )
|
||||
O.show_message("<span class='danger'>[user.name] hits the [src.name] with the [W.name] with no visible effect.</span>" )
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken==3)
|
||||
for (var/mob/O in hearers(5, src.loc))
|
||||
O.show_message("[user.name] smashes the [src.name]!" )
|
||||
O.show_message("<span class='danger'>[user.name] smashes the [src.name]!</span>" )
|
||||
src.isbroken=1
|
||||
playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1)
|
||||
else
|
||||
for (var/mob/O in hearers(5, src.loc))
|
||||
O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" )
|
||||
O.show_message("<span class='danger'>[user.name] forcefully slams the [src.name] with the [I.name]!</span>" )
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
else
|
||||
user << "<FONT COLOR='blue'>This does nothing.</FONT>"
|
||||
@@ -1026,10 +1021,9 @@ obj/item/weapon/newspaper/Topic(href, href_list)
|
||||
obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
if(src.scribble_page == src.curr_page)
|
||||
user << "<FONT COLOR='blue'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>"
|
||||
user << "<span class='notice'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</span>"
|
||||
else
|
||||
var/s = strip_html( input(user, "Write something", "Newspaper", "") )
|
||||
s = copytext(sanitize(s), 1, MAX_MESSAGE_LEN)
|
||||
var/s = stripped_input(user, "Write something", "Newspaper")
|
||||
if (!s)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
if (src.health <= 0)
|
||||
visible_message("<span class='notice'>The [src] dissapates.</span>")
|
||||
visible_message("<span class='notice'>[src] dissipates.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <=0)
|
||||
visible_message("<span class='notice'>The [src] dissapates.</span>")
|
||||
visible_message("<span class='notice'>The [src] dissipates.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
opacity = 1
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
//Handle the destruction of the shield
|
||||
if (src.health <= 0)
|
||||
visible_message("<span class='notice'>The [src] dissapates.</span>")
|
||||
visible_message("<span class='notice'>[src] dissipates.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -475,8 +475,8 @@
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
|
||||
else
|
||||
src.add_fingerprint(user)
|
||||
visible_message("<span class='danger'>The [src.name] has been hit with the [W.name] by [user.name]!</span>")
|
||||
add_fingerprint(user)
|
||||
..()
|
||||
|
||||
/obj/machinery/shieldwallgen/proc/cleanup(var/NSEW)
|
||||
var/obj/machinery/shieldwall/F
|
||||
|
||||
@@ -311,6 +311,7 @@
|
||||
|
||||
/obj/machinery/turret/attack_animal(mob/living/simple_animal/M as mob)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
if(!(stat & BROKEN))
|
||||
visible_message("<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
@@ -328,9 +329,10 @@
|
||||
|
||||
/obj/machinery/turret/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(!(stat & BROKEN))
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='userdanger'>[] has slashed at []!</span>", M, src)
|
||||
visible_message("<span class='danger'>[M] has slashed at [src]!</span>")
|
||||
src.health -= 15
|
||||
if (src.health <= 0)
|
||||
src.die()
|
||||
@@ -411,9 +413,10 @@
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/gun_turret/attack_alien(mob/user as mob)
|
||||
/obj/machinery/gun_turret/attack_alien(mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] slashes at [src]", "You slash at [src]")
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] slashes at [src]</span>", "<span class='danger'>You slash at [src]</span>")
|
||||
take_damage(15)
|
||||
return
|
||||
|
||||
|
||||
@@ -648,9 +648,16 @@
|
||||
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs."
|
||||
vend_delay = 34
|
||||
icon_state = "cigs"
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 4,/obj/item/weapon/storage/fancy/rollingpapers = 5)
|
||||
products = list(/obj/item/weapon/storage/fancy/cigarettes = 5,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift = 3,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust = 2,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp = 3,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori = 1,
|
||||
/obj/item/weapon/storage/box/matches = 10,
|
||||
/obj/item/weapon/lighter/random = 4,
|
||||
/obj/item/weapon/storage/fancy/rollingpapers = 5)
|
||||
contraband = list(/obj/item/weapon/lighter/zippo = 4)
|
||||
premium = list(/obj/item/clothing/mask/cigarette/cigar/havana = 2)
|
||||
premium = list(/obj/item/clothing/mask/cigarette/cigar/havana = 2, /obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold = 1)
|
||||
refill_canister = /obj/item/weapon/vending_refill/cigarette
|
||||
|
||||
|
||||
|
||||
+237
-483
@@ -1,7 +1,3 @@
|
||||
/////////////////////////////
|
||||
///// Part Fabricator ///////
|
||||
/////////////////////////////
|
||||
|
||||
/obj/machinery/mecha_part_fabricator
|
||||
icon = 'icons/obj/robotics.dmi'
|
||||
icon_state = "fab-idle"
|
||||
@@ -18,129 +14,37 @@
|
||||
var/time_coeff_tech = 1
|
||||
var/resource_coeff_tech = 1
|
||||
var/list/resources = list(
|
||||
"metal"=0,
|
||||
"glass"=0,
|
||||
"bananium"=0,
|
||||
"diamond"=0,
|
||||
"gold"=0,
|
||||
"plasma"=0,
|
||||
"silver"=0,
|
||||
"uranium"=0
|
||||
)
|
||||
"$metal"=0,
|
||||
"$glass"=0,
|
||||
"$bananium"=0,
|
||||
"$diamond"=0,
|
||||
"$gold"=0,
|
||||
"$plasma"=0,
|
||||
"$silver"=0,
|
||||
"$uranium"=0
|
||||
)
|
||||
var/res_max_amount = 200000
|
||||
var/datum/research/files
|
||||
var/id
|
||||
var/sync = 0
|
||||
var/part_set
|
||||
var/obj/being_built
|
||||
var/datum/design/being_built
|
||||
var/list/queue = list()
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/list/part_sets = list( //set names must be unique
|
||||
"Cyborg"=list(
|
||||
/obj/item/robot_parts/robot_suit,
|
||||
/obj/item/robot_parts/chest,
|
||||
/obj/item/robot_parts/head,
|
||||
/obj/item/robot_parts/l_arm,
|
||||
/obj/item/robot_parts/r_arm,
|
||||
/obj/item/robot_parts/l_leg,
|
||||
/obj/item/robot_parts/r_leg
|
||||
),
|
||||
"Ripley"=list(
|
||||
/obj/item/mecha_parts/chassis/ripley,
|
||||
/obj/item/mecha_parts/chassis/firefighter,
|
||||
/obj/item/mecha_parts/part/ripley_torso,
|
||||
/obj/item/mecha_parts/part/ripley_left_arm,
|
||||
/obj/item/mecha_parts/part/ripley_right_arm,
|
||||
/obj/item/mecha_parts/part/ripley_left_leg,
|
||||
/obj/item/mecha_parts/part/ripley_right_leg
|
||||
),
|
||||
"Odysseus"=list(
|
||||
/obj/item/mecha_parts/chassis/odysseus,
|
||||
/obj/item/mecha_parts/part/odysseus_torso,
|
||||
/obj/item/mecha_parts/part/odysseus_head,
|
||||
/obj/item/mecha_parts/part/odysseus_left_arm,
|
||||
/obj/item/mecha_parts/part/odysseus_right_arm,
|
||||
/obj/item/mecha_parts/part/odysseus_left_leg,
|
||||
/obj/item/mecha_parts/part/odysseus_right_leg
|
||||
),
|
||||
|
||||
"Gygax"=list(
|
||||
/obj/item/mecha_parts/chassis/gygax,
|
||||
/obj/item/mecha_parts/part/gygax_torso,
|
||||
/obj/item/mecha_parts/part/gygax_head,
|
||||
/obj/item/mecha_parts/part/gygax_left_arm,
|
||||
/obj/item/mecha_parts/part/gygax_right_arm,
|
||||
/obj/item/mecha_parts/part/gygax_left_leg,
|
||||
/obj/item/mecha_parts/part/gygax_right_leg,
|
||||
/obj/item/mecha_parts/part/gygax_armor
|
||||
),
|
||||
"Durand"=list(
|
||||
/obj/item/mecha_parts/chassis/durand,
|
||||
/obj/item/mecha_parts/part/durand_torso,
|
||||
/obj/item/mecha_parts/part/durand_head,
|
||||
/obj/item/mecha_parts/part/durand_left_arm,
|
||||
/obj/item/mecha_parts/part/durand_right_arm,
|
||||
/obj/item/mecha_parts/part/durand_left_leg,
|
||||
/obj/item/mecha_parts/part/durand_right_leg,
|
||||
/obj/item/mecha_parts/part/durand_armor
|
||||
),
|
||||
"H.O.N.K"=list(
|
||||
/obj/item/mecha_parts/chassis/honker,
|
||||
/obj/item/mecha_parts/part/honker_torso,
|
||||
/obj/item/mecha_parts/part/honker_head,
|
||||
/obj/item/mecha_parts/part/honker_left_arm,
|
||||
/obj/item/mecha_parts/part/honker_right_arm,
|
||||
/obj/item/mecha_parts/part/honker_left_leg,
|
||||
/obj/item/mecha_parts/part/honker_right_leg
|
||||
),
|
||||
"Phazon"=list(
|
||||
/obj/item/mecha_parts/chassis/phazon,
|
||||
/obj/item/mecha_parts/part/phazon_torso,
|
||||
/obj/item/mecha_parts/part/phazon_head,
|
||||
/obj/item/mecha_parts/part/phazon_left_arm,
|
||||
/obj/item/mecha_parts/part/phazon_right_arm,
|
||||
/obj/item/mecha_parts/part/phazon_left_leg,
|
||||
/obj/item/mecha_parts/part/phazon_right_leg,
|
||||
/obj/item/mecha_parts/part/phazon_armor
|
||||
),
|
||||
"Exosuit Equipment"=list(
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/cable_layer,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun,
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid,
|
||||
/obj/item/mecha_parts/mecha_equipment/generator,
|
||||
///obj/item/mecha_parts/mecha_equipment/jetpack, //TODO MECHA JETPACK SPRITE MISSING
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||
),
|
||||
|
||||
"Cyborg Upgrade Modules" = list(
|
||||
/obj/item/borg/upgrade/reset,
|
||||
/obj/item/borg/upgrade/rename,
|
||||
/obj/item/borg/upgrade/restart,
|
||||
/obj/item/borg/upgrade/vtec,
|
||||
/obj/item/borg/upgrade/tasercooler,
|
||||
/obj/item/borg/upgrade/jetpack
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"Misc"=list(/obj/item/mecha_parts/mecha_tracking)
|
||||
)
|
||||
|
||||
|
||||
|
||||
var/list/part_sets = list(
|
||||
"Cyborg",
|
||||
"Ripley",
|
||||
"Odysseus",
|
||||
"Gygax",
|
||||
"Durand",
|
||||
"H.O.N.K",
|
||||
"Phazon",
|
||||
"Exosuit Equipment",
|
||||
"Cyborg Upgrade Modules",
|
||||
"Misc"
|
||||
)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/New()
|
||||
..()
|
||||
@@ -152,19 +56,7 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
// part_sets["Cyborg Upgrade Modules"] = typesof(/obj/item/borg/upgrade/) - /obj/item/borg/upgrade/ // Eh. This does it dymaically, but to support having the items referenced otherwhere in the code but not being constructable, going to do it manaully.
|
||||
|
||||
for(var/part_set in part_sets)
|
||||
convert_part_set(part_set)
|
||||
files = new /datum/research(src) //Setup the research data holder.
|
||||
/*
|
||||
if(!id)
|
||||
for(var/obj/machinery/r_n_d/server/centcom/S in world)
|
||||
S.initialize()
|
||||
break
|
||||
*/
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/RefreshParts()
|
||||
var/T = 0
|
||||
@@ -187,25 +79,6 @@
|
||||
if(time_coeff!=diff)
|
||||
time_coeff = diff
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Destroy()
|
||||
for(var/atom/A in src)
|
||||
qdel(A)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/operation_allowed(mob/M)
|
||||
if(isrobot(M) || isAI(M))
|
||||
return 1
|
||||
if(!istype(req_access) || !req_access.len)
|
||||
return 1
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/ID in list(H.get_active_hand(), H.wear_id, H.belt))
|
||||
if(src.check_access(ID))
|
||||
return 1
|
||||
M << "<span class='alert'>You don't have the required permissions to use \the [src]!</span>"
|
||||
return 0
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/check_access(obj/item/weapon/card/id/I)
|
||||
if(istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
@@ -218,119 +91,55 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/emag()
|
||||
sleep()
|
||||
switch(emagged)
|
||||
if(0)
|
||||
emagged = 0.5
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB error \[Code 0x00F1\]\"")
|
||||
sleep(10)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps: \"Attempting auto-repair\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"Attempting auto-repair\"")
|
||||
sleep(15)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
|
||||
sleep(30)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"User DB truncated. Please contact your Nanotrasen system operator for future assistance.\"")
|
||||
req_access = null
|
||||
emagged = 1
|
||||
if(0.5)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"DB not responding \[Code 0x0003\]...\"")
|
||||
if(1)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps: \"No records in User DB\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps: \"No records in User DB\"")
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/convert_part_set(set_name as text)
|
||||
var/list/parts = part_sets[set_name]
|
||||
if(istype(parts, /list))
|
||||
for(var/i=1;i<=parts.len;i++)
|
||||
var/path = parts[i]
|
||||
var/part = new path(src)
|
||||
if(part)
|
||||
parts[i] = part
|
||||
//debug below
|
||||
if(!istype(parts[i],/obj/item)) return 0
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_part_set(set_name as text,parts=null)
|
||||
if(set_name in part_sets)//attempt to create duplicate set
|
||||
/*
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_part_to_set(set_name, part)
|
||||
if(!part)
|
||||
return 0
|
||||
if(isnull(parts))
|
||||
if(!set_name in part_sets)//attempt to create duplicate set
|
||||
part_sets[set_name] = list()
|
||||
else
|
||||
part_sets[set_name] = parts
|
||||
convert_part_set(set_name)
|
||||
part_sets[set_name] += part
|
||||
return 1
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_part_to_set(set_name as text,part)
|
||||
if(!part) return 0
|
||||
src.add_part_set(set_name)//if no "set_name" set exists, create
|
||||
var/list/part_set = part_sets[set_name]
|
||||
var/atom/apart
|
||||
if(ispath(part))
|
||||
apart = new part(src)
|
||||
else
|
||||
apart = part
|
||||
if(!istype(apart)) return 0
|
||||
for(var/obj/O in part_set)
|
||||
if(O.type == apart.type)
|
||||
qdel(apart)
|
||||
return 0
|
||||
part_set[++part_set.len] = apart
|
||||
return 1
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_part_set(set_name as text)
|
||||
for(var/i=1,i<=part_sets.len,i++)
|
||||
if(part_sets[i]==set_name)
|
||||
part_sets.Cut(i,++i)
|
||||
return
|
||||
/*
|
||||
proc/sanity_check()
|
||||
for(var/p in resources)
|
||||
var/index = resources.Find(p)
|
||||
index = resources.Find(p, ++index)
|
||||
if(index) //duplicate resource
|
||||
world << "Duplicate resource definition for [src](\ref[src])"
|
||||
return 0
|
||||
for(var/set_name in part_sets)
|
||||
var/index = part_sets.Find(set_name)
|
||||
index = part_sets.Find(set_name, ++index)
|
||||
if(index) //duplicate part set
|
||||
world << "Duplicate part set definition for [src](\ref[src])"
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
/*
|
||||
New()
|
||||
..()
|
||||
src.add_part_to_set("Test",list("result"="/obj/item/mecha_parts/part/gygax_armor","time"=600,"metal"=75000,"diamond"=10000))
|
||||
src.add_part_to_set("Test",list("result"="/obj/item/mecha_parts/part/ripley_left_arm","time"=200,"metal"=25000))
|
||||
src.remove_part_set("Gygax")
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name)
|
||||
var/output = ""
|
||||
var/list/part_set = listgetindex(part_sets, set_name)
|
||||
if(istype(part_set))
|
||||
for(var/obj/item/part in part_set)
|
||||
var/resources_available = check_resources(part)
|
||||
output += "<div class='part'>[output_part_info(part)]<br>\[[resources_available?"<a href='?src=\ref[src];part=\ref[part]'>Build</a> | ":null]<a href='?src=\ref[src];add_to_queue=\ref[part]'>Add to queue</a>\]\[<a href='?src=\ref[src];part_desc=\ref[part]'>?</a>\]</div>"
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type&16)
|
||||
if(D.category != set_name)
|
||||
continue
|
||||
var/resources_available = check_resources(D)
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\[[resources_available?"<a href='?src=\ref[src];part=[D.id]'>Build</a> | ":null]<a href='?src=\ref[src];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=\ref[src];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_info(var/obj/item/part)
|
||||
var/output = "[part.name] (Cost: [output_part_cost(part)]) [get_construction_time_w_coeff(part)/10]sec"
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/obj/part = D.build_path
|
||||
var/output = "[initial(part.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(part)/10]sec"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_cost(var/obj/item/part)
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
var/i = 0
|
||||
var/output
|
||||
if(hasvar(part, "construction_time") && hasvar(part, "construction_cost"))//The most efficient way to go about this. Not all objects have these vars, but if they don't then they CANNOT be made by the mech fab. Doing it this way reduces a major amount of typecasting and switches, while cutting down maintenece for them as well -Sieve
|
||||
for(var/c in part:construction_cost)//The check should ensure that anything without the var doesn't make it to this point
|
||||
if(c in resources)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(part,c)] [c]"
|
||||
i++
|
||||
return output
|
||||
else
|
||||
return 0
|
||||
for(var/c in D.materials)
|
||||
if(c in resources)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D,c)] [c]"
|
||||
i++
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_available_resources()
|
||||
var/output
|
||||
@@ -342,70 +151,62 @@
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_resources(var/obj/item/part)
|
||||
//Be SURE to add any new equipment to this switch, but don't be suprised if it spits out children objects
|
||||
if(hasvar(part, "construction_time") && hasvar(part, "construction_cost"))
|
||||
for(var/resource in part:construction_cost)
|
||||
if(resource in src.resources)
|
||||
src.resources[resource] -= get_resource_cost_w_coeff(part,resource)
|
||||
else
|
||||
return
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_resources(datum/design/D)
|
||||
for(var/resource in D.materials)
|
||||
if(resource in resources)
|
||||
resources[resource] -= get_resource_cost_w_coeff(D,resource)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/check_resources(var/obj/item/part)
|
||||
// if(istype(part, /obj/item/robot_parts) || istype(part, /obj/item/mecha_parts) || istype(part,/obj/item/borg/upgrade))
|
||||
//Be SURE to add any new equipment to this switch, but don't be suprised if it spits out children objects
|
||||
if(hasvar(part, "construction_time") && hasvar(part, "construction_cost"))
|
||||
for(var/resource in part:construction_cost)
|
||||
if(resource in src.resources)
|
||||
if(src.resources[resource] < get_resource_cost_w_coeff(part,resource))
|
||||
return 0
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
/obj/item/mechavars //until these values are extracted from the design datum (most objects on the mech fabricators don't have these), this is necessary, to make the initial() work.
|
||||
var/construction_time
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/build_part(var/obj/item/part)
|
||||
if(!part) return
|
||||
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
|
||||
for(var/R in D.materials)
|
||||
if(R in resources)
|
||||
if(resources[R] < get_resource_cost_w_coeff(D, R))
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
// critical exploit prevention, do not remove unless you replace it
|
||||
if( (part.loc != src) || !(hasvar(part, "construction_time")) || !(hasvar(part, "construction_cost")) ) // these 3 are the current requirements for an object being buildable by the mech_fabricator
|
||||
return
|
||||
|
||||
src.being_built = new part.type(src)
|
||||
src.desc = "It's building \a [src.being_built]."
|
||||
src.remove_resources(part)
|
||||
part.m_amt = get_resource_cost_w_coeff(part,"metal")
|
||||
part.g_amt = get_resource_cost_w_coeff(part,"glass")
|
||||
src.overlays += "fab-active"
|
||||
src.use_power = 2
|
||||
src.updateUsrDialog()
|
||||
/obj/machinery/mecha_part_fabricator/proc/build_part(datum/design/D)
|
||||
var/obj/part = D.build_path
|
||||
being_built = D
|
||||
desc = "It's building \a [initial(part.name)]."
|
||||
remove_resources(D)
|
||||
overlays += "fab-active"
|
||||
use_power = 2
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(part))
|
||||
src.use_power = 1
|
||||
src.overlays -= "fab-active"
|
||||
src.desc = initial(src.desc)
|
||||
if(being_built)
|
||||
src.being_built.loc = get_step(src,SOUTH)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps, \"\The [src.being_built] is complete.\"")
|
||||
src.being_built = null
|
||||
src.updateUsrDialog()
|
||||
use_power = 1
|
||||
overlays -= "fab-active"
|
||||
desc = initial(desc)
|
||||
|
||||
var/obj/item/I = new D.build_path
|
||||
I.loc = get_step(src,SOUTH)
|
||||
I.m_amt = get_resource_cost_w_coeff(D,"$metal")
|
||||
I.g_amt = get_resource_cost_w_coeff(D,"$glass")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"\The [I] is complete.\"")
|
||||
being_built = null
|
||||
|
||||
updateUsrDialog()
|
||||
return 1
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/update_queue_on_page()
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",src.list_queue())
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_part_set_to_queue(set_name)
|
||||
if(set_name in part_sets)
|
||||
var/list/part_set = part_sets[set_name]
|
||||
if(islist(part_set))
|
||||
for(var/obj/item/part in part_set)
|
||||
add_to_queue(part)
|
||||
return
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type&16)
|
||||
if(D.category == set_name)
|
||||
add_to_queue(D)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_to_queue(part)
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_to_queue(D)
|
||||
if(!istype(queue))
|
||||
queue = list()
|
||||
if(part)
|
||||
queue[++queue.len] = part
|
||||
if(D)
|
||||
queue[++queue.len] = D
|
||||
return queue.len
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_from_queue(index)
|
||||
@@ -415,30 +216,26 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/process_queue()
|
||||
var/obj/item/part = listgetindex(src.queue, 1)
|
||||
if(!part)
|
||||
var/datum/design/D = queue[1]
|
||||
if(!D)
|
||||
remove_from_queue(1)
|
||||
if(src.queue.len)
|
||||
if(queue.len)
|
||||
return process_queue()
|
||||
else
|
||||
return
|
||||
if(!(hasvar(part, "construction_time")) || !(hasvar(part, "construction_cost")))//If it shouldn't be printed
|
||||
remove_from_queue(1)//Take it out of the quene
|
||||
return process_queue()//Then reprocess it
|
||||
temp = null
|
||||
while(part)
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!check_resources(part))
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps, \"Not enough resources. Queue processing stopped.\"")
|
||||
if(!check_resources(D))
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Not enough resources. Queue processing stopped.\"")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
<a href='?src=\ref[src];process_queue=1'>Try again</a> | <a href='?src=\ref[src];clear_temp=1'>Return</a><a>"}
|
||||
return 0
|
||||
remove_from_queue(1)
|
||||
build_part(part)
|
||||
part = listgetindex(src.queue, 1)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps, \"Queue processing finished successfully.\"")
|
||||
return 1
|
||||
build_part(D)
|
||||
D = listgetindex(queue, 1)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Queue processing finished successfully.\"")
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/list_queue()
|
||||
var/output = "<b>Queue contains:</b>"
|
||||
@@ -446,31 +243,29 @@
|
||||
output += "<br>Nothing"
|
||||
else
|
||||
output += "<ol>"
|
||||
for(var/i=1;i<=queue.len;i++)
|
||||
var/obj/item/part = listgetindex(src.queue, i)
|
||||
if(istype(part))
|
||||
if(hasvar(part, "construction_time") && hasvar(part, "construction_cost"))
|
||||
output += "<li[!check_resources(part)?" style='color: #f00;'":null]>[part.name] - [i>1?"<a href='?src=\ref[src];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] [i<queue.len?"<a href='?src=\ref[src];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] <a href='?src=\ref[src];remove_from_queue=[i]'>Remove</a></li>"
|
||||
else//Prevents junk items from even appearing in the list, and they will be silently removed when the fab processes
|
||||
remove_from_queue(i)//Trash it
|
||||
return list_queue()//Rebuild it
|
||||
var/i = 0
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>[initial(part.name)] - [i>1?"<a href='?src=\ref[src];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] [i<queue.len?"<a href='?src=\ref[src];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] <a href='?src=\ref[src];remove_from_queue=[i]'>Remove</a></li>"
|
||||
|
||||
output += "</ol>"
|
||||
output += "\[<a href='?src=\ref[src];process_queue=1'>Process queue</a> | <a href='?src=\ref[src];clear_queue=1'>Clear queue</a>\]"
|
||||
return output
|
||||
|
||||
/*
|
||||
/obj/machinery/mecha_part_fabricator/proc/convert_designs()
|
||||
if(!files) return
|
||||
var/i = 0
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type&16)
|
||||
if(D.category in part_sets)//Checks if it's a valid category
|
||||
if(add_part_to_set(D.category, D.build_path))//Adds it to said category
|
||||
if(add_part_to_set(D.category, D))//Adds it to said category
|
||||
i++
|
||||
else
|
||||
if(add_part_to_set("Misc", D.build_path))//If in doubt, chunk it into the Misc
|
||||
if(add_part_to_set("Misc", D))//If in doubt, chunk it into the Misc
|
||||
i++
|
||||
return i
|
||||
|
||||
*/
|
||||
/obj/machinery/mecha_part_fabricator/proc/update_tech()
|
||||
if(!files) return
|
||||
var/output
|
||||
@@ -501,17 +296,10 @@
|
||||
return output
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/sync(silent=null)
|
||||
/* if(queue.len)
|
||||
if(!silent)
|
||||
temp = "Error. Please clear processing queue before updating!"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
*/
|
||||
if(!silent)
|
||||
temp = "Updating local R&D database..."
|
||||
src.updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
/obj/machinery/mecha_part_fabricator/proc/sync()
|
||||
temp = "Updating local R&D database..."
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
|
||||
var/found = 0
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in area_contents(get_area(src)))
|
||||
@@ -523,36 +311,25 @@
|
||||
for(var/datum/design/D in RDC.files.known_designs)
|
||||
files.AddDesign2Known(D)
|
||||
files.RefreshResearch()
|
||||
var/i = src.convert_designs()
|
||||
var/tech_output = update_tech()
|
||||
if(!silent)
|
||||
temp = "Processed [i] equipment designs.<br>"
|
||||
temp += tech_output
|
||||
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
src.updateUsrDialog()
|
||||
if(i || tech_output)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps, \"Successfully synchronized with R&D server. New data processed.\"")
|
||||
if(!silent && !found)
|
||||
//var/i = convert_designs() aran
|
||||
//var/tech_output = update_tech()
|
||||
temp = "Processed equipment designs.<br>"
|
||||
//temp += tech_output
|
||||
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
updateUsrDialog()
|
||||
//if(i || tech_output)
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Successfully synchronized with R&D server.\"")
|
||||
if(!found)
|
||||
temp = "Unable to connect to local R&D Database.<br>Please check your connections and try again.<br><a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(var/obj/item/part as obj,var/resource as text, var/roundto=1)
|
||||
//Be SURE to add any new equipment to this switch, but don't be suprised if it spits out children objects
|
||||
if(hasvar(part, "construction_time") && hasvar(part, "construction_cost"))
|
||||
var/list/L = part_sets["Misc"]
|
||||
if(L.Find(part.type))
|
||||
return round(part:construction_cost[resource]*(resource_coeff/2)*resource_coeff_tech, roundto) //hacky scary skeletons send shivers down your spine
|
||||
return round(part:construction_cost[resource]*resource_coeff*resource_coeff_tech, roundto)
|
||||
else
|
||||
return 0
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
return round(D.materials[resource]*resource_coeff*resource_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(var/obj/item/part as obj, var/roundto=1)
|
||||
//Be SURE to add any new equipment to this switch, but don't be suprised if it spits out children objects
|
||||
if(hasvar(part, "construction_time") && hasvar(part, "construction_cost"))
|
||||
return round(part:construction_time*time_coeff*time_coeff_tech, roundto)
|
||||
else
|
||||
return 0
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(P, roundto = 1) //aran
|
||||
var/obj/item/mechavars/part = P
|
||||
return round(initial(part.construction_time)*time_coeff*time_coeff_tech, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/attack_hand(mob/user)
|
||||
if(!(..()))
|
||||
@@ -562,17 +339,16 @@
|
||||
var/dat, left_part
|
||||
if (..())
|
||||
return
|
||||
if(!operation_allowed(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/turf/exit = get_step(src,SOUTH)
|
||||
if(exit.density)
|
||||
src.visible_message("\icon[src] <b>\The [src]</b> beeps, \"Error! Part outlet is obstructed.\"")
|
||||
visible_message("\icon[src] <b>\The [src]</b> beeps, \"Error! Part outlet is obstructed.\"")
|
||||
return
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(src.being_built)
|
||||
left_part = {"<TT>Building [src.being_built.name].<BR>
|
||||
else if(being_built)
|
||||
var/obj/I = being_built.build_path
|
||||
left_part = {"<TT>Building [initial(I.name)].<BR>
|
||||
Please wait until completion...</TT>"}
|
||||
else
|
||||
switch(screen)
|
||||
@@ -586,7 +362,7 @@
|
||||
left_part += "<hr><a href='?src=\ref[src];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[src.name]</title>
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
@@ -618,21 +394,6 @@
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/exploit_prevention(var/obj/Part, mob/user as mob, var/desc_exploit)
|
||||
// critical exploit prevention, feel free to improve or replace this, but do not remove it
|
||||
|
||||
if(!istype(Part) || !istype(user)) // sanity
|
||||
return 1
|
||||
|
||||
if( (Part.loc != src) || !(hasvar(Part, "construction_time")) || !(hasvar(Part, "construction_cost")) ) // these 3 are the current requirements for an object being buildable by the mech_fabricator
|
||||
|
||||
var/turf/LOC = get_turf(user)
|
||||
message_admins("[key_name_admin(user)] tried to exploit an Exosuit Fabricator to [desc_exploit ? "get the desc of" : "duplicate"] <a href='?_src_=vars;Vars=\ref[Part]'>[Part]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
|
||||
log_admin("EXPLOIT : [key_name(user)] tried to exploit an Exosuit Fabricator to [desc_exploit ? "get the desc of" : "duplicate"] [Part] !")
|
||||
return 1
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
@@ -641,30 +402,27 @@
|
||||
var/tpart_set = filter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
src.part_set = null
|
||||
part_set = null
|
||||
else
|
||||
src.part_set = tpart_set
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/obj/part = filter.getObj("part")
|
||||
|
||||
// critical exploit prevention, do not remove unless you replace it
|
||||
if(src.exploit_prevention(part, usr))
|
||||
return
|
||||
|
||||
if(!processing_queue)
|
||||
build_part(part)
|
||||
else
|
||||
add_to_queue(part)
|
||||
var/T = filter.getStr("part")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type&16)
|
||||
if(D.id == T)
|
||||
if(!processing_queue)
|
||||
build_part(D)
|
||||
else
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/obj/part = filter.getObj("add_to_queue")
|
||||
|
||||
// critical exploit prevention, do not remove unless you replace it
|
||||
if(src.exploit_prevention(part, usr))
|
||||
return
|
||||
|
||||
add_to_queue(part)
|
||||
|
||||
var/T = filter.getStr("add_to_queue")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type&16)
|
||||
if(D.id == T)
|
||||
add_to_queue(D)
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(filter.getNum("remove_from_queue"))
|
||||
@@ -679,14 +437,10 @@
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
/*
|
||||
if(href_list["list_queue"])
|
||||
list_queue()
|
||||
*/
|
||||
if(href_list["clear_temp"])
|
||||
temp = null
|
||||
if(href_list["screen"])
|
||||
src.screen = href_list["screen"]
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = filter.getNum("index")
|
||||
var/new_index = index + filter.getNum("queue_move")
|
||||
@@ -698,42 +452,42 @@
|
||||
queue = list()
|
||||
return update_queue_on_page()
|
||||
if(href_list["sync"])
|
||||
src.sync()
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/obj/part = filter.getObj("part_desc")
|
||||
var/T = filter.getStr("part_desc")
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
if(D.build_type&16)
|
||||
if(D.id == T)
|
||||
var/obj/part = D.build_path
|
||||
temp = {"<h1>[initial(part.name)] description:</h1>
|
||||
[initial(part.desc)]<br>
|
||||
<a href='?src=\ref[src];clear_temp=1'>Return</a>
|
||||
"}
|
||||
break
|
||||
|
||||
// critical exploit prevention, do not remove unless you replace it
|
||||
if(src.exploit_prevention(part, usr, 1))
|
||||
return
|
||||
|
||||
if(part)
|
||||
temp = {"<h1>[part] description:</h1>
|
||||
[part.desc]<br>
|
||||
<a href='?src=\ref[src];clear_temp=1'>Return</a>
|
||||
"}
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
temp = "Ejected [remove_material(href_list["material"],text2num(href_list["remove_mat"]))] of [href_list["material"]]<br><a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_material(var/mat_string, var/amount)
|
||||
var/type
|
||||
switch(mat_string)
|
||||
if("metal")
|
||||
if("$metal")
|
||||
type = /obj/item/stack/sheet/metal
|
||||
if("glass")
|
||||
if("$glass")
|
||||
type = /obj/item/stack/sheet/glass
|
||||
if("gold")
|
||||
if("$gold")
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
if("silver")
|
||||
if("$silver")
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
if("diamond")
|
||||
if("$diamond")
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
if("plasma")
|
||||
if("$plasma")
|
||||
type = /obj/item/stack/sheet/mineral/plasma
|
||||
if("uranium")
|
||||
if("$uranium")
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
if("bananium")
|
||||
if("$bananium")
|
||||
type = /obj/item/stack/sheet/mineral/bananium
|
||||
else
|
||||
return 0
|
||||
@@ -746,12 +500,10 @@
|
||||
res.Move(src.loc)
|
||||
result = res.amount
|
||||
else
|
||||
result = 0
|
||||
qdel(res)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/attackby(obj/W as obj, mob/user as mob)
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return
|
||||
@@ -761,92 +513,94 @@
|
||||
|
||||
if(panel_open)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
while(src.resources["metal"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$metal"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
|
||||
var/sheet_conversion = round(src.resources["metal"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$metal"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["metal"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["glass"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$metal"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$glass"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
var/sheet_conversion = round(src.resources["glass"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$glass"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["glass"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["plasma"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$glass"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$plasma"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc)
|
||||
var/sheet_conversion = round(src.resources["plasma"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$plasma"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["plasma"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["silver"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$plasma"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$silver"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc)
|
||||
var/sheet_conversion = round(src.resources["silver"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$silver"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["silver"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["gold"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$silver"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$gold"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
|
||||
var/sheet_conversion = round(src.resources["gold"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$gold"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["gold"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["uranium"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$gold"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$uranium"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
|
||||
var/sheet_conversion = round(src.resources["uranium"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$uranium"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["uranium"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["diamond"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$uranium"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$diamond"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
|
||||
var/sheet_conversion = round(src.resources["diamond"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$diamond"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["diamond"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(src.resources["bananium"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$diamond"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
while(resources["$bananium"] >= MINERAL_MATERIAL_AMOUNT)
|
||||
var/obj/item/stack/sheet/mineral/bananium/G = new /obj/item/stack/sheet/mineral/bananium(src.loc)
|
||||
var/sheet_conversion = round(src.resources["bananium"] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheet_conversion = round(resources["$bananium"] / MINERAL_MATERIAL_AMOUNT)
|
||||
G.amount = min(sheet_conversion, G.max_amount)
|
||||
src.resources["bananium"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
resources["$bananium"] -= (G.amount * MINERAL_MATERIAL_AMOUNT)
|
||||
default_deconstruction_crowbar(W)
|
||||
return 1
|
||||
else
|
||||
user << "<span class='danger'>You can't load \the [src.name] while it's opened.</span>"
|
||||
user << "<span class='danger'>You can't load \the [name] while it's opened.</span>"
|
||||
return 1
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
emag()
|
||||
return
|
||||
var/material
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/mineral/gold)
|
||||
material = "gold"
|
||||
if(/obj/item/stack/sheet/mineral/silver)
|
||||
material = "silver"
|
||||
if(/obj/item/stack/sheet/mineral/diamond)
|
||||
material = "diamond"
|
||||
if(/obj/item/stack/sheet/mineral/plasma)
|
||||
material = "plasma"
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
material = "metal"
|
||||
if(/obj/item/stack/sheet/glass)
|
||||
material = "glass"
|
||||
if(/obj/item/stack/sheet/mineral/bananium)
|
||||
material = "bananium"
|
||||
if(/obj/item/stack/sheet/mineral/uranium)
|
||||
material = "uranium"
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(src.being_built)
|
||||
user << "\The [src] is currently processing. Please wait until completion."
|
||||
return
|
||||
var/obj/item/stack/sheet/stack = W
|
||||
var/sname = "[stack.name]"
|
||||
if(src.resources[material] < res_max_amount)
|
||||
var/count = 0
|
||||
src.overlays += "fab-load-[material]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
|
||||
while(src.resources[material] < res_max_amount && stack && stack.amount > 0)
|
||||
src.resources[material] += MINERAL_MATERIAL_AMOUNT
|
||||
stack.use(1)
|
||||
count++
|
||||
sleep(10)
|
||||
user << "You insert [count] [sname] sheet\s into \the [src]."
|
||||
src.updateUsrDialog()
|
||||
src.overlays -= "fab-load-[material]" //No matter what the overlay shall still be deleted
|
||||
else
|
||||
user << "\The [src] cannot hold any more [sname] sheet\s."
|
||||
return
|
||||
if(istype(W, /obj/item/stack))
|
||||
var/material
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/mineral/gold)
|
||||
material = "$gold"
|
||||
if(/obj/item/stack/sheet/mineral/silver)
|
||||
material = "$silver"
|
||||
if(/obj/item/stack/sheet/mineral/diamond)
|
||||
material = "$diamond"
|
||||
if(/obj/item/stack/sheet/mineral/plasma)
|
||||
material = "$plasma"
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
material = "$metal"
|
||||
if(/obj/item/stack/sheet/glass)
|
||||
material = "$glass"
|
||||
if(/obj/item/stack/sheet/mineral/bananium)
|
||||
material = "$bananium"
|
||||
if(/obj/item/stack/sheet/mineral/uranium)
|
||||
material = "$uranium"
|
||||
else
|
||||
return ..()
|
||||
|
||||
if(being_built)
|
||||
user << "\The [src] is currently processing. Please wait until completion."
|
||||
return
|
||||
var/obj/item/stack/sheet/stack = W
|
||||
var/sname = "[stack.name]"
|
||||
if(resources[material] < res_max_amount)
|
||||
var/count = 0
|
||||
overlays += "fab-load-[material]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
|
||||
while(resources[material] < res_max_amount && stack && stack.amount > 0)
|
||||
resources[material] += MINERAL_MATERIAL_AMOUNT
|
||||
stack.use(1)
|
||||
count++
|
||||
sleep(10)
|
||||
user << "You insert [count] [sname] sheet\s into \the [src]."
|
||||
updateUsrDialog()
|
||||
overlays -= "fab-load-[material]" //No matter what the overlay shall still be deleted
|
||||
else
|
||||
user << "\The [src] cannot hold any more [sname] sheet\s."
|
||||
return
|
||||
@@ -455,8 +455,9 @@ obj/mecha/proc/can_use(mob/user)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/mecha/attack_hand(mob/user as mob)
|
||||
/obj/mecha/attack_hand(mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
user.do_attack_animation(src)
|
||||
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
|
||||
if ((HULK in user.mutations) && !prob(src.deflect_chance))
|
||||
@@ -473,9 +474,10 @@ obj/mecha/proc/can_use(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/mecha/attack_alien(mob/user as mob)
|
||||
/obj/mecha/attack_alien(mob/living/user as mob)
|
||||
src.log_message("Attack by alien. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE) //Now stompy alien killer mechs are actually scary to aliens!
|
||||
user.do_attack_animation(src)
|
||||
if(!prob(src.deflect_chance))
|
||||
src.take_damage(15)
|
||||
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
@@ -494,9 +496,11 @@ obj/mecha/proc/can_use(mob/user)
|
||||
|
||||
/obj/mecha/attack_animal(mob/living/simple_animal/user as mob)
|
||||
src.log_message("Attack by simple animal. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(user.melee_damage_upper == 0)
|
||||
user.emote("[user.friendly] [src]")
|
||||
else
|
||||
user.do_attack_animation(src)
|
||||
if(!prob(src.deflect_chance))
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
src.take_damage(damage)
|
||||
@@ -631,9 +635,9 @@ obj/mecha/proc/can_use(mob/user)
|
||||
src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL))
|
||||
return
|
||||
|
||||
/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
|
||||
user.do_attack_animation(src)
|
||||
src.log_message("Attacked by [W]. Attacker - [user]")
|
||||
if(prob(src.deflect_chance))
|
||||
user << "<span class='danger'>The [W] bounces off [src.name] armor.</span>"
|
||||
@@ -1472,7 +1476,7 @@ var/year_integer = text2num(year) // = 2013???
|
||||
return
|
||||
if (href_list["change_name"])
|
||||
if(usr != src.occupant) return
|
||||
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
|
||||
var/newname = stripped_input(occupant,"Choose new exosuit name","Rename exosuit",initial(name), MAX_NAME_LEN)
|
||||
if(newname && trim(newname))
|
||||
name = newname
|
||||
else
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["send_message"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message")
|
||||
var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text)
|
||||
var/message = stripped_input(usr,"Input message","Transmit message")
|
||||
var/obj/mecha/M = MT.in_mecha()
|
||||
if(trim(message) && M)
|
||||
M.occupant_message(message)
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
continue
|
||||
var/foundVirus = 0
|
||||
for(var/datum/disease/D in patient.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
if(D.severity != D.non_threat)
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
if(D.severity != NONTHREAT)
|
||||
foundVirus++
|
||||
//if(patient.virus2)
|
||||
// foundVirus++
|
||||
|
||||
@@ -109,8 +109,9 @@
|
||||
healthcheck()
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attack_hand(mob/user)
|
||||
/obj/structure/alien/resin/attack_hand(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
|
||||
health = 0
|
||||
healthcheck()
|
||||
@@ -120,8 +121,9 @@
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attack_alien(mob/user)
|
||||
/obj/structure/alien/resin/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(islarva(user))
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
|
||||
@@ -132,7 +134,7 @@
|
||||
healthcheck()
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/alien/resin/attackby(obj/item/I, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
health -= I.force
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
|
||||
@@ -957,6 +957,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
/obj/structure/foamedmetal/attack_animal(var/mob/living/simple_animal/M)
|
||||
if(M.environment_smash >= 1)
|
||||
M.do_attack_animation(src)
|
||||
M << "<span class='notice'>You smash apart the foam wall.</span>"
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(D.spread_type == SPECIAL)
|
||||
del(D)
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
|
||||
@@ -635,40 +635,26 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/t = stripped_input(U, "Please enter channel", name, (chat_channel)) as text
|
||||
|
||||
if(t)
|
||||
ntrclog[chat_channel] = "<hr>" + ntrclog[chat_channel]
|
||||
var/datum/chatroom/C = chatchannels[chat_channel]
|
||||
if(!findtext(t,"#",1,2))
|
||||
t = "#" + t
|
||||
chat_channel = t
|
||||
C.parse_msg(src, nick, "/join [chat_channel]")
|
||||
var/ret = C.parse_msg(src, nick, "/join [t]")
|
||||
if((ret in chatchannels) && (ret != chat_channel))
|
||||
ntrclog[chat_channel] = "<hr>" + ntrclog[chat_channel]
|
||||
chat_channel = ret
|
||||
|
||||
if("NTRC Message")
|
||||
var/t = msg_input(U) as text
|
||||
var/datum/chatroom/C = chatchannels[chat_channel]
|
||||
if(C)
|
||||
var/lt = text2list(t, " ")
|
||||
if(lt[1] == "/join")
|
||||
if(!findtext(lt[2],"#",1,2))
|
||||
lt[2] = "#" + lt[2]
|
||||
var/ret = C.parse_msg(src,nick,t)
|
||||
if(findtextEx(ret,"ERR_",1,5))
|
||||
if(findtextEx(ret,"BAD_",1,5))
|
||||
ntrclog[chat_channel] = "[ret]<br>" + ntrclog[chat_channel]
|
||||
else
|
||||
if(ret == 0)
|
||||
ntrclog[chat_channel] = "Failure<br>" + ntrclog[chat_channel]
|
||||
else
|
||||
if(lt[1] == "/join")
|
||||
chat_channel = lt[2]
|
||||
else if(ret in chatchannels)
|
||||
chat_channel = ret
|
||||
|
||||
if("NTRC Help")
|
||||
var/helptext = "<b>NTRC reference:</b><br><br>"
|
||||
helptext += "<i>General commands</i><br>"
|
||||
helptext += "/join #channel<br>/part<br>/log amountoflines<br>/who<br>/topic<br>/register<br><br>"
|
||||
helptext += "<i>Moderation commands</i><br>"
|
||||
helptext += "/ban targetnick<br>/unban targetnick<br>/kick targetnick<br>/mute targetnick<br><br>"
|
||||
helptext += "<i>Management commands</i><br>"
|
||||
helptext += "/topic topictext<br>/op targetnick<br>/deop targetnick<br>/delchannel"
|
||||
usr << browse(helptext, "window=ntrchelp;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
var/helptext = "<b>NTRC Commands:</b><br><br>"
|
||||
helptext += "/join #channel<br>/register<br>/log amountoflines<br><br>"
|
||||
usr << browse(helptext, "window=ntrchelp;size=200x200;border=1;can_resize=1;can_close=1;can_minimize=1")
|
||||
|
||||
|
||||
|
||||
@@ -1161,7 +1147,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
ntrclog[C] = msg + ntrclog[C]
|
||||
else
|
||||
ntrclog[channel] = msg + ntrclog[channel]
|
||||
if (!silent)
|
||||
if (findtext(message, nick) && !silent)
|
||||
loc.audible_message("\icon[src] *[ttone]*", null, 3)
|
||||
|
||||
/proc/get_viewable_pdas()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/datum/chatroom/default_ntrc_chatroom = new("")
|
||||
var/datum/chatroom/default_ntrc_chatroom = new()
|
||||
var/list/chatchannels = list(default_ntrc_chatroom.name = default_ntrc_chatroom)
|
||||
|
||||
//procs that can be used directly:
|
||||
@@ -6,13 +6,9 @@ var/list/chatchannels = list(default_ntrc_chatroom.name = default_ntrc_chatroom)
|
||||
|
||||
/datum/chatroom
|
||||
var/name = "#ss13"
|
||||
var/topic = "Welcome to the best NTRC channel in this sector of the galaxy!" // topic message for the chatroom
|
||||
var/list/operators = list() // chat operators
|
||||
var/list/logs = list() // chat logs
|
||||
var/list/muted = list() // muted users
|
||||
var/list/banned = list() // banned users
|
||||
var/list/auth = list() // authenticated clients
|
||||
var/list/users = list() // current users
|
||||
var/list/authed = list() //authenticated users
|
||||
var/datum/events/events = new ()
|
||||
var/list/datum/event/evlist = list()
|
||||
|
||||
@@ -22,20 +18,25 @@ var/list/chatchannels = list(default_ntrc_chatroom.name = default_ntrc_chatroom)
|
||||
/datum/chatroom/proc/parse_msg(client,nick,message)
|
||||
var/obj/machinery/message_server/MS = check_server(client)
|
||||
if(!MS)
|
||||
return "ERR_TCOM"
|
||||
return "BAD_TCOM"
|
||||
|
||||
if(!nick || length(nick) > 8)
|
||||
return "ERR_NICK"
|
||||
if(!get_auth(client,nick) || !nick || length(nick) > 8)
|
||||
return "BAD_NICK"
|
||||
|
||||
MS.send_chat_message(nick,name,message)
|
||||
|
||||
if(findtext(message,"/",1,2))
|
||||
return handle_command(client,nick,copytext(message,2))
|
||||
var/list/cmd=text2list(message, " ")
|
||||
switch(cmd[1])
|
||||
if("/register")
|
||||
return register_auth(client,nick)
|
||||
if("/join")
|
||||
if(cmd[2]) return channel_join(client,nick,cmd[2])
|
||||
if("/log")
|
||||
if(cmd[2]) return get_log(client,nick,cmd[2])
|
||||
|
||||
else
|
||||
return send_message(client,nick,message)
|
||||
return send_message(client,nick,message)
|
||||
|
||||
//the following are for internal use only
|
||||
//the following are helper procs, FOR INTERNAL USE ONLY
|
||||
|
||||
/datum/chatroom/proc/check_server(client)
|
||||
var/atom/C = client
|
||||
@@ -45,168 +46,51 @@ var/list/chatchannels = list(default_ntrc_chatroom.name = default_ntrc_chatroom)
|
||||
var/turf/T = get_turf(MS)
|
||||
if(MS.active && (T.z == CT.z))
|
||||
return MS
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/handle_command(client,nick,command) //command parser
|
||||
var/list/cmd=text2list(command, " ")
|
||||
|
||||
if(!get_auth(client,nick))
|
||||
return "ERR_AUTH"
|
||||
|
||||
switch(cmd[1]) //argument-less commmands
|
||||
if("topic")
|
||||
if(cmd.len == 1)
|
||||
return get_topic(client)
|
||||
else
|
||||
return set_topic(client,nick,cmd[2])
|
||||
if("part")
|
||||
return channel_part(client,nick)
|
||||
if("delchannel")
|
||||
return delete_channel(client,nick)
|
||||
if("who")
|
||||
return get_who(client, nick)
|
||||
if("register")
|
||||
return register_auth(client,nick)
|
||||
|
||||
if(cmd.len == 1)
|
||||
return "ERR_ARGS"
|
||||
|
||||
switch(cmd[1]) //commands with 1 arg
|
||||
if("join")
|
||||
return channel_join(client,nick,cmd[2])
|
||||
if("log")
|
||||
return get_log(client,nick,cmd[2])
|
||||
if("op")
|
||||
return make_op(client,nick,cmd[2])
|
||||
if("deop")
|
||||
return deop(client,nick,cmd[2])
|
||||
if("ban")
|
||||
return ban(client,nick,cmd[2])
|
||||
if("unban")
|
||||
return unban(client,nick,cmd[2])
|
||||
if("kick")
|
||||
return kick(client,nick,cmd[2])
|
||||
if("mute")
|
||||
return mute_nick(client,nick,cmd[2])
|
||||
|
||||
return "ERR_WCMD"
|
||||
return null
|
||||
|
||||
/datum/chatroom/proc/send_message(client,nick,message) //standard message
|
||||
if(nick in muted)
|
||||
return "ERR_MUTE"
|
||||
if(!message)
|
||||
return "ERR_BLNK"
|
||||
logs += "[strip_html_properly(nick)]> [strip_html_properly(message)]"
|
||||
return 0
|
||||
logs.Insert(1,"[strip_html_properly(nick)]> [strip_html_properly(message)]")
|
||||
log_chat("[usr]/([usr.ckey]) as [nick] sent to [name]: [message]")
|
||||
events.fireEvent("msg_chat",name,nick,message)
|
||||
return 1
|
||||
|
||||
/datum/chatroom/proc/get_auth(client,nick) //check auth
|
||||
if((!(nick in auth)) || (auth[nick] == client))
|
||||
if((!(nick in authed)) || (auth[client] == nick))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//chat commands go here
|
||||
//chat commands go here, FOR INTERNAL USE ONLY
|
||||
/datum/chatroom/proc/register_auth(client,nick) //register
|
||||
if(!get_auth(client,nick))
|
||||
return 0
|
||||
auth[nick] = client
|
||||
return "BAD_REGS"
|
||||
auth[client] = nick
|
||||
authed += nick
|
||||
return 1
|
||||
|
||||
/datum/chatroom/proc/delete_channel(client,nick) //delchannel
|
||||
if(nick in operators)
|
||||
for(var/event in events.events)
|
||||
events.clearEvent("msg_chat",event)
|
||||
qdel(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/channel_join(client,nick,channel) //join
|
||||
if(!findtext(channel,"#",1,2))
|
||||
channel = "#" + channel
|
||||
if(channel == name)
|
||||
if((nick in banned) || (nick in users))
|
||||
return 0
|
||||
users += nick
|
||||
get_topic(client,nick)
|
||||
evlist[nick] = events.addEvent("msg_chat",client,"msg_chat")
|
||||
return 1
|
||||
else
|
||||
if(channel == name) //join this channel
|
||||
if(!(client in evlist))
|
||||
evlist[client] = events.addEvent("msg_chat",client,"msg_chat")
|
||||
return name
|
||||
|
||||
else //leave this channel, join another one
|
||||
if(client in evlist)
|
||||
events.clearEvent("msg_chat",evlist[client])
|
||||
evlist -= client
|
||||
if(!(channel in chatchannels))
|
||||
var/ret = new_channel(client,nick,channel)
|
||||
if(!ret)
|
||||
return 0
|
||||
channel_part(client,nick)
|
||||
var/datum/chatroom/NC = new /datum/chatroom()
|
||||
NC.name = channel
|
||||
chatchannels[channel] = NC
|
||||
var/datum/chatroom/C = chatchannels[channel]
|
||||
return C.parse_msg(client,nick,"/join [channel]")
|
||||
|
||||
/datum/chatroom/proc/channel_part(client,nick) //part
|
||||
users -= nick
|
||||
events.clearEvent("msg_chat",evlist[nick])
|
||||
return 1
|
||||
|
||||
/datum/chatroom/proc/make_op(client,nick,target) //op
|
||||
if(nick in operators)
|
||||
operators += target
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/deop(client,nick,target) //deop
|
||||
if(nick in operators)
|
||||
operators -= target
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/ban(client,nick,target) //ban
|
||||
if(nick in operators)
|
||||
banned += target
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/unban(client,nick,target) //unban
|
||||
if(nick in operators)
|
||||
banned -= target
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/kick(client,nick,target) //kick
|
||||
if(nick in operators)
|
||||
channel_part(null,nick)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/set_topic(client,nick,newtopic) //topic
|
||||
if(nick in operators)
|
||||
topic = strip_html_properly(newtopic)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/get_topic(client,nick) //topic
|
||||
call(client,"msg_chat")(name,"NTbot","TOPIC: [topic]")
|
||||
return 1
|
||||
|
||||
/datum/chatroom/proc/get_who(client,nick) //who
|
||||
for(var/user in users)
|
||||
call(client,"msg_chat")(name,"NTbot","WHO: [user]")
|
||||
return 1
|
||||
|
||||
/datum/chatroom/proc/get_log(client,nick,lines) //log
|
||||
lines = text2num(lines)
|
||||
lines = min(lines, logs.len)
|
||||
for(var/i=0;i<lines;i++)
|
||||
var/mylog = logs[logs.len-i]
|
||||
call(client,"msg_chat")(name,"NTbot","LOG[i]: [mylog]")
|
||||
return 1
|
||||
|
||||
/datum/chatroom/proc/mute_nick(client,nick,target) //mute
|
||||
if(nick in operators)
|
||||
muted += target
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/chatroom/proc/new_channel(client,nick,target) //called by join
|
||||
if(target in chatchannels)
|
||||
return 0
|
||||
chatchannels[target] = new /datum/chatroom()
|
||||
var/datum/chatroom/C = chatchannels[target]
|
||||
C.name = target
|
||||
C.operators += nick
|
||||
call(client,"msg_chat")(name,"NTbot","LOG[i]: [logs[(logs.len)-i]]")
|
||||
return 1
|
||||
|
||||
@@ -148,8 +148,8 @@ MASS SPECTROMETER
|
||||
user.show_message("<span class='warning'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>", 1)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
user.show_message("<span class='warning'><b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>", 1)
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
user.show_message("<span class='warning'><b>Warning: [D.form] Detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>", 1)
|
||||
|
||||
if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
|
||||
user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>", 1)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(user.stat && user.canmove && !user.restrained())
|
||||
if(!user.stat && user.canmove && !user.restrained())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
/* Toys!
|
||||
* ContainsL
|
||||
* Balloons
|
||||
* Fake telebeacon
|
||||
* Fake singularity
|
||||
* Toy gun
|
||||
* Toy crossbow
|
||||
* Toy swords
|
||||
* Crayons
|
||||
* Snap pops
|
||||
* Water flower
|
||||
* Mech prizes
|
||||
* AI core prizes
|
||||
* Cards
|
||||
* Toy nuke
|
||||
* Fake meteor
|
||||
* Carp plushie
|
||||
*/
|
||||
|
||||
|
||||
@@ -550,79 +552,90 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "ripleytoy"
|
||||
var/cooldown = 0
|
||||
var/quiet = 0
|
||||
|
||||
//all credit to skasi for toy mech fun ideas
|
||||
/obj/item/toy/prize/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
|
||||
cooldown = 1
|
||||
spawn(30) cooldown = 0
|
||||
if (!quiet)
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/toy/prize/attack_hand(mob/user as mob)
|
||||
if(loc == user)
|
||||
if(!cooldown)
|
||||
user << "<span class='notice'>You play with [src].</span>"
|
||||
playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
|
||||
cooldown = 1
|
||||
spawn(30) cooldown = 0
|
||||
if (!quiet)
|
||||
playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/toy/prize/ripley
|
||||
name = "toy Ripley"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 1/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 1/12."
|
||||
|
||||
/obj/item/toy/prize/fireripley
|
||||
name = "toy firefighting Ripley"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 2/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 2/12."
|
||||
icon_state = "fireripleytoy"
|
||||
|
||||
/obj/item/toy/prize/deathripley
|
||||
name = "toy deathsquad Ripley"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 3/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 3/12."
|
||||
icon_state = "deathripleytoy"
|
||||
|
||||
/obj/item/toy/prize/gygax
|
||||
name = "toy Gygax"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 4/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 4/12."
|
||||
icon_state = "gygaxtoy"
|
||||
|
||||
/obj/item/toy/prize/durand
|
||||
name = "toy Durand"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 5/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 5/12."
|
||||
icon_state = "durandprize"
|
||||
|
||||
/obj/item/toy/prize/honk
|
||||
name = "toy H.O.N.K."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 6/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 6/12."
|
||||
icon_state = "honkprize"
|
||||
|
||||
/obj/item/toy/prize/marauder
|
||||
name = "toy Marauder"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 7/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 7/12."
|
||||
icon_state = "marauderprize"
|
||||
|
||||
/obj/item/toy/prize/seraph
|
||||
name = "toy Seraph"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 8/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 8/12."
|
||||
icon_state = "seraphprize"
|
||||
|
||||
/obj/item/toy/prize/mauler
|
||||
name = "toy Mauler"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 9/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 9/12."
|
||||
icon_state = "maulerprize"
|
||||
|
||||
/obj/item/toy/prize/odysseus
|
||||
name = "toy Odysseus"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 10/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 10/12."
|
||||
icon_state = "odysseusprize"
|
||||
|
||||
/obj/item/toy/prize/phazon
|
||||
name = "toy Phazon"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 11/11."
|
||||
desc = "Mini-Mecha action figure! Collect them all! 11/12."
|
||||
icon_state = "phazonprize"
|
||||
|
||||
/obj/item/toy/prize/reticence
|
||||
name = "toy Reticence"
|
||||
desc = "Mini-Mecha action figure! Collect them all! 12/12."
|
||||
icon_state = "reticenceprize"
|
||||
quiet = 1
|
||||
|
||||
/*
|
||||
* AI core prizes
|
||||
*/
|
||||
@@ -631,6 +644,7 @@
|
||||
desc = "A little toy model AI core with real law announcing action!"
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "AI"
|
||||
w_class = 2.0
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/AI/attack_self(mob/user)
|
||||
@@ -1004,6 +1018,9 @@ obj/item/toy/cards/deck/syndicate
|
||||
card_throw_range = 7
|
||||
card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut")
|
||||
|
||||
/*
|
||||
* Fake nuke
|
||||
*/
|
||||
|
||||
/obj/item/toy/nuke
|
||||
name = "\improper Nuclear Fission Explosive toy"
|
||||
@@ -1027,3 +1044,33 @@ obj/item/toy/cards/deck/syndicate
|
||||
else
|
||||
var/timeleft = (cooldown - world.time)
|
||||
user << "<span class='alert'>Nothing happens, and '</span>[round(timeleft/10)]<span class='alert'>' appears on a small display.</span>"
|
||||
|
||||
/*
|
||||
* Fake meteor
|
||||
*/
|
||||
|
||||
/obj/item/toy/minimeteor
|
||||
name = "\improper Mini-Meteor"
|
||||
desc = "Relive the excitement of a meteor shower! SweetMeat-eor. Co is not responsible for any injuries, headaches or hearing loss caused by Mini-Meteor™"
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "minimeteor"
|
||||
w_class = 2.0
|
||||
|
||||
/obj/item/toy/minimeteor/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai))\
|
||||
shake_camera(M, 3, 1)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Carp plushie
|
||||
*/
|
||||
|
||||
/obj/item/toy/carpplushie
|
||||
name = "space carp plushie"
|
||||
desc = "An adorable stuffed toy that resembles a space carp."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "carpplushie"
|
||||
w_class = 2.0
|
||||
@@ -20,6 +20,7 @@ AI MODULES
|
||||
throw_range = 7
|
||||
origin_tech = "programming=3"
|
||||
var/list/laws = list()
|
||||
var/bypass_law_amt_check = 0
|
||||
|
||||
//The proc other things should be calling
|
||||
/obj/item/weapon/aiModule/proc/install(var/mob/living/silicon/reciever, var/mob/user)
|
||||
@@ -27,6 +28,17 @@ AI MODULES
|
||||
user << "<span class='warning'>ERROR: No laws found on board.</span>"
|
||||
return
|
||||
|
||||
if(reciever.laws)
|
||||
var/tot_laws = 0
|
||||
tot_laws += reciever.laws.inherent.len
|
||||
tot_laws += reciever.laws.supplied.len
|
||||
tot_laws += reciever.laws.ion.len
|
||||
tot_laws += laws.len
|
||||
if(tot_laws > config.silicon_max_law_amount && !bypass_law_amt_check)//allows certain boards to avoid this check, eg: reset
|
||||
user << "<span class='caution'>Not enough memory allocated to [reciever]'s law processor to handle this amount of laws."
|
||||
message_admins("[key_name_admin(user)] tried to upload laws to [key_name_admin(reciever)] that would exceed the law cap.")
|
||||
return
|
||||
|
||||
var/law2log = src.transmitInstructions(reciever, user) //Freeforms return something extra we need to log
|
||||
user << "Upload complete. [reciever]'s laws have been modified."
|
||||
reciever.show_laws()
|
||||
@@ -94,7 +106,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/supplied/safeguard/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = stripped_input(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
|
||||
var/targName = stripped_input(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
|
||||
targetName = targName
|
||||
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
|
||||
desc = "A 'safeguard' AI module: '[laws[1]]'"
|
||||
@@ -121,7 +133,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/zeroth/oneHuman/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = stripped_input(user, "Please enter the name of the person who is the only human.", "Who?", user.real_name)
|
||||
var/targName = stripped_input(user, "Please enter the name of the person who is the only human.", "Who?", user.real_name,MAX_NAME_LEN)
|
||||
targetName = targName
|
||||
laws[1] = "Only [targetName] is human"
|
||||
desc = "A 'one human' AI module: '[laws[1]]'"
|
||||
@@ -206,6 +218,7 @@ AI MODULES
|
||||
desc = "A 'reset' AI module: Resets back to the original core laws."
|
||||
origin_tech = "programming=3;materials=4"
|
||||
laws = list("This is a bug.") //This won't give the AI a message reading "these are now your laws: 1. this is a bug" because this list is only read in aiModule's subtypes.
|
||||
bypass_law_amt_check = 1
|
||||
|
||||
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
..()
|
||||
|
||||
@@ -131,8 +131,7 @@
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(on)
|
||||
//Detach the paddles into the user's hands
|
||||
var/list/L = list("left hand" = slot_l_hand,"right hand" = slot_r_hand)
|
||||
if(!user.equip_in_one_of_slots(paddles, L))
|
||||
if(!usr.put_in_hands(paddles))
|
||||
on = 0
|
||||
user << "<span class='warning'>You need a free hand to hold the paddles!</span>"
|
||||
update_icon()
|
||||
@@ -232,16 +231,20 @@
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/dropped(mob/user as mob)
|
||||
..()
|
||||
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
|
||||
defib.on = 0
|
||||
loc = defib
|
||||
defib.update_icon()
|
||||
if(user)
|
||||
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
|
||||
defib.on = 0
|
||||
loc = defib
|
||||
defib.update_icon()
|
||||
return unwield()
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O)
|
||||
if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
|
||||
M.unEquip(O)
|
||||
qdel(0)
|
||||
qdel(O)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@@ -271,10 +274,10 @@
|
||||
busy = 1
|
||||
H.visible_message("<span class='danger'>[M.name] has been touched with [src] by [user]!</span>")
|
||||
H.adjustStaminaLoss(50)
|
||||
H.adjustFireLoss(10)
|
||||
H.Stun(3)
|
||||
H.Weaken(5)
|
||||
H.updatehealth() //forces health update before next life tick
|
||||
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
H.emote("gasp")
|
||||
add_logs(user, M, "stunned", object="defibrillator")
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = 1
|
||||
@@ -289,24 +292,35 @@
|
||||
if(do_after(user, 30)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
|
||||
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
|
||||
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 0)
|
||||
var/isghosted = !H.key && H.mind
|
||||
var/mob/dead/observer/ghost = H.get_ghost()
|
||||
var/tplus = world.time - H.timeofdeath
|
||||
var/tlimit = 1500 //past this much time the subject is unrecoverable
|
||||
var/tloss = 900 //but brain damage starts setting in after some time
|
||||
var/tlimit = 1800 //past this much time the subject is unrecoverable, currently 3m
|
||||
var/tloss = 900 //brain damage starts setting in after some time, currently 1m30s
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
if(do_after(user, 20)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
|
||||
for(var/obj/item/carried_item in H.contents)
|
||||
if((istype(carried_item, /obj/item/clothing/suit/armor)) || (istype(carried_item, /obj/item/clothing/suit/space)))
|
||||
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
if(H.stat == 2)
|
||||
var/health = H.health
|
||||
var/chance = 90
|
||||
for(var/obj/item/carried_item in H.contents)
|
||||
if(istype(carried_item, /obj/item/clothing/suit/armor))
|
||||
chance = 25
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
|
||||
playsound(get_turf(src), "bodyfall", 50, 1)
|
||||
playsound(get_turf(src), 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
if(H.health <= -100 && !H.suiciding && prob(chance) && !isghosted && tplus < tlimit && !NOCLONE in H.mutations)
|
||||
for(var/obj/item/organ/limb/O in H.organs)
|
||||
total_brute += O.brute_dam
|
||||
total_burn += O.burn_dam
|
||||
if(H.health <= config.health_threshold_dead && total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations))
|
||||
tobehealed = health + threshold
|
||||
tobehealed -= 5 //They get 5 health in crit to heal the person or inject stabilizers
|
||||
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
|
||||
H.adjustOxyLoss(tobehealed)
|
||||
H.adjustToxLoss(tobehealed)
|
||||
H.adjustFireLoss(tobehealed)
|
||||
H.adjustBruteLoss(tobehealed)
|
||||
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0)
|
||||
H.stat = 1
|
||||
@@ -319,15 +333,14 @@
|
||||
add_logs(user, M, "revived", object="defibrillator")
|
||||
else
|
||||
if(tplus > tlimit)
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed. Tissue damage beyond point of no return for defibrillation.</span>")
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
|
||||
else if(total_burn >= 180 || total_brute >= 180)
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
|
||||
if(isghosted)
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
if(ghost.mind == H.mind)
|
||||
if(ghost.can_reenter_corpse)
|
||||
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
|
||||
ghost << sound('sound/effects/genetics.ogg')
|
||||
if(ghost)
|
||||
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
|
||||
ghost << sound('sound/effects/genetics.ogg')
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
defib.deductcharge(revivecost)
|
||||
update_icon()
|
||||
|
||||
@@ -95,7 +95,8 @@
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/device/flashlight/pen,
|
||||
/obj/item/weapon/extinguisher/mini,
|
||||
/obj/item/weapon/reagent_containers/hypospray
|
||||
/obj/item/weapon/reagent_containers/hypospray,
|
||||
/obj/item/device/rad_laser
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
desc = "A box with several utility medipens for the economical miner."
|
||||
icon_state = "syringe"
|
||||
|
||||
/obj/item/weapon/storage/box/syringes/New()
|
||||
/obj/item/weapon/storage/box/medipens/utility/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen/leporazine( src )
|
||||
new /obj/item/weapon/reagent_containers/hypospray/medipen/leporazine( src )
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
//CIG PACK//
|
||||
////////////
|
||||
/obj/item/weapon/storage/fancy/cigarettes
|
||||
name = "cigarette packet"
|
||||
desc = "The most popular brand of Space Cigarettes, sponsors of the Space Olympics."
|
||||
name = "\improper Space Cigarettes packet"
|
||||
desc = "The most popular brand of cigarettes, sponsors of the Space Olympics."
|
||||
icon = 'icons/obj/cigarettes.dmi'
|
||||
icon_state = "cigpacket"
|
||||
item_state = "cigpacket"
|
||||
@@ -190,6 +190,66 @@
|
||||
icon_state = "Dpacket"
|
||||
item_state = "Dpacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
name = "\improper Uplift Smooth packet"
|
||||
desc = "Your favorite brand, now menthol flavored."
|
||||
icon_state = "upliftpacket"
|
||||
item_state = "upliftpacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
name = "\improper Robust packet"
|
||||
desc = "Smoked by the robust."
|
||||
icon_state = "robustpacket"
|
||||
item_state = "robustpacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold
|
||||
name = "\improper Robust Gold packet"
|
||||
desc = "Smoked by the truly robust."
|
||||
icon_state = "robustgpacket"
|
||||
item_state = "robustgpacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold/New()
|
||||
..()
|
||||
for(var/i = 1 to storage_slots)
|
||||
reagents.add_reagent("gold",1)
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
name = "\improper Carp Classic packet"
|
||||
desc = "Since 2313."
|
||||
icon_state = "carppacket"
|
||||
item_state = "carppacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate
|
||||
name = "cigarette packet"
|
||||
desc = "An obscure brand of cigarettes."
|
||||
icon_state = "syndiepacket"
|
||||
item_state = "syndiepacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate/New()
|
||||
..()
|
||||
for(var/i = 1 to storage_slots)
|
||||
reagents.add_reagent("doctorsdelight",15)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
name = "\improper Midori Tabako packet"
|
||||
desc = "You can't understand the runes, but the packet smells funny."
|
||||
icon_state = "midoripacket"
|
||||
item_state = "midoripacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims
|
||||
name ="\improper Shady Jim's Super Slims"
|
||||
desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!"
|
||||
icon_state = "shadyjimpacket"
|
||||
item_state = "shadyjimpacket"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims/New()
|
||||
..()
|
||||
for(var/i = 1 to storage_slots)
|
||||
reagents.add_reagent("lipozine",4)
|
||||
reagents.add_reagent("ammonia",2)
|
||||
reagents.add_reagent("plantbgone",1)
|
||||
reagents.add_reagent("toxin",1.5)
|
||||
|
||||
/obj/item/weapon/storage/fancy/rollingpapers
|
||||
name = "rolling paper pack"
|
||||
|
||||
@@ -117,8 +117,7 @@
|
||||
|
||||
if(user.a_intent == "harm")
|
||||
..()
|
||||
|
||||
if(!status)
|
||||
else if(!status)
|
||||
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -69,10 +69,11 @@
|
||||
|
||||
// check for TK users
|
||||
|
||||
if (istype(usr, /mob/living/carbon/human))
|
||||
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
if(TK in H.mutations)
|
||||
is_in_use = 1
|
||||
src.attack_hand(usr)
|
||||
in_use = is_in_use
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
/obj/structure/closet/proc/can_close()
|
||||
for(var/obj/structure/closet/closet in get_turf(src))
|
||||
if(closet != src)
|
||||
if(closet != src && !closet.wall_mounted)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] destroys the [src].</span>")
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
@@ -337,3 +338,5 @@
|
||||
visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>")
|
||||
user << "<span class='notice'>You successfully break out of [src]!</span>"
|
||||
open()
|
||||
else
|
||||
user << "<span class='warning'>You fail to break out of [src]!</span>"
|
||||
|
||||
@@ -8,20 +8,21 @@
|
||||
icon_opened = "fireaxe1100"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
|
||||
opened = 1
|
||||
var/hitstaken = 0
|
||||
locked = 1
|
||||
var/smashed = 0
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
|
||||
var/hasaxe = 0 //gonna come in handy later~
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
|
||||
if (isrobot(usr) || src.locked)
|
||||
if (isrobot(user) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "<span class = 'caution'> Resetting circuitry...</span>"
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
@@ -40,6 +41,7 @@
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user.do_attack_animation(src)
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "<span class = 'warning'> The cabinet's protective glass glances off the hit.</span>"
|
||||
|
||||
@@ -335,7 +335,7 @@ obj/structure/door_assembly/New()
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter the name for the door.", src.name, src.created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -204,18 +204,17 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(30))
|
||||
if (prob(70))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
if (prob(15))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/girder/displaced
|
||||
@@ -230,6 +229,25 @@
|
||||
state = 2
|
||||
girderpasschance = 0
|
||||
|
||||
/obj/structure/girder/reinforced/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(30))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/cultgirder
|
||||
icon= 'icons/obj/cult.dmi'
|
||||
icon_state= "cultgirder"
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
explosion_resistance = 5
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
var/obj/item/stack/rods/stored
|
||||
|
||||
/obj/structure/grille/New()
|
||||
stored = new/obj/item/stack/rods(src)
|
||||
stored.amount = 2
|
||||
|
||||
/obj/structure/grille/ex_act(severity)
|
||||
qdel(src)
|
||||
@@ -25,8 +30,9 @@
|
||||
/obj/structure/grille/attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
/obj/structure/grille/attack_hand(mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
|
||||
"<span class='warning'>You hit [src].</span>", \
|
||||
@@ -40,7 +46,8 @@
|
||||
health -= rand(1,2)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/user as mob)
|
||||
/obj/structure/grille/attack_alien(mob/living/user as mob)
|
||||
user.do_attack_animation(src)
|
||||
if(istype(user, /mob/living/carbon/alien/larva)) return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
@@ -55,6 +62,7 @@
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/living/carbon/slime/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(!user.is_adult) return
|
||||
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
@@ -69,7 +77,7 @@
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
|
||||
M.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='warning'>You smash against [src].</span>", \
|
||||
@@ -99,17 +107,27 @@
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/grille/Deconstruct()
|
||||
transfer_fingerprints_to(stored)
|
||||
var/turf/T = loc
|
||||
stored.loc = T
|
||||
..()
|
||||
|
||||
/obj/structure/grille/proc/Break()
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
destroyed = 1
|
||||
stored.amount = 1
|
||||
var/obj/item/stack/rods/newrods = new(loc)
|
||||
transfer_fingerprints_to(newrods)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
var/obj/item/stack/rods/newrods = new(loc)
|
||||
transfer_fingerprints_to(newrods)
|
||||
if(!destroyed)
|
||||
newrods.amount = 2
|
||||
qdel(src)
|
||||
Deconstruct()
|
||||
else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
@@ -198,16 +216,10 @@
|
||||
/obj/structure/grille/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
if(!destroyed)
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
destroyed = 1
|
||||
var/obj/item/stack/rods/newrods = new(loc)
|
||||
transfer_fingerprints_to(newrods)
|
||||
|
||||
Break()
|
||||
else
|
||||
if(health <= -6)
|
||||
qdel(src)
|
||||
return
|
||||
Deconstruct()
|
||||
return
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
@@ -250,4 +262,4 @@
|
||||
tforce = I.throwforce - 5
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
health = max(0, health - tforce)
|
||||
healthcheck()
|
||||
healthcheck()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user