first port

This commit is contained in:
Timothy Teakettle
2020-06-10 20:33:01 +01:00
parent 6ae46d6e44
commit 95b8cd3956
34 changed files with 801 additions and 118 deletions
+46
View File
@@ -0,0 +1,46 @@
/datum/round_event_control/wizard/embedpocalypse
name = "Make Everything Embeddable"
weight = 2
typepath = /datum/round_event/wizard/embedpocalypse
max_occurrences = 1
earliest_start = 0 MINUTES
/datum/round_event/wizard/embedpocalypse/start()
for(var/obj/item/I in world)
CHECK_TICK
if(!(I.flags_1 & INITIALIZED_1))
continue
if(!I.embedding || I.embedding == EMBED_HARMLESS)
I.embedding = EMBED_POINTY
I.AddElement(/datum/element/embed, I.embedding)
I.name = "pointy [I.name]"
GLOB.embedpocalypse = TRUE
GLOB.stickpocalypse = FALSE // embedpocalypse takes precedence over stickpocalypse
/datum/round_event_control/wizard/embedpocalypse/sticky
name = "Make Everything Sticky"
weight = 6
typepath = /datum/round_event/wizard/embedpocalypse/sticky
max_occurrences = 1
earliest_start = 0 MINUTES
/datum/round_event_control/wizard/embedpocalypse/sticky/canSpawnEvent(players_amt, gamemode)
if(GLOB.embedpocalypse)
return FALSE
/datum/round_event/wizard/embedpocalypse/sticky/start()
for(var/obj/item/I in world)
CHECK_TICK
if(!(I.flags_1 & INITIALIZED_1))
continue
if(!I.embedding)
I.embedding = EMBED_HARMLESS
I.AddElement(/datum/element/embed, I.embedding)
I.name = "sticky [I.name]"
GLOB.stickpocalypse = TRUE
+3 -1
View File
@@ -94,7 +94,9 @@
//We want an accurate reading of .len
listclearnulls(BP.embedded_objects)
temp_bleed += 0.5 * BP.embedded_objects.len
for(var/obj/item/embeddies in BP.embedded_objects)
if(!embeddies.is_embed_harmless())
temp_bleed += 0.5
if(brutedamage >= 20)
temp_bleed += (brutedamage * 0.013)
@@ -159,7 +159,10 @@
disabled += BP
missing -= BP.body_zone
for(var/obj/item/I in BP.embedded_objects)
msg += "<B>[t_He] [t_has] \a [icon2html(I, user)] [I] embedded in [t_his] [BP.name]!</B>\n"
if(I.is_embed_harmless())
msg += "<B>[t_He] [t_has] \a [icon2html(I, user)] [I] stuck to [t_his] [BP.name]!</B>\n"
else
msg += "<B>[t_He] [t_has] \a [icon2html(I, user)] [I] embedded in [t_his] [BP.name]!</B>\n"
for(var/X in disabled)
var/obj/item/bodypart/BP = X
+1 -16
View File
@@ -220,22 +220,7 @@
var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects
if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore
return
var/time_taken = I.embedding.embedded_unsafe_removal_time/I.w_class //Citadel Change from * to /
usr.visible_message("<span class='warning'>[usr] attempts to remove [I] from [usr.p_their()] [L.name].</span>","<span class='notice'>You attempt to remove [I] from your [L.name]... (It will take [DisplayTimeText(time_taken)].)</span>")
if(do_after(usr, time_taken, needhand = 1, target = src))
remove_embedded_unsafe(L, I, usr)
/* CITADEL EDIT: remove_embedded_unsafe replaces this code
if(!I || !L || I.loc != src || !(I in L.embedded_objects))
return
L.embedded_objects -= I
L.receive_damage(I.embedding.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus.
I.forceMove(get_turf(src))
usr.put_in_hands(I)
usr.emote("scream")
usr.visible_message("[usr] successfully rips [I] out of [usr.p_their()] [L.name]!","<span class='notice'>You successfully remove [I] from your [L.name].</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
SEND_SIGNAL(usr, COMSIG_CLEAR_MOOD_EVENT, "embedded") */
SEND_SIGNAL(src, COMSIG_HUMAN_EMBED_RIP, I, L)
return
if(href_list["item"])
@@ -620,7 +620,10 @@
to_send += "\t <span class='[no_damage ? "notice" : "warning"]'>Your [LB.name] [HAS_TRAIT(src, TRAIT_SELF_AWARE) ? "has" : "is"] [status].</span>\n"
for(var/obj/item/I in LB.embedded_objects)
to_send += "\t <a href='?src=[REF(src)];embedded_object=[REF(I)];embedded_limb=[REF(LB)]' class='warning'>There is \a [I] embedded in your [LB.name]!</a>\n"
if(I.is_embed_harmless())
to_chat(src, "\t <a href='?src=[REF(src)];embedded_object=[REF(I)];embedded_limb=[REF(LB)]' class='warning'>There is \a [I] stuck to your [LB.name]!</a>")
else
to_chat(src, "\t <a href='?src=[REF(src)];embedded_object=[REF(I)];embedded_limb=[REF(LB)]' class='warning'>There is \a [I] embedded in your [LB.name]!</a>")
for(var/t in missing)
to_send += "<span class='boldannounce'>Your [parse_zone(t)] is missing!</span>\n"
@@ -35,10 +35,6 @@
//heart attack stuff
handle_heart()
if(stat != DEAD)
//Stuff jammed in your limbs hurts
handle_embedded_objects()
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
@@ -303,25 +299,6 @@
return TRUE
return ..()
/mob/living/carbon/human/proc/handle_embedded_objects()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
for(var/obj/item/I in BP.embedded_objects)
if(prob(I.embedding.embedded_pain_chance))
BP.receive_damage(I.w_class*I.embedding.embedded_pain_multiplier)
to_chat(src, "<span class='userdanger'>[I] embedded in your [BP.name] hurts!</span>")
if(prob(I.embedding.embedded_fall_chance))
BP.receive_damage(I.w_class*I.embedding.embedded_fall_pain_multiplier)
BP.embedded_objects -= I
I.forceMove(drop_location())
I.unembedded()
visible_message("<span class='danger'>[I] falls out of [name]'s [BP.name]!</span>","<span class='userdanger'>[I] falls out of your [BP.name]!</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "embedded")
/mob/living/carbon/human/proc/handle_active_genes()
if(HAS_TRAIT(src, TRAIT_MUTATION_STASIS))
return
+5 -2
View File
@@ -124,9 +124,12 @@
return TRUE
var/dtype = BRUTE
var/volume = I.get_volume_by_throwforce_and_or_w_class()
SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, impacting_zone)
dtype = I.damtype
var/nosell_hit = SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, zone, throwingdatum) // TODO: find a better way to handle hitpush and skipcatch for humans
if(nosell_hit)
skipcatch = TRUE
hitpush = FALSE
dtype = I.damtype
if (I.throwforce > 0) //If the weapon's throwforce is greater than zero...
if (I.throwhitsound) //...and throwhitsound is defined...
playsound(loc, I.throwhitsound, volume, 1, -1) //...play the weapon's throwhitsound.
@@ -15,4 +15,4 @@
/obj/item/throwing_star/ninja
name = "ninja throwing star"
throwforce = 30
embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 100, "embedded_fall_chance" = 0)
embedding = list("pain_mult" = 6, "embed_chance" = 100, "fall_chance" = 0)
+7
View File
@@ -27,6 +27,7 @@
var/colour = "black" //what colour the ink is!
var/degrees = 0
var/font = PEN_FONT
embedding = list()
/obj/item/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit sudoku...</span>")
@@ -41,6 +42,7 @@
desc = "It's a normal red ink pen."
icon_state = "pen_red"
colour = "red"
throw_speed = 4 // red ones go faster (in this case, fast enough to embed!)
/obj/item/pen/invisible
desc = "It's an invisible pen marker."
@@ -56,8 +58,10 @@
switch(colour)
if("black")
colour = "red"
throw_speed++
if("red")
colour = "green"
throw_speed = initial(throw_speed)
if("green")
colour = "blue"
else
@@ -178,6 +182,7 @@
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") //these wont show up if the pen is off
sharpness = IS_SHARP
var/on = FALSE
var/embedding = list(embed_chance = EMBED_CHANCE)
/obj/item/pen/edagger/ComponentInitialize()
. = ..()
@@ -198,6 +203,7 @@
throwforce = initial(throwforce)
playsound(user, 'sound/weapons/saberoff.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] can now be concealed.</span>")
RemoveElement(/datum/element/embed, embedding)
else
on = TRUE
force = 18
@@ -208,6 +214,7 @@
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
AddElement(/datum/element/embed, embedding)
update_icon()
/obj/item/pen/edagger/update_icon_state()
+32 -1
View File
@@ -760,4 +760,35 @@
materials = list(/datum/material/iron = 1000)
build_path = /obj/item/tank/internals/emergency_oxygen/engi/empty
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
/////////////////////////////////////////
/////////////////Tape////////////////////
/////////////////////////////////////////
/datum/design/sticky_tape
name = "Sticky Tape"
id = "sticky_tape"
build_type = PROTOLATHE
materials = list(/datum/material/plastic = 500)
build_path = /obj/item/stack/sticky_tape
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
/datum/design/super_sticky_tape
name = "Super Sticky Tape"
id = "super_sticky_tape"
build_type = PROTOLATHE
materials = list(/datum/material/plastic = 3000)
build_path = /obj/item/stack/sticky_tape/super
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
/datum/design/pointy_tape
name = "Pointy Tape"
id = "pointy_tape"
build_type = PROTOLATHE
materials = list(/datum/material/iron = 1500, /datum/material/plastic = 1000)
build_path = /obj/item/stack/sticky_tape/pointy
category = list("Equipment")
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
@@ -66,3 +66,28 @@
design_ids = list("air_horn", "honker_main", "honker_peri", "honker_targ", "honk_chassis", "honk_head", "honk_torso", "honk_left_arm", "honk_right_arm",
"honk_left_leg", "honk_right_leg", "mech_banana_mortar", "mech_mousetrap_mortar", "mech_honker", "mech_punching_face", "implant_trombone", "borg_transform_clown")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
////////////////////////Tape tech////////////////////////////
/datum/techweb_node/sticky_basic
id = "sticky_basic"
display_name = "Basic Sticky Technology"
description = "The only thing left to do after researching this tech is to start printing out a bunch of 'kick me' signs."
prereq_ids = list("base")
design_ids = list("sticky_tape")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 2500
hidden = TRUE
experimental = TRUE
// Can be researched after getting the basic sticky technology from the BEPIS major reward
/datum/techweb_node/sticky_advanced
id = "sticky_advanced"
display_name = "Advanced Sticky Technology"
description = "Taking a good joke too far? Nonsense!"
prereq_ids = list("sticky_basic")
design_ids = list("super_sticky_tape", "pointy_tape")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
export_price = 2500
hidden = TRUE
+3 -1
View File
@@ -166,11 +166,13 @@
clear_alert("embeddedobject")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "embedded")
/mob/living/carbon/proc/has_embedded_objects()
/mob/living/carbon/proc/has_embedded_objects(include_harmless=FALSE)
. = 0
for(var/X in bodyparts)
var/obj/item/bodypart/L = X
for(var/obj/item/I in L.embedded_objects)
if(!include_harmless && I.is_embed_harmless())
continue
return 1
@@ -23,12 +23,7 @@
var/objects = 0
for(var/obj/item/I in L.embedded_objects)
objects++
I.forceMove(get_turf(H))
L.embedded_objects -= I
I.unembedded()
if(!H.has_embedded_objects())
H.clear_alert("embeddedobject")
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "embedded")
SEND_SIGNAL(H, COMSIG_HUMAN_EMBED_REMOVAL, I, L)
if(objects > 0)
display_results(user, target, "<span class='notice'>You successfully remove [objects] objects from [H]'s [L.name].</span>",